OrsGridBasedSAM_9fabead7dc3411f08046c85ea97229ba¶
OrsGridBasedSAM - A plugin that provides a simple button interface for grid-based SAM functionality. This plugin is embedded within OrsAISegmentationTools and should not create its own dock widget.
Class Code¶
- class OrsPythonPlugins.OrsGridBasedSAM_9fabead7dc3411f08046c85ea97229ba.OrsGridBasedSAM_9fabead7dc3411f08046c85ea97229ba.OrsGridBasedSAM_9fabead7dc3411f08046c85ea97229ba(*args, **kwargs)¶
- class AutoMaskGeneratorParameters(points_per_side: int | None = 32, pred_iou_thresh: float = 0.88, stability_score_thresh: float = 0.95, box_nms_thresh: float = 0.7, point_grids: list[numpy.ndarray] | None = None, min_mask_region_area: int = 10)¶
- class AutoPointMethod(*values)¶
- interfacemethod applyGridBasedSAM(sliceChannels: Annotated[list[Channel], MinLen(min_length=1)], timeStep: int, autoPointMethod: str, pointsNb: int, predIoUThreshold: float, stabilityScoreThreshold: float, boxNMSThreshold: float) str¶
Compute slice channels segmentation
- Parameters:
sliceChannels (ORSModel.ors.Channel) [count=[1, 3]] – The slice channels on which to perform the segmentation
timeStep (int) – The time step of the segmentation
autoPointMethod (str) – The method used to get the sampling points grid
pointsNb (int) – The total number of sampling points
predIoUThreshold (float) – A quality threshold for the output masks
stabilityScoreThreshold (float) – A stability score threshold based on how much the output mask varies with changes in its binarization threshold
boxNMSThreshold (float) – The box IoU cutoff used by non-maximal suppression to filter duplicate masks
- Returns:
errMsg (str) – The error message
- cleanup()¶
Deletes the variables managed by the plugin. It is the place to remove callbacks and other references to Python objects that would prevent them to be garbage collected. This method is called during the process of deletion of the plugin. It calls for the cleanup and deletion of the forms.
- interfacemethod computeCurrentSlices(inputChannels: Annotated[list[Channel], MinLen(min_length=1)], viewBoundedPlane: Rectangle) Annotated[list[Channel], MinLen(min_length=0)]¶
Compute slice channels
- Parameters:
inputChannels (ORSModel.ors.Channel) [count=[1, 3]] – list of input channels
viewBoundedPlane (ORSModel.ors.Rectangle) – The bounded plane defining the slice region
- Returns:
sliceChannels (ORSModel.ors.Channel) [count=[0, 3]] – The slice channels
- classmethod getMainFormClass()¶
Gets the class of the main form
- Returns:
output –
