Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of Zeiss CZI fixes #1078

Merged
merged 22 commits into from
May 16, 2014
Merged

Lots of Zeiss CZI fixes #1078

merged 22 commits into from
May 16, 2014

Conversation

melissalinkert
Copy link
Member

See http://trac.openmicroscopy.org.uk/ome/query?status=accepted&status=closed&status=new&status=reopened&keywords=~czi&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority.

All tickets listed there should be resolved; the relevant files from each ticket will need to be imported and/or opened in ImageJ to verify that the import succeeds, images look correct, ROI data is correct (where applicable to the ticket), and that the generated OME-XML is valid. Most likely this will need multiple pairs of eyes, as having one person do all of the imports and validation may be burdensome.

See also the Trello card (https://trello.com/c/N6Wxa2UX/39-czi-bugs-5-0-2-blockers), which has a draft for announcing this to the community ahead of 5.0.2.

/cc @bramalingam, @emilroz (since you've both previously reported issues with this data)

This is mostly to assist in debugging issues with very large files.
The stored Y coordinate is the actual Y coordinate; it doesn't need to
be subtracted from the image height.

Fixes ticket #11367.
This uses the stored tile row/column instead of assuming that tiles were
acquired in comb mode.  It also prevents tiles from being copied to the
wrong row when the image width is greater than the sum of the tile widths.

Fixes #11784.
The channel count and interleaved values were previously set
incorrectly; openBytes also did not account for the fact that RGB images
are stored in BGR order.

Fixes #11233.
These are really just packed pixels; 12 bits are stored for 16-bit (12
valid bit) data.  Some transposing needs to occur type 504, though it's
not completely clear to me why.

Fixes #11204, fixes #9398.
Also updates the relevant test to check for the new behavior.

Fixes #12189.
This lets us set a buffer size for a specific stream/handle, instead of
calling the static setDefaultBufferSize method in NIOFileHandle.
We have to do a lot of seeking and opening new streams to read a small
number of bytes; the only place where large chunks of bytes are read is
when the pixel data is processed.  This should speed up setId times, as
we're not attempting to buffer 1MB every time a new stream is opened
(potentially millions of times for very large datasets).
...instead of throwing an exception.  Many of the camera-dependent
encoding types are just raw data, and were correctly handled previously.
The same values are stored elsewhere, and for very large datasets there
can be potentially tens of thousands of DisplaySetting entries.
@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-5.0-merge-daily#650. See the console output for more details.

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-5.0-merge-daily#651. See the console output for more details.

@melissalinkert
Copy link
Member Author

gh-1018 had an erroneous .czi-related commit which conflicted with this, and has now been removed.

@pwalczysko
Copy link
Member

Re: http://trac.openmicroscopy.org.uk/ome/ticket/11367 (the ROI ticket):
See screenshots below, principally works fine. Tested in ImageJ using bioformats_package.jar. Using my old bioformats_package.jar to repeat the bug (without this PR) and a bioformats_package.jar from my target/components/bioformats local build (after ./build.py release-clients was run) for the version with this PR in. ImageJ test fully passed.

Questions:

  • Not sure how to test with Fiji, problem with updating the bioformats_package.jar - do not think the changes from this PR would be in though in any case, would they ?
  • @jburel @rleigh-dundee @melissalinkert We do not display these regions in OMERO at all - imported to my local server with this PR merged in using Insight (see last screenshot).

Pre-upgrade ImageJ (this PR not in)

imagej prior to update

ImageJ with the bioformats_package.jar with this PR in:

imagej with bioformats_packagejar from localbuild

Insight (with this PR in)

insight - no regions

@pwalczysko
Copy link
Member

Re: http://trac.openmicroscopy.org.uk/ome/ticket/12124
This seems more or less the same as the #1078 (comment) - testing it with the same file, as I do not have any other zen files with ROIs.

Test passes in ImageJ. (see #1078 (comment) - the questions there are the same).

Oritinal xml

original xml file

In Fiji without this PR
without the pr from fiji

In ImageJ with this PR
with this pr from imagej

@pwalczysko
Copy link
Member

Note: Nr. 2 and the last one in this list http://trac.openmicroscopy.org.uk/ome/query?status=accepted&status=closed&status=new&status=reopened&keywords=%7Eczi&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority will be done by Balaji.

Note: check the list on Trello card to see what is done already - tick off as you are progressing.

@pwalczysko
Copy link
Member

Re: http://trac.openmicroscopy.org.uk/ome/ticket/11204. Compared in Insight on Gretzky (merge, with this PR in) and Nightshade, with the Insight from "latest" (this PR not in). When the QA 7405 image was imported on Gretzky, there were structures visible. On Nightshade, the image (multi-z, all planes) was black.

This seems to work fine.

@pwalczysko
Copy link
Member

Re: http://trac.openmicroscopy.org.uk/ome/ticket/11233. Imported to Gretzky as user-1, Project czi testing 11233, ID 40813. This is with this PR in. The image looks like it should comparing to the png submitted with it (also imported in the same Project). Compare with Nightshade and "latest" Insight - one image looks black (without this PR). There is one black image. Also imported the 7601 QA and the corresponding images from @rleigh-dundee 's team folder - all look fine.

Nevertherless the 7891 QA image from Apache is not okay - it says "not a valid image in Insight" - see gretzky, user-1 - Project as above, ID 40869

The last problem (the line above, 7891 QA) is resolved - it was just building pyramids probably. Now it displays fine.

This seems to work fine then.

@pwalczysko
Copy link
Member

@bramalingam @rleigh-dundee @joshmoore : We had a discussion regarding testing of http://trac.openmicroscopy.org.uk/ome/ticket/12189 - the one with ~760 G of data to import. @joshmoore suggested that the solution would be an inplace import to gretzky, but @manics is telling me such an in-place is not possible as squig is not mounted on gretzky. @joshmoore ?

@bramalingam
Copy link
Member

Hi Petr,

Had a discussion with Melissa on this regard. The server side operations of bio-formats should not affect this dataset.
The correction is at the level of importContainers. So hopefully we can test this on dogfish itself.

Best,
Balaji


Mr Balaji Ramalingam

Software Developer

OME Team

College of Life Sciences

University of Dundee

From: pwalczysko <notifications@github.commailto:notifications@github.com>
Reply-To: openmicroscopy/bioformats <reply@reply.github.commailto:reply@reply.github.com>
Date: Wednesday, 7 May 2014 14:16
To: openmicroscopy/bioformats <bioformats@noreply.github.commailto:bioformats@noreply.github.com>
Cc: Balaji Ramalingam <b.ramalingam@dundee.ac.ukmailto:b.ramalingam@dundee.ac.uk>
Subject: Re: [bioformats] Lots of Zeiss CZI fixes (#1078)

@bramalingamhttps://github.com/bramalingam@rleigh-dundeehttps://github.com/rleigh-dundee@joshmoorehttps://github.com/joshmoore : We had a discussion regarding testing of http://trac.openmicroscopy.org.uk/ome/ticket/12189 - the one with ~760 G of data to import. @joshmoorehttps://github.com/joshmoore suggested that the solution would be an inplace import to gretzky, but @manicshttps://github.com/manics is telling me such an in-place is not possible as squig is not mounted on gretzky. @joshmoorehttps://github.com/joshmoore ?

Reply to this email directly or view it on GitHubhttps://github.com//pull/1078#issuecomment-42425060.

The University of Dundee is a registered Scottish Charity, No: SC015096

@pwalczysko
Copy link
Member

@bramalingam : Okay, I will leave this with you then, thanks.

@pwalczysko
Copy link
Member

@rleigh-dundee is dealing with http://trac.openmicroscopy.org.uk/ome/ticket/11784, waiting for pyramid generation atm (user-4/czi)

@ghost
Copy link

ghost commented May 7, 2014

11784 looks fine here.

@pwalczysko
Copy link
Member

Also checked http://trac.openmicroscopy.org.uk/ome/ticket/9398. This works fine (was black on nightshade without this PR, is identical with the "export" image on gretzky with this PR. Adding to Trello and ticking off.

@ghost
Copy link

ghost commented May 7, 2014

For trac 11166:

ZeissCZIReader initializing /ome/data_repo/from_skyking/zeiss-czi/zeiss/zen-2012/VivaTome/Mouse_kidney_VivaTome-1chTZ.czi
Unknown IlluminationType value 'Fluorescence' will be stored as "Other"
Unknown Immersion value 'Unknown' will be stored as "Other"
ome.xml.model.Channel@1e6e49a4 reference to null missing from object hierarchy.

and RefractiveIndex* are still NaNs. It's like that in the original metadata, but is that a computed value or actually what it is in the CZI? The Channel warning looks like a bug though.

BPAE-cells_mitosis_3chZ(WF).czi is OK.

@melissalinkert
Copy link
Member Author

I thought I had noted it in the ticket, but for ticket 11166, NaN really is what is stored for the RefractiveIndex (almost all metadata values are parsed from blocks of not-quite-OME-XML). The Channel warning should be safe to ignore assuming there are no OME-XML validation errors, and that the file successfully imports into OMERO.

@bramalingam
Copy link
Member

http://trac.openmicroscopy.org.uk/ome/ticket/12189

The grouping error still seems to persist,
Bioformats and server details,

OMERO Version: 5.0.1-rc1-ice33-b20
Bioformats version: 5.0.1-DEV revision: d25a180 date: 7 May 2014

Import Client : Matlab based Inplace import..

Stack trace while pointing at the top directory,

FILE_EXCEPTION: /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(1).czi
java.lang.IllegalArgumentException: Invalid T index: 1/1
at loci.formats.FormatTools.getIndex(FormatTools.java:372)
at loci.formats.FormatTools.getIndex(FormatTools.java:317)
at loci.formats.FormatReader.getIndex(FormatReader.java:1051)
at loci.formats.in.ZeissCZIReader.assignPlaneIndices(ZeissCZIReader.java:1140)
at loci.formats.in.ZeissCZIReader.initFile(ZeissCZIReader.java:723)
at loci.formats.FormatReader.setId(FormatReader.java:1315)
at loci.formats.ImageReader.setId(ImageReader.java:753)
at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:569)
at loci.formats.ChannelFiller.setId(ChannelFiller.java:259)
at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:569)
at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:270)
at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:569)
at loci.formats.Memoizer.setId(Memoizer.java:467)
at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:569)
at ome.formats.importer.ImportCandidates.singleFile(ImportCandidates.java:414)
at ome.formats.importer.ImportCandidates.handleFile(ImportCandidates.java:595)
at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:367)
at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:364)
at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:335)
at ome.formats.importer.ImportCandidates.execute(ImportCandidates.java:368)
at ome.formats.importer.ImportCandidates.(ImportCandidates.java:229)
Location.mapFile: embedded-stream.raw -> null
skipping memo: no directory given
ZeissCZIReader initializing /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(100).czi
ZeissCZIReader initializing /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(100).czi
loci.formats.in.ZeissCZIReader.initFile(/ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(100).czi)
Unknown AcquisitionMode value 'SPIM' will be stored as "Other"
Expected positive value for CutIn; got 0
Expected positive value for CutOut; got 0
start[1399549305743] time[773] tag[loci.formats.Memoizer.setId]
Location.mapFile: embedded-stream.raw -> null

The importer continues to read every individual file within the folder, which was previously the case as well, and if allowed to continue imports every individual file within the folder separately (T grouping == not right).

@melissalinkert
Copy link
Member Author

Last two commits should help with the file grouping. If the grouping is still wrong with the current state of this branch, then could you please point me at the Matlab client being used?

@melissalinkert
Copy link
Member Author

Was there anything left here besides the file grouping issue noticed by @bramalingam?

@ghost
Copy link

ghost commented May 12, 2014

Not that I can tell.

@bramalingam
Copy link
Member

The T grouping was the only issue. Dint notice anything else.

@pwalczysko
Copy link
Member

I think the issues dealt with by @bramalingam were the last outstanding here, see https://trello.com/c/N6Wxa2UX/39-czi-bugs-5-0-2-blockers

@bramalingam
Copy link
Member

OMERO Version: 5.0.1-969-10a1148-ice33-b658
Bioformats version: 5.0.1-DEV revision: 4876596 date: 13 May 2014
Attempting initial SSL connection to demo.openmicroscopy.org:4064
Server: 5.0.1
Client: 5.0.1-969-10a1148-ice33-b658
Java Version: 1.7.0_11
OS Name: Linux
OS Arch: amd64
OS Version: 2.6.32-431.3.1.el6.centos.plus.x86_64
Depth: 10 Metadata Level: MINIMUM
SCANNING: Depth:2 Num:  200 Tot:  n/a File: pf-46hpf(34).czi
SCANNING: Depth:2 Num:  300 Tot:  n/a File: f-46hpf(144).czi
SCANNING: Depth:2 Num:  400 Tot:  n/a File: f-46hpf(230).czi
SCANNING: Depth:2 Num:  500 Tot:  n/a File: hpf-46hpf(9).czi
SCANNING: Depth:0 Num:  534 Tot:  n/a File: sel/Charles/SPIM
Location.mapFile: embedded-stream.raw -> null
skipping memo: no directory given
Using mapped byte buffer? false
ZeissCZIReader initializing /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(1).czi
ZeissCZIReader initializing /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(1).czi
loci.formats.in.ZeissCZIReader.initFile(/ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(1).czi)
Loaded properties from: services.properties
Added interface interface loci.formats.services.POIService and implementation class loci.formats.services.POIServiceImpl
Added interface interface loci.formats.services.MDBService and implementation class loci.formats.services.MDBServiceImpl
Added interface interface loci.formats.services.JPEGTurboService and implementation class loci.formats.services.JPEGTurboServiceImpl
Added interface interface loci.formats.services.JAIIIOService and implementation class loci.formats.services.JAIIIOServiceImpl
Added interface interface loci.formats.services.WlzService and implementation class loci.formats.services.WlzServiceImpl
Added interface interface loci.formats.services.NetCDFService and implementation class loci.formats.services.NetCDFServiceImpl
Added interface interface loci.formats.services.MetakitService and implementation class loci.formats.services.MetakitServiceImpl
Added interface interface loci.formats.services.LuraWaveService and implementation class loci.formats.services.LuraWaveServiceImpl
Added interface interface loci.formats.services.OMEXMLService and implementation class loci.formats.services.OMEXMLServiceImpl
Unknown AcquisitionMode value 'SPIM' will be stored as "Other"
Expected positive value for CutIn; got 0
Expected positive value for CutOut; got 0
start[1399978190447] time[58255] tag[loci.formats.Memoizer.setId]
Location.mapFile: embedded-stream.raw -> null
FILE_EXCEPTION: /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(1).czi
java.lang.IllegalArgumentException: Invalid T index: 1/1
        at loci.formats.FormatTools.getIndex(FormatTools.java:372)
        at loci.formats.FormatTools.getIndex(FormatTools.java:317)
        at loci.formats.FormatReader.getIndex(FormatReader.java:1051)
        at loci.formats.in.ZeissCZIReader.assignPlaneIndices(ZeissCZIReader.java:1020)
        at loci.formats.in.ZeissCZIReader.initFile(ZeissCZIReader.java:615)
        at loci.formats.FormatReader.setId(FormatReader.java:1315)
        at loci.formats.ImageReader.setId(ImageReader.java:753)
        at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:569)
        at loci.formats.ChannelFiller.setId(ChannelFiller.java:259)
        at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:569)
        at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:270)
        at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:569)
        at loci.formats.Memoizer.setId(Memoizer.java:467)
        at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:569)
        at ome.formats.importer.ImportCandidates.singleFile(ImportCandidates.java:414)
        at ome.formats.importer.ImportCandidates.handleFile(ImportCandidates.java:595)
        at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:367)
        at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:364)
        at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:335)
        at ome.formats.importer.ImportCandidates.execute(ImportCandidates.java:368)
        at ome.formats.importer.ImportCandidates.<init>(ImportCandidates.java:229)
Location.mapFile: embedded-stream.raw -> null
skipping memo: no directory given
ZeissCZIReader initializing /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(100).czi
ZeissCZIReader initializing /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(100).czi
loci.formats.in.ZeissCZIReader.initFile(/ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(100).czi)
Unknown AcquisitionMode value 'SPIM' will be stored as "Other"
Expected positive value for CutIn; got 0
Expected positive value for CutOut; got 0
start[1399978248705] time[58817] tag[loci.formats.Memoizer.setId]
Location.mapFile: embedded-stream.raw -> null
Location.mapFile: embedded-stream.raw -> null
skipping memo: no directory given
ZeissCZIReader initializing /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(101).czi
ZeissCZIReader initializing /ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(101).czi
loci.formats.in.ZeissCZIReader.initFile(/ome/data_repo/from_Biozentrum_Basel/Charles/SPIM/large_timeseries_700GB/Image 17-24hpf-46hpf(101).czi)

@bramalingam
Copy link
Member

@melissalinkert : Still reading individual files?

Client version and bioformats version mentioned in the report. Allowing the upload to go through to check the output.

@bramalingam
Copy link
Member

More updates : Server not upgraded. Demo server being used to upload. Its the stable release : 5.0.1

@melissalinkert
Copy link
Member Author

The above shows 4876596 as being the Bio-Formats commit hash, which is the current snoopy/merge/dev_5_0/submodules, but that doesn't seem to include this PR at all (possibly due to Travis status when the merge build was running?). You will need to either build this by hand to test today, or wait for tomorrow's merge build.

@sbesson
Copy link
Member

sbesson commented May 13, 2014

As far as I can tell 5.0.1-969-10a1148-ice33-b658 is the build number for yesterday's merge build. Any of today's build should now include this PR.

@bramalingam
Copy link
Member

The omero_client was yesterdays build. Because the recent omero_client.jar (including Blazej's PR had some errors.

Error on import
Ice.ObjectNotExistException
   id.name = "bfd6c70f-dd44-4dd4-a12f-3f708f84e221-RepoRawFileStoreI"
   id.category = "8f1fb492-c307-41a4-90b0-13b4337b68c6"
   facet = ""
   operation = "save"
   at IceInternal.Outgoing.invoke(Outgoing.java:147)
   at omero.api._RawFileStoreDelM.save(_RawFileStoreDelM.java:167)
   at omero.api.RawFileStorePrxHelper.save(RawFileStorePrxHelper.java:252)
   at omero.api.RawFileStorePrxHelper.save(RawFileStorePrxHelper.java:224)
   at ome.formats.importer.transfers.TransferState.save(TransferState.java:113)
   at ome.formats.importer.transfers.AbstractFileTransfer.finish(AbstractFileTransfer.java:107)
   at ome.formats.importer.transfers.AbstractExecFileTransfer.transfer(AbstractExecFileTransfer.java:66)
   at ome.formats.importer.ImportLibrary.uploadFile(ImportLibrary.java:414)
   at ome.formats.importer.ImportLibrary.importImage(ImportLibrary.java:477)
   at ome.formats.importer.ImportLibrary.importCandidates(ImportLibrary.java:271)

So the omero_client.jar was yesterday's. The Bioformats_package.jar was today's.
Had a discussion with @joshmoore as well before trying the same.
Please correct me if am going wrong somewhere..

@melissalinkert
Copy link
Member Author

It's not clear to me what would cause that exception, though my suspicion is that it's not related to this PR. It sounds like you haven't been using true merge builds (i.e. jars have been copied/replaced), which we know can cause problems, so maybe the thing to do is to merge this and re-test with RC1 client and server? Any real blocker can be fixed in an emergency PR.

@joshmoore
Copy link
Member

With everyone away this afternoon, and the issues above being primarily deployment issues (that are fully my fault!), I'd say let's merge this and get bump the submodule. @bramalingam, if your testing shows any issues, please raise another 5.0.2 blocker (or re-open an existing one). Thanks all 💯 !

@joshmoore
Copy link
Member

Merging with visual thumbs up from @melissalinkert and @sbesson.

joshmoore added a commit that referenced this pull request May 16, 2014
@joshmoore joshmoore merged commit b0fb622 into ome:dev_5_0 May 16, 2014
@melissalinkert
Copy link
Member Author

--rebased-to #1138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants