Skip to content

Commit

Permalink
Add docstrings to Segmentation init (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaiaPomar committed Feb 24, 2023
1 parent 6327578 commit 223f0b6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions imgtools/modules/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ def map_over_labels(segmentation, f, include_background=False, return_segmentati

class Segmentation(sitk.Image):
def __init__(self, segmentation, roi_indices=None, existing_roi_indices=None, raw_roi_names=None):
"""Initializes the Segmentation class
Parameters
----------
roi_indices
Dictionary of {"ROI": label number}
existing_roi_indices
Dictionary of {"ROI": label number} of the existing ROIs
raw_roi_names
Dictionary of {"ROI": original countor names}
"""
super().__init__(segmentation)
self.num_labels = self.GetNumberOfComponentsPerPixel()
if not roi_indices:
Expand Down

0 comments on commit 223f0b6

Please sign in to comment.