fissa.readimagejrois module#
Tools for reading ImageJ files.
Based on code originally written by Luis Pedro Coelho <luis@luispedro.org>, 2012, available at https://gist.github.com/luispedro/3437255, distributed under the MIT License.
- Modified
2014 by Jeffrey Zaremba (@jzaremba), https://github.com/losonczylab/sima
2015 by Scott Lowe (@scottclowe) and Sander Keemink (@swkeemink).
- fissa.readimagejrois.parse_roi_file(roi_source)#
Parse an individual ImageJ ROI.
- Parameters
- roi_sourcestr or file object
Path to file, or file object containing a single ImageJ ROI.
- Returns
- dict
Returns a parsed ROI object, a dictionary with either a
"polygons"
or a"mask"
field.
- Raises
- IOError
If there is an error reading the roi file object.
- ValueError
If unable to parse ROI.