arg! Calibration.getX() and Calibration.getY() being passed illegal pixel values

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

arg! Calibration.getX() and Calibration.getY() being passed illegal pixel values

Zummy
Well, I thought I would get tricky, and override the Calibration.getX() and
Calibration.getY()
methods to implement my own lookup.  Unfortunately,  these methods are being
passed pixel values which don't exist!  My image is 128x128 pixels, and I
assumed that
these methods would be passed values from 0-127.  They are being passed
values from
outside the image!   This is particularly apparent when dragging ROIs
around.  I have a reasonable
workaround that I had worked out before.  I will check the range from
0-127, and if it's
outside the range, I will apply the workaround.

I guess there are no contracts in Java.  Oh well!

John