glencoesoftware / raw2ometiff

Raw format to OME-TIFF converter
GNU General Public License v2.0
46 stars 20 forks source link

Split channel timepoints slice #107

Closed Tom-TBT closed 7 months ago

Tom-TBT commented 1 year ago

Hello, I'll open an issue here also to cross reference my post on image.sc: https://forum.image.sc/t/raw2ometiff-channels-timepoints-slice-output/83205

I would like to be able to split my hyperstacks into individual channels or timepoints or Z-slice. One reason for this is to input multiple channels of Z-stacks to Cellprofiler.

In the first post, I propose to be able to choose the name output, such as Filename_t{timepoint}_p{plane}_ch{channel}, but this is not needed.

Splitting the t/z/c would also mean that the files are also split into individual series (with the --split flag implemented in https://github.com/glencoesoftware/raw2ometiff/pull/80)

melissalinkert commented 1 year ago

Thanks, @Tom-TBT. I'd very much prefer not to reimplement the full pattern logic noted in https://forum.image.sc/t/raw2ometiff-channels-timepoints-slice-output/83205/6, but using a fixed file name pattern should be relatively straightforward.

Would an option such as --split-planes that always writes a single plane and its subresolutions to something like prefix_s<series index>_z<Z index>_c<channel index>_t<timepoint index>.ome.tif be sufficient? We wouldn't be able to split a plane across multiple files, or split the subresolutions for a plane across multiple files, and still have the output remain a valid pyramid OME-TIFF dataset. Each file would need to contain the full pyramid for one whole plane.

Are there any other cases we need to consider for CellProfiler compatibility (/cc @DavidStirling)?

Tom-TBT commented 1 year ago

Hello Melissa, thank you for your answer. Do I understand it right, the --split-planes option would split each Z, C, T? This is a satisfying solution for us. Splitting a plane across multiple planes isn't necessary, and neither splitting the subresolutions across multiple files.

Does implementing the choice of "which dimension to split" fall in the "not as easy as it sounds" category? (and by transitivity makes me fall in the "annoying user" category) I would appreciate being able to split only the channels (required for CellProfiler), to shorten the list of output files. But that's the only reason I have for it. The --split-planes option could be extended to choose which dimensions to split (something like --split-planes zt, default --split-planes being the same as --split-planes zct)

Thanks again!