Login  Register

Re: Bug in ImageJ?

Posted by Rasband, Wayne (NIH/NIMH) [E] on Sep 11, 2010; 4:19am
URL: http://imagej.273.s1.nabble.com/Bug-in-ImageJ-tp3686967p3686968.html

This bug is fixed in the 1.44g10 daily build.

-wayne

On Sep 11, 2010, at 12:13 AM, Wayne Rasband wrote:

>   Hi,
>
> I have a question to the ImageProcessor class. In interpolated value
> this statement is found:
>
> ------------------------------
>
> public final double getInterpolatedValue(double x, double y) {
>         if (useBicubic)
>             return getBicubicInterpolatedPixel(x, y, this);
>         if (x<0.0 || x>=width-1.0 || y<0.0 || y>=height-1.0) {
>             if (x<-1.0 || x>=width || y<=1.0 || y>=height)
>                 return 0.0;
>             else
>                 return getInterpolatedEdgeValue(x, y);
>         }
> -----------------------------
>
> We are experiencing troubles in reading some of the image edge values.
> Shouldn't the second constraint
>
>  (x<-1.0 || x>=width || y<=1.0 || y>=height)
>
> be
>
>  (x<-1.0 || x>=width || y<-1.0 || y>=height)
>
>                         ^^^^^^^
>
> Best,
>
> Andreas
>
> P.S. Is this problem already fixed in a newer version of ImageJ? We are
> using ImageJ 1.43u.
>
> --
> Dr.-Ing. Andreas Maier
> Stanford University
> Department of Radiology
> The Lucas Center for Imaging
> Mail Code 5488, Route 8
> Stanford, CA  94305
> http://med.stanford.edu/profiles/Andreas_Maier/