OrsVolumeROIPainter¶
Handles all aspects of painting Regions of Interest
- author:
Dragonfly Team
- contact:
- email:
- organization:
Comet Technologies Canada Inc.
- address:
460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7
- copyright:
Comet Technologies Canada Inc. All rights reserved 2023.
- date:
Jun 10 2015 13:37
- dragonflyVersion:
3.1.0.286 (D)
- UUID:
1d3fb7ba761e11e7a73e448a5b5d70c0
Class Code¶
- class OrsPythonPlugins.OrsVolumeROIPainter.OrsVolumeROIPainter.OrsVolumeROIPainter(*args, **kwargs)¶
- 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 draw2DPath(aROI: Union[ROI, MultiROI], path: VisualPath, transformationMatrix: Matrix4x4, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0, boxSize: int = 3, thicknessSize: int = 1, isSingleSlicePath: bool = False, bplane: Rectangle = None, kernelSize: int = None) None¶
Inject a path in a ROI.
Changed in version KernelSize: has been replaced by boxSize and thicknessSize (version 2024.2)
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
path (ORSModel.ors.VisualPath) – the path
transformationMatrix (ORSModel.ors.Matrix4x4) – the transformation matrix from the view to the region
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
boxSize (int) – the size of the box
thicknessSize (int) – the size of the path drawn
isSingleSlicePath (bool) – is the path single slice
bplane (ORSModel.ors.Rectangle) – bouding plane of current view
kernelSize (int) [deprecated: use boxSize and thicknessSize instead] – the size of the path drawn
- Anonymize path:
True
- interfacemethod draw2DRegion(aROI: Union[ROI, MultiROI], region: VisualRegion, transformationMatrix: Matrix4x4, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0) None¶
Inject a region in a ROI
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
region (ORSModel.ors.VisualRegion) – the region
transformationMatrix (ORSModel.ors.Matrix4x4) – the transformation matrix from the view to the region
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
- interfacemethod draw2dPointAndClick(roi: Union[ROI, MultiROI], subsetStructuredGrid: StructuredGrid, worldCoordinate: Vector3 = None, isInAdd: bool = False, connectivityForLabelization: bool = False, currentTime: int = 0, minValue: float = 0, maxValue: float = 0, outlineMode: bool = False, isPointAndFillMode: bool = False, isEnterAction: bool = False) None¶
Draw point and click 2D in a ROI
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
subsetStructuredGrid (ORSModel.ors.StructuredGrid) – the structured grid to use for point and click
worldCoordinate (ORSModel.ors.Vector3) – the coordinates of the cursor
isInAdd (bool) – indicating whether the voxel index should be added or removed from the ROI
connectivityForLabelization (bool) – connectivity for labelization to multiroi
currentTime (int) – the time step index of the ROI
minValue (float) – the threshold range minimal value
maxValue (float) – the threshold range maximal value
outlineMode (bool) – is current state in outline mode
isPointAndFillMode (bool) – is current state in fill mode
isEnterAction (bool) – is click in enter action
- interfacemethod draw3DRegion(aROI: Union[ROI, MultiROI], region: VisualRegion, camera: Camera, t: int = 0, remove: bool = False, isOrtho: bool = False) None¶
Injects a region in a ROI
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
region (ORSModel.ors.VisualRegion) – the region
camera (ORSModel.ors.Camera) – the view camera
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
isOrtho (bool) – is the view in ortho mode
- interfacemethod draw3DRegionIntersectingDataset(aROI: Union[ROI, MultiROI], region: VisualRegion, camera: Camera, dataset: Channel, rangeMin: float, rangeMax: float, lut: LookupTable, t: int = 0, remove: bool = False, clipBox: Box = None, isOrtho: bool = False) None¶
Injects a region in a ROI intersecting a dataset
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
region (ORSModel.ors.VisualRegion) – the region
camera (ORSModel.ors.Camera) – the view camera
dataset (ORSModel.ors.Channel) [const] – the intersecting dataset
rangeMin (float) – minimal value of the dataset intensity to include in the ROI
rangeMax (float) – maximal value of the dataset intensity to include in the ROI
lut (ORSModel.ors.LookupTable) – a LUT
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
clipBox (ORSModel.ors.Box) – clip the resulting roi by this box
isOrtho (bool) – is the view in ortho mode
- interfacemethod draw3DRegionIntersectingMultiROI(aROI: Union[ROI, MultiROI], region: VisualRegion, camera: Camera, aMultiROI: MultiROI, highlightOpacityInRange: float, highlightOpacityOutRange: float, t: int = 0, remove: bool = False, clipBox: Box = None, isOrtho: bool = False) None¶
Injects a region in a ROI intersecting a MultiROI
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
region (ORSModel.ors.VisualRegion) – the region
camera (ORSModel.ors.Camera) – the view camera
aMultiROI (ORSModel.ors.MultiROI) [const] – the intersecting MultiROI
highlightOpacityInRange (float) – highlight opacity of the MultiROI labels in the selection range
highlightOpacityOutRange (float) – highlight opacity of the MultiROI labels out of the selection range
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
clipBox (ORSModel.ors.Box) – clip the resulting roi by this box
isOrtho (bool) – is the view in ortho mode
- interfacemethod draw3DRegionIntersectingROI(aROI: Union[ROI, MultiROI], region: VisualRegion, camera: Camera, intersectingROI: ROI, t: int = 0, remove: bool = False, clipBox: Box = None, isOrtho: bool = False) None¶
Injects a region in a ROI intersecting a ROI
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
region (ORSModel.ors.VisualRegion) – the region
camera (ORSModel.ors.Camera) – the view camera
intersectingROI (ORSModel.ors.ROI) [const] – the intersecting ROI
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
clipBox (ORSModel.ors.Box) – clip the resulting roi by this box
isOrtho (bool) – is the view in ortho mode
- interfacemethod draw3dPointAndClick(aPointClickLogic: PointClickLogic, roi: Union[ROI, MultiROI], structuredGrid: StructuredGrid, worldCoordinate: Vector3 = None, isInAdd: bool = False, connectivityForLabelization: bool = False, currentTime: int = 0, minValue: float = 0, maxValue: float = 0, outlineMode: bool = False, isPointAndFillMode: bool = False, isEnterAction: bool = False) None¶
Draw point and click 3D in a ROI
- Parameters:
aPointClickLogic (transient PointClickLogic) – a PointClickLogic
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
structuredGrid (ORSModel.ors.StructuredGrid) – the structured grid to use for point and click
worldCoordinate (ORSModel.ors.Vector3) – the coordinates of the cursor
isInAdd (bool) – indicating whether the voxel index should be added or removed from the ROI
connectivityForLabelization (bool) – connectivity for labelization to multiroi
currentTime (int) – the time step index of the ROI
minValue (float) – the threshold range minimal value
maxValue (float) – the threshold range maximal value
outlineMode (bool) – is current state in outline mode
isPointAndFillMode (bool) – is current state in fill mode
isEnterAction (bool) – is click in enter action
- interfacemethod drawCircle(roi: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0, oppositeROI: ROI = None, roiToExclude: Optional[List] = None) None¶
Inject a circle in a ROI
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the circle
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
oppositeROI (ORSModel.ors.ROI) – a ROI where the opposite operation will be done
roiToExclude (ORSModel.ors.ROI) [count=[0, None]] – list of additional ROIs to remove from
- interfacemethod drawCircleIntersect(roi: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0, oppositeROI: ROI = None, roiMasks: Optional[List] = None, removeFromMask: bool = True) None¶
Inject a circle in a ROI with intersect
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the circle
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
oppositeROI (ORSModel.ors.ROI) – a ROI where the opposite operation will be done
roiMasks (ORSModel.ors.ROI) [count=[0, None]] – list of ROIs to use has mask
removeFromMask (bool) – indicating whether the operation should remove from the masks
- interfacemethod drawCube(roi, boundedPlane, worldPos, brushSize, t=0, remove=False, rangeChannel=None, rangeMin=0.0, rangeMax=0.0, oppositeROI=None, roiToExclude: Optional[List] = None)¶
Inject a cube in a ROI
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the cube
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
oppositeROI (ORSModel.ors.ROI) – a ROI where the opposite operation will be done
roiToExclude (ORSModel.ors.ROI) [count=[0, None]] – list of additional ROIs to remove from
- interfacemethod drawCubeIntersect(roi: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0, oppositeROI: ROI = None, roiMasks: Optional[List] = None, removeFromMask: bool = True) None¶
Inject a cube in a ROI with intersect
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the cube
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
oppositeROI (ORSModel.ors.ROI) – a ROI where the opposite operation will be done
roiMasks (ORSModel.ors.ROI) [count=[0, None]] – list of ROIs to use has mask
removeFromMask (bool) – indicating whether the operation should remove from the masks
- interfacemethod drawCubeOn3D(aROI: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False) None¶
Inject a cube in a ROI on 3D
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the cube
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawCubeOn3DIntersectingDataset(aROI: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, dataset: Channel, rangeMin: float, rangeMax: float, lut: LookupTable, t: int = 0, remove: bool = False) None¶
Injects a cube in a ROI in 3D intersecting a dataset
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the cube
brushSize (float) – the brush radius size in world coordinate
dataset (ORSModel.ors.Channel) [const] – the intersecting dataset
rangeMin (float) – minimal value of the dataset intensity to include in the ROI
rangeMax (float) – maximal value of the dataset intensity to include in the ROI
lut (ORSModel.ors.LookupTable) – a LUT
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawCubeOn3DIntersectingMultiROI(aROI: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, aMultiROI: MultiROI, highlightOpacityInRange: float, highlightOpacityOutRange: float, t: int = 0, remove: bool = False) None¶
Injects a cube in a ROI in 3D intersecting a MultiROI
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the cube
brushSize (float) – the brush radius size in world coordinate
aMultiROI (ORSModel.ors.MultiROI) [const] – the intersecting MultiROI
highlightOpacityInRange (float) – highlight opacity of the MultiROI labels in the selection range
highlightOpacityOutRange (float) – highlight opacity of the MultiROI labels out of the selection range
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawCubeOn3DIntersectingROI(aROI: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, intersectingROI: ROI, t: int = 0, remove: bool = False) None¶
Injects a cube in a ROI in 3D intersecting a ROI
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the cube
brushSize (float) – the brush radius size in world coordinate
intersectingROI (ORSModel.ors.ROI) [const] – the intersecting ROI
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawSmartGrid(smartGridSegmentationLogic: SmartGridSegmentationLogic, smartGridClickLogic: SmartGridSegmentationClickLogic, roi: Union[ROI, MultiROI], inputStructuredGrid: StructuredGrid, worldCoordinate: Vector3, brushSize: float, currentTime: int, isInAdd: bool, isEnterAction: bool, bounded_plane: Rectangle, gridSize: tuple, sigma: float) None¶
Draw smart grid in a ROI
- Parameters:
smartGridSegmentationLogic (transient SmartGridSegmentationLogic) – a SmartGridSegmentationLogic
smartGridClickLogic (transient SmartGridSegmentationClickLogic) – a SmartGridSegmentationClickLogic
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
inputStructuredGrid (ORSModel.ors.StructuredGrid) – the structured grid to use for smart grid
worldCoordinate (ORSModel.ors.Vector3) – the coordinates of the cursor
brushSize (float) – the brush radius size in world coordinate
currentTime (int) – the time step index of the ROI
isInAdd (bool) – indicating whether the voxel index should be added or removed from the ROI
isEnterAction (bool) – is click in enter action
bounded_plane (ORSModel.ors.Rectangle) – the drawing bounded plane
gridSize (tuple) – smart grid size in x and y
sigma (float) – smart grid sigma
- interfacemethod drawSnap(blowTool: BlowTool, roi: Union[ROI, MultiROI], worldPosition: Vector3, timeStep: int, remove: bool) None¶
Instantiates a Blow tool for snap
- Parameters:
blowTool (transient BlowTool) – a BlowTool
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
worldPosition (ORSModel.ors.Vector3) – the coordinates of the cursor
timeStep (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawSphere(roi: Union[ROI, MultiROI], worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0, oppositeROI: ROI = None, roiToExclude: Optional[List] = None) None¶
Inject a sphere in a ROI
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the sphere
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
oppositeROI (ORSModel.ors.ROI) – a ROI where the opposite operation will be done
roiToExclude (ORSModel.ors.ROI) [count=[0, None]] – list of additional ROIs to remove from
- interfacemethod drawSphereIntersect(roi: Union[ROI, MultiROI], worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0, oppositeROI: ROI = None, roiMasks: Optional[List] = None, removeFromMask: bool = True) None¶
Inject a sphere in a ROI with intersect
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the sphere
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
oppositeROI (ORSModel.ors.ROI) – a ROI where the opposite operation will be done
roiMasks (ORSModel.ors.ROI) [count=[0, None]] – list of ROIs to use has mask
removeFromMask (bool) – indicating whether the operation should remove from the masks
- interfacemethod drawSphereOn3D(aROI: Union[ROI, MultiROI], worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False) None¶
Inject a sphere in a ROI in 3D
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the sphere
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawSphereOn3DIntersectingDataset(aROI: Union[ROI, MultiROI], worldPos: Vector3, brushSize: float, dataset: Channel, rangeMin: float, rangeMax: float, lut: LookupTable, t: int = 0, remove: bool = False) None¶
Injects a sphere in a ROI in 3D intersecting a dataset
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the sphere
brushSize (float) – the brush radius size in world coordinate
dataset (ORSModel.ors.Channel) [const] – the intersecting dataset
rangeMin (float) – minimal value of the dataset intensity to include in the ROI
rangeMax (float) – maximal value of the dataset intensity to include in the ROI
lut (ORSModel.ors.LookupTable) – a LUT
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawSphereOn3DIntersectingMultiROI(aROI: Union[ROI, MultiROI], worldPos: Vector3, brushSize: float, aMultiROI: MultiROI, highlightOpacityInRange: float, highlightOpacityOutRange: float, t: int = 0, remove: bool = False) None¶
Injects a sphere in a ROI in 3D intersecting a MultiROI
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the sphere
brushSize (float) – the brush radius size in world coordinate
aMultiROI (ORSModel.ors.MultiROI) [const] – the intersecting MultiROI
highlightOpacityInRange (float) – highlight opacity of the MultiROI labels in the selection range
highlightOpacityOutRange (float) – highlight opacity of the MultiROI labels out of the selection range
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawSphereOn3DIntersectingROI(aROI: Union[ROI, MultiROI], worldPos: Vector3, brushSize: float, intersectingROI: ROI, t: int = 0, remove: bool = False) None¶
Injects a sphere in a ROI in 3D intersecting a ROI
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the sphere
brushSize (float) – the brush radius size in world coordinate
intersectingROI (ORSModel.ors.ROI) [const] – the intersecting ROI
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
- interfacemethod drawSquare(roi: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0, oppositeROI: ROI = None, roiToExclude: Optional[List] = None) None¶
Inject a square in a ROI
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the square
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
oppositeROI (ORSModel.ors.ROI) – a ROI where the opposite operation will be done
roiToExclude (ORSModel.ors.ROI) [count=[0, None]] – list of additional ROIs to remove from
- interfacemethod drawSquareIntersect(roi: Union[ROI, MultiROI], boundedPlane: Rectangle, worldPos: Vector3, brushSize: float, t: int = 0, remove: bool = False, rangeChannel: Channel = None, rangeMin: float = 0.0, rangeMax: float = 0.0, oppositeROI: ROI = None, roiMasks: Optional[List] = None, removeFromMask: bool = True) None¶
Inject a square in a ROI with intersect
Deprecated since version 2021.1: Use method of dynamic brushes instead
- Parameters:
roi (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
boundedPlane (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPos (ORSModel.ors.Vector3) – the world position of the voxel at the center of the square
brushSize (float) – the brush radius size in world coordinate
t (int) – the time step index of the ROI
remove (bool) – indicating whether the voxel index should be added or removed from the ROI
rangeChannel (ORSModel.ors.Channel) [const] – the dataset to check against (if None, the range won’t be used)
rangeMin (float) – the threshold range minimal value (used only if rangeChannel is not None)
rangeMax (float) – the threshold range maximal value (used only if rangeChannel is not None)
oppositeROI (ORSModel.ors.ROI) – a ROI where the opposite operation will be done
roiMasks (ORSModel.ors.ROI) [count=[0, None]] – list of ROIs to use has mask
removeFromMask (bool) – indicating whether the operation should remove from the masks
- static getClipBox(stucturedGrid, view)¶
Get the ROI clip box
- classmethod getMainFormClass()¶
Gets the class of the main form
- Returns:
output –
- getMultiROI()¶
Get the current MultiROI
- Returns:
mr (ORSModel.ors.MultiROI) – The current MultiROI
- getMultiROIs()¶
Get the current MultiROIs
- Returns:
mrois (ORSModel.ors.MultiROI) – list of MultiROI
- Rcount mrois:
[0, None]
- interfacemethod getStructuredGridIntersectingWithView(bounded_plane: Rectangle, referenceStructuredGrid: StructuredGrid) StructuredGrid¶
Get the structured grid slice if in 2d, copy the full structured grid if 3d
- Parameters:
bounded_plane (ORSModel.ors.Rectangle) – bouding plane of current view
referenceStructuredGrid (ORSModel.ors.StructuredGrid) – reference structured grid
- Returns:
output (ORSModel.ors.StructuredGrid) – reference structured grid
- getVolumeROI()¶
Get the current volume ROI
- Returns:
volumeROI (ORSModel.ors.ROI) – The current ROI
- getVolumeROIs()¶
Get the current volume ROIs
- Returns:
rois (ORSModel.ors.ROI) – list of ROIs
- Rcount rois:
[0, None]
- interfacemethod getWindowLevel3DMinMaxForPaintingFromGenealogicalName(layoutFullName: str, dataset: Channel) Tuple[float, float]¶
Gets the dataset 3D window/level range in layout for painting
- Parameters:
layoutFullName (str) – a genealogical name
dataset (ORSModel.ors.Channel) – a dataset
- Returns:
rangeMin (float) – minimal value of the range
rangeMax (float) – maximal value of the range
- handleChanged(oldHandleName, newHandleName)¶
This method is called when the state of the application is changed.
- Parameters:
oldState (str) – name of the old (previous) state
newState (str) – name of the new (current) state
- handleTriggered(event)¶
This method is called on every user input (mouse move, mouse click, key press, …) when the current state of the application is one of those declared by the plugin. This method can be used to perform specific tasks even if no action is currently in progress.
- Parameters:
eventData (OrsEvent.eventdata.InputEventData) – the event data
- classmethod importAllLoggingClasses()¶
This method is called to make any class extension available for macro playing. It should:
import all class extension;
return a list of classes where logging is supported.
- Returns:
output (list of classes) – list of classes where logging is supported by the current plugin
- interfacemethod instantiateBlowTool() BlowTool¶
Instantiates a Blow tool for snap
- Returns:
output (transient BlowTool) – a BlowTool
- interfacemethod instantiatePointClickLogic() PointClickLogic¶
Instantiates a PointClickLogic
- Returns:
output (transient PointClickLogic) – a PointClickLogic
- interfacemethod instantiateSmartGridClickLogic(targetStructuredGrid: Union[ROI, MultiROI], labelROI: StructuredGrid = None) SmartGridSegmentationClickLogic¶
Instantiates a SmartGridLogic
- Parameters:
targetStructuredGrid (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – the ROI or MultiROI to paint
labelROI (ORSModel.ors.StructuredGrid) – the structured grid to use for smart grid
- Returns:
output (transient SmartGridSegmentationClickLogic) – a SmartGridSegmentationClickLogic
- interfacemethod prepareDrawSnap(blowTool: BlowTool, channel: StructuredGrid, rectangle: Rectangle, worldPosition: Vector3, brushSize: float, timeStep: int, minV: float, maxV: float, useRange: bool, onLevelling: bool = True, filter: bool = False) VisualPath¶
Prepare for draw snap ROI
- Parameters:
blowTool (transient BlowTool) – a BlowTool
channel (ORSModel.ors.StructuredGrid) – the structured grid to use for smart grid
rectangle (ORSModel.ors.Rectangle) – the drawing bounded plane
worldPosition (ORSModel.ors.Vector3) – the coordinates of the cursor
brushSize (float) – the brush radius size in world coordinate
timeStep (int) – the time step index of the ROI
minV (float) – the threshold range minimal value
maxV (float) – the threshold range maximal value
useRange (bool) – indicating whether the voxel index should be added or removed from the ROI
onLevelling (bool) – indicating whether the voxel index should be added or removed from the ROI
filter (bool) – indicating whether the voxel index should be added or removed from the ROI
- Returns:
output (ORSModel.ors.VisualPath) – path
- setCursor(handleName)¶
Sets the current cursor
- Parameters:
state (str) – state associated to the cursor to set