Image writer: false number of images in tif header with hyperstacks

I have issues with reading hyperstack tif-files produced by the Image writer node. The error can be reproduced by importing an unsigned short type tif hyperstack with the Image Reader node (e.g. 20 slices, 3 channels) and just writing a tif or ome.tif image with the Image Writer node. While the input image can be read by e.g. ImageJ or Zen software, the output cannot be read or only one channel is displayed. The reason seems to be a mistake in the header of the output image: The number of images in the header of the output image is 20, while it should be 60.

Hi @diddi,

Just to be clear: You can open the images with an Image Reader but cannot open them in ImageJ/Fiji via File > Open? Have you had any success opening the images with File > Import > Image?

Well, that’s not the whole story. ImageJ1 makes assumptions about how TIFF files and the planes are structured. If the files do not adhere to this standard, opening them with ImageJ1 results in bogus images. The header of a TIFF generated by Image Reader (or much rather SCIFIO) is actually correct, since each of the images contains multiple values per pixel: ImageJ1 just assumes that each pixel is associated with only one value.

I have started investigating this issue some time ago but haven’t had time to follow up on this ( You should be able to work around this by loading images in ImageJ via SCIFIO (File > Import > Image).


1 Like

Hi Stefan,

Thank you very much for your help!


This really works. Many thanks for the enlightenment!



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.