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
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.

fissa.readimagejrois.read_imagej_roi_zip(filename)[source]#

Read an ImageJ ROI zip set and parse each ROI individually.

Parameters
filenamestr

Path to the ImageJ ROis zip file.

Returns
roi_listlist

List of the parsed ImageJ ROIs.