OrsContourPath

Active contour

author:

Dragonfly Team

contact:

https://dragonfly.comet.tech

email:

support.dragonfly@comet.tech

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:

Jan 26 2017 16:39

dragonflyVersion:

2.1.0.200 (D)

UUID:

274722ace41d11e682470cc47aab53c3

Class Code

class OrsPythonPlugins.OrsContourPath.OrsContourPath.OrsContourPath(*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 editObjectFromGroupOfPaths(aGroupOfRegions: Group, operationToPerform: str, IProgress: Progress = None) None

Edits an object from a set of regions using a Poisson reconstruction.

The regions used in the Poisson reconstruction are only the selected objects contained in the group.

Parameters:
  • aGroupOfRegions (ORSModel.ors.Group) – group containing a list of selected regions to use in the Poisson reconstruction. At this time, the only accepted regions are instances of VisualPath.

  • operationToPerform (str) – operation to perform Should be one of: [‘add’, ‘remove’, ‘intersect’, ‘replace’].

  • IProgress (ORSModel.ors.Progress) – progress object

interfacemethod generatePreview(inputDataset: Channel, viewName: str, useLevelling: bool, useGaussianFilter: bool, gaussianFilterStd: float, cannyProportion: float, cannySigma: float) Channel

Generate a dataset of preview on the slice of the specified view

Parameters:
  • inputDataset (ORSModel.ors.Channel) – input dataset

  • viewName (str) – a view genealogical name

  • useLevelling (bool) – specifies if the window levelling should be used

  • useGaussianFilter (bool) – specifies if the Gaussian filter should be used

  • gaussianFilterStd (float) – standard deviation of the Gaussian filter

  • cannyProportion (float) – pondering factor (between 0.0 and 1.0) of the Canny filter to be added to the gaussian filtered result

  • cannySigma (float) – sigma parameter (>= 0) of the Canny filter

Returns:

previewDataset (ORSModel.ors.Channel) – the dataset of the preview

getCurrentPath()

Gets the path object for which the snake parameters are used.

Return:

the path object

Rtype:

ORSModel.ors.VisualPath

classmethod getMainFormClass()

Gets the class of the main form

Returns:

output

interfacemethod getMeshFromGroupOfPaths(aGroupOfRegions: Group, meshTitle: str, meshColor: Color, IProgress: Progress = None) Mesh

Creates a mesh from a set of regions using a Poisson reconstruction.

The regions used in the Poisson reconstruction are only the selected objects contained in the group.

Parameters:
  • aGroupOfRegions (ORSModel.ors.Group) – group containing a list of selected regions to use in the Poisson reconstruction. At this time, the only accepted regions are instances of VisualPath.

  • meshTitle (str) – the new mesh title

  • meshColor (ORSModel.ors.Color) – the new mesh color

  • IProgress (ORSModel.ors.Progress) – progress object

Anonymize meshTitle:

True

Returns:

newMesh (ORSModel.ors.Mesh) – created mesh obtained by the Poisson reconstruction

interfacemethod getMeshPoissonReconstruction(aGroupOfRegions: Group, depth: int = 8, scale: float = 1.25, solverDivide: int = 8, isoDivide: int = 8, samplesPerNode: float = 1.0, normalsEvaluation: str = 'path plane', inputDataset: Channel = None, IProgress: Progress = None) Mesh

Calls for a Poisson reconstruction on a set of regions.

The regions used in the Poisson reconstruction are only the selected objects contained in the group.

Deprecated since version 3.6: Use getMeshFromGroupOfPaths.

Parameters:
  • aGroupOfRegions (ORSModel.ors.Group) – group containing a list of selected regions to use in the Poisson reconstruction. At this time, the only accepted regions are instances of VisualPath.

  • depth (int) – Poisson reconstruction parameter depth

  • scale (float) – Poisson reconstruction parameter scale

  • solverDivide (int) – Poisson reconstruction parameter solverDivide

  • isoDivide (int) – Poisson reconstruction parameter isoDivide

  • samplesPerNode (float) – Poisson reconstruction parameter samplesPerNode

  • normalsEvaluation (str) – technique to evaluate the normals

  • inputDataset (ORSModel.ors.Channel) – dataset to be used if the normals are to be evaluated from a dataset

  • IProgress (ORSModel.ors.Progress) – progress object

Returns:

newMesh (ORSModel.ors.Mesh) – created mesh obtained by the Poisson reconstruction

classmethod getMinMaxValueLevelling(inputDataset, aView)

Gets the window levelling values for the given dataset in the given view, in data units.

Parameters:
Returns:
  • minValueLevellingDataArray (float) – min value of window levelling in data

  • maxValueLevellingDataArray (float) – max value of window levelling in data

interfacemethod getMultiROIFromGroupOfPaths(aGroupOfRegions: Group, structuredGridShapeOfReference: StructuredGrid, multiROITitle: str, IProgress: Progress = None) MultiROI

Creates a MultiROI from a set of regions using a Poisson reconstruction.

The regions used in the Poisson reconstruction are only the selected objects contained in the group.

Parameters:
  • aGroupOfRegions (ORSModel.ors.Group) – group containing a list of selected regions to use in the Poisson reconstruction. At this time, the only accepted regions are instances of VisualPath.

  • structuredGridShapeOfReference (ORSModel.ors.StructuredGrid) – a structured grid of reference defining the shape of the new ROI

  • multiROITitle (str) – the new MultiROI title

  • IProgress (ORSModel.ors.Progress) – progress object

Anonymize multiROITitle:

True

Returns:

newMultiROI (ORSModel.ors.MultiROI) – created MultiROI, equivalent of the mesh obtained by the Poisson reconstruction

interfacemethod getROIFromGroupOfPaths(aGroupOfRegions: Group, structuredGridShapeOfReference: StructuredGrid, roiTitle: str, roiColor: Color, IProgress: Progress = None) ROI

Creates a ROI from a set of regions using a Poisson reconstruction.

The regions used in the Poisson reconstruction are only the selected objects contained in the group.

Parameters:
  • aGroupOfRegions (ORSModel.ors.Group) – group containing a list of selected regions to use in the Poisson reconstruction. At this time, the only accepted regions are instances of VisualPath.

  • structuredGridShapeOfReference (ORSModel.ors.StructuredGrid) – a structured grid of reference defining the shape of the new ROI

  • roiTitle (str) – the new ROI title

  • roiColor (ORSModel.ors.Color) – the new ROI color

  • IProgress (ORSModel.ors.Progress) – progress object

Anonymize roiTitle:

True

Returns:

newROI (ORSModel.ors.ROI) – created ROI, equivalent of the mesh obtained by the Poisson reconstruction

getSelectedPathsInCurrentGroupOfPaths()

Gets the selected path object(s).

Return:

list of selected path object(s).

Rtype:

list of ORSModel.ors.VisualPath

handleChanged(oldState, newState)

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(eventdata)

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

iterateSelectedPathsActionAction()

Action stage of the action iterateSelectedPathsAction

iterateSelectedPathsActionEnterAction()

EnterAction stage of the action iterateSelectedPathsAction

This action uses the instance variable “_iterateSelectedPathsActionBuffer”, a buffer kept in the implementation instance.

iterateSelectedPathsActionExitAction()

ExitAction stage of the action iterateSelectedPathsAction

interfacemethod lookAtPath(viewName: str, aVisualPath: VisualPath) None

Sets the camera to view the path

Parameters:
setCursor(state)

Sets the current cursor

Parameters:

state (str) – state associated to the cursor to set

setSelectionStateOfAllPathsInCurrentGroupOfPaths(newSelectionState)

Sets the selection state of all path object(s).

updateTablePathsModel()

This function is to actualize the table model of paths