[ome-users] [OME] #12420: Bug: MIPAV importer plugin broken due to model changes

Curtis Rueden ctrueden at wisc.edu
Sat Jun 28 13:51:45 BST 2014


Hi Pascal,

> But with respect to Zeiss czi stacks, the importer throws an error
> message that “An I/O error occurred reading the file: Import data
> error: bounds incorrect”. So I guess, as already pointed out by Roger,
> the code has some additional problems.

The plan we discussed a couple of years ago with the MIPAV team was for
them to adopt the plugin upstream as part of MIPAV. We did some work [1] to
make it possible.

But I guess it never panned out. If you are interested in seeing that
happen you could write a mail to the MIPAV mailing list [2].

Regards,
Curtis

[1] https://github.com/openmicroscopy/bioformats/pull/64
[2] http://mipav.cit.nih.gov/pubwiki/index.php/MIPAV_mailing_list


On Fri, Jun 27, 2014 at 10:14 PM, Dr. Pascal Detampel <pdetampe at ucalgary.ca>
wrote:

> Just in case somebody runs into the same issue.
> With the help of Roger, and some digging in the corresponding classes, I
> got it to work again.
>
> Next to replacing getDimensions to getPixels, dropping the index, and
> changing the object type to PositiveFloat (thanks Roger), I had to call the
> method *.getValue() instead of *.floatValue() and change the type from
> float to double in the lines below. Only the object "dimTimeInc” should be
> Double and the elements of the array “res” (a few lines below) have to be
> casted (float). In addition, the object type PositiveFloat has to be
> imported at the top of the file (import
> ome.xml.model.primitives.PositiveFloat;).
>
> Except for the import statement at the top, my changes looked like the
> following:
>
> >          // harvest physical resolution
> >          PositiveFloat dimPhysSizeX = store.getPixelsPhysicalSizeX(0);
> >          PositiveFloat dimPhysSizeY = store.getPixelsPhysicalSizeY(0);
> >          PositiveFloat dimPhysSizeZ = store.getPixelsPhysicalSizeZ(0);
> >          Double dimTimeInc = store.getPixelsTimeIncrement(0);
> >          double physSizeX = dimPhysSizeX == null ?
> >            1.0f : dimPhysSizeX.getValue();
> >          double physSizeY = dimPhysSizeY == null ?
> >            1.0f : dimPhysSizeY.getValue();
> >          double physSizeZ = dimPhysSizeZ == null ?
> >            1.0f : dimPhysSizeZ.getValue();
> >          float timeInc = dimTimeInc == null ? 1.0f :
> dimTimeInc.floatValue();
> >
> >          // compute dimensional extents
> >          int[] dimExtents = {sizeX, sizeY, sizeZ, sizeT};
> >          float[] res = {(float) physSizeX, (float) physSizeY, (float)
> physSizeZ, timeInc};
> >          int[] units = {
> >            FileInfoBase.MICROMETERS, FileInfoBase.MICROMETERS,
> >            FileInfoBase.MICROMETERS, FileInfoBase.SECONDS
> >          };
>
> Maybe there is an more elegant way, but at least it compiles again and
> Mipav shows the BioFormatsImporter under Plugins.
> But with respect to Zeiss czi stacks, the importer throws an error message
> that “An I/O error occurred reading the file: Import data error: bounds
> incorrect”.
> So I guess, as already pointed out by Roger, the code has some additional
> problems.
>
> Thanks,
> Pascal
>
>
> On Jun 27, 2014, at 7:42 AM, OME <trac at cvs.openmicroscopy.org.uk> wrote:
>
> > #12420: Bug: MIPAV importer plugin broken due to model changes
> >
> ------------------------------+---------------------------------------------
> >      Reporter:  rleigh       |        Owner:  mlinkert
> >          Type:  task         |       Status:  new
> >      Priority:  minor        |    Milestone:  Unscheduled
> >     Component:  Bio-Formats  |      Version:  5.0.2
> >    Resolution:               |     Keywords:
> > Remaining Time:               |       Sprint:
> >     Resources:               |   References:
> > Referenced By:               |
> >
> ------------------------------+---------------------------------------------
> > PlugInBioFormatsImporter.java will not compile:
> >
> > {{{
> > labtop:plugins pascal$ javac -cp
> > /Applications/mipav:/Applications/mipav/bioformats_package.jar
> > PlugInBioFormatsImporter.java
> >
> > PlugInBioFormatsImporter.java:201: cannot find symbol
> > symbol  : method getDimensionsPhysicalSizeX(int,int)
> > location: interface loci.formats.meta.IMetadata
> >           Float dimPhysSizeX = store.getDimensionsPhysicalSizeX(0, 0);
> >
> > PlugInBioFormatsImporter.java:202: cannot find symbol
> > symbol  : method getDimensionsPhysicalSizeY(int,int)
> > location: interface loci.formats.meta.IMetadata
> >           Float dimPhysSizeY = store.getDimensionsPhysicalSizeY(0, 0);
> >
> > PlugInBioFormatsImporter.java:203: cannot find symbol
> > symbol  : method getDimensionsPhysicalSizeZ(int,int)
> > location: interface loci.formats.meta.IMetadata
> >           Float dimPhysSizeZ = store.getDimensionsPhysicalSizeZ(0, 0);
> >
> > PlugInBioFormatsImporter.java:204: cannot find symbol
> > symbol  : method getDimensionsTimeIncrement(int,int)
> > location: interface loci.formats.meta.IMetadata
> >           Float dimTimeInc = store.getDimensionsTimeIncrement(0, 0);
> >
> > 4 errors
> > }}}
> >
> > The method calls in question were removed from the OME data model in
> 2010,
> > and so it has been non-functional for some time.
> >
> > Fixing the above error is simple (change getDimensions to getPixels and
> > drop the pixel index).  However, there may be additional problems with
> the
> > code.
> >
> > Ideally, there should be a maven pom to allow this to be added to our
> > regular CI infrastructure to pick up any future breakage.
> >
> > --
> > Ticket URL: <http://trac.openmicroscopy.org.uk/ome/ticket/12420>
> > OME <http://www.openmicroscopy.org/>
> > OME Project
>
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20140628/15c9ef92/attachment.html>


More information about the ome-users mailing list