Re: Suspicious code in interpolation code
Posted by
Antoine Vandecreme on
Nov 18, 2013; 7:43pm
URL: http://imagej.273.s1.nabble.com/Re-Suspicious-code-in-interpolation-code-tp5005590.html
Hi all,
I was looking at the resizing code and I found this part suspicious:
https://github.com/fiji/imagej1/blob/master/ij/process/ShortProcessor.java#L844
Lines 844 to 847:
the lowerLeft variable seems to be assigned the upperLeft value (and
upperLeft variable the lowerLeft value)
the same goes for lowerRight and upperRight.
To be clear here is what I would write:
int upperLeft = pixels[offset]&0xffff;
int upperRight = pixels[offset + 1]&0xffff;
int lowerRight = pixels[offset + width + 1]&0xffff;
int lowerLeft = pixels[offset + width]&0xffff;
This code is also present in others processors.
I don't think there is a case where it is really important but I wanted to
let you now just in case.
Regards,
Antoine Vandecreme
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html