using Bio-Formats to read a 12 bit grayscale lossless .jpg
Posted:
Wed Sep 25, 2013 6:50 pm
by mbrandt_nasa
Hi,
Is it possible to use Bio-Formats to read in a 12 bit grayscale lossless .jpg image file into Java, into a BufferedImage?
It's not clear to me if Bio-Formats would support that.
Any hints would be appreciated.
thanks
Re: using Bio-Formats to read a 12 bit grayscale lossless .j
Posted:
Wed Sep 25, 2013 7:30 pm
by mbrandt_nasa
If I try to run:
JPEGReader jr = new JPEGReader();
try
{
jr.setId("images/b0958620.jpg");
int bits = jr.getBitsPerPixel();
System.out.println("Bits per pixel: " + bits);
...
I get:
sun.awt.image.ImageFormatException: Unsupported JPEG data precision 12
Does this mean that Bio-Formats does not support 12 bit gray scale JPEG images? I thought that this is a common medical image format, so I would think that it would support it?
Thanks for any idea...
Re: using Bio-Formats to read a 12 bit grayscale lossless .j
Posted:
Thu Sep 26, 2013 11:11 pm
by mlinkert
Which version of Bio-Formats are you using? If you haven't already, I would suggest trying 5.0.0-beta1 (from
http://www.openmicroscopy.org/site/prod ... io-formats), as that includes enhanced JPEG support.
If neither the current stable version (4.4.8) nor 5.0.0-beta1 can open the file, then it would be very helpful if you could upload an example to:
http://qa.openmicroscopy.org.uk/qa/upload/