glencoesoftware / raw2ometiff

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

Add note about `--quality` option #78

Closed melissalinkert closed 2 years ago

melissalinkert commented 2 years ago

/cc @muhanadz @mgheirat @DavidStirling @erindiel

muhanadz commented 2 years ago

@DavidStirling As far as I know the only way to see the list of accepted compression is with raw2ometiff --help.

--compression=<compression>
                         Compression type for output OME-TIFF file
                           (Uncompressed, LZW, JPEG-2000, JPEG-2000 Lossy,
                           JPEG, zlib; default: LZW)

Maybe we should open another PR, either listing the compression types or adding the output of raw2ometiff --help?

mgheirat commented 2 years ago

Looks good to me. Very useful info. @melissalinkert could you point us to the code where the --quality option is being used in the JPEG2000 lossy params setting?

melissalinkert commented 2 years ago

8591b4c updates to include the compression types that can be used.

To follow --quality through to where it is actually used for compressing data:

https://github.com/glencoesoftware/raw2ometiff/blob/master/src/main/java/com/glencoesoftware/pyramid/PyramidFromDirectoryWriter.java#L169 https://github.com/glencoesoftware/raw2ometiff/blob/master/src/main/java/com/glencoesoftware/pyramid/PyramidFromDirectoryWriter.java#L1085 https://github.com/glencoesoftware/raw2ometiff/blob/master/src/main/java/com/glencoesoftware/pyramid/PyramidFromDirectoryWriter.java#L1088 https://github.com/ome/bioformats/blob/v6.9.1/components/formats-bsd/src/loci/formats/tiff/TiffCompression.java#L112 https://github.com/ome/bioformats/blob/v6.9.1/components/formats-bsd/src/loci/formats/tiff/TiffCompression.java#L351 https://github.com/ome/bioformats/blob/v6.9.1/components/formats-bsd/src/loci/formats/codec/JPEG2000Codec.java#L65 https://github.com/ome/ome-codecs/blob/v0.3.2/src/main/java/ome/codecs/JPEG2000Codec.java#L191 https://github.com/ome/ome-codecs/blob/v0.3.2/src/main/java/ome/codecs/services/JAIIIOServiceImpl.java#L121 https://github.com/ome/ome-jai/blob/15b2b34d4c2e05bfec6e5749d6a7745f7caacc20/src/main/java/com/sun/media/imageio/plugins/jpeg2000/J2KImageWriteParam.java#L310 https://github.com/ome/ome-jai/blob/15b2b34d4c2e05bfec6e5749d6a7745f7caacc20/src/main/java/com/sun/media/imageio/plugins/jpeg2000/J2KImageWriteParam.java#L114 https://github.com/ome/ome-jai/blob/master/src/main/java/com/sun/media/imageioimpl/plugins/jpeg2000/J2KImageWriter.java#L382 https://github.com/ome/ome-jai/blob/master/src/main/java/jj2000/j2k/entropy/encoder/PostCompRateAllocator.java#L283

mgheirat commented 2 years ago

Thank you very much @melissalinkert for the detailed sequence of pointers!