ImageJ czi files won't open

Hi there, I am not very computer literate but trying to view some scanned IHC slide images taken from a Zeiss Axioscanner that are in the czi format using Fiji. I’ve made sure the bioformats plugin is downloaded and I can try to open the files from the import menu, but once I do nothing opens. I’ve copied the stack trace here but I don’t know how to interpret it. If anyone can point me in the right direction that would be fantastic. Thanks in advance,
Sian

“AWT-EventQueue-0” prio=6 id=20 group=main
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.awt.EventQueue.getNextEvent(EventQueue.java:554)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:187)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

“AWT-Shutdown” prio=5 id=19 group=system
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:295)
at java.lang.Thread.run(Thread.java:748)

“AppKit Thread” daemon prio=5 id=11 group=system
java.lang.Thread.State: RUNNABLE

“Bio-Formats Importer” prio=4 id=25 group=main
java.lang.Thread.State: RUNNABLE
at ome.jxrlib.JXRJNI.DecodeContext_decodeFirstFrame(Native Method)
at ome.jxrlib.DecodeContext.decodeFirstFrame(DecodeContext.java:39)
at ome.jxrlib.AbstractDecode.decodeFirstFrame(AbstractDecode.java:110)
at ome.jxrlib.Decode.decodeFirstFrame(Decode.java:51)
at loci.formats.services.JPEGXRServiceImpl.decompress(JPEGXRServiceImpl.java:75)
at loci.formats.codec.JPEGXRCodec.decompress(JPEGXRCodec.java:94)
at loci.formats.in.ZeissCZIReader$SubBlock.readPixelData(ZeissCZIReader.java:3866)
at loci.formats.in.ZeissCZIReader$SubBlock.readPixelData(ZeissCZIReader.java:3822)
at loci.formats.in.ZeissCZIReader$SubBlock.readPixelData(ZeissCZIReader.java:3817)
at loci.formats.in.ZeissCZIReader.openBytes(ZeissCZIReader.java:396)
at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:156)
at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:148)
at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:200)
at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:161)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
at loci.formats.DimensionSwapper.openBytes(DimensionSwapper.java:233)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
at loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:186)
at loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:83)
at loci.plugins.in.ImagePlusReader.createVirtualStack(ImagePlusReader.java:349)
at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:281)
at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:243)
at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:221)
at loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:116)
at loci.plugins.in.Importer.readPixels(Importer.java:149)
at loci.plugins.in.Importer.run(Importer.java:86)
at loci.plugins.LociImporter.run(LociImporter.java:78)
at ij.IJ.runUserPlugIn(IJ.java:230)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

“DestroyJavaVM” prio=5 id=24 group=main
java.lang.Thread.State: RUNNABLE

“Finalizer” daemon prio=8 id=3 group=system
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)

“Java2D Disposer” daemon prio=10 id=16 group=system
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
at sun.java2d.Disposer.run(Disposer.java:148)
at java.lang.Thread.run(Thread.java:748)

“Java2D Queue Flusher” daemon prio=10 id=15 group=system
java.lang.Thread.State: TIMED_WAITING
at java.lang.Object.wait(Native Method)
at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:203)

“Reference Handler” daemon prio=10 id=2 group=system
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

“SciJava-70ebd61b-Thread-1” prio=6 id=29 group=main
java.lang.Thread.State: RUNNABLE
at java.lang.Thread.dumpThreads(Native Method)
at java.lang.Thread.getAllStackTraces(Thread.java:1610)
at org.scijava.plugins.commands.debug.DumpStack.run(DumpStack.java:81)
at org.scijava.command.CommandModule.run(CommandModule.java:199)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
at org.scijava.thread.DefaultThreadService$$Lambda$136/2039671268.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

“SciJava-70ebd61b-Thread-2” prio=6 id=30 group=main
java.lang.Thread.State: TIMED_WAITING
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

“Signal Dispatcher” daemon prio=9 id=4 group=system
java.lang.Thread.State: RUNNABLE

“Timer-0” daemon prio=5 id=9 group=main
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.util.TimerThread.mainLoop(Timer.java:526)
at java.util.TimerThread.run(Timer.java:505)

“TimerQueue” daemon prio=5 id=27 group=system
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:211)
at javax.swing.TimerQueue.run(TimerQueue.java:174)
at java.lang.Thread.run(Thread.java:748)

Dear SianJ,
I don’t know if it’s the same problem I had. But with a slide scanner the image are very big and ImageJ cannot manage that. Only 2Go per 2D plane.
The best is to read your metadata (without opening your file) and crop your file during the import process.
You can crop multiples times in a macro to divide your file in 3 by 3 or more.

I agree that this is most likely a limitation of the file format not the CZI itself. Can try

  • save a small subimage with JPGXR in ZEN compression
  • save a small subimage without JPGXR compression in ZEN
  • try to open in Fiji
  • try to open using czifile.py in Python
  • try to open usiog aicsimagio (using libCZI) in python

Let me know if you need help. Access to the file would help.

Sebi (from Zeiss)

If you like IJMacro this is an example with the creation of 9 images in Ome.tif for all your czi
If your file are very big, maybe you will need to crop more.

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////// This macro was written in April 2020 by Alexandre Hego 
////// This macro will crop automatically 9 times
////// This macro will run in batch mode and need bio-format plugin
////// Please remove the space in the folder name and file name
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


input = getDirectory("choose the input directory"); 
output= input + "/Images/"; 
File.makeDirectory(output);
startTime = getTime();
print("\\Clear");
run("Bio-Formats Macro Extensions");

function processFolder(input);
list = getFileList(input); 
	for (i=0; i<list.length; i++) {
		if (endsWith(list[i],".czi")){
			inputPath= input +  list[i];
			print("Conversion: " + inputPath +" please wait");
			length = File.length(inputPath);
			
	//Bio-format extension to get the Metadata infos SizeXand SizeY without opening the file
			Ext.setId(inputPath);
			Ext.getSizeX(width);
			Ext.getSizeY(height);
	//define X, Y, width and height for the new 9 slices
				for (p = 1; p <10 ; p++) {
				x1 = 0; y1 = 0; 
				x2= width /3; y2 = 0; 
				x3 = 2*width/3; y3 = 0;
				x4= 0 ; y4 = height /3;
				x5 = width/3; y5 = height /3;
				x6 = 2*width/3; y6 = height /3;
				x7 = 0; y7 = 2*height /3;
				x8 = width/3; y8 = 2*height /3;
				x9 = 2*width/3; y9 = 2*height /3;
				w= width /3;
				h = height /3;
				run("Bio-Formats Importer", "open=inputPath color_mode=Default crop rois_import=[ROI manager] view=Hyperstack stack_order=XYCZT series_1 x_coordinate_1=x"+p+" y_coordinate_1=y"+p+" width_1="+w+" height_1="+h+"");
				imagesName=getTitle();
	// convert tiff to RGB then OME.TIFF without compression then save it
				run("Stack to RGB");
				run("OME-TIFF...", "save=" + output + File.separator + imagesName +"_"+ p + ".ome.tif" + " compression=Uncompressed");
				close("*");
			}
		}	
	}
finalTime = getTime();
Time = (finalTime - startTime)/1000;
print("the macro ran " + Time + " secondes.");
print("Macro ends");

You might also try to read only a certain pyramid level from the CZI using the python script below.

czireader_complete.py

Maybe it helps to narrow down the problem.