Stitch then split large round field in FIJI

Briefly, I’m trying to stitch a whole well of a 6 well dish in FIJI, taken with some overlap, then re-split it back out into larger, non-overlapping sections. All of this is done in a single script.

I’ve been working well with Grid/Collection stitching, but our collaborators recently increased the size of the field they want stitched and I’m now above the 2 gigapixel limit. I’m trying to use BigStitcher but without much success; I have 1364 tiles, but it then claims it can only recognize 1351 and when it loads them it says it’s got 1338 (not sure if whether the drop is symmetric (13 each time) is relevant or not). When I try to then fuse it anyway, it then complains I’m above the 2GP limit. If I try to split without fusing, it gives me a NullPointer exception.

Is there something else I can try? Will Grid/Collection make >2GP images if running headless?

@bcimini, I also ran into issues importing data into Big Stitcher that I could not solve (these issues were probably quite specific to my specific data, consecutively numbered tiles with gaps in the numbering. The importer couldn’t handle the gaps in numbering IIRC). For me, the easiest way was to directly produce a BigStitcher project file (essentialy Big Data Viewer format) from Python using npy2bdv. At the time I wasn’t aware of pybdv which offers overlapping functionality. Some examples here and here. If you have the stage positions of the tiles, put them in the affine transform and the resulting files will already be correctly aligned to get a good overview (even without pairwaise correlation and global optimization steps).

If you can fix it within Big Stitcher that’s probably the better way, but I have a feeling you may prefer the Python route.

EDIT: not quite clear to me whether you got the coarse alignment (without pairwise shifts/global optimizatoin) working despite the missing frames. If it is purely a fusion problem my suggestion above won’t help unfortunately.


Hi @bcimini, this is the sort of task that TrakEM2 is useful for, and its entirely scriptable: import tiles, stitch them, then export a grid.

A script that does some of what you want is here: Import, montage and blend images

Then you could use some of the code from Create a snapshot in 8-bit, 16-bit or 32-bit to export individual tiles at the desired bit-depth.

Hope this helps.


Thanks folks! I’ll play with those (and anything else that comes in) and report back.

1 Like

For what it’s worth, I decided to just stay with Grid/Collection and stitch the image in pieces (halves or quarters).

In case this is helpful to anyone in the future, this involved needing to pad the image out to square with new noise images (IJ.newImage("Untitled", "16-bit noise",1480, 1480, 1)); using noise turned out to be super critical, in that the stitching results came back very odd if I tried to pad with empty/all zero fields but were fine if the extra fields were noise.