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)¶ Parses an individual ImageJ ROI
This implementation utilises the read_roi package, which is more robust but does only supports Python 3+ and not Python 2.7.
Parameters: roi_source (str or file object) – Path to file, or file object containing a single ImageJ ROI
Returns: Returns a parsed ROI object, a dictionary with either a ‘polygons’ or a ‘mask’ field.
Return type: Raises: IOError
– If there is an error reading the roi file object.ValueError
– If unable to parse ROI.