On 13/03/2024 12:30, Jeremy Adler wrote:
When getPixel(x,y) is asked to read a location that is outside the selected 
image it returns the value 0.
While a selection that is outside the image returns NaN - flagging the mistake.

Is there a reason for getPixel returning zeros rather than a NaN or simply 
crashing?

Hi, I do not have an answer, but I believe a lot of code already written assumes zero outside the image. If that is to be changed to NAN, I would welcome that to be an option and not the only behaviour so no code is broken.

Regards

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Reply via email to