fiji / Stitching

Fiji's Stitching plugins reconstruct big images from tiled input images.
http://imagej.net/Stitching
GNU General Public License v2.0
96 stars 64 forks source link

Grid/collection stitching by Filename defined positions is not working #50

Open nunopimpaomartins opened 7 years ago

nunopimpaomartins commented 7 years ago

Hi,

Th plugin does not seem to working using this type of stitching. It load all the files well, or at least no error pops up, but the output image is the first image replicated and stitched together, example below.

Output image: https://imgur.com/a/CSQ03

Log-file: Stitching internal version: 1.2 Loading (0, 0): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_000_000.ome.tif ... 512x512x11px, channels=4, timepoints=1 (4036 ms) Loading (1, 0): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_001_000.ome.tif ... 512x512x11px, channels=4, timepoints=1 (2194 ms) Loading (2, 0): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_002_000.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1795 ms) Loading (3, 0): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_003_000.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1542 ms) Loading (4, 0): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_004_000.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1533 ms) Loading (0, 1): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_000_001.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1621 ms) Loading (1, 1): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_001_001.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1576 ms) Loading (2, 1): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_002_001.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1576 ms) Loading (3, 1): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_003_001.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1512 ms) Loading (4, 1): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_004_001.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1487 ms) Loading (0, 2): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_000_002.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1478 ms) Loading (1, 2): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_001_002.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1556 ms) Loading (2, 2): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_002_002.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1467 ms) Loading (3, 2): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_003_002.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1511 ms) Loading (4, 2): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_004_002.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1458 ms) Loading (0, 3): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_000_003.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1517 ms) Loading (1, 3): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_001_003.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1470 ms) Loading (2, 3): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_002_003.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1616 ms) Loading (3, 3): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_003_003.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1637 ms) Loading (4, 3): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_004_003.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1486 ms) Loading (0, 4): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_000_004.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1541 ms) Loading (1, 4): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_001_004.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1555 ms) Loading (2, 4): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_002_004.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1581 ms) Loading (3, 4): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_003_004.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1503 ms) Loading (4, 4): F:\Data\Microscopy\conv_grid_2\conv_grid_2_MMStack_1-Pos_004_004.ome.tif ... 512x512x11px, channels=4, timepoints=1 (1513 ms) conv_grid_2_MMStack_1-Pos_000_000.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](0.0,0.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_001_000.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](460.0,0.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_002_000.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](920.0,0.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_003_000.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1380.0,0.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_004_000.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1840.0,0.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_000_001.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](0.0,460.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_001_001.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](460.0,460.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_002_001.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](920.0,460.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_003_001.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1380.0,460.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_004_001.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1840.0,460.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_000_002.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](0.0,920.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_001_002.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](460.0,920.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_002_002.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](920.0,920.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_003_002.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1380.0,920.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_004_002.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1840.0,920.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_000_003.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](0.0,1380.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_001_003.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](460.0,1380.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_002_003.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](920.0,1380.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_003_003.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1380.0,1380.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_004_003.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1840.0,1380.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_000_004.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](0.0,1840.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_001_004.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](460.0,1840.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_002_004.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](920.0,1840.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_003_004.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1380.0,1840.0,0.0) 1.7976931348623157E308 conv_grid_2_MMStack_1-Pos_004_004.ome.tif - conv_grid_2_MMStack_1-Pos_000_000: [1,3](1840.0,1840.0,0.0) 1.7976931348623157E308 Fuse & Display ... Finished fusion (60613 ms) Finished ... (102455 ms)

Cheers, Nuno Martins

imagejan commented 7 years ago

Hi Nuno,

in my experience, this happens when bio-formats (which is used under the hood by this plugin) sees a multi-series dataset (from the ome.tif metadata) and then always loads the first series of the grouped dataset, no matter the actual file name for that tile. One possible workaround is to edit the TileConfiguration.txt file from your first run to include a multiseries=true parameter and edit the single lines to contain the series index of the dataset:

# TileConfiguration.txt
dims = 3
multiseries = true
# Coordinates
conv_grid_2_MMStack_1-Pos_000_000.ome.tif; 0; (0, 0, 0)
conv_grid_2_MMStack_1-Pos_000_000.ome.tif; 1; (920.0, 0, 0)
...

Maybe @StephanPreibisch knows of a better way.

Also, did you try using BigStitcher to see if this works for your files?

Cheers Jan

nunopimpaomartins commented 7 years ago

Hello Jan,

I tried that and it didn't work, even if I try stitching by the TileConfiguration file.

BigStitcher didn't work properly either, maybe I am doing something wrong.

I managed to make it work by changing the stitching type (to column-by-column) and renaming all the files, but I would like to avoid it with a larger amount of tiles.

Thanks anyways Jan! Nuno

dnmason commented 6 years ago

I can confirm what @imagejan suggests. This is a problem with the way BioFormats interprets a multifile series.

This is still a problem that I'm running into in Fiji (Stitching v1.2) and although I understand a lot of development has shifted to BigStitcher, it would be really nice to incorporate a checkbox for multiseries=true into the interface. Either that or an option to use BioFormats or not (this is not a problem if you resave as regular tif).

Finally, as I'm writing, can filename defined position also please respect the invert Y and invert X checkboxes? With our setup the files end up as 2018-07-24-test1_MMStack_1-Pos_000_000.ome.tif with the grid looking like this with the origin in the bottom left: 2018-07-04-epi-002

ctrueden commented 6 years ago

it would be really nice to incorporate a checkbox for multiseries=true into the interface. can filename defined position also please respect the invert Y and invert X checkboxes?

Please feel free to try your hand at a PR.