I have 16 bit signed integer grayscale microscopy images (that are displayed correctly in ImageJ), that appear black and white in display -- or in any program downstream of imagemagick.
Identify reports a 16bit image, but uncorrectly gives a min value of 0 and a max of 65535 (I can check the correct values in ImageJ and there usually in the -100 to 5000 range).
Is it normal (meaning are signed 16 bit images unsupported ?) ? If not I can send a sample image to help solving the problem.
I'm running ImageMagick 6.9.1-0 in Ubuntu 14.04.
Thanks !
signed 16 bit tiff is not read correctly
Re: signed 16 bit tiff is not read correctly
Post a URL to one of your images so we can download it and inspect it. We'll get back to you once we've viewed the image.
Re: signed 16 bit tiff is not read correctly
Here is an example :
https://www.dropbox.com/s/nm3bcypdiw0y38w/test.tif?dl=0
By looking at the histogram, it seems it has the correct number of values, but they're not interpreted correctly (they all fall in the 0-3% or 98-100% range).
Thanks !
https://www.dropbox.com/s/nm3bcypdiw0y38w/test.tif?dl=0
By looking at the histogram, it seems it has the correct number of values, but they're not interpreted correctly (they all fall in the 0-3% or 98-100% range).
Thanks !
Re: signed 16 bit tiff is not read correctly
Most of the infra-structure is in-place to support 16-bit signed pixels in ImageMagick, but not quite. For negative values, we have the HDRI-enabled version of ImageMagick but we also need to treat the 16-bit pixels as signed rather than unsigned. We'll get a patch in to fix the problem, but currently we do not have an ETA on when we'll have the patch. In the mean-time, you should be able build an HDRI version of ImageMagck then use the -evaluate or -fx option to convert the unsigned pixels to signed.
Re: signed 16 bit tiff is not read correctly
Thanks a lot for your answer. The work-around works nicely.
Re: signed 16 bit tiff is not read correctly
Can you post the command-line you used to generate the correct results? With it we can generate a reference image to ensure our patch works correctly. Thanks.