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

Multiseries stitching using coordinates from a tile configuration file. #26

Closed ehrenfeu closed 9 years ago

ehrenfeu commented 9 years ago

This PR adds the possibility to stitch multi-series files (.lsm, .czi, .lif, ...) using coordinates from a TileConfiguration.txt file.

I've created this upon the reply by @ctrueden on the ImageJ mailing list. As explained in my email to the list, we need this as we're having a user that acquired a lot of datasets where each channel was saved in a separate .lsm file, where only one of the channels is leading to good results when running the stitcher. So we wanted to re-use the results calculated by the stitcher for this channel on the other channels, but the current code did not allow for specifying coordinates for a multi-series file.

A couple of remarks:

I have reassembled my commits and tried to group them somehow logically, hoping they are easy to understand this way. I'd be more than happy to see this merged back into master, so feel free to give me your feedback!

Some manual testing was done to cover three cases: stitching using coordinates from the metadata, stitching using individual files using a tile configuration and (of course) the new feature, stitching a single multi-series file using a tile configuration file.

ctrueden commented 9 years ago

@StephanPreibisch What do you think?

ehrenfeu commented 9 years ago

Thanks for the heads up about logging, @ctrueden - sounds promising :smile:

I personally agree that sticking to IJ.log should be enough, I just didn't want to change the original behaviour too much without discussing this step with the upstream author.

ctrueden commented 9 years ago

@StephanPreibisch Ping!

ctrueden commented 9 years ago

So, I looked over this branch, and it looks great. Thanks very much for your efforts, @ehrenfeu. Actually, I have a use case for this functionality now in my lab, which is why I'd like to expedite getting it merged. :wink: But first I have a question: how do you actually go about producing a TileConfiguration.txt file for use with this feature? With single series files, you can set the fusion method to "Do not fuse images (only write TileConfiguration)". But it seems that when stitching with "Positions from file" and "Defined by image metadata", no TileConfiguration.txt is ever written regardless. (And actually, I get an eventual OutOfMemoryError when attempting to do this.)

So: how do you create your TileConfiguration.txt for use with this feature, @ehrenfeu? FWIW, my use case is that we have an OME-TIFF dataset we'd like to stitch, but with a couple of "bad" tiles we'd like to exclude from the stitching. I thought manually tweaking a tile configuration file would be a good way to achieve this...

StephanPreibisch commented 9 years ago

Thanks so much @ehrenfeu and @ctrueden ... I am not very good with emails the last days. It sounds great, if you tested it let's go ahead :)

ctrueden commented 9 years ago

Merged. We can follow up with additional commits to address anything else related that arises. @ehrenfeu I'd still like to know how you create your TileConfiguration.txt files. By hand? Or am I missing something?

ehrenfeu commented 9 years ago

@ctrueden just a short follow-up on your question about creating the TileConfiguration.txt files:

ctrueden commented 9 years ago

Thanks for the info, @ehrenfeu.

I'd like to put it on my agenda to update the current methods for writing those files using the extended multiseries-syntax. I'm already having multiple users requesting this (surprise, surprise...).

That would be fantastic!

iwbh15 commented 9 years ago

@ctrueden : Creating TileConfiguration.txt files I have created those files from microManager aquisitions and other metadata. Pls contact me if I can help.