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

unclosed ROIs are found #6

Closed YubinXie closed 4 years ago

YubinXie commented 5 years ago

When I tried to recover the ROIs that I generated from the ImageJ, I found some of them are not closed. Example attached. The left is from ImageJ and the right is the one recovered using your codes. Appreciate if you can help this. open_roi

adamltyson commented 5 years ago

I've also seen this (Loading .zip files with Python 3.6, Ubuntu 18.04 if that's relevant).

EDIT: This seems to occur when the ROI is "automatically" closed by ImageJ (i.e. the ROI only stores positions specifically selected). Should be easy to fix by joining the first and last ROI positions.

scottclowe commented 4 years ago

The data is loaded correctly from the ROI file, and so I think the current behaviour is the correct behaviour. If you want to close the path, just repeat the first node at the end of the list of nodes as @adamltyson mentions.

I think this issue can be marked as resolved.

hadim commented 4 years ago

Fixed!