Metadata Translation

Hello! I hope everyone is doing great and staying safe!

I’m trying to translate the metadata of various .czi files to a useable form that can be used by the Grid/Collection stitching plugin (Type: positions from file, order: defined by TileConfiguration). I’ve included the xml file with the x and y coordinates of each tile below. Also, this link will show you the required format for the stitching plugin.
Now, this is just a question about how to translate this data. I don’t have a great background in coding. Could someone help and guide me through how to solve this problem?

If anyone is interested, this is the original forum that extensively highlights the problem: Stitching based on metadata

Thanks for your help! Let me know if you have any further questions!

xml file: SH5_7316x7395or7405-4_(1)_info.xml (187.2 KB)

required format for stitching: https://imagej.net/Image_Stitching#I_have_a_known_approximate_arrangement_for_the_tiles_but_it_is_not_any_of_the_grids

@Sakib_Hossain

Again, @StephanPreibisch is the best person to assist you in this… I also *pinged him here:

1 Like

Hi, since bioformats can read the CZI Metadata, you can directly stitch a CZI in Fiji (if the stitching plugin uses BioFormats…)
Why do you want to extract the metadata first? Or did I misunderstood you?

2 Likes

Hey,

When I stitch through FIJI, it doesn’t give me a clean image. In other words, there are clear lines between the tiles to give a mosaic-like appearance. My goal is to use a correction (BaSiC) to get rid of this issue. BaSiC needs the tiles, not a stitched image to work.

Now, the problem is that stitching becomes the issue. Bio-Formats isn’t reading the metadata correctly:
This is the log message:
seriesCount: 183 (The series count makes sense as there are 183 tiles)
imageCount (Planes): 4 (This number doesn’t make sense as we expect it to be 183x4 as we have four channels)

Because the metadata isn’t being read properly, I can’t use the Grid/Collection Stitching plugin, which has an option to stitch the tiles based on the metadata. Hope this clears up the specifics about the problem!

Also, just as a comparison. I’ve attached the FIJI stitched image and the post-BaSiC correction manually stitched image to show the difference. Manually as in I took the existing data from the metadata and translated that to a useable form that can be used by the Grid/Collection Stitching plugin.

Hi,

can you post the XML-Metadata when opening this CZI via BioFormats in Fiji or even better a link to the actual CZI image?

If you need to read all invidual tiles from a CZI in Fiji you can use this script: czireader_complete.py and set the desired options.

The example below has 25 tiles and 3 channels and yields in the respective Hyperstack with 25 planes.

Sure thing!

CZI and SH5_7316x7395or7405-4_(1)_info.xml (187.2 KB) metadata extracted from ZEN.

Hi,

I downloaded the CZI and opened it via BioFormats in Fiji and as far as I can see it has the correct plane data incl. XYZ position available inside the OME_XML (190 planes with 4 channels each).

.

But I now understand now why Stitching “out-of-the-box” in Fiji does not work anymore.

The CZI file has 4 Pyramid levels which all have a different resolution, which is recognized by BioFormats as 4 image series. But when deactivating the autotsitch option for CZI the image stack will have 190 tiles. And that point the Stitching plugin will stop because of that mismatch.
A detailed explanation about opening CZI Tile Images in Fiji can be found here: Opening multiscene CZI files with FIJI

Options

  • Convince the authors of the Fiji Stitching plugin to update the way the metadata are read
  • Use ZEN blue directly to stitch your image (i tried it worked fine and took roughly 5s) --> check out the 90-day free trial if needed
  • extract
  • Extract the plane metadata and save them in a way the Fiji Stitching plugin can use