ip.getPixel returns 'index' not 'value'
Posted by Tony Shepherd on Sep 04, 2006; 6:41pm
URL: http://imagej.273.s1.nabble.com/ip-getPixel-returns-index-not-value-tp3701630.html
I'm using a greyscale image. When I place the mouse pointer over a
homogenous part of the image, the ImageJ toolbar tells me the following:
x=99, y=130, index=8, value=192,192,192.
In my program I use int greyvalue = ip.getPixelValue(x,y);
where x and y are defined inside the same algorithm.
For the same homogenous region as above (eg x=99, y=130) I expect to get
greyvalue = 192.
I get greyvalue = 8.
I suspect that I'm using a LUT without knowing it (or wanting it).
Is there a function that returns 'value' instead of 'index' (eg the value in
the red channel, since this is the same as the value in the green and blue
channels)