Reads ImageJ ROIs into numpy arrays. Use it like:
>>> import ijroi
>>> with open("my_roi.roi", "rb") as f:
... roi = ijroi.read_roi(f)
...
>>> isinstance(roi, np.ndarray)
True
read_roi returns a Nx2 array, where each row is a (row, column) or (y, x) pair.
Based on Luis Pedro Coelho's readroi.py gist.
ijroi is offered under the MIT license.
ijroi is maintained by Tim D. Smith. The core functionality was implemented by Luis Pedro Coelho.