Closed boazmohar closed 3 years ago
Hey! Thanks for the bug report! Hopefully we can fix it soon.
By CziFile
you mean Gohlke's CziFile library? (we have a CziFile object in our reader which is why I need the clarification)
And yes please share the file if you can.
Also, just wanted to say that I see you are using chunk_by_dims
, we changed that to just chunk_dims
in 4.0.
Ignore my last statement. I see that CziReader
still uses chunk_by_dims
Thanks for the smaller test file. We have had problems with light sheet images before... https://github.com/AllenCellModeling/aicspylibczi/issues/81
I will try to put some time at this tonight or Thursday night.
@JacksonMaxfield Thanks! I read up on the issue you linked and I wanted to clarify that my data doesn't have "raw" and "deskewed" as it is not from the Lattice microscope (I think I only have "raw").
Small update. Seems this issue is down at the aicspylibczi
level (our library for reading CZI files) which means it's likely somewhere in the C++ code.
Hi @JacksonMaxfield, thanks for the update. Would you like me to open an issue there?
Boaz
Nope no worries. I will simply transfer this issue over to that repo if needed but leaving it here until next dev meeting which will be on Monday.
A couple of updates.
Sorry for the long process.
I'm starting to take a look today. Will see how far I get.
Here are my findings after digging into aicspylibczi and libCZI for a day. I'm using the smaller Overview.czi file to test.
One question I would have is: how was the image generated? Are we seeing an image literally as it came off the microscope and/or has it been edited in any way? I'm not sure if the inconsistent offsets I see in the file data are allowed and reasonable, or if there is some other bug happening way upstream of all this.
@sebi06 I wonder if you might have some insight into this.
The one line change is in libCZI/Src/libCZI/CZIParse.cpp, line 252: https://github.com/zeiss-microscopy/libCZI/blob/master/Src/libCZI/CziParse.cpp#L252 I add:
offset = subBlckSegment.data.entryDV.FilePosition;
which overrides the given offset with the filePosition contained in the variable length subblock directory entry.
@toloudis Thank for looking into this! I can only add as to the generation of the data which is right off the microscope (Zeiss Z1 lightsheet). No edits were made. If there is a complied version of this change that I can pull, I can test it with other files I generated off the same microscope.
I need to point out that LightSheet Z1 is still running the old ZEN Black SW. I would not create any big changes bases on such CZI image files.
Ideally they work as well but I would rather only test against CZI from ZEN Blue.
The overview.czi was acquired by me a while ago, but I cannot rember anymore, if I did some postprocessing like stitching etc.
But I can provide fresh CZI (using the latest software version) at any time. Those should be the reference.
What would you need?
The PR https://github.com/ptahmose/libCZI/pull/1 should fix the issue discussed here. Note that the fix is applied to this repository (in the branch 'wolframlink') only at this point in time. Hope this fixes the problem, and thanks for the analysis.
@ptahmose @pthamose @JuergenBohl Thank you for this fast fix! We have a compile error because of mismatched types in the call to max
which I patched like this:
https://github.com/AllenCellModeling/libCZI/commit/2a8fdeb2f38d4bfae287b3987883118ab2b05938
This was marked as resolved but will not be actually fixed until we push a new version. Which will be shortly!
This should now be resolved. Can upgrade and use with pip install --upgrade
or pip install aicspylibczi==3.0.2
System and Software
Description
Corrupted few columns of czi data.
Expected Behavior
Loading it with CziFile or native software shows there is no corruption in the raw data
Reproduction
Environment
aicspylibczi-3.0.1
I can upload the file to dropbox but it is 64Gb (lmk). Thanks!