$ simvascular --python >>> import sv >>> help(sv.segmentation) Help on module segmentation: NAME segmentation - SimVascular segmentation module. DESCRIPTION The segmentation module provides an interface for SV segmentation methods. A segmentation defines the contour geometry of a region of interest using various 2D image segmentation methods. The segmentation module provides several classes used to create and modify 2D segmentations using circle, ellipse, level set, polygon, spline polygon and threshold methods. Circle, ellipse, polygon, and spline polygon methods are used to manually define the segmentation region using a set of control points. The level set and threshold methods compute the segmentation region automatically based on image properties and option settings. CLASSES builtins.Exception(builtins.BaseException) SegmentationError builtins.Segmentation(builtins.object) Circle Contour LevelSet Polygon SplinePolygon Threshold builtins.object Group Method SubdivisionType class Circle(builtins.Segmentation) | Circle(radius, center=None, normal=None, frame=None) | | The CircleSegmentation class provides an interface for creating a circle segmentation. | A circle segmentation is defined by a radius, a 3D point defining its center and a normal. | The normal defines its orientation (i.e. the plane the circle lies in). | | A CircleSegmentation object is created using a radius, center and normal or a PathFrame object. | | | A PathFrame object contains a path's interpolating spline (curve points) position, tangent, and normal data | at a given location. The position is used for the circle center, the tangent for its normal. | | Args: | radius (float): The circle radius. | center (list([float,float,float]): The circle center. | normal(list([float,float,float]): The circle normal direction. | frame (Optional[PathFrame]): A PathFrame object defing the circle's center and coordinate frame. | | Method resolution order: | Circle | builtins.Segmentation | builtins.object | | Methods defined here: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | get_center(...) | get_center() | | Get the circle segmentation center. | | Returns (list([float,float,float]): The circle center. | | get_normal(...) | get_normal() | | Get the circle segmentation normal. | | Returns (list([float,float,float]): The circle normal. | | get_radius(...) | get_radius(r) | | Get the radius for a circle segmentation. | | Returns (float): The radius of the circle. | | set_center(...) | set_center(center) | | Set the circle segmentation center. | | Args: | center (list([float,float,float]): The circle center. | | set_frame(...) | set_frame(frame) | | Set the circle segmentation coordinate frame using a PathFrame object. | | Args: | frame (PathFrame): The PathFrame object defing the circle's center and coordinate frame. | | set_normal(...) | set_normal(normal) | | Set the circle segmentation normal. | | Args: | normal (list([float,float,float]): The circle normal. | | set_radius(...) | set_radius(radius) | | Set the radius for a circle segmentation. | | Args: | radius (float): The radius of the circle. | | ---------------------------------------------------------------------- | Methods inherited from builtins.Segmentation: | | get_id(...) | get_id() | | Get the contour ID. | | Args: | None | | Returns int: The contour id. | | get_path_point(...) | get_path_point() | | Get the contour path point. | | Args: | None | | Returns dict(pos:[x,y,z], tangent:[x,y,z], rotation:[x,y,z]): The contour path point. | | get_points(...) | get_points() | | Get the segmentation contour points. | | Args: | None | | Returns list([x,y,z]): The list of contour points. | | get_polydata(...) | get_vtk_polydata() | | Get the contour type. | | Args: | None | Returns (str): contour type. | | get_type(...) | get_type() | | Get the contour type. | | Args: | None | Returns (str): contour type. class Contour(builtins.Segmentation) | Contour(contour_points) | | The ContourSegmentation class provides an interface for creating a contour segmentation. | A contur segmentation is defined by a set of 3D points. | | Args: | points(list([float,float,float]): The list of 3D points defining the contour. | | Method resolution order: | Contour | builtins.Segmentation | builtins.object | | Methods defined here: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | get_center(...) | get_center() | | Get the center of the polygon segmentation. | | | Returns (list([float,float,float]): The polygon segmentation center. | | get_normal(...) | get_normal() | | Get the normal of the polygon segmentation. | | | Returns (list([float,float,float]): The polygon segmentation normal. | | set_contour_points(...) | set_contour_points(contour_points) | | Set the contour points for a contour segmentation. | | Args: | points (list(list([float,float,float])): The list of contour points. | | ---------------------------------------------------------------------- | Methods inherited from builtins.Segmentation: | | get_id(...) | get_id() | | Get the contour ID. | | Args: | None | | Returns int: The contour id. | | get_path_point(...) | get_path_point() | | Get the contour path point. | | Args: | None | | Returns dict(pos:[x,y,z], tangent:[x,y,z], rotation:[x,y,z]): The contour path point. | | get_points(...) | get_points() | | Get the segmentation contour points. | | Args: | None | | Returns list([x,y,z]): The list of contour points. | | get_polydata(...) | get_vtk_polydata() | | Get the contour type. | | Args: | None | Returns (str): contour type. | | get_type(...) | get_type() | | Get the contour type. | | Args: | None | Returns (str): contour type. class Group(builtins.object) | ContourGroup objects | | Methods defined here: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | get_segmentation(...) | get_segmentation(time) | | Get the segmentation for a given time. | | Args: | time (int): The time to get the segmentation for. | | Returns (sv.segmentation.Segmentation object): The segmentation object for the given time. | | get_time_size(...) | set_contour(name) | | Store the polydata for the named contour into the repository. | | Args: | name (str): | | number_of_segmentations(...) | get_size() | | Get the number of contours in the group. | | Args: | None | Returns (int): The number of contours in the group. | | write(...) | write(file_name) | | Write the contour group to an SV .pth file. | | Args: | file_name (str): The name of the file to write the contour group to. class LevelSet(builtins.Segmentation) | LevelSet Segmentation objects | | Method resolution order: | LevelSet | builtins.Segmentation | builtins.object | | Methods defined here: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.Segmentation: | | get_center(...) | get_center() | | Get the center of the segmentation. | | Returns list([x,y,z]): The center of the segmentation. | | get_id(...) | get_id() | | Get the contour ID. | | Args: | None | | Returns int: The contour id. | | get_path_point(...) | get_path_point() | | Get the contour path point. | | Args: | None | | Returns dict(pos:[x,y,z], tangent:[x,y,z], rotation:[x,y,z]): The contour path point. | | get_points(...) | get_points() | | Get the segmentation contour points. | | Args: | None | | Returns list([x,y,z]): The list of contour points. | | get_polydata(...) | get_vtk_polydata() | | Get the contour type. | | Args: | None | Returns (str): contour type. | | get_type(...) | get_type() | | Get the contour type. | | Args: | None | Returns (str): contour type. class Method(builtins.object) | segmentation method class functions. | | Methods defined here: | | get_names(...) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | CIRCLE = 'CIRCLE' | | CONTOUR = 'CONTOUR' | | ELLIPSE = 'ELLIPSE' | | LEVEL_SET = 'LEVEL_SET' | | POLYGON = 'POLYGON' | | SPLINE_POLYGON = 'SPLINE_POLYGON' | | THRESHOLD = 'THRESHOLD' | | names = ['CIRCLE', 'CONTOUR', 'ELLIPSE', 'LEVEL_SET', 'POLYGON', 'SPLI... class Polygon(builtins.Segmentation) | PyPolygon(control_points) | | The PolygonSegmentation class provides an interface for creating a polygon segmentation. | A polygon segmentation is defined by a list of control points defining its boundary. | | Args: | points (list(list([float,float,float])): The list of control points. | | Method resolution order: | Polygon | builtins.Segmentation | builtins.object | | Methods defined here: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | get_center(...) | get_center() | | Get the center of the polygon segmentation. | | | Returns (list([float,float,float]): The polygon segmentation center. | | get_control_points(...) | get_control_points() | | Get the control points for a polygon segmentation. | | | Returns (list(list([float,float,float])): The list of control points. | | get_normal(...) | get_normal() | | Get the normal of the polygon segmentation. | | | Returns (list([float,float,float]): The polygon segmentation normal. | | set_control_points(...) | set_control_points(control_points) | | Set the control points for a polygon segmentation. | | Args: | points (list(list([float,float,float])): The list of control points. | | ---------------------------------------------------------------------- | Methods inherited from builtins.Segmentation: | | get_id(...) | get_id() | | Get the contour ID. | | Args: | None | | Returns int: The contour id. | | get_path_point(...) | get_path_point() | | Get the contour path point. | | Args: | None | | Returns dict(pos:[x,y,z], tangent:[x,y,z], rotation:[x,y,z]): The contour path point. | | get_points(...) | get_points() | | Get the segmentation contour points. | | Args: | None | | Returns list([x,y,z]): The list of contour points. | | get_polydata(...) | get_vtk_polydata() | | Get the contour type. | | Args: | None | Returns (str): contour type. | | get_type(...) | get_type() | | Get the contour type. | | Args: | None | Returns (str): contour type. class SegmentationError(builtins.Exception) | Common base class for all non-exit exceptions. | | Method resolution order: | SegmentationError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | helper for pickle | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class SplinePolygon(builtins.Segmentation) | SplinePolygon Segmentation objects | | Method resolution order: | SplinePolygon | builtins.Segmentation | builtins.object | | Methods defined here: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | get_center(...) | get_center() | | Get the center of the polygon segmentation. | | | Returns (list([float,float,float]): The polygon segmentation center. | | get_control_points(...) | get_control_points() | | Get the control points for a polygon segmentation. | | | Returns (list(list([float,float,float])): The list of control points. | | get_normal(...) | get_normal() | | Get the normal of the plane the spline polygon segmentation lies in. | | Returns (list([float,float,float]): The spline polygon segmentation normal. | | get_subdivision_params(...) | get_subdivision_params() | | Get the subdivision parameters used to control the interpolating spline. | | get_subdivision_type(...) | get_subdivision_type() | | Get the subdivision type of the interpolating spline. | | Return type (str): The subdivision type. | | set_control_points(...) | set_control_points(control_points) | | Set the control points for a polygon segmentation. | | Args: | points (list(list([float,float,float])): The list of control points. | | set_subdivision_params(...) | set_subdivision_params(type=None, spacing=None, number=None) | | Set the subdivision parameters used to control the interpolating spline. | | Args: | type (str): The subdivision type. Valid types: CONSTANT_SPACING, CONSTANT_SUBDIVISION_NUMBER, or CONSTANT_TOTAL_NUMBER. | spacing (float): The subdivision spacing. | number (int): The number of subdivisions. | | set_subdivision_type(...) | set_subdivision_type(type) | | Set the subdivision type of the interpolating spline. | | Args: | type (str): The subdivision type. Valid types: CONSTANT_SPACING, CONSTANT_SUBDIVISION_NUMBER, or CONSTANT_TOTAL_NUMBER. | | ---------------------------------------------------------------------- | Methods inherited from builtins.Segmentation: | | get_id(...) | get_id() | | Get the contour ID. | | Args: | None | | Returns int: The contour id. | | get_path_point(...) | get_path_point() | | Get the contour path point. | | Args: | None | | Returns dict(pos:[x,y,z], tangent:[x,y,z], rotation:[x,y,z]): The contour path point. | | get_points(...) | get_points() | | Get the segmentation contour points. | | Args: | None | | Returns list([x,y,z]): The list of contour points. | | get_polydata(...) | get_vtk_polydata() | | Get the contour type. | | Args: | None | Returns (str): contour type. | | get_type(...) | get_type() | | Get the contour type. | | Args: | None | Returns (str): contour type. class SubdivisionType(builtins.object) | segmentation type class functions. | | Methods defined here: | | get_names(...) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | CONSTANT_SPACING = 'CONSTANT_SPACING' | | CONSTANT_SUBDIVISION_NUMBER = 'CONSTANT_SUBDIVISION_NUMBER' | | CONSTANT_TOTAL_NUMBER = 'CONSTANT_TOTAL_NUMBER' | | names = ['CONSTANT_SPACING', 'CONSTANT_SUBDIVISION_NUMBER', 'CONSTANT_... class Threshold(builtins.Segmentation) | Threshold segmentation objects | | Method resolution order: | Threshold | builtins.Segmentation | builtins.object | | Methods defined here: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.Segmentation: | | get_center(...) | get_center() | | Get the center of the segmentation. | | Returns list([x,y,z]): The center of the segmentation. | | get_id(...) | get_id() | | Get the contour ID. | | Args: | None | | Returns int: The contour id. | | get_path_point(...) | get_path_point() | | Get the contour path point. | | Args: | None | | Returns dict(pos:[x,y,z], tangent:[x,y,z], rotation:[x,y,z]): The contour path point. | | get_points(...) | get_points() | | Get the segmentation contour points. | | Args: | None | | Returns list([x,y,z]): The list of contour points. | | get_polydata(...) | get_vtk_polydata() | | Get the contour type. | | Args: | None | Returns (str): contour type. | | get_type(...) | get_type() | | Get the contour type. | | Args: | None | Returns (str): contour type. FUNCTIONS create(...) Create a segmentation object. FILE (built-in)