ome / bioformats

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
370 stars 241 forks source link

bfconvert: remove extra channels if `-channel` was used #4173

Closed melissalinkert closed 2 months ago

melissalinkert commented 3 months ago

Fixes #4149.

Compare the test case in #4149 and/or something like bfconvert "test&sizeC=2.fake" test.ome.tiff -channel 1 with and without this PR. Without this PR, the output OME-TIFF should have 2 Channels defined in the OME-XML produced by tiffcomment or showinf -nopix -omexml. With this PR, the output OME-TIFF should have a single Channel.

This should also be tested with both -channel and -series used, so that the case where most Image and Pixels elements are removed is also covered.