Problems opening .czi files

fiji
stitching
imagej
czi

#1

Hey!

I’ve been having trouble opening .czi images. When I’m trying to import them to Fiji, I get a warning in console [WARN] Z positions not equal and an exception (see below).

I’ve been getting around this issue by using ZEN software to split the channels, export tif files and then reassemble the image in Fiji, but this is really cumbersome to do for multiple images.

Images were acquired with Zeiss LSM710-NLO using (latest?) ZEN software.

You can find an example image here: https://www.dropbox.com/s/r2jkiuvz1vh31sw/08102018_DAPI_A488_Cy3_Cy5_Panorama_Zstack_63x.czi?dl=0

Any help will be greatly appreciated!

Exception message:

(Fiji Is Just) ImageJ 2.0.0-rc-68/1.52g; Java 1.8.0_66 [64-bit]; Windows 10 10.0; 52MB of 12140MB (<1%)
 
java.lang.NullPointerException
	at ome.units.quantity.Length.compareTo(Length.java:150)
	at ome.units.quantity.Length.compareTo(Length.java:35)
	at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:320)
	at java.util.ComparableTimSort.sort(ComparableTimSort.java:188)
	at java.util.Arrays.sort(Arrays.java:1246)
	at loci.formats.TileStitcher.setId(TileStitcher.java:290)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)
	at loci.plugins.in.ImportProcess.setId(ImportProcess.java:694)
	at loci.plugins.in.ImportProcess.initializeStack(ImportProcess.java:547)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:146)
	at loci.plugins.in.Importer.showDialogs(Importer.java:140)
	at loci.plugins.in.Importer.run(Importer.java:76)
	at loci.plugins.LociImporter.run(LociImporter.java:78)
	at ij.IJ.runUserPlugIn(IJ.java:228)
	at ij.IJ.runPlugIn(IJ.java:192)
	at ij.IJ.runPlugIn(IJ.java:181)
	at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:499)
	at HandleExtraFileTypes.run(HandleExtraFileTypes.java:72)
	at ij.IJ.runUserPlugIn(IJ.java:228)
	at ij.IJ.runPlugIn(IJ.java:192)
	at ij.IJ.runPlugIn(IJ.java:181)
	at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:516)
	at ij.io.Opener.openImage(Opener.java:370)
	at ij.io.Opener.openImage(Opener.java:242)
	at ij.io.Opener.open(Opener.java:109)
	at ij.io.Opener.openAndAddToRecent(Opener.java:291)
	at ij.plugin.DragAndDrop.openFile(DragAndDrop.java:192)
	at ij.plugin.DragAndDrop.run(DragAndDrop.java:159)
	at java.lang.Thread.run(Thread.java:745)

Regards,
Karl


#2

Hi @Karl,

your image opens fine for me using Plugins > Bio-Formats > Bio-Formats Importer.

If this does not work for you then you might simply have to update Fiji.


#3

Hey @CellKai!
Thanks for the reply!

I had updated ImageJ just before posting the question to make sure that it wasn’t an issue. Now I’ve also reinstalled ImageJ, but the issue persisted.

However, I tried some different settings in the Bio-Formats importer and turning off stitching opens the image, although in 3 different tiles. So I guess the problem arises when trying to stitch the tiles together.
Can you properly open the image together with stitching? If so, what options are you using? I might be missing something obvious here.

Karl


#4

how are these tiles supposed to be placed with respect to each other?
If it is a non-rectangular layout, then the bio-formats “stitch-tiles” option might not handle it.

You can try the Grid/Collection Stitcher Plugin instead. I have tried to stitch it from metadata, but here it fails with the exception that no tile overlap was found.
If you know in which order the tiles where acquired you might be able to use an alternative tile layout option in the Grid/Collection Stitcher to get a better result.


#5

It’s a 3x1 rectangle, I’ll upload an image of what it should look like.
And it’s weird that no overlap was found, as I imaged it with a 10% overlap.


#6

For these cases – when the plugin in unable to determine the correct tile overlap from the metadata – there’s an Increase overlap [%] option in the stitching dialog (after selecting Positions from file and Defined by image metadata):


#7

I tried this suggested method (positions from file, defined by image metadata) with many different combinations of parameters. The best image I get out of this is still wrong - it manages to stitch together 2 tiles in an ok way (could be optimized), but places them in the wrong position and completely fails with one (first) tile. (On a side note, when I include Z-stack, then I end up with ~100 z-level image, instead of the 7 it should be).

Stitching with Grid stitching:

Original image:


#8

I think the problem is that one of the tiles has its xy coordinates set to 0. Not sure why this happened though.
What does work is if you open the czi and save the individual images In my case, I used the Bio-formats exporter to save the 3 images as individual ics/ids.
You can probably also use Zens “split” function or the "export as ome-tiff function. That latter one should have an option that lets you save each tile as an individual image.

Then you can use the grid collection stitcher with the settings shown in the screenshot below (I hope its visible):


#9

While this could be a workaraound for the issue, it seems as cumbersome and more complicated as exporting single channel z-stacks from ZEN and then reassembling them in FIJI (then I don’t have to worry about the parameters for stitching).
I’m still wondering why the stitching in Bio-Formats is failing now with all the .czi images I’ve acquired this past week, it has bee working nicely in the past. And when I’m doing the Collection stitching (positions from file), it’s always the first tile that ends up in a completely wrong place.