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

Fix series assignment for multiseries files #46

Open yoda-vid opened 7 years ago

yoda-vid commented 7 years ago

I've been working with lightsheet multiseries .czi files and tried to stitch with the "Positions from file" mode, but the resulting tiles all came from the same series. The fix for me was to set the series on value when building the ImporterOptions.

I also made a small simplification to use the series index directly when creating the ImageCollectionElement objects, though the change doesn't appear to be necessary.

I tested the changes in headless mode with a multiseries file generated by Zeiss Zen 2014 after dual illumination fusion, both with order "Defined by TileConfiguration" (including 3D and 2D subsets, with TileConfiguration.txt built separately beforehand) and "Defined by image metadata" (though my multiseries file does not appear to give tile offsets in the metadata). It'd be helpful to test with other multiseries files from other systems.

StephanPreibisch commented 7 years ago

Hi, thanks a lot! I think it does need some testing. I am a bit worried that it might break loading other types of data. Did you try it on anything else than your images yet?

Cheers, Stephan

yoda-vid commented 7 years ago

I don't have any other multiseries files at the moment to test but will keep my eye out for any. The main area I was focusing on was to set the series when fusing a multiseries file. I could see the series being set when building the layout, but fusion opened the same series for each tile until I set it explicitly in the ImagePlus open method. Do most multiseries files increment their series automatically though?

Thanks, David

yoda-vid commented 7 years ago

I had a chance to test another multiseries image generated with Zeiss Zen 2012 from 2-photon tiled imaging, and it also repeatedly opened the first series only unless I set the series explicitly. The fix for me was really just the options.setSeriesOn(getIndex(), true); line.