Login  Register

Re: Getpixel() behaviour

Posted by Gabriel Landini on Feb 09, 2011; 9:11pm
URL: http://imagej.273.s1.nabble.com/Getpixel-behaviour-tp3685748p3685749.html

On Wednesday 09 Feb 2011 19:42:52 Gilbert Bigras wrote:

> A macro script I wrote was behaving strangely since ImageJ version 1.44. I
> found out that getpixel() built-in macro function is responsible of my
> problem.

Hi Gilbert,
Yes that was introduced in ij 1.44k:
"The getPixel(x,y) macro function now interpolates if x or y are non-integer."

I had completely forgotten about this.
By rounding the coordinates one avoid the interpolated value, so I think that
your solution is correct.
Cheers,

Gabriel