Login  Register

bit-depth for Analyze format

Posted by Tony Shepherd on Jan 26, 2007; 1:03pm
URL: http://imagej.273.s1.nabble.com/bit-depth-for-Analyze-format-tp3700519.html

I'm working with Analyze-format images, which are loaded into ImageJ as
16-bit stacks.

My plugin needs to sample pixel values, from ImageProcessor objects created
using stack.getProcessor(sliceNumber).

ip.getPixel(x,y) returns 0 at all pixels
Float.intBitsToFloat(ip.getPixel(x,y) returns 0.0

The pixel values displayed in the ImageJ panel (when mouse hovers over image
window) are strange. There are 2 values, one negative and one in brackets.

For example a lighter pixel is given:

-31837.00 (931)

and a darker pixel is given:

-32536.00 (232)

I think I want the number in brackets, but How do I get it?

ManyThanks,

T