fissa.readimagejrois module¶
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.
read_imagej_roi_zip
(filename)[source]¶ Reads an ImageJ ROI zip set and parses each ROI individually
Parameters: filename (str) – Path to the ImageJ ROis zip file Returns: roi_list – List of the parsed ImageJ ROIs Return type: list
-
fissa.readimagejrois.
read_roi
(roi_obj)[source]¶ Parses an individual ImageJ ROI
This is based on the Java implementation: http://rsbweb.nih.gov/ij/developer/source/ij/io/RoiDecoder.java.html
Parameters: roi_obj (file object) – 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 objectValueError
– If unable to parse ROI