Page 1 of 1

Zeiss CZI Tiles vs LSM Tiles

PostPosted: Mon Jan 29, 2018 5:48 pm
by Oli
Hi All,

We encountered an interesting problem with a tiled CZI file.

The tile is a 4x4, 2 channel, 4Z and 27 timepoints

When trying to open it with Bioformats, we have no access to the individual tiles and Bioformats Importer shows a series of pyramidal images that make it seem as though the 16 individual tiles are no longer accessible (As if only the fused image were saved). See image below
czi-bioformats.jpg
When opening original CZI file
czi-bioformats.jpg (121.4 KiB) Viewed 3608 times


Hoewever opening the same dataset in ZEN shows we can still access each of the 16 individual tiles.

Moreover, when resaving the czi file as an LSM, Bioformats now sees the individual tiles again, as seen below
lsm-bioformats.jpg
When opening LSM file (Resaved from CZI)
lsm-bioformats.jpg (242.43 KiB) Viewed 3608 times


The person who created the data agreed to share it as long as it is not shown anywhere (Of course, feel free to keep it for your tests)

Each file is rather large (8GB) so I could not upload them via your server, but with the following links you should be able to download both the original CZI file as well as the LSM file
CZI File: https://drive.switch.ch/index.php/s/OOjB0hX3uA3li0Q
LSM File: https://drive.switch.ch/index.php/s/8tZYdfB7mQTAWgr

So ideally, I would need the CZI file to behave as the LSM file in order to call the Grid/Collection Stitching plugin. If I can avoid a conversion step, that would be ideal...

Best and thank you for your time

Re: Zeiss CZI Tiles vs LSM Tiles

PostPosted: Tue Jan 30, 2018 1:33 pm
by dgault
Hi Oli,

Thank you for providing the sample files for testing. There is a an option in Bio-Formats now that enables autostiching of tiled CZI images.

You can change this behaviour to disable the autostiching by going to the following menu:
Plugins > Bio-Formats > Bio-Formats Plugin Configuration > Formats > Zeiss CZI

This will have an option 'Automatically stitch tiled images' which you can then disable. Once deselected the individual tiles will be presented upon import.

David Gault

Re: Zeiss CZI Tiles vs LSM Tiles

PostPosted: Wed Jan 31, 2018 4:13 pm
by Oli
Dear David,

Thank you, your suggestion worked!

I have a question, though. How would you go about to set this option programmatically?

With IReader, I would do something like
Code: Select all
// Make sure autostitch is set to false for CZI files
def meta_opts = new DynamicMetadataOptions();
meta_opts.setBoolean('zeissczi.autostitch', false);

def reader = new ImageReader()
reader.setMetadataOptions(meta_opts)
...


But to make my life easier I wanted to use `ImportProcess`, `ImporterOptions` and `ImagePlusReader`
But those are purely dependent on the user going to Plugins > Bio-Formats > Bio-Formats Plugin Configuration > Formats > Zeiss CZI and uncheck the option.

How could I make sure to do this without user intervention?

Re: Zeiss CZI Tiles vs LSM Tiles

PostPosted: Thu Feb 01, 2018 9:56 am
by dgault
To set the option within the ImageJ programming environment you can instead use ImageJ Preferences rather than the MetadataOptions approach. To do this you would use the ij.Pref class and set the option as below:

Code: Select all
Prefs.set(LociPrefs.PREF_CZI_AUTOSTITCH, false);

Re: Zeiss CZI Tiles vs LSM Tiles

PostPosted: Thu Feb 01, 2018 12:14 pm
by Oli
Dear David,

That's perfect! Thank you so much for all your help!