Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about --quality option #78

Merged
merged 2 commits into from
Jun 21, 2022

Conversation

melissalinkert
Copy link
Member

Copy link
Member

@DavidStirling DavidStirling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do we have a list of accepted compression types somewhere?

Copy link
Member

@muhanadz muhanadz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds clarity and important information about the range and values for the --quality flag used with compression that was missing before. The explanation is thorough and straightforward with good examples and starting value for users.

Looks good.

@muhanadz
Copy link
Member

muhanadz commented Jun 2, 2022

@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
Copy link

mgheirat commented Jun 2, 2022

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
Copy link
Member Author

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
Copy link

mgheirat commented Jun 3, 2022

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

Copy link
Member

@muhanadz muhanadz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chris-allan chris-allan merged commit 9afcdc2 into glencoesoftware:master Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants