-
Notifications
You must be signed in to change notification settings - Fork 221
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
10 bit tiff support #185
10 bit tiff support #185
Conversation
@evanspa That's awesome! Thanks for contributing. @rasband What do you think? If you want to review the patch without the whitespace changes cluttering the view, you can append |
Hi @evanspa, |
The LibTIFF library has a nice collection of samples, including bit depths from 2 through 32, downloadable from http://www.simplesystems.org/libtiff/images.html. In particular, these files from the archive might be helpful for testing:
|
I made 2 small changes to the read10bitImage() method (marked with "//wsr") and it now opens the libtiffpic/depth/flower-minisblack-10.tif sample image. These changes are in the ImageJ 1.54c27 daily build. -wayne
|
Great, thank you both!
…-Paul
On Sun, Feb 19, 2023 at 10:54 PM rasband ***@***.***> wrote:
Closed #185 <#185>.
—
Reply to this email directly, view it on GitHub
<#185 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHRE4Y5UR72C25WBG6A6ULWYLTITANCNFSM6AAAAAARZSGPPA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello - I was asked by Accelerate Diagnostics Inc. to add support to ImageJ for 10-bit TIFF images produced by their equipment. This PR contains this functionality. The meat of the code is a new "read10bitImage()" function inside of ImageReader.java, along with a new file info constant, GRAY10_UNSIGNED. I tried to keep the code consistent with how the other bit-length reader functions are implemented. This code was tested against several 10-bit TIFF files provided by Accelerate and worked well. To accomplish this, the read10bitImage() function reads in 5 bytes of data at a time, and produces 4 pixels of information. The result is that each new pixel contains no data loss, so the fidelity of the image is not reduced with this conversion. Each new 16-bit pixel contains the original 10-bits of information; the remaining unused 6-bits are set to 0 (left-padded).
Accelerate Diagnostics Inc has been a happy user of ImageJ for years, and are excited that this small contribution may make its way into the core product, to benefit other users.
Thank you for your consideration of this PR.
-Paul