perch.structure
Classes
|
Class for storing information about a topological structure in an image. |
- class perch.structure.Structure(pi=None, id=None, id_ph=None, img_shape=None, sdir='./')
Bases:
objectClass for storing information about a topological structure in an image.
Parameters
- piarray-like
Array of persistence information. The first element is the homology type, the second is the birth time, the third is the death time, the next three are the birth pixel coordinates, and the last three are the death pixel coordinates.
- idint
Unique identifier for the structure, in the subset of selected structures.
- id_phint
Unique identifier for the structure, in the full persistence diagram.
- img_shapetuple
Shape of the image the structure is segmented from.
- sdirstr
Directory to save/load structure information.
- compute_segment(img)
Compute the segmentation of the structure in the image.
Parameters
- imgarray-like
Image to segment the structure from.
- get_mask()
Get mask of the structure.