Grid/Collection Stitching


Does someone know the logic of the Grid/Collection file loading?

I put this: E2–W00050–P000{ii}–Z00008–T00000–Trans.tif

Doing this, it for instance however also loads files named like this


That is with a different Z index in the filename!
Is that on purpose or maybe a bug because it stops parsing the filenames after the {ii}?

Best, Christian

From my understanding and experience using Grid/Collection Stitching, only iterators between ‘{’ and ‘}’ are replaced with numbers. So in theory every other character in the filename pattern should match exactly.

So in your example, it will match all characters in the filename pattern exactly, but replace the ‘{ii}’ with two numbers as it finds files in the source directory.

The range of possible filenames should be:

Could you upload the two examples images and a list of minimal steps to reproduce the bug(?) in the Grid/Collection Stitching plugin. I would like to see if I can reproduce your error.

Michael Majurski

1 Like

Thank you very much for the answer!

While preparing the minimal example I realized what the problem is:

Somehow these Olympus-ScanR tif files seem to have in their headers that some “dataset-metadata” (experiment_descriptor.xml) is saved one folder above. It looks like the Stitching plugin is using bio-formats to open the tif files, which parses the header, and loads the whole “dataset”, i.e. all z-planes.

I don’t know, I find this concept kind of scary that tif headers silently link to other tif files…I think ome.tif itself also follows this strategy, does it?

Anyway, my problem is fixed now: I simply have to delete the experiment_descriptor.xml file!

1 Like

This has bothered me ever since I started stitching Metamorph datasets (.nd metadata files with accompanying .stk files): when you try to stitch them via their .stk file name pattern, Bio-Formats always picks up the whole dataset, and you end up with a stitched mosaic where every tile is filled with the pixel data of the first series :slight_smile:

You can work around this by doing the same as Bio-Formats and treating the whole folder as a multi-series dataset. The pattern-based stitching won’t work like that, but you should be able to create (or edit) a TileConfiguration.txt file that contains the multiseries = true annotation, and then use the Positions from file > Defined by TileConfiguration option:

# Dimensions and series
dim = 3
multiseries = true

# Coordinates
E2–W00050–P00001–Z00007–T00000–Trans.tif; 0; (0, 0, 0)
E2–W00050–P00001–Z00007–T00000–Trans.tif; 1; (0, 0, 0)
E2–W00050–P00001–Z00007–T00000–Trans.tif; 2; (0, 0, 0)
E2–W00050–P00001–Z00007–T00000–Trans.tif; 3; (0, 0, 0)
E2–W00050–P00001–Z00007–T00000–Trans.tif; 4; (0, 0, 0)
E2–W00050–P00001–Z00007–T00000–Trans.tif; 5; (0, 0, 0)
E2–W00050–P00001–Z00007–T00000–Trans.tif; 6; (0, 0, 0)

You should be able to leave the file name always the same (e.g. the first file in your dataset) and only vary the series index (after the first ; semicolon).

Or, as you found out, get rid of the metadata file (re-naming it to *.tmp seemed a more sensible option to me than deleting it; at least it works fine with Metamorph .nd files).

I agree it can be quite surprising (and sometimes annoying) that Bio-Formats try to be so “smart” about your datasets :slight_smile:

1 Like

This is a good point but I was so annoyed about it that it felt good to delete it :wink:

1 Like