OrsHelpers¶
abstractLogger¶
abstractSelectedObjectHelper¶
-
class
OrsHelpers.abstractSelectedObjectHelper.
AbstractSelectedObjectHelper
¶ Helper related to the objects in the selection.
-
callSublassManagingContextIfMethodDefined
(func)¶
-
classmethod
getAbstractDatasetPresentersVisibleInDisplay
(*args)¶
-
static
getAllSubclasses
(aClass, outputCollection=None)¶
-
classmethod
getBestBoxFromSelection
(*args)¶
-
classmethod
getBoxContainingAllSelectedVisualsVisibleInView
(*args)¶
-
classmethod
getBoxForCine
(*args)¶
-
classmethod
getBoxOfVisualRoiInView
(aPluginForContext, visualROI, view)¶
-
classmethod
getFallBackBox
(aPluginForContext, view)¶
-
classmethod
getMaxTimeStepForCine
(*args)¶
-
classmethod
getSelectedVisualVisibleInDisplay
(*args)¶
-
classmethod
getSubclassManagingContext
(contextName)¶
-
classmethod
getVolumeForLeveling
(*args)¶
-
managedContext
= []¶
-
classmethod
managedContextInclude
(contextName)¶
-
annotationhelper¶
-
class
OrsHelpers.annotationhelper.
AnnotationHelper
¶ Helper related to the annotations.
-
interfacemethod
setIsVisibleForViewFromLayoutGenealogicalName
(aName, annotation, isVisible)¶ Set view mode for annotation
Parameters: - aName (str) – a genealogical name
- annotation (ORSModel.ors.Annotation) – an annotation
- isVisible (bool) – visibility
-
interfacemethod
arrayhelper¶
-
class
OrsHelpers.arrayhelper.
ArrayHelper
(ors_array)¶ Helper for manipulating ORS arrays with Numpy.
-
static
ConvertNumpyToOrsArray
(np_array, packet_size=64)¶ Convert numpy.ndarray to Ors array
Parameters: np_array (numpy.ndarray) – The input numpy array to copy Return: The output OrsArray copy Rtype: OrsArray
-
static
ConvertOrsToNumpyArray
(ors_array)¶ Convert Ors array to numpy.ndarray
Parameters: ors_array (OrsArray) – The input OrsArray to copy Return: The numpy array copy Rtype: numpy.ndarray
-
at
(index)¶
-
atPut
(index, value)¶
-
copyFromNumpyArray
(np_array)¶ Copy a numpy.ndarray into this Ors Array
Parameters: np_array (numpy.ndarray) – The numpy array to copy
-
getNumpyArrayCopy
()¶ Get a numpy.ndarray copy of this Ors Array
Return: A numpy array copy of the underlying OrsArray Rtype: numpy.ndarray
-
getSize
()¶
-
setAll
(value)¶
-
setSize
(new_size)¶
-
static
datasetcompare¶
-
class
OrsHelpers.datasetcompare.
DatasetCompareHelper
¶ Helper to perform comparison on datasets.
This is essentially for testing purposes.
-
classmethod
compare
(dataset1, dataset2)¶ Compares datasets. :param dataset1: First dataset. :param dataset2: Second dataset. :return: True if both datasets are equivalent; False otherwise.
-
classmethod
datasethelper¶
-
class
OrsHelpers.datasethelper.
DatasetHelper
¶ Helper related to the class ORSModel.ors.Channel.
-
interfacemethod
copyDataset
(aDataset)¶ Copies a dataset
Parameters: aDataset (ORSModel.ors.Channel) – the dataset to copy Returns: newDataset (ORSModel.ors.Channel) – the copied dataset
-
classmethod
copyDatasetAndPublish
(aDataset)¶
-
interfacemethod
createDatasetFromMultiROI
(aMultiROI, IProgress=None)¶ Creates a new dataset where the value at each pixel is the label in the MultiROI
Parameters: - aMultiROI (ORSModel.ors.MultiROI) – a MultiROI
- IProgress (ORSModel.ors.Progress) – progress object
Returns: dataset (ORSModel.ors.Channel) – new dataset
-
interfacemethod
createMultiROIFromDataset
(dataset, multiROI, IProgress=None)¶ Creates a new MultiROI where each pixel is contained in the label matching the dataset value at that location
Parameters: - dataset (ORSModel.ors.Channel) – a dataset
- multiROI (ORSModel.ors.MultiROI) – multiROI output object. May be None.
- IProgress (ORSModel.ors.Progress) – progress object
Returns: aMultiROI (ORSModel.ors.MultiROI) – new MultiROI
-
interfacemethod
deleteDataset
(aDataset)¶ Deletes a dataset
Parameters: aDataset (ORSModel.ors.Channel) – the dataset to delete
-
classmethod
getDatasetGroupContainingDataset
(dataset)¶
-
classmethod
getIsDerivedNew
(dataset)¶
-
classmethod
setDerivedNew
(dataset)¶
-
classmethod
setDerivedSaved
(dataset)¶
-
classmethod
setDerivedState
(dataset, state)¶
-
interfacemethod
setIsVisibleForViewFromLayoutGenealogicalName
(aName, dataset, isVisible)¶ Set view mode for dataset
Parameters: - aName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
- isVisible (bool) – visibility
-
interfacemethod
datasetPresenterLogger¶
-
class
OrsHelpers.datasetPresenterLogger.
DatasetPresenterLogger
¶ Helper related to the class ORSModel.ors.DatasetPresenter.
-
classmethod
set2DIntensityRangeForView
(view, datasetPresenter, minValue, maxValue)¶
-
classmethod
set2DWindowLevelValuesForView
(view, datasetPresenter, width, center)¶
-
classmethod
set3DIntensityRangeForView
(view, datasetPresenter, minValue, maxValue)¶
-
classmethod
set3DWindowLevelValuesForView
(view, datasetPresenter, width, center)¶
-
classmethod
setUseLUTAlphaIn2DForView
(view, datasetPresenter, value)¶
-
interfacemethod
setUseLUTAlphaIn2DForViewFromLayoutGenealogicalName
(aName, datasetPresenter, value)¶ Use 2d lut alpha
Parameters: - aName (str) – a genealogical name
- datasetPresenter (ORSModel.ors.DatasetPresenter) – the datasetPresenter
- value (bool) – value
-
interfacemethod
setView2DWindowLevelValuesFromLayoutGenealogicalName
(aName, datasetPresenter, width, center)¶ Set window / level for a DatasetPresenter for view and all other view of the scene layout of the view if synchro is allow
Parameters: - aName (str) – a genealogical name
- datasetPresenter (ORSModel.ors.DatasetPresenter) – the datasetPresenter
- width (float) – width
- center (float) – center
-
interfacemethod
setView3DWindowLevelValuesFromLayoutGenealogicalName
(aName, datasetPresenter, width, center)¶ set window / level for a DatasetPresenter for view and all other view of the scene layout of the view if synchro is allow
Parameters: - aName (str) – a genealogical name
- datasetPresenter (ORSModel.ors.DatasetPresenter) – the datasetPresenter
- width (float) – width
- center (float) – center
-
classmethod
dimensionUnitHelper¶
-
class
OrsHelpers.dimensionUnitHelper.
DimensionUnitHelper
¶ Helper for manipulating dimension units.
-
classmethod
convertValueToString
(value, dimensionUnit=None, view=None)¶ Convert and format a value in a given dimension unit to a view dimension unit.
Parameters: - value – ths source value
- dimensionUnit – the source dimension unit
- view – the view
Returns: output – a string representation of the converted value
-
classmethod
getAngleToString
(value, view=None)¶
-
classmethod
getLenghtToString
(value, view=None)¶
-
classmethod
getSurfaceToString
(value, view=None)¶
-
classmethod
getVolumeToString
(value, view=None)¶
-
classmethod
discretecolorsequence¶
displayDatasetInLayout¶
-
class
OrsHelpers.displayDatasetInLayout.
DisplayDatasetInLayout
¶ Helper for attaching/detaching channels and related objects (visuals, ...) to layouts.
-
classmethod
addChannelToLayout
(IChannel, inLayout=None, pluginInContext=None)¶
-
classmethod
createGridUnderTopFrame
(topFrame)¶
-
classmethod
createObjectsForDisplaysOfLayout
(layout, topFrame, pluginInContext=None)¶
-
classmethod
removeChannelFromLayout
(IChannel, layout)¶
-
classmethod
removeChannelFromLayoutOfDisplay
(IChannel, display)¶
-
classmethod
displaymesh¶
-
class
OrsHelpers.displaymesh.
DisplayMesh
¶ Helper for attaching/detaching meshes and related objects (visuals, ...) to layouts.
-
classmethod
addMeshModelToLayout
(IMeshModel, IDisplay, bReplace=False, pluginInContext=None)¶
-
classmethod
addMeshToLayoutOfDisplay
(IMeshModel, display, pluginInContext=None)¶
-
classmethod
removeModelFromGroupOfDisplay
(IMeshModel, IDisplay, disableFusion)¶
-
classmethod
displayROI¶
-
class
OrsHelpers.displayROI.
DisplayROI
¶ Helper for attaching/detaching ROIs and MultiROIs and related objects (visuals, ...) to layouts.
-
classmethod
addROIListToDisplay
(listOfROI, view)¶
-
classmethod
addROIToDisplay
(IROI, IDisplay)¶
-
interfacemethod
deleteMultiROI
(aMultiROI)¶ Deletes a MultiROI
Parameters: aMultiROI (ORSModel.ors.MultiROI) – the MultiROI to delete
-
interfacemethod
deleteROI
(aROI)¶ Deletes a ROI
Parameters: aROI (ORSModel.ors.ROI) – the ROI to delete
-
classmethod
distancemaphelper¶
exporthistogramtocsvhelper¶
-
class
OrsHelpers.exporthistogramtocsvhelper.
ExportHistogramToCSVHelper
¶ Helper to export histogram data to a CSV file.
-
classmethod
export1DHistogramToCSV
(parent, histogramDataGUID, histogramDataTitle, windowTitle='', defaultPath='')¶ Export CSV data in a file (including save dialog interface) for 1-dimension histogram using OrsHistogramData
-
classmethod
jsonhelper¶
kernelHelper¶
-
class
OrsHelpers.kernelHelper.
KernelHelper
¶ Helper for manipulating kernels.
These kernels are to be used with convolution filters.
-
applyGaussianShape
(kernelMatrix, standardDeviation, normalize=True)¶
-
getElementValue
()¶
-
getKernelDim
()¶
-
getKernelMatrix
()¶
-
classmethod
getKernelObjectFromNumpyArray
(kernelMatrix)¶
-
classmethod
getKernelObjectGaussianShape
(sigma, truncate=2.0)¶ Gets a ConvolutionKernel object from the specifications of standard deviation in each axe.
Parameters: - sigma – list of standard deviation. If a single element is given, a 1D kernel will be created. If 2 elements are given, a 2D kernel will be created. If 3 elements are given, a 3D kernel will be created. The first element in the list is for the “X” axe, the second element is for the “Y” axe, and the third element is for the “Z” axe.
- truncate – truncate the kernel at this many standard deviations.
Returns: output – a ConvolutionKernel object
-
getKernelShape
()¶
-
getKernelSize
()¶
-
classmethod
normalize
(kernelMatrix)¶
-
setElementValue
(elementValue)¶
-
setKernelDim
(kernelDim)¶
-
setKernelShape
(kernelShape)¶
-
setKernelSize
(kernelSize)¶
-
layoutHelper¶
-
class
OrsHelpers.layoutHelper.
LayoutHelper
¶ Helper for manipulating layouts.
-
classmethod
getChildSceneLayoutOfLayout
(layout: ORSModel.ors.Layout)¶
-
classmethod
getIsViewMaximized
(display)¶
-
classmethod
getLayoutOfView
(display) → ORSModel.ors.Layout¶
-
classmethod
getLayoutOfViewFromGUID
(displayGUID)¶
-
classmethod
getSceneLayoutOfLayout
(layout)¶
-
classmethod
getSceneLayoutOfTopFrame
(topFrame)¶
-
classmethod
getSceneLayoutOfView
(display) → ORSModel.ors.Layout¶
-
classmethod
getSceneLayoutOfViewFromGUID
(displayGUID)¶
-
classmethod
getTopLayoutOfContext
(pluginInContext)¶
-
classmethod
getTopLayoutOfLayout
(layout)¶
-
classmethod
maximizeViewInItsSceneLayout
(view)¶
-
classmethod
refreshAllViewsInSceneLayoutOfView
(display)¶
-
classmethod
refreshViewTitleFromLayout
(layout)¶
-
classmethod
restoreAfterMaximizeViewInItsSceneLayout
(view)¶
-
classmethod
setTopLayoutOfContext
(topLayout, pluginInContext)¶
-
classmethod
layoutpropertieshelper¶
-
class
OrsHelpers.layoutpropertieshelper.
LayoutPropertiesHelper
¶ Helper for setting and getting information of the layouts (LUT to use, current time step, ...).
-
class
LayoutProperties
(propertyId, showLegend=None, showScaleBar=None, showTextAnnotation=None)¶ -
currentTimeStep
¶
-
exportToXml
()¶
-
get2DLUTUUID
(anObject)¶
-
get3DLUTUUID
(object)¶
-
getOpacity2D
(anObject)¶
-
getOpacity3D
(anObject)¶
-
getUse2DLUTAlpha
(anObject)¶
-
getWindowLevel2D
(anObject)¶
-
getWindowLevel3D
(anObject)¶
-
loadFromOrsObject
(anObject)¶
-
loadFromXml
(xml)¶
-
saveToOrsObject
(anObject)¶
-
set2DLUTUUID
(anObject, lutUUID)¶
-
set3DLUTUUID
(anObject, lutUUID)¶
-
setOpacity2D
(anObject, value)¶
-
setOpacity3D
(anObject, value)¶
-
setUse2DLUTAlpha
(anObject, value)¶
-
setWindowLevel2D
(anObject, width, center)¶
-
setWindowLevel3D
(anObject, width, center)¶
-
showLegend
¶
-
showScaleBar
¶
-
showTextAnnotation
¶
-
-
defaultLutPath
= '\\\\?\\C:\\RootReferences\\OrsQtPlateform\\resource\\lut\\grayscale 7b00da82eefc11e68693448a5b87686a.tfi'¶
-
classmethod
get2DLUTUUID
(layout, anObject)¶
-
classmethod
get3DLUTUUID
(layout, anObject)¶
-
interfacemethod
getLUTFromGenealogicalName
(layoutFullName, dataset)¶ Gets the dataset LUT in layout
Parameters: - layoutFullName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
Returns: lut (ORSModel.ors.LookupTable) – a LUT
-
classmethod
getLayoutPropertiesId
(layout)¶
-
classmethod
getOpacity2D
(layout, anObject)¶
-
classmethod
getShowLegend
(layout)¶
-
classmethod
getShowScaleBar
(layout)¶
-
classmethod
getShowTextAnnotation
(layout)¶
-
classmethod
getUse2DLUTAlpha
(layout, anObject)¶
-
classmethod
getWindowLevel2D
(layout, anObject)¶
-
classmethod
getWindowLevel3D
(layout, anObject)¶
-
interfacemethod
getWindowLevel3DMinMaxFromGenealogicalName
(layoutFullName, dataset)¶ Gets the dataset 3D window/level range in layout
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
-
classmethod
set2DBackgroundColor
(layout, color)¶
-
interfacemethod
set2DBackgroundColorFromGenealogicalName
(layoutFullName, color)¶ Set show text annotation in layout
Parameters: - layoutFullName (str) – a genealogical name
- color (ORSModel.ors.Color) – a flag
-
classmethod
set2DLUTUUID
(layout, anObject, lutUUID)¶
-
interfacemethod
set2DLUTUUIDFromGenealogicalName
(layoutFullName, anObject, lutUUID)¶ Set the lut of an object in layout
Parameters: - layoutFullName (str) – a genealogical name
- anObject (ORSModel.ors.Channel, ORSModel.ors.MultiROI, ORSModel.ors.Mesh) – a dataset, a MultiROI or a mesh
- lutUUID (str) – a lutUUID
-
classmethod
set3DLUTUUID
(layout, anObject, lutUUID)¶
-
interfacemethod
set3DLUTUUIDFromGenealogicalName
(layoutFullName, anObject, lutUUID)¶ Set the lut of an object in layout
Parameters: - layoutFullName (str) – a genealogical name
- anObject (ORSModel.ors.Channel, ORSModel.ors.MultiROI, ORSModel.ors.Mesh) – a dataset, a MultiROI or a mesh
- lutUUID (str) – a lutUUID
-
classmethod
setCurrentTimeStep
(layout, time_step)¶
-
interfacemethod
setCurrentTimeStepFromGenealogicalName
(layoutFullName, time_step)¶ Change time step in layout
Parameters: - layoutFullName (str) – a genealogical name
- time_step (int) – new time step
-
classmethod
setLayoutPropertiesId
(layout, id_)¶
-
classmethod
setOpacity2D
(layout, anObject, value, logging=False)¶
-
interfacemethod
setOpacity2DFromGenealogicalName
(layoutFullName, dataset, value)¶ Set VisualChannel 2D opacity in layout
Parameters: - layoutFullName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
- value (float) – a value
-
classmethod
setOpacity3D
(layout, anObject, value, logging=False)¶
-
interfacemethod
setOpacity3DFromGenealogicalName
(layoutFullName, dataset, value)¶ Set VisualChannel 3D opacity in layout
Parameters: - layoutFullName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
- value (float) – a value
-
classmethod
setShowLegend
(layout, showLegend)¶
-
interfacemethod
setShowLegendFromGenealogicalName
(layoutFullName, showLegend)¶ Set show legend in layout
Parameters: - layoutFullName (str) – a genealogical name
- showLegend (bool) – a flag
-
classmethod
setShowScaleBar
(layout, showScaleBar)¶
-
interfacemethod
setShowScaleBarFromGenealogicalName
(layoutFullName, showScaleBar)¶ Set show text annotation in layout
Parameters: - layoutFullName (str) – a genealogical name
- showScaleBar (bool) – a flag
-
classmethod
setShowTextAnnotation
(layout, showTextAnnotation)¶
-
interfacemethod
setShowTextAnnotationFromGenealogicalName
(layoutFullName, showTextAnnotation)¶ Set show text annotation in layout
Parameters: - layoutFullName (str) – a genealogical name
- showTextAnnotation (bool) – a flag
-
classmethod
setUnit
(layout, unit_type, unitId)¶
-
interfacemethod
setUnitFromGenealogicalName
(layoutFullName, unit_type, unitId)¶ Set unit in layout
Parameters: - layoutFullName (str) – a genealogical name
- unit_type (IntEnum CxvUniverse_Dimension_Type) – an unit type
- unitId (IntEnum CxvUniverse_Dimension) – an unit id
-
classmethod
setUse2DLUTAlpha
(layout, visualChannel, value)¶
-
interfacemethod
setUse2DLUTAlphaFromGenealogicalName
(layoutFullName, dataset, value)¶ Set VisualChannel 3D window/level in layout
Parameters: - layoutFullName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
- value (bool) – a value
-
classmethod
setWindowLevel2D
(layout, anObject, width, center, logging=False, updateWindowLeveling=True)¶
-
interfacemethod
setWindowLevel2DFromGenealogicalName
(layoutFullName, dataset, width, center)¶ Sets the dataset 2D window/level in layout
Parameters: - layoutFullName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
- width (float) – a width
- center (float) – a center
-
classmethod
setWindowLevel3D
(layout, anObject, width, center, logging=False, updateWindowLeveling=True)¶
-
interfacemethod
setWindowLevel3DFromGenealogicalName
(layoutFullName, dataset, width, center)¶ Sets the dataset 3D window/level in layout
Parameters: - layoutFullName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
- width (float) – a width
- center (float) – a center
-
tmpLutPath
= '\\\\?\\C:\\Users\\RD\\AppData\\Local\\ORS\\Dragonfly35\\tempLut.tfi'¶
-
classmethod
updateLUTAllViews
(layout, layoutProperties)¶
-
classmethod
updateSceneProperties
(layout, datasetIsVisible=False)¶
-
class
legendLogic¶
-
class
OrsHelpers.legendLogic.
LegendLogic
(implementation)¶ Helper related to the class ORSModel.ors.VisualLegend.
-
classmethod
createDiscreteLegend
(legendTitle, parentObject, layout, lutUUID=None, updateLayoutProperties=False)¶
-
classmethod
createLegend
(legendTitle, parentObject, layout, lutUUID=None, useColorLUT=False, updateLayoutProperties=True)¶
-
classmethod
selectedObjectsChange
(implementation)¶
-
classmethod
updateLegendVisibility
(implementation, listOfLegends, setDisplayDirty=True)¶
-
classmethod
ListHelper¶
-
class
OrsHelpers.ListHelper.
ListHelper
¶ Helper for manipulating Python lists and ORS lists.
-
classmethod
asPythonCollection
(orslist)¶
-
classmethod
asPythonCollectionString
(orslist)¶
-
classmethod
convertStringifiedListOfFilenames
(string)¶
-
classmethod
deleteAllObjectInORSList
(aListOfObjectToBeDeleted)¶
-
classmethod
fromPythonCollection
(aList, asPythonList=False)¶
-
classmethod
fromPythonCollectionString
(guids)¶
-
classmethod
managedhelper¶
-
class
OrsHelpers.managedhelper.
ManagedHelper
¶ Helper related to the class ORSModel.ors.Managed.
-
interfacemethod
copy
(anObject)¶ Copies a Managed object
Parameters: anObject (ORSModel.ors.Managed) – the Managed object to copy Returns: newObject (ORSModel.ors.Managed) – the copied Managed
-
classmethod
copyAndPublish
(anObject)¶
-
classmethod
copyAndPublishMany
(listOfManaged)¶
-
interfacemethod
delete
(anObject)¶ Deletes a Managed Object
Parameters: anObject (ORSModel.ors.Managed) – the Managed object to delete
-
interfacemethod
publish
(anObject)¶ Publishes an object.
Parameters: anObject (ORSModel.ors.Managed) – an object
-
classmethod
publishStringifiedList
(aString)¶ Publishes a list of objects, where the list is stringified.
-
interfacemethod
meshcompare¶
meshhelper¶
-
class
OrsHelpers.meshhelper.
MeshHelper
¶ Helper related to the class ORSModel.ors.Mesh.
-
classmethod
connectVisualMeshToTopFrame
(IMeshVisual, ITopFrame)¶
-
interfacemethod
copyMesh
(aMesh)¶ Copies a mesh
Parameters: aMesh (ORSModel.ors.Mesh) – the mesh to copy Returns: newMesh (ORSModel.ors.Mesh) – the copied mesh
-
classmethod
copyMeshAndPublish
(aMesh)¶
-
interfacemethod
createMeshFromAbstractMesh
(IMeshModel, layout=None)¶ Creates the mesh visual object from the mesh model object.
Parameters: - IMeshModel (ORSModel.ors.Mesh) – the mesh model object
- layout (ORSModel.ors.Layout) – A specific layout in which to add the volume
Returns: visualMesh (ORSModel.ors.VisualMesh) – the mesh visual object
-
interfacemethod
createMeshFromMultiROI
(aMultiROI, IProgress=None)¶ Creates a new mesh from a MultiROI
Parameters: - aMultiROI (ORSModel.ors.MultiROI) – a MultiROI
- IProgress (ORSModel.ors.Progress) – progress object
Returns: aMesh (ORSModel.ors.Mesh) – new mesh
-
classmethod
createOrientedContourPathFromAnOrientedPlaneMeshCutter
(IMeshModel, IListOfOrientedPlane, ITIndex)¶
-
classmethod
detachMeshesFromTopFrame
(ITopFrame)¶
-
classmethod
displayContainsVisual
(display)¶
-
classmethod
exportToVtkPolyData
(IMeshModel, IPath, ITIndex)¶
-
classmethod
exportToXMLVtkPolyData
(IMeshModel, IPath, ITIndex)¶
-
classmethod
fitToView
(IMeshModel, display)¶
-
classmethod
getIsEnabledIn3D
(obj)¶
-
classmethod
getIsVisible
(mesh, display)¶
-
classmethod
getIsVisibleIn2D
(IMeshModel, display)¶ Parameters: - IMeshModel (ORSAbstractMesh) – a MeshModel
- display (ORSModel.ors.View) – a display
Returns: output (bool) – the 2D MeshModel visibility
-
classmethod
getIsVisibleIn3D
(IMeshModel, display)¶ Parameters: - IMeshModel (ORSAbstractMesh) – a MeshModel
- display (ORSModel.ors.View) – a display
Returns: output (bool) – the 3D ROI visibility
-
static
getLUT
(aMesh)¶
-
static
getLegend
(aMeshVisualOrModel, forceCreation=False)¶
-
static
getLegendTitle
(aMesh)¶
-
static
getListOfDisplayRenderingMesh
(aMesh)¶
-
classmethod
getMeshVisual
(obj)¶
-
static
getOpacity
(IMesh)¶
-
classmethod
getPointsFromAPlaneMeshCutter
(IMeshModel, IPlane, ITIndex)¶
-
static
isclose
(a, b, rel_tol=1e-09, abs_tol=0.0)¶
-
classmethod
loadFromVTKFile
(IPath, showProgress, progress, ITIndex)¶
-
classmethod
loadFromXMLVTKFile
(IPath, showProgress, progress, ITIndex)¶
-
classmethod
readAFile
(reader, IPath)¶
-
classmethod
refreshOctree
(aMesh)¶
-
interfacemethod
setIsVisibleForViewFromLayoutGenealogicalName
(aName, mesh, isVisible)¶ Set view mode for mesh
Parameters: - aName (str) – a genealogical name
- mesh (ORSModel.ors.Mesh) – a mesh
- isVisible (bool) – visibility
-
classmethod
setIsVisibleIn2D
(IMeshModel, display, value)¶ Parameters: - IMeshModel (ORSAbstractMesh) – a MeshModel
- display (ORSModel.ors.View) – a view
- value (bool) – the MeshModel 2D visibility
-
classmethod
setIsVisibleIn3D
(IMeshModel, display, value)¶ Parameters: - IMeshModel (ORSAbstractMesh) – a MeshModel
- display (ORSModel.ors.View) – a display
- value (bool) – the MeshModel 3D visibility
-
static
setLUT
(aMesh, aLUT)¶
-
static
setOpacity
(IMesh, opacityIn, opacityOut)¶
-
classmethod
updateLegend
(IMeshModel, display=None, ITopFrame=None)¶
-
classmethod
updateMeshColorFromVertexScalarValue
(IMeshModel, forceToRefresh=False)¶
-
static
updateMeshVisibilityOrder
(guidList, topToBottom=True)¶
-
classmethod
multiroicomparehelper¶
-
class
OrsHelpers.multiroicomparehelper.
MultiROICompareHelper
¶ Helper to perform comparison on MultiROIs.
This is essentially for testing purposes.
-
classmethod
compare
(aMultiROI1, aMultiROI2)¶ Compares MultiROIs. :param aMultiROI1: First Multi-ROI. :param aMultiROI2: Second Multi-ROI. :return: True if both Multi-ROIs are equivalent; False otherwise.
-
getWarningFromLastCompare
()¶
-
lastWarning
= ''¶
-
classmethod
orschannelregistrationhelper¶
orsregistrationhelper¶
-
class
OrsHelpers.orsregistrationhelper.
OrsRegistrationHelper
¶ Helper for performing registration.
-
classmethod
addTransformationMatrixToUserInfo
(objectGUI, matrix, registrationMethod=None)¶
-
classmethod
applyTransformationFromAnObjectToAnOtherObject
(referenceObjectGUID, movingObjectGUID)¶
-
classmethod
getAllTransfromationStringMatrixFromUserInfo
(objectGUID)¶
-
classmethod
getEulerAnglesFromTransformMatrix
(transformationMatrix, scale)¶
-
classmethod
getEulerAnglesInDegreeFromTransformMatrix
(transformationMatrix, scale)¶
-
classmethod
getIsFirstTransformationOn
(objectGUI)¶
-
classmethod
getIsLastTransformationOn
(objectGUI)¶
-
classmethod
getLastRegistrationMethod
(objectGUI)¶
-
classmethod
getLastTransformationMatrix
(objectGUI)¶
-
classmethod
getNumberOfRegistrationKeys
(objectGUI)¶
-
classmethod
getTransformationMatrixAtIndex
(objectGUI, index)¶
-
classmethod
getTransformationMatrixThatAreDifferentFromAReferenceObject
(referenceObjectGUID, anObjectGUID)¶
-
classmethod
removeTransformationMatrixFromUserInfo
(objectGUI)¶
-
classmethod
phantomgenerators¶
-
class
OrsHelpers.phantomgenerators.
PhantomGenerators
¶ Helper for generating testing/debugging datasets.
-
classmethod
circleIntensityToDataset
(datasetGUID, circleDiameter, circleDepth, boxHeight, boxWidth, boxDepth, intensityList)¶ Method that adds circles with the specified dimensions and intensities to an existing dataset. The number of shapes created will depend on the dimensions given and the number of intensities within the intensityList.
Parameters: - datasetGUID – string Unique identification of an ORSChannel.
- circleDiameter – uint Diameter according to the Y and X axis that all shapes will have.
- circleDepth – uint Depth according to the Z axis that all volumes will have.
- boxHeight – uint Height according to the Y axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- boxWidth – uint Width according to the X axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- boxDepth – uint Depth according to the Z axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- intensityList – list of float Intensity values that will be given to individual volume generated.
-
classmethod
createEmptyChannel
(xSize=100, ySize=100, zSize=100, title='New Phantom Dataset', dataType=<class 'numpy.uint8'>, spacing=[1.0, 1.0, 1.0, 1.0])¶ Method that generates an empty channel with the desired dimensions, spacing, title and data type.
Parameters: - xSize – uint Width of the generated dataset.
- ySize – uint Height of the generated dataset.
- zSize – uint Depth of the generated dataset.
- title – string Name that will be given to the generated dataset.
- dataType – type Numpy data type the array should have. This data type will be the same as the one used in the generated
- spacing – list of floats Each index specifies the spacing of direction0, direction1, direction2 and T. dataset.
Returns: output – Dataset’s GUID if it is generated correctly.
-
static
flattenList
(listToFlatten, numberOfTime)¶
-
static
generate4dPhantom
(pathToWritte, xySize, imgSize, imgToHidePath=None, posToHide=None, fontsize=50)¶
-
static
generate5dPhantom
(pathToWritte, xySize, imgSize, imgToHidePath=None, posToHide=None, fontsize=50)¶
-
static
generate6dPhantom
(pathToWritte, xySize, imgSize, imgToHidePath=None, posToHide=None, fontsize=50)¶
-
static
generateHyperDimensionalFromNumpyArray
(pathToWritte, array, labels, unit)¶
-
classmethod
generateIntensities
(dataset, listNumbers, fontsize=50)¶
-
classmethod
rectangleIntensityToDataset
(datasetGUID, rectangleHeight, rectangleWidth, rectangleDepth, boxHeight, boxWidth, boxDepth, intensityList)¶ Method that adds rectangles with the specified dimensions and intensities to an existing dataset. The number of shapes created will depend on the dimensions given and the number of intensities within the intensityList.
Parameters: - datasetGUID – string Unique identification of an ORSChannel.
- rectangleHeight – uint Height according to the Y axis that all shapes will have.
- rectangleWidth – uint Width according to the X axis that all shapes will have.
- rectangleDepth – uint Depth according to the Z axis that all volumes will have.
- boxHeight – uint Height according to the Y axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- boxWidth – uint Width according to the X axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- boxDepth – uint Depth according to the Z axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- intensityList – list of float Intensity values that will be given to individual volume generated.
-
classmethod
saveImagesFromNumpyArray
(npArray, outputImageFileStringToFormat)¶ Helper to save a numpy array as a set of images into a directory
Parameters: - npArray – numpy array Array to write as individual images. The accepted shape is (z, y, x).
- outputImageFileStringToFormat – string String to format with an image number, where the images will be saved. Ex: C:tmpImagesTestImage_{:04g}.tif
Returns: output – None
-
classmethod
saveImagesIntensities
(numberMin, numberMax, xSize, ySize, fontsize=50, imgPath='C:\\tmp\\ImagesTest\\Image_{:04g}.tif')¶
-
classmethod
shapeAndIntensityToDataset
(datasetGUID, shape, shapeHeight, shapeWidth, shapeDepth, boxHeight, boxWidth, boxDepth, intensityList)¶ Method that adds the desired shape with the specified dimensions and intensities to an existing dataset. The number of shapes created will depend on the dimensions given and the number of intensities within the intensityList.
Parameters: - datasetGUID – string Unique identification of an ORSChannel.
- shape – string 2D shape of the area to be painted, either ‘circle’ or ‘rectangle’.
- shapeHeight – uint Height according to the Y axis that all shapes will have.
- shapeWidth – uint Width according to the X axis that all shapes will have.
- shapeDepth – uint Depth according to the Z axis that all volumes will have.
- boxHeight – uint Height according to the Y axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- boxWidth – uint Width according to the X axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- boxDepth – uint Depth according to the Z axis of the box surrounding the shape. Having greater box dimensions than shape dimensions will prevent overlapping.
- intensityList – list of float Intensity values that will be given to individual volume generated.
Returns: output – None if the intensityList is empty. None if the provided shape is not recognized.
-
classmethod
primitivehelper¶
-
class
OrsHelpers.primitivehelper.
PrimitiveHelper
¶ Helper related to the class ORSModel.ors.Annotation.
-
interfacemethod
addControlPoint
(anAnnotation, timeStep, position, transformationMatrix=None)¶ Adds a control point in an annotation.
Parameters: - anAnnotation (ORSModel.ors.Annotation) – the annotation object to modify
- timeStep (int) – time index of the annotation
- position (ORSModel.ors.Vector3) – (X, Y, Z) coordinate of the new position
- transformationMatrix (ORSModel.ors.Matrix4x4) – the transformation matrix (optional)
Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
createPrimitive
(primitiveClass, aLayoutName, associatedState)¶ Creates an annotation.
Parameters: - primitiveClass (ORSModel.ors.Annotation class) – the class of the annotation to create
- aLayoutName (str) – a layout genealogical name
- associatedState (str) – edition associated state
Returns: newAnnotation (ORSModel.ors.Annotation) – the created annotation
-
interfacemethod
deletePrimitive
(anAnnotation)¶ Deletes an annotation.
Parameters: anAnnotation (ORSModel.ors.Annotation) – the annotation object to delete Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
deselectControlPoint
(anAnnotation, controlPointIndex, timeStep)¶ Deselects a control point from an annotation.
Parameters: - anAnnotation (ORSModel.ors.Annotation) – the annotation object to modify
- controlPointIndex (int) – index of the control point in the annotation
- timeStep (int) – time index of the annotation
Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
insertControlPoint
(index, anAnnotation, timeStep, position, transformationMatrix=None)¶ Insert a control point.
Parameters: - index (int) – index of the control point to insert
- anAnnotation (ORSModel.ors.Annotation) – the annotation object to modify
- timeStep (int) – time index of the annotation
- position (ORSModel.ors.Vector3) – (X, Y, Z) coordinate of the new position
- transformationMatrix (ORSModel.ors.Matrix4x4) – the transformation matrix (optional)
Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
removeControlPoint
(anAnnotation, controlPointIndex, timeStep)¶ Removes a control point from an annotation.
Parameters: - anAnnotation (ORSModel.ors.Annotation) – the annotation object to modify
- controlPointIndex (int) – index of the control point in the annotation
- timeStep (int) – time index of the annotation
Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
selectControlPoint
(anAnnotation, controlPointIndex, timeStep)¶ Selects a control point from an annotation.
Parameters: - anAnnotation (ORSModel.ors.Annotation) – the annotation object to modify
- controlPointIndex (int) – index of the control point in the annotation
- timeStep (int) – time index of the annotation
Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
setControlPointPosition
(anAnnotation, controlPointIndex, timeStep, position, transformationMatrix=None)¶ Sets the position of a control point.
Parameters: - anAnnotation (ORSModel.ors.Annotation) – the annotation object to modify
- controlPointIndex (int) – index of the control point in the annotation
- timeStep (int) – time index of the annotation
- position (ORSModel.ors.Vector3) – (X, Y, Z) coordinate of the new position
- transformationMatrix (ORSModel.ors.Matrix4x4) – the transformation matrix (optional)
Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
setRegionShape
(anAnnotation, regionShape)¶ Sets the shape of an region annotation.
Parameters: - anAnnotation (ORSModel.ors.Annotation) – the annotation object to modify
- regionShape (IntEnum CxvRegion_Shape) – the shape to set
Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
translatePrimitive
(anAnnotation, timeStep, xOffset, yOffset, zOffset)¶ Translates an annotation.
Parameters: - anAnnotation (ORSModel.ors.Annotation) – the annotation object to modify
- timeStep (int) – time index of the annotation
- xOffset (float) – translation X distance
- yOffset (float) – translation Y distance
- zOffset (float) – translation Z distance
Returns: success (bool) – True if successful, False otherwise
-
interfacemethod
progresslogger¶
-
class
OrsHelpers.progresslogger.
ProgressLogger
¶ Helper related to the class ORSModel.ors.Progress.
Deprecated since version 3.1: Set the optional argument
logging
atTrue
when calling the constructor or any method to log the call.-
interfacemethod
closeProgress
(aProgress)¶ Closes the progress bar
This protocol is also called automatically when the interface gets deleted, so it is not necessary to call it.
Parameters: aProgress (ORSModel.ors.Progress) – a Progress object
-
interfacemethod
createProgressObject
()¶ Creates a Progress object
Returns: aProgress (ORSModel.ors.Progress) – the created progress object
-
interfacemethod
decrementRangeBy
(aProgress, decrementRangeValue)¶ Decrements the progress range
This protocol is only relevant when the progress is not a working progress.
Parameters: - aProgress (ORSModel.ors.Progress) – a Progress object
- decrementRangeValue (int) – the range decrement
-
interfacemethod
deleteProgressObject
(aProgress)¶ Deletes a Progress object
Parameters: aProgress (ORSModel.ors.Progress) – a progress object
-
interfacemethod
incrementRangeBy
(aProgress, incrementRangeValue)¶ Increments the progress range
This protocol is only relevant when the progress is not a working progress.
Parameters: - aProgress (ORSModel.ors.Progress) – a Progress object
- incrementRangeValue (int) – the range increment
-
classmethod
logCreateProgressObject
(IProgress)¶ This method is to be able to use the overloaded “new” of Progress.
- This is to cover the 4 common situations:
- call aProgress = Progress() in Python (call “new” with log);
- calling createProgressObject directly (from Python code or from the execution of a macro);
- calling aProgress = orsObj(aProgressGUID) (this calls “new” to create a new Python reference,
- but should not log because the logging of that object occurred at its creation);
- calling a COMWrapper method with a progress at None (this calls “new” from sip
- with a Progress object at none; this should not log).
Parameters: IProgress – the newly created Progress object to log
-
loggedProgressGUID
= []¶
-
newProgressGUID
= ''¶
-
interfacemethod
resetCancelledState
(aProgress)¶ Resets the cancelled state
Parameters: aProgress (ORSModel.ors.Progress) – a Progress object
-
interfacemethod
setExtraText
(aProgress, text)¶ Sets the extra text
Parameters: - aProgress (ORSModel.ors.Progress) – a progress object
- text (str) – some text
-
interfacemethod
setIsCancellable
(aProgress, isCancellable)¶ Sets if the progress is cancellable
Parameters: - aProgress (ORSModel.ors.Progress) – a progress object
- isCancellable (bool) – True to make the progress cancellable, False otherwise
-
interfacemethod
setIsCancelled
(aProgress, isCancelled)¶ Sets the progress to be cancelled or not
This protocol is only relevant when the progress is a cancellable progress.
Parameters: - aProgress (ORSModel.ors.Progress) – a Progress object
- isCancelled (bool) – True to set in a cancelled state, False otherwise
-
interfacemethod
startProgressWithCaption
(aProgress, caption, range, isCancellable)¶ Starts a normal progress bar
Parameters: - aProgress (ORSModel.ors.Progress) – a Progress object
- caption (str) – the progress caption
- range (int) – the range
- isCancellable (bool) – True if the progress bar is to be cancellable, False otherwise
-
interfacemethod
startProgressWithID
(aProgress, progressID, range, isCancellable)¶ Starts a normal progress bar
Parameters: - aProgress (ORSModel.ors.Progress) – a Progress object
- progressID (int) – the progress ID (see ORSProgressBars.h for supported IDs)
- range (int) – the range
- isCancellable (bool) – True if the progress bar is to be cancellable, False otherwise
-
interfacemethod
startWorkingProgressWithCaption
(aProgress, caption, isCancellable)¶ Starts a working progress bar
Parameters: - aProgress (ORSModel.ors.Progress) – a Progress object
- caption (str) – the progress caption
- isCancellable (bool) – True if the progress bar is to be cancellable, False otherwise
-
interfacemethod
startWorkingProgressWithID
(aProgress, progressID, isCancellable)¶ Starts a working progress bar
Parameters: - aProgress (ORSModel.ors.Progress) – a Progress object
- progressID (int) – the progress ID (see ORSProgressBars.h for supported IDs)
- isCancellable (bool) – True if the progress bar is to be cancellable, False otherwise
-
interfacemethod
updateProgress
(aProgress, progressPosition)¶ Updates the progress bar
This protocol should not be used with working progress bars, as they do not have a position.
Parameters: - aProgress (ORSModel.ors.Progress) – a Progress object
- progressPosition (int) – the new progress bar position
-
interfacemethod
refreshHelper¶
roicomparehelper¶
-
class
OrsHelpers.roicomparehelper.
ROICompareHelper
¶ Helper to perform comparison on ROIs.
This is essentially for testing purposes.
-
classmethod
compare
(aROI1, aROI2)¶ Compares ROIs. :param aROI1: First ROI. :param aROI2: Second ROI. :return: True if both ROIs are equivalent; False otherwise.
-
getWarningFromLastCompare
()¶
-
lastWarning
= ''¶
-
classmethod
roihelper¶
-
class
OrsHelpers.roihelper.
ROIHelper
¶ Helper related to the classes ORSModel.ors.ROI and ORSModel.ors.MultiROI.
-
DEFAULT_DATASET_OPACITY
= 1.0¶
-
DEFAULT_HIGHTLIGHT_OPACITY
= 0.5¶
-
DEFAULT_ROI_OPACITY
= 1¶
-
static
convertLabeledMultiROIToROI
(LMRSource, ROIDestination, labelList=None)¶
-
classmethod
copyLabeledMultiROI
(LMRSource, LMRDestination, labelList=None)¶
-
interfacemethod
copyMultiROI
(aMultiROI)¶ Copies a MultiROI
Parameters: aMultiROI (ORSModel.ors.MultiROI) – the MultiROI to copy Returns: newMultiROI (ORSModel.ors.MultiROI) – the copied MultiROI
-
classmethod
copyMultiROIAndPublish
(aMultiROI)¶
-
interfacemethod
copyROI
(aROI)¶ Copies a ROI
Parameters: aROI (ORSModel.ors.ROI) – the ROI to copy Returns: newROI (ORSModel.ors.ROI) – the copied ROI
-
classmethod
copyROIAndPublish
(aROI)¶
-
classmethod
createFullVolumeROIWithStructuredGrid
(aROI)¶
-
interfacemethod
createMultiROIFromStructuredGrid
(structuredGridReference, MultiROITitle)¶ Creates a Multi ROI with the same shape of a reference structured grid.
Parameters: - structuredGridReference (ORSModel.ors.StructuredGrid) – the structured grid of reference
- MultiROITitle (str) – title of the MultiROI
Returns: aMultiROI (ORSModel.ors.MultiROI) – new MultiROI
-
interfacemethod
createROIFromStructuredGrid
(structuredGridReference, ROITitle, ROIColor)¶ Creates a ROI with the same shape of a reference structured grid.
Parameters: - structuredGridReference (ORSModel.ors.StructuredGrid) – the structured grid of reference
- ROITitle (str) – title of the ROI
- ROIColor (ORSModel.ors.Color) – color of the ROI
Returns: aROI (ORSModel.ors.ROI) – new ROI
-
classmethod
executeMethod
(listROIGUIDToModify, methodToExecute, args=None, updateUndo=True)¶
-
static
fitToView
(aROI, view)¶
-
static
get2DOpacity
(aROI, view=None)¶
-
static
get3DOpacity
(aROI, view=None)¶
-
classmethod
getCenterOfMass
(anOrsObject, iTIndex)¶
-
static
getColor
(aROI, view=None)¶ Return the color of a ROI for a given display
Parameters: - aROI (ORSModel.ors.ROI) – a ROI
- view (ORSModel.ors.View) – a display
Return: (r, g, b, a) a tuple of normalized color
-
static
getEmptyLabels
(aMultiROI)¶
-
interfacemethod
getHighlightOpacityForAllViews
(aROI)¶ Gets the in-range and out-of-range highlight opacity of a ROI or MultiROI for all views
Parameters: aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – a ROI or a MultiROI
Returns: - highlightOpacityInRange (float) – in-range highlight opacity
- highlightOpacityOutRange (float) – out-of-range highlight opacity
-
static
getIntersectionOfROIAndMultiROIThatIntersectPositionOnRectangle
(rectangle, worldposition, roisOrMultiROIs, timestep)¶
-
static
getIsVisible
(roi, display)¶
-
static
getIsVisibleIn2D
(aROI, view)¶ Parameters: - aROI (ORSModel.ors.ROI) – a ROI
- view (ORSModel.ors.View) – a display
Return: the 2D ROI visibility
Rtype: bool
-
static
getIsVisibleIn3D
(aROI, view)¶ Parameters: - aROI (ORSModel.ors.ROI) – a ROI
- view (ORSModel.ors.View) – a view
Return: the 3D ROI visibility
Rtype: bool
-
static
getLUT
(aROI)¶
-
static
getLegend
(aROI)¶
-
static
getLegendTitle
(aMultiROI)¶
-
static
getListOf2DDisplayRenderingROI
(aROI)¶
-
static
getListOf3DDisplayRenderingROI
(aROI)¶
-
static
getListOfDisplayRenderingROI
(aROI)¶
-
static
getNonEmptyLabels
(aMultiROI)¶
-
static
getROIInterpolationMode
(aROI)¶
-
static
getShowContour
(aROI, view)¶
-
static
getVisualROI
(aROI, forceCreation=True)¶ Return the VisualROI associated with a ROI for a given Display
Parameters: - aROI (ORSModel.ors.ROI) – a ROI
- forceCreation (bool) – (optional) Force creation if no aVisualROI found
Return: the VisualROI
Rtype: ORSModel.ors.VisualROI
-
interfacemethod
intersection
(inputROIs, destinationROI, clearDestination=False, keepEmptyLabels=False)¶ Intersects multiple ROIs or Multi-ROi.
The input argument destinationROI cannot be None. If required, create a ROI or a MultiROI prior to calling this method (ex: ROIHelper.createROIFromStructuredGrid).
Parameters: - inputROIs (ORSModel.ors.ROI, ORSModel.ors.MultiROI) [count=[2, None]] – list of ROIs and/or Multi-ROIs
- destinationROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – ROI or MultiROI of destination
- clearDestination (bool) – if True, the destinationROI will be cleared before getting the output result.
- keepEmptyLabels (bool) – This is only applicable for the situation where the destination is a MultiROI. If False, empty labels of the destination are removed.
-
interfacemethod
loadROIFromFile
(filename, IProgress=None)¶ Loads a ROI from an ORSObject file
Parameters: - filename (file) – fully qualified file name
- IProgress (ORSModel.ors.Progress) – progress object
Returns: newROI (ORSModel.ors.ROI) – new ROI
-
classmethod
outputROIListToPNG
(ROIList, filename)¶
-
classmethod
recoverFromUndo
(listROIGUIDToRecoverFromUndo)¶
-
interfacemethod
removeEmptyLabelsAndRenumber
(aMultiROI)¶ Removes the empty labels and renumber the remaining ones
Parameters: aMultiROI (ORSModel.ors.MultiROI) – the MultiROI to modify
-
classmethod
roiConnectedComponentBySliceIterator
(aROI, tIndex, considerDiagonal, box=None, IProgress=None)¶ Parameters: - aROI – ROI to extract connected components from
- tIndex –
- considerDiagonal – whether to consider areas with touching points on diagonal as connected
Returns: output – list of connected ROIs in each slice
-
static
set2DOpacity
(aROI, view=None, highlightOpacityInRange=None, highlightOpacityOutRange=None)¶
-
static
set3DOpacity
(aROI, view=None, highlightOpacityInRange=None, roiOpacityInRange=None, volumeOpacity=None, highlightOpacityOutRange=None, roiOpacityOutRange=None)¶
-
interfacemethod
setColor
(aROI, aColor, highlightOpacityInRange=None)¶ Sets the ROI color.
Parameters: - aROI (ORSModel.ors.ROI) – the ROI to set the color to
- aColor (ORSModel.ors.Color) – the new color
- highlightOpacityInRange (float) – the alpha normalized color (between 0.0 and 1.0) (optional)
-
static
setIsVisibleIn2D
(aROI, view, value)¶ Parameters: - aROI (ORSModel.ors.ROI) – a ROI
- view (ORSModel.ors.View) – a view
- value (bool) – the ROI 2D visibility
-
interfacemethod
setIsVisibleIn2DFromGenealogicalName
(name, aROI, isVisible)¶ set 2D visibility of a ROI or of a MultiROI
Parameters: - name (str) – a genealogical name
- aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – a ROI or a MultiROI
- isVisible (bool) – True to set as visible, False otherwise
-
static
setIsVisibleIn3D
(aROI, view, value)¶ Parameters: - aROI (ORSModel.ors.ROI) – a ROI
- view (ORSModel.ors.View) – a view
- value (bool) – the ROI 3D visibility
-
interfacemethod
setIsVisibleIn3DFromGenealogicalName
(name, aROI, isVisible)¶ set 3D visibility of a ROI or of a MultiROI
Parameters: - name (str) – a genealogical name
- aROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – a ROI or a MultiROI
- isVisible (bool) – True to set as visible, False otherwise
-
static
setLUT
(aMultiROI, newLUT)¶
-
static
setLabelAsScalarValue
(aMultiROI)¶
-
static
setROIInterpolationMode
(obj, value)¶
-
static
setShowContour
(aROI, view, value)¶
-
interfacemethod
subtract
(firstROI, secondROI, destinationROI, clearDestination=False, keepEmptyLabels=False)¶ Subtracts a ROI or Multi-ROi from another ROi or Multi-ROI, as: destinationROI = firstROI - secondROI.
The input argument destinationROI cannot be None. If required, create a ROI or a MultiROI prior to calling this method (ex: ROIHelper.createROIFromStructuredGrid).
Parameters: - firstROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – first ROI or MultiROI
- secondROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – second ROI or MultiROI
- destinationROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – ROI or MultiROI of destination
- clearDestination (bool) – if True, the destinationROI will be cleared before getting the output result.
- keepEmptyLabels (bool) – This is only applicable for the situation where the destination is a MultiROI. If False, empty labels of the destination are removed.
-
interfacemethod
union
(inputROIs, destinationROI, keepEmptyLabels=False)¶ Makes the union of multiple ROIs or Multi-ROi.
The input argument destinationROI cannot be None. If required, create a ROI or a MultiROI prior to calling this method (ex: ROIHelper.createROIFromStructuredGrid).
Parameters: - inputROIs (ORSModel.ors.ROI, ORSModel.ors.MultiROI) [count=[2, None]] – list of ROIs and/or Multi-ROIs
- destinationROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – ROI or MultiROI of destination
- keepEmptyLabels (bool) – This is only applicable for the situation where the destination is a MultiROI. If False, empty labels of the destination are removed.
-
static
updateLegend
(aMultiROI, view, lutUUID, forceUpdate=False)¶
-
classmethod
updateMultiROIColor
(aMultiROI)¶
-
static
updateROIVisibilityOrder
(guidList, topToBottom=True)¶
-
classmethod
updateUndo
(listROIGUIDToUpdate)¶
-
SaversHelper¶
sequentialcolorgenerator¶
structuredGridHelper¶
-
class
OrsHelpers.structuredGridHelper.
StructuredGridHelper
¶ Helper related to the manipulation of classes inheriting ORSModel.ors.StructuredGrid (namely, Channel, ROI and MultiROI).
-
classmethod
getClipBox
(structuredGrid, viewOrTopFrame, forceCreation=False)¶
-
classmethod
getClipBoxForCurrentView
(structuredGrid, forceCreation=True, implementation=None)¶
-
classmethod
getClipBoxes
(structuredGrid)¶
-
classmethod
getVisual
(structuredGrid)¶
-
classmethod
getVisualReachableByDisplay
(structuredGrid, view)¶
-
classmethod
refreshVisual
(structuredGrid)¶
-
classmethod
resetVisualBox
(structuredGrid, view=None)¶ Resets the visual box of a structured grid.
Parameters: - structuredGrid (ORSModel.ors.StructuredGrid) – the structured grid object to reset the visual box to
- view (ORSModel.ors.View) – a specific view in which the visual box is attached to. If set as None, the first parent will be used.
-
classmethod
resetVisualBoxOfChannel
(channel, view=None)¶
-
classmethod
resetVisualBoxOfROI
(roiOrLabelROI, view=None)¶
-
classmethod
setClipBoxVisibility
(structuredGrid, isVisible, view=None, logging=True)¶ Sets the visibility of the clip box associated to a structured grid in the layout of the view
Parameters: - structuredGrid (ORSModel.ors.StructuredGrid) – the associated structured grid
- isVisible (bool) – if True, the clip box will be set as visible; if False, the clip box will be hidden.
- view (ORSModel.ors.View) – the view
-
classmethod
setVisualBox
(structuredGrid, aBox, view=None)¶ Sets the visual box of a structured grid.
Parameters: - structuredGrid (ORSModel.ors.StructuredGrid) – the structured grid object to set the visual box to
- aBox (ORSModel.ors.Box) – the box to set
- view (ORSModel.ors.View) – a specific view in which the visual box is attached to. If set as None, the first parent will be used.
-
classmethod
structuredGridLogger¶
-
class
OrsHelpers.structuredGridLogger.
StructuredGridLogger
¶ Helper related to the visibility of classes inheriting ORSModel.ors.StructuredGrid (namely, Channel, ROI and MultiROI).
-
interfacemethod
resetVisualBoxOfChannelFromLayoutGenealogicalName
(aName, channel)¶ Resets the visual box of a Channel
Parameters: - aName (str) – a genealogical name
- channel (ORSModel.ors.Channel) – a Channel
-
interfacemethod
resetVisualBoxOfROIFromLayoutGenealogicalName
(aName, aROIOrMultiROI)¶ Resets the visual box of a ROI or of a MultiROI
Parameters: - aName (str) – a genealogical name
- aROIOrMultiROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – a ROI or a MultiROI
-
interfacemethod
setBox
(aStructuredGrid, aBox)¶ Sets box of StructuredGrid
Parameters: - aStructuredGrid (ORSModel.ors.StructuredGrid) – a StructuredGrid
- aBox (ORSModel.ors.Box) – a Box
-
classmethod
setClipBoxVisibilityOfChannel
(channel, isVisible, view=None)¶
-
interfacemethod
setClipBoxVisibilityOfChannelFromLayoutGenealogicalName
(aName, channel, isVisible)¶ Sets the visual box visibility of a Channel
Parameters: - aName (str) – a genealogical name
- channel (ORSModel.ors.Channel) – a Channel
- isVisible (bool) – if True, the clip box will be set as visible; if False, the clip box will be hidden.
-
classmethod
setClipBoxVisibilityOfROI
(aROIOrMultiROI, isVisible, view=None)¶
-
interfacemethod
setClipBoxVisibilityOfROIFromLayoutGenealogicalName
(aName, aROIOrMultiROI, isVisible)¶ Sets the visual box visibility of a ROI or of a MultiROI
Parameters: - aName (str) – a genealogical name
- aROIOrMultiROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – a ROI or a MultiROI
- isVisible (bool) – if True, the clip box will be set as visible; if False, the clip box will be hidden.
-
classmethod
setVisualBoxOfChannel
(channel, aBox, display=None)¶
-
interfacemethod
setVisualBoxOfChannelFromLayoutGenealogicalName
(aName, channel, aBox)¶ Sets the visual box of a Channel
Parameters: - aName (str) – a genealogical name
- channel (ORSModel.ors.Channel) – a Channel
- aBox (ORSModel.ors.Box) – the box to set
-
classmethod
setVisualBoxOfROI
(aROIOrMultiROI, aBox, display=None)¶
-
interfacemethod
setVisualBoxOfROIFromLayoutGenealogicalName
(aName, aROIOrMultiROI, aBox)¶ Sets the visual box of a ROI or of a MultiROI
Parameters: - aName (str) – a genealogical name
- aROIOrMultiROI (ORSModel.ors.ROI, ORSModel.ors.MultiROI) – a ROI or a MultiROI
- aBox (ORSModel.ors.Box) – the box to set
-
interfacemethod
unstructuredGridHelper¶
-
class
OrsHelpers.unstructuredGridHelper.
UnstructuredGridHelper
¶ Helper related to the manipulation of classes inheriting ORSModel.ors.UnstructuredGrid (namely, Mesh).
-
classmethod
getClipBox
(unstructuredGrid, viewOrTopFrame, forceCreation=False)¶
-
classmethod
getClipBoxForCurrentView
(structuredGrid, forceCreation=True, implementation=None)¶
-
classmethod
getClipBoxes
(unstructuredGrid)¶
-
classmethod
getVisual
(unstructuredGrid)¶
-
classmethod
getVisualReachableByDisplay
(unstructuredGrid, display)¶
-
classmethod
refreshUnstructuredGridVisual
(unstructuredGrid)¶
-
classmethod
refreshVisual
(unstructuredGrid)¶
-
classmethod
resetVisualBox
(unstructuredGrid, view=None)¶ Resets the visual box of an unstructured grid.
Parameters: - unstructuredGrid (ORSModel.ors.UnstructuredGrid) – the unstructured grid object to reset the visual box to
- view (ORSModel.ors.View) – a specific display in which the visual box is attached to. If set as None, the first parent will be used.
-
classmethod
resetVisualFrame
(unstructuredGrid, display=None)¶
-
classmethod
resetVisualFrameAndApplyRotation
(unstructuredGrid, pivot, axis, angle, display=None)¶
-
classmethod
resetVisualFrameAndApplyTranslation
(unstructuredGrid, translation, display=None)¶
-
classmethod
resetVisualFrameAndSetTransformation
(unstructuredGrid, matrix, display=None)¶
-
classmethod
resetVisualFrameWithBox
(unstructuredGrid, box, display=None)¶
-
classmethod
setClipBoxVisibility
(unstructuredGrid, isVisible, view=None)¶ Sets the visibility of the clip box associated to an unstructured grid in the layout of the view
Parameters: - unstructuredGrid (ORSModel.ors.UnstructuredGrid) – the associated unstructuredGrid grid
- isVisible (bool) – if True, the clip box will be set as visible; if False, the clip box will be hidden.
- view (ORSModel.ors.View) – the view
-
classmethod
setVisualBox
(unstructuredGrid, aBox, view=None)¶ Resets the visual box of an unstructured grid.
Parameters: - unstructuredGrid (ORSModel.ors.UnstructuredGrid) – the unstructured grid object to reset the visual box to
- aBox (ORSModel.ors.Box) – the box to set
- view (ORSModel.ors.View) – a specific display in which the visual box is attached to. If set as None, the first parent will be used.
-
classmethod
unstructuredGridLogger¶
-
class
OrsHelpers.unstructuredGridLogger.
UnstructuredGridLogger
¶ Helper related to the visibility of classes inheriting ORSModel.ors.UnstructuredGrid (namely, Mesh).
-
interfacemethod
resetVisualBoxOfMeshFromLayoutGenealogicalName
(aName, mesh)¶ Resets the visual box of a Mesh
Parameters: - aName (str) – a genealogical name
- mesh (ORSModel.ors.Mesh) – a Mesh
-
classmethod
setClipBoxVisibilityOfMesh
(mesh, isVisible, view=None)¶
-
interfacemethod
setClipBoxVisibilityOfMeshFromLayoutGenealogicalName
(aName, mesh, isVisible)¶ Sets the visual box visibility of a Mesh
Parameters: - aName (str) – a genealogical name
- mesh (ORSModel.ors.Mesh) – a Mesh
- isVisible (bool) – if True, the clip box will be set as visible; if False, the clip box will be hidden.
-
classmethod
setVisualBoxOfMesh
(mesh, aBox, display=None)¶
-
interfacemethod
setVisualBoxOfMeshFromLayoutGenealogicalName
(aName, mesh, aBox)¶ Sets the visual box of a Mesh
Parameters: - aName (str) – a genealogical name
- mesh (ORSModel.ors.Mesh) – a Mesh
- aBox (ORSModel.ors.Box) – the box to set
-
interfacemethod
viewhelper¶
-
class
OrsHelpers.viewhelper.
ViewHelper
¶ Helper related to the class ORSModel.ors.View.
-
classmethod
applyRotationInDegree
(display, degree, logging=True)¶
-
classmethod
applyRotationInRadian
(display, radian, logging=True)¶
-
classmethod
copyViewSettings
(source: ORSModel.ors.View, destination: ORSModel.ors.View)¶
-
classmethod
flipViewHorizontally
(display, logging=True)¶
-
classmethod
flipViewVertically
(display, logging=True)¶
-
classmethod
getCursor3DForView
(display)¶
-
classmethod
refreshAllViewsOfSameGroupAs
(display, d2D=False, d3D=False)¶
-
classmethod
viewLayoutHelper¶
-
class
OrsHelpers.viewLayoutHelper.
DisplayLayoutHelper
¶ Helper related to the layouts (disposition of the views).
-
classmethod
copyVisibilityStatesOfVisualInView
(oldDisplay, newDisplay)¶
-
classmethod
fitBoxInAllViewsOfLayout
(layout, box, logging=True)¶
-
classmethod
fitBoxInLayoutOfView
(display, box)¶
-
classmethod
fitVisualInAllViewsOfLayout
(layout, visual)¶
-
classmethod
fitVisualInLayoutOfView
(display, visual)¶
-
classmethod
get3DCursorForLayout
(layout)¶
-
classmethod
get3DCursorForView
(display)¶
-
classmethod
get3DCursorPositionForView
(display)¶
-
classmethod
getAll2DViewsInLayout
(layout)¶
-
classmethod
getAll2DViewsOfLayoutOfView
(display)¶
-
classmethod
getAll3DViewsInLayout
(layout)¶
-
classmethod
getAll3DViewsOfLayoutOfView
(display)¶
-
classmethod
getAllOther2DViewsInLayoutOfView
(display)¶
-
classmethod
getAllOther3DViewsInLayoutOfView
(display)¶
-
classmethod
getAllOtherViewsOfLayoutOfView
(display)¶
-
classmethod
getAllViewsOfLayoutOfView
(display)¶
-
classmethod
getExistsVisible2DViewInLayoutOfView
(display)¶
-
classmethod
getGridForLayout
(layout)¶
-
classmethod
getGridForView
(display)¶
-
classmethod
getOrsQtLayoutPluginInstanceForView
(IDisplay)¶
-
classmethod
getScaleBarForLayout
(layout)¶
-
classmethod
getScaleBarForView
(display)¶
-
classmethod
getTopFrameForLayout
(layout)¶
-
classmethod
getTopFrameForView
(display)¶
-
classmethod
move2DLayoutOfViewToIncludePoint
(display, worldposition, center=False, logging=True)¶
-
classmethod
move2DViewOfLayoutToIncludePoint
(layout, worldposition, center=False, logging=True)¶
-
classmethod
move3DLayoutOfViewToIncludePoint
(display, worldposition, center=False, logging=True)¶
-
classmethod
move3DViewOfLayoutToIncludePoint
(layout, worldposition, center=False, logging=True)¶
-
classmethod
refreshAll2DViewsOfLayout
(layout)¶
-
classmethod
refreshAll2DViewsOfLayoutOfView
(display)¶
-
classmethod
refreshAll3DViewsOfLayoutOfView
(display)¶
-
classmethod
refreshAllOtherViewsOfLayoutOfView
(display)¶
-
classmethod
refreshAllViewsOfLayoutOfView
(display)¶
-
classmethod
reset3DCursorOfLayout
(layout)¶
-
classmethod
setIsVisibleForView
(volumeGUID, displayGUID, bVisibleStatusToSet)¶
-
static
setTopFrameForAllViewsOfLayout
(layout, topFrame)¶
-
classmethod
viewLogger¶
-
class
OrsHelpers.viewLogger.
ViewLogger
¶ Helper related to the class ORSModel.ors.View.
-
classmethod
fitBoundedPlaneInView
(view, rectangle)¶
-
interfacemethod
fitBoundedPlaneInViewFromLayoutGenealogicalName
(aName, rectangle)¶ Fit Rectangle in View
Parameters: - aName (str) – a genealogical name
- rectangle (ORSModel.ors.Rectangle) – a rectangle
-
classmethod
fitBoxInView
(view, box)¶
-
interfacemethod
fitBoxInViewFromLayoutGenealogicalName
(aName, box)¶ Fit box in View
Parameters: - aName (str) – a genealogical name
- box (ORSModel.ors.Box) – a box
-
interfacemethod
setCameraFromLayoutGenealogicalName
(aName, camera)¶ Sets the camera of the view based on the fullname of the view layout
Parameters: - aName (str) – a genealogical name
- camera (ORSModel.ors.Camera) – the new camera
-
classmethod
setCameraView
(view, camera)¶
-
classmethod
setProjectionMode2D
(view, projectionMode)¶
-
interfacemethod
setProjectionMode2DFromLayoutGenealogicalName
(aName, projectionMode)¶ Set view mode
Parameters: - aName (str) – a genealogical name
- projectionMode (IntEnum CxvVolumeProjection_Mode) – a viewMode
-
classmethod
setViewMode
(view, viewMode)¶
-
interfacemethod
setViewModeFromLayoutGenealogicalName
(aName, viewMode)¶ Set view mode
Parameters: - aName (str) – a genealogical name
- viewMode (IntEnum CxvView_Mode) – a viewMode
-
classmethod
setViewOrientedPlane
(view, orientedPlane, thickness)¶
-
interfacemethod
setViewOrientedPlaneFromLayoutGenealogicalName
(aName, orientedPlane, thickness)¶ Sets the view oriented plane from genealogical name
Parameters: - aName (str) – a genealogical name
- orientedPlane (ORSModel.ors.OrientedPlane) – the view futur oriented plane
- thickness (float) – a thickness in meter
-
classmethod
setViewOrientedPlaneWithBox
(view, orientedPlane, box)¶
-
interfacemethod
setViewOrientedPlaneWithBoxFromLayoutGenealogicalName
(aName, orientedPlane, box)¶ Sets the view orientation from box
Parameters: - aName (str) – a genealogical name
- orientedPlane (ORSModel.ors.OrientedPlane) – an oriented plane
- box (ORSModel.ors.Box) – a box
-
classmethod
setViewOrthoZoomFactor
(view, zoomFactor)¶
-
interfacemethod
setViewOrthoZoomFactorFromLayoutGenealogicalName
(aName, zoomFactor)¶ Sets the view ortho zoom factor
Parameters: - aName (str) – a genealogical name
- zoomFactor (float) – a zoom factor
-
classmethod
setViewPlanePosition
(view, point, center)¶
-
interfacemethod
setViewPlanePositionFromLayoutGenealogicalName
(aName, point, center)¶ Sets the view plane position from genealogical name
Parameters: - aName (str) – a genealogical name
- point (ORSModel.ors.Vector3) – a point
- center (bool) – should the point be the center of the view
-
classmethod
setViewSlabThickness
(view, thickness)¶
-
interfacemethod
setViewSlabThicknessFromLayoutGenealogicalName
(aName, thickness)¶ Sets the view plane position from genealogical name
Parameters: - aName (str) – a genealogical name
- thickness (float) – a thickness in meter
-
classmethod
setViewSliceIndexOfBox
(view, box, sliceIndex)¶
-
interfacemethod
setViewSliceIndexOfBoxFromLayoutGenealogicalName
(aName, box, sliceIndex)¶ Sets the view plane position at box index from genealogical name
Parameters: - aName (str) – a genealogical name
- box (ORSModel.ors.Box) – a box
- sliceIndex (float) – a slice index
-
classmethod
visualChannelLogger¶
-
class
OrsHelpers.visualChannelLogger.
VisualChannelLogger
¶ Helper related to the visual state of Channels.
-
classmethod
set2DOpacityFactorForView
(visualChannel, view, value)¶
-
interfacemethod
set2DOpacityFactorForViewFromLayoutGenealogicalName
(aName, dataset, value)¶ Sets the 2D opacity of a VisualChannel
Parameters: - aName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
- value (float) – value
-
classmethod
set3DOpacityFactorForView
(visualChannel, view, value)¶
-
interfacemethod
set3DOpacityFactorForViewFromLayoutGenealogicalName
(aName, dataset, value)¶ Sets the 3D opacity of a VisualChannel
Parameters: - aName (str) – a genealogical name
- dataset (ORSModel.ors.Channel) – a dataset
- value (float) – value
-
classmethod
visualColorBarLogger¶
-
class
OrsHelpers.visualColorBarLogger.
VisualColorBarLogger
¶ Helper related to the visual state of ColorBars.
-
classmethod
setCanBeVisibleForView
(visualColorBar, view, value)¶
-
interfacemethod
setCanBeVisibleForViewFromLayoutGenealogicalName
(aName, parentNode, value)¶ Sets the visibility of a Visual color bar
Parameters: - aName (str) – a genealogical name
- parentNode (ORSModel.ors.Channel, ORSModel.ors.MultiROI, ORSModel.ors.Mesh) – the visualColorBar parentNode
- value (bool) – value
-
classmethod
setLookupTableForView
(visualColorBar, view, lut)¶
-
interfacemethod
setLookupTableForViewFromLayoutGenealogicalName
(aName, parentNode, lutUUID)¶ Sets the lookup table of a visual color bar
Parameters: - aName (str) – a genealogical name
- parentNode (ORSModel.ors.Channel, ORSModel.ors.MultiROI, ORSModel.ors.Mesh) – the visualColorBar parentNode
- lutUUID (str) – a look up table UUID
-
classmethod
visualLogger¶
-
class
OrsHelpers.visualLogger.
VisualLogger
¶ Helper related to generic visuals.
-
classmethod
setIsVisibleForView
(visual, view, bValue, logging=True)¶
-
classmethod
setIsVisibleForViewFromLayoutGenealogicalName
(aName, visual, isVisible)¶ Set view mode for dataset
Parameters: - aName (str) – a genealogical name
- visual (ORSModel.ors.Visual) – a visual
- isVisible (bool) – visibility
-
classmethod
volumehelper¶
-
class
OrsHelpers.volumehelper.
VolumeHelper
¶ Helper related to the class ORSModel.ors.VisualChannel.
-
classmethod
addWindowLevelingCallbacksOnVisualColorBar
(legend=None)¶
-
interfacemethod
applyDefaultLeveling
(dataset)¶ Applies the default window leveling on a visual associated to a dataset
Parameters: dataset (ORSModel.ors.Channel) – a channel from which the leveling will be obtained
-
classmethod
attachVolumesToTopFrame
(IVol, ITopFrame)¶
-
interfacemethod
createVolumeForChannel
(aChannel0, aChannel1=None, aChannel2=None, aChannel3=None, layout=None)¶ Creates a volume from a set of channels
Parameters: - aChannel0 (ORSModel.ors.Channel) – The first channel to attach
- aChannel1 (ORSModel.ors.Channel) – The second channel to attach
- aChannel2 (ORSModel.ors.Channel) – The third channel to attach
- aChannel3 (ORSModel.ors.Channel) – The fourth channel to attach
- layout (ORSModel.ors.Layout) – A specific layout in which to add the volume
Returns: - aVolume (ORSModel.ors.VisualChannel) – created volume
- clipBox (ORSModel.ors.VisualBox) – clip box of the channel(s)
- aLegend (ORSModel.ors.VisualColorBar) – created legend
-
classmethod
detachVisualsFromTopFrame
(topFrameGuid)¶
-
classmethod
detachVolumesFromTopFrame
(volGuid, topFrameGuid)¶
-
leveling3D_callbacks
= {}¶
-
leveling_callbacks
= {}¶
-
classmethod
removeWindowLevelingCallbacksOnVisualColorBar
(legend=None)¶
-
interfacemethod
set2DWindowLevel2Range
(dataset, rangeMinInPhysicalUnits, rangeMaxInPhysicalUnits)¶ Sets the range of the second leveling of a visual associated to a dataset
Parameters: - dataset (ORSModel.ors.Channel) – associated channel to the visual to set the range on
- rangeMinInPhysicalUnits (float) – minimal value of the range
- rangeMaxInPhysicalUnits (float) – maximal value of the range
-
interfacemethod
setSecondLevelingStatus
(dataset, isEnabled)¶ Enables or disabled the second leveling of a visual associated to a dataset.
Parameters: - dataset (ORSModel.ors.Channel) – associated channel to the visual
- isEnabled (bool) – specify if the range should be enabled
-
static
updateLegendRange
(aLegend, leveling3D)¶
-
static
updateVolumeVisibilityOrder
(guidList, topToBottom=True)¶
-
classmethod
watershedhelper¶
-
class
OrsHelpers.watershedhelper.
WatershedHelper
¶ Helper for performing a watershed (segmentation algorithm).
-
classmethod
watershedFromAChannelLabeled
(edgeMap, tStepEdgeMap, labelChannelIn, labelChannelOut, neighboorCount=6, ROIMask=None, IProgress=None, progressBarId=79)¶
-
classmethod
watershedFromALabeledMultiROI
(edgeMap, tStepEdgeMap, LMRInput, LMROutput, neighboorCount=6, ROIMask=None, IProgress=None, progressBarId=79)¶
-
classmethod
watershedFromAListOfROI
(edgeMap, tStepEdgeMap, aListOfROI, tStepROI, neighboorCount=6, ROIMask=None, IProgress=None, progressBarId=79)¶
-
classmethod