hadim / read-roi

Read ROI files .zip or .roi generated with ImageJ.
BSD 3-Clause "New" or "Revised" License
51 stars 22 forks source link

BUG: Loading co-ordinates larger than 32768 #19

Closed scottclowe closed 4 years ago

scottclowe commented 4 years ago

Data for the left/top/right/bottom boundaries of the ROI are stored as either int16 or uint16, with negative co-ordinates and values larger than 2^15 mapping to the same values.

We now make a best guess as to whether the value is negative or very big by checking whether it exceeds the threshold 65036. Values below this remain large positive numbers. Values greater than this become negative values no more negative than -500.

Closes #13.

scottclowe commented 4 years ago

I believe this also closes #7, if it wasn't already resolved.