ORSModel

Inheritance diagram

Inheritance diagram of ORSModel.ors.Annotation, ORSModel.ors.Array, ORSModel.ors.ArrayChar, ORSModel.ors.ArrayDouble, ORSModel.ors.ArrayFloat, ORSModel.ors.ArrayLONGLONG, ORSModel.ors.ArrayLong, ORSModel.ors.ArrayShort, ORSModel.ors.ArrayUnsignedChar, ORSModel.ors.ArrayUnsignedLONGLONG, ORSModel.ors.ArrayUnsignedLong, ORSModel.ors.ArrayUnsignedShort, ORSModel.ors.Box, ORSModel.ors.Camera, ORSModel.ors.Capsule, ORSModel.ors.Channel, ORSModel.ors.Channel2DOverlapMergerHelper, ORSModel.ors.Channel3DBlendingHelper, ORSModel.ors.ChannelRegistrationHelper, ORSModel.ors.ChannelSliceRegistrationHelper, ORSModel.ors.ChannelSliceReplacementHelper, ORSModel.ors.Circle, ORSModel.ors.Collection, ORSModel.ors.Color, ORSModel.ors.ConvolutionHelper, ORSModel.ors.ConvolutionKernel, ORSModel.ors.Cursor3D, ORSModel.ors.Cylinder, ORSModel.ors.DatasetPresenter, ORSModel.ors.Dijkstra, ORSModel.ors.Dijkstra2D, ORSModel.ors.DimensionUnit, ORSModel.ors.DistanceChannelAnalyzer, ORSModel.ors.DualQuaternion, ORSModel.ors.EuclideanDistanceMapGenerator, ORSModel.ors.FaceVertexMesh, ORSModel.ors.FastMarching, ORSModel.ors.FastMarching2D, ORSModel.ors.FastMarchingWatershed2D, ORSModel.ors.FordBellmanAutomata, ORSModel.ors.GaussianPyramid, ORSModel.ors.GeodesicDistanceMap, ORSModel.ors.Graph, ORSModel.ors.Group, ORSModel.ors.HalfEdgeMesh, ORSModel.ors.HistogramAnalyzer, ORSModel.ors.HistogramData, ORSModel.ors.Image, ORSModel.ors.ImageCollection, ORSModel.ors.ImageCollectionPresenter, ORSModel.ors.Intersection, ORSModel.ors.Layout, ORSModel.ors.Line, ORSModel.ors.LineSegment, ORSModel.ors.List, ORSModel.ors.Loader, ORSModel.ors.LookupTable, ORSModel.ors.Managed, ORSModel.ors.MassiveMarchingAutomata, ORSModel.ors.Material, ORSModel.ors.Matrix4x4, ORSModel.ors.Mesh, ORSModel.ors.MeshFacesROI, ORSModel.ors.Model, ORSModel.ors.MultiROI, ORSModel.ors.MultiROIAnalyzer, ORSModel.ors.Node, ORSModel.ors.ORSBaseClass, ORSModel.ors.Octree, ORSModel.ors.OpticalFlow, ORSModel.ors.OrderedCollection, ORSModel.ors.OrderedCollectionChar, ORSModel.ors.OrderedCollectionDouble, ORSModel.ors.OrderedCollectionFloat, ORSModel.ors.OrderedCollectionLONGLONG, ORSModel.ors.OrderedCollectionLong, ORSModel.ors.OrderedCollectionShort, ORSModel.ors.OrderedCollectionUnsignedChar, ORSModel.ors.OrderedCollectionUnsignedLONGLONG, ORSModel.ors.OrderedCollectionUnsignedLong, ORSModel.ors.OrderedCollectionUnsignedShort, ORSModel.ors.OrientedPlane, ORSModel.ors.PartialSpaceDijkstra, ORSModel.ors.PartialSpaceFastMarching, ORSModel.ors.PerimeterComputation, ORSModel.ors.Plane, ORSModel.ors.PlaneCollection, ORSModel.ors.Progress, ORSModel.ors.Quaternion, ORSModel.ors.ROI, ORSModel.ors.ROIAnalyzer, ORSModel.ors.Rectangle, ORSModel.ors.ReferenceFrame, ORSModel.ors.RenderingEffect, ORSModel.ors.Saver, ORSModel.ors.SequenceableCollection, ORSModel.ors.Shape, ORSModel.ors.Shape2D, ORSModel.ors.Shape3D, ORSModel.ors.Sphere, ORSModel.ors.StatisticalAnalyzer, ORSModel.ors.StructuredGrid, ORSModel.ors.TraceBackChannelAnalyzer, ORSModel.ors.Unmanaged, ORSModel.ors.UnstructuredGrid, ORSModel.ors.Vector3, ORSModel.ors.VectorField, ORSModel.ors.View, ORSModel.ors.Visual, ORSModel.ors.VisualAngle, ORSModel.ors.VisualArrow, ORSModel.ors.VisualBox, ORSModel.ors.VisualCapsule, ORSModel.ors.VisualChannel, ORSModel.ors.VisualColorBar, ORSModel.ors.VisualCylinder, ORSModel.ors.VisualGraph, ORSModel.ors.VisualGrid, ORSModel.ors.VisualLabel, ORSModel.ors.VisualLegend, ORSModel.ors.VisualMesh, ORSModel.ors.VisualOverlay, ORSModel.ors.VisualPath, ORSModel.ors.VisualPlane, ORSModel.ors.VisualPoints, ORSModel.ors.VisualROI, ORSModel.ors.VisualRegion, ORSModel.ors.VisualRuler, ORSModel.ors.VisualScaleBar, ORSModel.ors.VisualShape, ORSModel.ors.VisualShape2D, ORSModel.ors.VisualShape3D, ORSModel.ors.VisualSphere, ORSModel.ors.VisualText, ORSModel.ors.VisualVectorField, ORSModel.ors.Watershed, ORSModel.ors.WatershedOnGrid

Classes

Annotation

class ORSModel.ors.Annotation

Bases: ORSModel.ors.Visual

brief_description: Represents image annotations. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Aug 2006

addControlPoint(self, pPoint: ORSModel.ors.Vector3, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4) → None

Adds a control point.

Note

Any change to a annotation should be followed by update() to reflect the changes visually.

Parameters:
addControlPointForAllTimeStep(self, pPoint: ORSModel.ors.Vector3, aWorldTransformMatrix: ORSModel.ors.Matrix4x4) → None

method addControlPointForAllTimeStep

Parameters:
addControlPointToHighlighted(self, controlPointIndex: int, iTIndex: int) → None
Parameters:
  • controlPointIndex (int) –
  • iTIndex (int) –
addControlPointToSelection(self, controlPointIndex: int, iTIndex: int) → None

method addControlPointToSelection

Parameters:
  • controlPointIndex (int) –
  • iTIndex (int) –
applyTransformation(self, aTransformationMatrix: ORSModel.ors.Matrix4x4, iTIndex: int) → None

method applyTransformation

Parameters:
applyTransformationOnAllTimeStep(self, aTransformationMatrix: ORSModel.ors.Matrix4x4) → None

method applyTransformationOnAllTimeStep

Parameters:aTransformationMatrix (ORSModel.ors.Matrix4x4) –
copyControlPointFrom(self, aControlPointCollection: ORSModel.ors.OrderedCollectionDouble, iTIndex: int) → None

method copyControlPointFrom

Parameters:
duplicateTimeStepDataAcrossAllTimeSteps(self, iTIndex: int) → None

Duplicate Time Step Data Across All Time Steps.

Parameters:iTIndex (int) – the T index (an uint32_t)
get3DThickness(self) → float

Gets the thickness of lines in 3D mode.

Returns:output (float) – the thickness, in screen proportion (a double between 0 and 1)
getAsROI(self, iTIndex: int, worldTransform: ORSModel.ors.Matrix4x4, pOutputROI: ORSModel.ors.ROI) → None

Makes a Region of Interest from the annotation.

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • worldTransform (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none())
  • pOutputROI (ORSModel.ors.ROI) – the output ROI where results are to be written (a ROI)
getAsROIForAllTimeStep(self, worldTransform: ORSModel.ors.Matrix4x4, pOutputROI: ORSModel.ors.ROI) → None
Parameters:
getAutoCaption(self) → bool

method getAutoCaption

Returns:output (bool) –
getCaption(self) → str

method getCaption

Returns:output (str) –
getCaptionTextFontName(self) → str

getCaptionTextFontName

Returns:output (str) –
getCaptionTextFontSize(self) → float

Gets the font size of text captions, in screen one thousandths.

Returns:output (float) – the font size (a double between 0 and 1)
getCaptionTextMinimumFontSize(self) → int

Gets the minimum font size of text captions, in font points.

Returns:output (int) – the font size
getCentroid(self, iTIndex: int, worldTransform: ORSModel.ors.Matrix4x4) → Vector3

Gets the World centroid of the annotation.

Parameters:
Returns:

output (ORSModel.ors.Vector3) – The centroid vector

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getControlPointAppearance(self) → int

Gets the control point appearance.

Returns:output (int) – The appearance (an int) 0:Circle 1:Square 2:Triangle 3:+ 4:x
getControlPointCaptionAtIndex(self, index: int, iTIndex: int) → str

Gets the text associated to a given control point.

Parameters:
  • index (int) – the T index (an uint32_t)
  • iTIndex (int) – the control point index (an uint32_t)
Returns:

output (str) – the text

getControlPointCount(self, iTIndex: int) → int

Gets the number of control points for a given T.

Parameters:iTIndex (int) – the T index (a uint32_t)
Returns:output (int) – the number of control points (an uint32_t)
getControlPointPositionAtIndex(self, index: int, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → Vector3

method getControlPointPositionAtIndex

Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getControlPoints(self, iTIndex: int) → OrderedCollectionDouble

getControlPoints

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.OrderedCollectionDouble) –
getCreationOrientedPlane(self) → OrientedPlane

Retrieve the oriented plane on which the annotation is created, if it was set.

Returns:output (ORSModel.ors.OrientedPlane) – an Oriented Plane (an OrientedPlane)
getCreationOrientedPlaneInView(self, aView: ORSModel.ors.View) → OrientedPlane

getCreationOrientedPlaneInView

Parameters:aView (ORSModel.ors.View) –
Returns:output (ORSModel.ors.OrientedPlane) –
getDistanceFromLineSegment(self, aStartPoint: ORSModel.ors.Vector3, aEndPoint: ORSModel.ors.Vector3, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → float

Gets the distance between this annotation and a givenLine Segment.

Parameters:
Returns:

output (float) – the distance (a double)

getDistanceFromPlane(self, aPlane: ORSModel.ors.Plane, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → float

Gets the distance between this annotation and a givenPlane.

Parameters:
  • aPlane (ORSModel.ors.Plane) – the plane (a Plane)
  • iTIndex (int) – the T index (an uint32_t)
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none)
Returns:

output (float) – the distance (a double)

getDistanceFromPoint(self, aPoint: ORSModel.ors.Vector3, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → float

Gets the distance between this annotation and a given Point.

Parameters:
Returns:

output (float) – the distance (a double)

getDrawTextShadow(self) → bool

Gets the view text shadows status.

Returns:output (bool) – true if text shadows are visible, false otherwise
getHighlightControlPointColor(self) → Color

method getHighlightControlPointColor

Returns:output (ORSModel.ors.Color) –
getHighlightedControlPointsArray(self, iTIndex: int) → OrderedCollectionUnsignedLong

Gets the list of highlighted control points.

Parameters:iTIndex (int) – the T index (a uint32_t)
Returns:output (ORSModel.ors.OrderedCollectionUnsignedLong) – a collection of points (an OrderedCollectionUnsignedLong)
getHighlightedControlPointsCount(self, iTIndex: int) → int

Gets the count of highlighted control points.

Parameters:iTIndex (int) – the T index (a uint32_t)
Returns:output (int) – the count (a uint32_t)
getIsEditable(self) → bool

Sees if the annotation is editable or not.

Note

Non editable annotations appear to be “locked”, i.e. they do not react to user modifications.

Returns:output (bool) – true if the annotation is editable, false otherwise
getIsIntersectingBox(self, box: ORSModel.ors.Box, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → bool

Indicates if the annotation intersects with a box.

Parameters:
  • box (ORSModel.ors.Box) – the box (a Box)
  • iTIndex (int) – the T index (an uint32_t)
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none)
Returns:

output (bool) – true if the annotation intersects the box, false otherwise

getNormalColor(self) → Color

Gets the normal color of the annotation.

Note

Because annotations can switch from normal to selected colors, you can store them within the annotation, and switch from one to the other with setToNormalColor() and setToSelectedColor().

Returns:output (ORSModel.ors.Color) – the color (a Color)
getProjectionIn(self, worldTransform: ORSModel.ors.Matrix4x4) → Annotation

Projects the annotation in a channel’s space, returning a new annotation.

Parameters:worldTransform (ORSModel.ors.Matrix4x4) –
  • the channel in which to project (a Channel)
Returns:output (ORSModel.ors.Annotation) – a new annotation (an Annotation)
getSelectedColor(self) → Color

Gets the selected color of the annotation.

Note

Because annotations can switch from normal to selected colors, you can store them within the annotation, and switch from one to the other with setToNormalColor() and setToSelectedColor().

Returns:output (ORSModel.ors.Color) – the color (a Color)
getSelectedControlPointArray(self, iTIndex: int) → OrderedCollectionUnsignedLong

method getSelectedControlPointArray

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.OrderedCollectionUnsignedLong) –
getSelectedControlPointColor(self) → Color

Gets the control point selected color of the annotation.

Returns:output (ORSModel.ors.Color) – the color (a Color)
getSelectedControlPointCount(self, iTIndex: int) → int

Gets the count of selected control points.

Parameters:iTIndex (int) – the T index (an uint32_t)
Returns:output (int) – the count (an uint32_t)
getShow3DIn2D(self) → bool

Get the Control Point Appearance.

Returns:output (bool) –
getShowCaption(self) → bool

get the view status of the annotation caption.

Returns:output (bool) – true if caption are displayed, false otherwise
getShowControlPoints(self) → bool

Sees if control points are visible.

Returns:output (bool) – true if control points are visible, false otherwise
getTextColor(self) → Color

Gets the text color of the annotation.

Note

The text color is used for the caption.

Returns:output (ORSModel.ors.Color) – the color (a Color)
getTextShadowColor(self) → Color

Gets the text shadow color of the annotation.

Returns:output (ORSModel.ors.Color) – the color (a Color)
getThickness(self) → float

Gets the thickness of lines in 2D mode.

Returns:output (float) – the thickness, in screen proportion (a double between 0 and 1)
getWellBehaveBoundingBox(timestep, matrix)
insertControlPoint(self, index: int, pPoint: ORSModel.ors.Vector3, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4) → None

Insert a control point.

Note

Any change to a annotation should be followed by update() to reflect the changes visually.

Parameters:
  • index (int) – the control point insertion index (an uint32_t)
  • pPoint (ORSModel.ors.Vector3) – a point (a Vector3)
  • iTIndex (int) – the T index (an uint32_t)
  • aWorldTransformMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none)
none()

Annotation.__init__() -> Annotation

removeAllControlPoints(self, iTIndex: int) → None

Removes all control points.

Parameters:iTIndex (int) – the T index (an uint32_t)
removeAllControlPointsForAllTimeStep(self) → None

Removes all control points.

removeControlPoint(self, index: int, iTIndex: int) → None

Removes a single control point.

Note

Control point indicies are zero based.

Parameters:
  • index (int) – the control point index (an uint32_t)
  • iTIndex (int) – the T index (an uint32_t)
removeControlPointForAllTimeStep(self, index: int) → None

Removes a single control point.

Parameters:index (int) – the T index (an uint32_t)
removeControlPointFromHighlighted(self, controlPointIndex: int, iTIndex: int) → None
Parameters:
  • controlPointIndex (int) –
  • iTIndex (int) –
removeControlPointFromSelection(self, controlPointIndex: int, iTIndex: int) → None

method removeControlPointFromSelection

Parameters:
  • controlPointIndex (int) –
  • iTIndex (int) –
set3DThickness(self, value: float) → None

Sets the thickness of lines in 3D mode.

Parameters:value (float) – the thickness, in pixel units (a double between 0 and 1)
setAutoCaption(self, aValue: bool) → None

method setAutoCaption

Parameters:aValue (bool) –
setCaption(self, text: str) → None

Sets the caption of the annotation.

Note

Any modification to annotation properties must be followed by an update() to be shown on the view.

Parameters:text (str) – a caption (a string)
setCaptionTextFontName(self, sFontName: str) → None

Sets the font name of text captions.

Parameters:sFontName (str) – the font name (a string)
setCaptionTextFontSize(self, fontSize: float) → None

Sets the font size of text captions, in screen one thousandths.

Parameters:fontSize (float) – the font size (a double between 0 and 1)
setCaptionTextMinimumFontSize(self, fontSize: int) → None

Sets the minimum font size of text captions, in font points.

Parameters:fontSize (int) – the font size
setControlPointAppearance(self, nValue: int) → None

Sets the control point appearance.

Parameters:nValue (int) – The appearance (an int) 0:Circle 1:Square 2:Triangle 3:+ 4:x
setControlPointCaptionAtIndex(self, index: int, iTIndex: int, sCaption: str) → None

Sets the caption of a given control point.

Parameters:
  • index (int) – the control point index (an uint32_t)
  • iTIndex (int) – the T index (an uint32_t)
  • sCaption (str) – the caption
setControlPointPositionAtIndex(self, index: int, iTIndex: int, anIVector: ORSModel.ors.Vector3, aTransformationMatrix: ORSModel.ors.Matrix4x4) → None

Sets the position of a given control point.

Parameters:
  • index (int) – the control point index (an uint32_t)
  • iTIndex (int) – the T index (an uint32_t)
  • anIVector (ORSModel.ors.Vector3) – the position (a Vector3)
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none)
setControlPointPositionAtIndexForAllTimeStep(self, index: int, anIVector: ORSModel.ors.Vector3, aTransformationMatrix: ORSModel.ors.Matrix4x4) → None

method setControlPointPositionAtIndexForAllTimeStep

Parameters:
setCreationOrientedPlane(self, anOrientedPlane: ORSModel.ors.OrientedPlane) → None

Set the oriented plane on which the annotation is created.

Parameters:anOrientedPlane (ORSModel.ors.OrientedPlane) – an Oriented Plane (an OrientedPlane)
setCreationOrientedPlaneFromView(self, aView: ORSModel.ors.View) → None

Copies the oriented plane from the given view.

Parameters:aView (ORSModel.ors.View) – a view (a View)
setDrawTextShadow(self, bFlag: bool) → None

Toggles displaying shadows for the text.

Parameters:bFlag (bool) – true to show text shadows, false otherwise
setHighlightControlPointColor(self, IColor: ORSModel.ors.Color) → None

Set the color of control points.

Parameters:IColor (ORSModel.ors.Color) – the color (a Color)
setIsEditable(self, pFlag: bool) → None

Sets the annotation to be editable or not.

Note

Non editable annotations appear to be “locked”, i.e. they do not react to user modifications.

Parameters:pFlag (bool) – true to make the annotation editable, false otherwise
setNormalColor(self, IColor: ORSModel.ors.Color) → None

Sets the normal color of the annotation.

Note

Because annotations can switch from normal to selected colors, you can store them within the annotation, and switch from one to the other with setToNormalColor() and setToSelectedColor().

Parameters:IColor (ORSModel.ors.Color) – the color (a Color)
setSelectedColor(self, IColor: ORSModel.ors.Color) → None

Sets the selected color of the annotation.

Note

Because annotations can switch from normal to selected colors, you can store them within the annotation, and switch from one to the other with setToNormalColor() and setToSelectedColor().

Parameters:IColor (ORSModel.ors.Color) – the color (a Color)
setSelectedControlPointColor(self, IColor: ORSModel.ors.Color) → None

Sets the control point selected color of the annotation.

Parameters:IColor (ORSModel.ors.Color) – the color (a Color)
setShow3DIn2D(self, nValue: bool) → None

Set the Control Point Appearance.

Parameters:nValue (bool) –
setShowCaption(self, bShow: bool) → None

Toggles the displaying of the annotation caption.

Note

Any modification to annotation properties must be followed by an update() to be shown on the view.

Parameters:bShow (bool) – true to display the caption, false to hide it
setShowControlPoints(self, value: bool) → None

Toggles the displaying of the annotation control points.

Note

Any modification to annotation properties must be followed by an update() to be shown on the view.

Parameters:value (bool) – true to display the control points, false to hide them
setTextColor(self, IColor: ORSModel.ors.Color) → None

Sets the text color of the annotation.

Note

The text color is used for the caption.

Parameters:IColor (ORSModel.ors.Color) – the color (a Color)
setTextShadowColor(self, IColor: ORSModel.ors.Color) → None

Sets the text shadow color of the annotation.

Parameters:IColor (ORSModel.ors.Color) – the color (a Color)
setThickness(self, value: float) → None

Sets the thickness of lines in 2D mode.

Parameters:value (float) – the thickness, in pixel units (a double between 0 and 1)
update(self) → None

Updates all visual aspects of the annotation.

Array

class ORSModel.ors.Array

Bases: ORSModel.ors.SequenceableCollection

brief_description: None author: Normand Mongeau. version: 1.0 Array abstraction class. Arrays can shrink and grow while preserving their contents. Resizing an array is not internally done, i.e. it’s up to the user of an array

to manage the array size. Accessing an index that’s not in the array will result in an error.
copyFromMemory(self, pSource: int, iByteCount: int, iInsertionIndex: int) → None

Copies a memory buffer in the array.

Note

The array will grow to accommodate the copied data, if required.

Parameters:
  • pSource (bytes) – the source (a unsigned char*)
  • iByteCount (int) – the size of the source, in bytes (a uint64_t)
  • iInsertionIndex (int) – the insertion index into the array (a uint64_t, zero based)
copyFromNumpyArray()
copyIntoMemory(self, pOutput: int, iStartIndex: int, iNbElementsToCopy: int) → None

Copies the array to a memory buffer.

Note

The memory buffer needs to be big enough to accommodate the input.

Parameters:
  • pOutput (bytes) – the target memory buffer (a unsigned char*)
  • iStartIndex (int) – the starting index of the source array (a uint64_t, zero based)
  • iNbElementsToCopy (int) – the number of array elements to copy (a uint64_t)
classmethod createArrayFromNumpyArray(np_array, packet_size=64) → ORSModel.ors.Array
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getNDArray()
getNumpyArrayCopy()
getOffsetBitAnd(self) → int
Returns:output (int) –
getOffsetBitShift(self) → int
Returns:output (int) –
getPacketCount(self) → int

Gets the number of packets currently in the array.

Note

Arrays are composed of packets, this method return the number of packets.

Returns:output (int) – the packet count (an uint32_t)
getPacketSize(self) → int

Gets the packet size used by the array.

Note

Arrays are composed of packets, this method return the packet size used. The packet size represents the number of items in the packet, not the byte size.

Returns:output (int) – the packet size (an uint32_t)
none()

Array.__init__() -> Array

setInitialSize(self, iPacketSize: int, initialSize: int) → None

Sets the initial size of the array.

Note

This should be the first method invoked after instantiating the array. If the array has been used (items added/deleted) then this method can be costly if the array has many elements, as changing the internal storage implies that the data can co-exist momentarily.

Note

Arrays are composed of packets, this method controls the packet size used. Default values are 64 and 64.

Parameters:
  • iPacketSize (int) – the packet size (a uint32_t)
  • initialSize (int) – the initial array size (a uint64_t)

ArrayChar

class ORSModel.ors.ArrayChar

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type char (1 byte per value).

at(self, index: int) → int

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (int) – the value (a signed char)
atPut(self, index: int, pValue: int) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (int) – the value to put (a signed char)
copyInto(self, anArray: ORSModel.ors.ArrayChar, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ORSModel.ors.ArrayChar) – the destination array (an ORSArrayCharPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: int) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (int) – the value to search for (a signed char)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: int) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (int) – the value to search for (a signed char)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → int

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the largest value found (a signed short)

getMin(self, startIndex: int, endIndex: int) → int

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the smallest value found (a signed short)

getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (bytes) – the smallest value found (a signed char*)
  • max (bytes) – the largest value found (a signed char*)
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (int) – the value to insert (a signed char)
none()

ArrayChar.__init__() -> ArrayChar

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: int) → None

Sets all elements of the array to the same value.

Parameters:iValue (int) – the value to set (a signed char)

ArrayDouble

class ORSModel.ors.ArrayDouble

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type double (8 bytes per value).

at(self, index: int) → float

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (float) – the value (a double)
atPut(self, index: int, pValue: float) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (float) – the value to put (a double)
copyInto(self, anArray: ORSModel.ors.ArrayDouble, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ORSModel.ors.ArrayDouble) – the destination array (an ORSArrayDoublePtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: float) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (float) – the value to search for (a double)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: float) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (float) – the value to search for (a double)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → float

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (float) – the largest value found (a double)

getMin(self, startIndex: int, endIndex: int) → float

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (float) – the smallest value found (a double)

getMinMax(self, startIndex: int, endIndex: int, min: float, max: float) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (float) – the smallest value found (a double*)
  • max (float) – the largest value found (a double*)
getOccurrencesOf(self, pValue: float) → int
Parameters:pValue (float) –
Returns:output (int) –
insertAt(self, index: int, pValue: float) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (float) – the value to insert (a double)
none()

ArrayDouble.__init__() -> ArrayDouble

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: float) → None

Sets all elements of the array to the same value.

Parameters:iValue (float) – the value to set (a double)

ArrayFloat

class ORSModel.ors.ArrayFloat

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type float (4 bytes per value).

at(self, index: int) → float

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (float) – the value (a float)
atPut(self, index: int, pValue: float) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (float) – the value to put (a float)
copyInto(self, anArray: ORSModel.ors.ArrayFloat, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ORSModel.ors.ArrayFloat) – the destination array (an ORSArrayFloatPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: float) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (float) – the value to search for (a float)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: float) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (float) – the value to search for (a float)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → float

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (float) – the largest value found (a float)

getMin(self, startIndex: int, endIndex: int) → float

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (float) – the smallest value found (a float)

getMinMax(self, startIndex: int, endIndex: int, min: float, max: float) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (float) – the smallest value found (a float*)
  • max (float) – the largest value found (a float*)
getOccurrencesOf(self, pValue: float) → int
Parameters:pValue (float) –
Returns:output (int) –
insertAt(self, index: int, pValue: float) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (float) – the value to insert (a float)
none()

ArrayFloat.__init__() -> ArrayFloat

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: float) → None

Sets all elements of the array to the same value.

Parameters:iValue (float) – the value to set (a float)

ArrayLONGLONG

class ORSModel.ors.ArrayLONGLONG

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type int64_t (8 bytes per value).

at(self, index: int) → int

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (int) – the value (a int64_t)
atPut(self, index: int, pValue: int) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (int) – the value to put (a int64_t)
copyInto(self, anArray: ORSModel.ors.ArrayLONGLONG, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ArrayLONGLONG) – the destination array (an ORSArrayLONGLONGPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: int) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (int) – the value to search for (a int64_t)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: int) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (int) – the value to search for (a int64_t)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → int

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the largest value found (a int64_t)

getMin(self, startIndex: int, endIndex: int) → int

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the smallest value found (a int64_t)

getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (int) – the smallest value found (a int64_t*)
  • max (int) – the largest value found (a int64_t*)
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (int) – the value to insert (a int64_t)
none()

ArrayLONGLONG.__init__() -> ArrayLONGLONG

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: int) → None

Sets all elements of the array to the same value.

Parameters:iValue (int) – the value to set (a int64_t)

ArrayLong

class ORSModel.ors.ArrayLong

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type int32_t (4 bytes per value).

at(self, index: int) → int

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (int) – the value (a int32_t)
atPut(self, index: int, pValue: int) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (int) – the value to put (a int32_t*)
copyInto(self, anArray: ORSModel.ors.ArrayLong, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ORSModel.ors.ArrayLong) – the destination array (an ORSArrayLongPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: int) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (int) – the value to search for (a int32_t*)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: int) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (int) – the value to search for (a int32_t*)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → int

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the largest value found (a int32_t)

getMin(self, startIndex: int, endIndex: int) → int

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the smallest value found (a int32_t)

getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (int) – the smallest value found (a int32_t*)
  • max (int) – the largest value found (a int32_t*)
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (int) – the value to insert (a int32_t*)
none()

ArrayLong.__init__() -> ArrayLong

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: int) → None

Sets all elements of the array to the same value.

Parameters:iValue (int) – the value to set (a int32_t*)

ArrayShort

class ORSModel.ors.ArrayShort

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type short (2 bytes per value).

at(self, index: int) → int

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (int) – the value (a short)
atPut(self, index: int, pValue: int) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (int) – the value to put (a short)
copyInto(self, anArray: ORSModel.ors.ArrayShort, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ORSModel.ors.ArrayShort) – the destination array (an ORSArrayShortPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: int) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (int) – the value to search for (a short)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: int) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (int) – the value to search for (a short)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → int

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the largest value found (a signed short)

getMin(self, startIndex: int, endIndex: int) → int

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the smallest value found (a signed short)

getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (int) – the smallest value found (a short*)
  • max (int) – the largest value found (a short*)
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (int) – the value to insert (a short)
none()

ArrayShort.__init__() -> ArrayShort

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: int) → None

Sets all elements of the array to the same value.

Parameters:iValue (int) – the value to set (a short)

ArrayUnsignedChar

class ORSModel.ors.ArrayUnsignedChar

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type unsigned char (1 byte per value).

at(self, index: int) → int

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (int) – the value (an char)
atPut(self, index: int, pValue: int) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (int) – the value to put (an unsigned char)
copyInto(self, anArray: ORSModel.ors.ArrayUnsignedChar, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ORSModel.ors.ArrayUnsignedChar) – the destination array (an ORSArrayUnsignedCharPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: int) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (int) – the value to search for (an unsigned char)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: int) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (int) – the value to search for (an unsigned char)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → int

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the largest value found (an short)

getMin(self, startIndex: int, endIndex: int) → int

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the smallest value found (an short)

getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (bytes) – the smallest value found (an unsigned char*)
  • max (bytes) – the largest value found (an unsigned char*)
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (int) – the value to insert (an unsigned char)
none()

ArrayUnsignedChar.__init__() -> ArrayUnsignedChar

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: int) → None

Sets all elements of the array to the same value.

Parameters:iValue (int) – the value to set (an unsigned char)

ArrayUnsignedLONGLONG

class ORSModel.ors.ArrayUnsignedLONGLONG

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type uint64_t (8 bytes per value).

at(self, index: int) → int

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (int) – the value (a uint64_t)
atPut(self, index: int, pValue: int) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (int) – the value to put (a uint64_t)
copyInto(self, anArray: ORSModel.ors.ArrayUnsignedLONGLONG, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ArrayUnsignedLONGLONG) – the destination array (an ORSArrayUnsignedLONGLONGPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: int) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (int) – the value to search for (a uint64_t)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: int) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (int) – the value to search for (a uint64_t)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → int

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the largest value found (an uint64_t)

getMin(self, startIndex: int, endIndex: int) → int

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the smallest value found (an uint64_t)

getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (int) – the smallest value found (an uint64_t*)
  • max (int) – the largest value found (an uint64_t*)
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (int) – the value to insert (a uint64_t)
none()

ArrayUnsignedLONGLONG.__init__() -> ArrayUnsignedLONGLONG

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: int) → None

Sets all elements of the array to the same value.

Parameters:iValue (int) – the value to set (an uint64_t)

ArrayUnsignedLong

class ORSModel.ors.ArrayUnsignedLong

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type uint32_t (4 bytes per value).

at(self, index: int) → int

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (int) – the value (an uint32_t)
atPut(self, index: int, pValue: int) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (int) – the value to put (an uint32_t)
copyInto(self, anArray: ORSModel.ors.ArrayUnsignedLong, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ORSModel.ors.ArrayUnsignedLong) – the destination array (an ORSArrayUnsignedLongPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: int) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (int) – the value to search for (an uint32_t)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: int) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (int) – the value to search for (an uint32_t)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → int

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the largest value found (an uint32_t)

getMin(self, startIndex: int, endIndex: int) → int

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the smallest value found (an uint32_t)

getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (int) – the smallest value found (an uint32_t*)
  • max (int) – the largest value found (an uint32_t*)
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (int) – the value to insert (an uint32_t)
none()

ArrayUnsignedLong.__init__() -> ArrayUnsignedLong

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: int) → None

Sets all elements of the array to the same value.

Parameters:iValue (int) – the value to set (an uint32_t)

ArrayUnsignedShort

class ORSModel.ors.ArrayUnsignedShort

Bases: ORSModel.ors.Array

brief_description: None author: Normand Mongeau. version: 1.0 Array for numeric values of type unsigned short (2 bytes per value).

at(self, index: int) → int

Retrieves a single value from the array.

Parameters:index (int) – the index of the item to retrieve (an uint64_t, zero based)
Returns:output (int) – the value (an short)
atPut(self, index: int, pValue: int) → None

Puts a single value into the array.

Note

Any previous value at the given position is lost.

Parameters:
  • index (int) – the index of the item to modify (an uint64_t, zero based)
  • pValue (int) – the value to put (an unsigned short)
copyInto(self, anArray: ORSModel.ors.ArrayUnsignedShort, iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None

Copies portions of the source array in another array.

Note

The destination array will grow to accommodate the copied data, if required.

Parameters:
  • anArray (ORSModel.ors.ArrayUnsignedShort) – the destination array (an ORSArrayUnsignedShortPtr)
  • iInsertionIndex (int) – the insertion index into the destination array (a uint64_t, zero based)
  • iStartIndex (int) – the start index of the source (a uint64_t, zero based)
  • iEndIndex (int) – the end index of the source (a uint64_t, zero based)
findFirst(self, pValue: int) → int

Searches the array for a given value, starting at index 0.

Parameters:pValue (int) – the value to search for (an unsigned short)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
findLast(self, pValue: int) → int

Searches the array for a given value, starting at indexgetSize() - 1 (the end of the array).

Parameters:pValue (int) – the value to search for (an unsigned short)
Returns:output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMax(self, startIndex: int, endIndex: int) → int

Returns the max value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the largest value found (an short)

getMin(self, startIndex: int, endIndex: int) → int

Returns the min value within the array.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:

output (int) – the smallest value found (an short)

getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None

Returns the min and max values within the array.

Note

Return values are written to the supplied arguments.

Parameters:
  • startIndex (int) – the start index where to search (a uint64_t, zero based, inclusive)
  • endIndex (int) – the end index where to search (a uint64_t, zero based, inclusive)
Returns:
  • min (int) – the smallest value found (an unsigned short*)
  • max (int) – the largest value found (an unsigned short*)
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None

Inserts a single item into the array.

Note

All items after the insertion index are shifted down. The last element of the array is thus lost.

Parameters:
  • index (int) – the index of the item to insert (an uint64_t, zero based)
  • pValue (int) – the value to insert (an unsigned short)
none()

ArrayUnsignedShort.__init__() -> ArrayUnsignedShort

privateGetDataPacketAtIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
setAll(self, iValue: int) → None

Sets all elements of the array to the same value.

Parameters:iValue (int) – the value to set (an unsigned short)

Box

class ORSModel.ors.Box

Bases: ORSModel.ors.Shape3D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010

clip(self, pBox: ORSModel.ors.Box) → None

Clip the box with the given box if both box are aligned, do nothing otherwise.

Parameters:pBox (ORSModel.ors.Box) – a box (a Box)
createFromPythonRepresentation(aPythonRepresentation: str) → Box

Create aBox object from a Python string representation a static method.

Parameters:aPythonRepresentation (str) – a Python evaluable string representation (a string)
Returns:output (ORSModel.ors.Box) – a box (a Box)
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

Create aBox object from a Python string representation.

Parameters:aPythonRepresentation (str) – a Python evaluable string representation (a string)
Returns:output (bool) – TRUE if parsing worked, FALSE otherwise (a bool)
getBoundedPlaneOfSlice(self, sliceIndex: int) → Rectangle

Gets the bounded plane for a given direction2 index.

Parameters:sliceIndex (int) – the index in the direction2 of the box (an uint32_t)
Returns:output (ORSModel.ors.Rectangle) – the bounded plane (a Rectangle)
getBoxInBoxReferential(self, inRefBox: ORSModel.ors.Box) → Box

Gets a copy of the receiver in the argument referential.

Parameters:inRefBox (ORSModel.ors.Box) – a box, the destination referential (an Box)
Returns:output (ORSModel.ors.Box) – a box, a copy of the receiver in the argument referential (an Box)
getBoxToWorld(self, intVect: ORSModel.ors.Vector3) → Vector3

Transforms the given point (which is expressed in the box referential) in the world referential.

Note

Here the spacing is not considered.

Parameters:intVect (ORSModel.ors.Vector3) – a point (an Vector3)
Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getCenter(self) → Vector3

Gets the geometrical middle of the box.

Returns:output (ORSModel.ors.Vector3) – a box center position (an Vector3)
getCenterHalfVoxel(self) → Vector3

Gets the middle of the voxel in the middle of the box.

Returns:output (ORSModel.ors.Vector3) – a box center position (an Vector3)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getContainsBox(self, aBox: ORSModel.ors.Box) → bool

Gets if the given box is totally contained in the receiver.

Parameters:aBox (ORSModel.ors.Box) – a box (a Box)
Returns:output (bool) – TRUE if the given box is totally contained in the receiver, FALSE otherwise
getDirection(self, index: int) → Vector3

Gets a box direction.

Note

The direction vector is normalized.

Parameters:index (int) – the side index (a uint16_t)
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection0(self) → Vector3

Gets the box direction0.

Note

The direction0 vector is normalized.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection0Size(self) → float

Gets the box direction0 side length.

Note

This is the size in meters of the box side 0.

Returns:output (float) – the side 0 length (a double)
getDirection0SizeInVoxel(self) → int

Gets the direction0 size in voxels.

Returns:output (int) – the size in voxels (an uint32_t)
getDirection0Spacing(self) → float

Gets the box direction0 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Returns:output (float) – the side 0 spacing (a double)
getDirection1(self) → Vector3

Gets the box direction1.

Note

The direction1 vector is normalized.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection1Size(self) → float

Gets the box direction1 side length.

Note

This is the size in meters of the box side 1.

Returns:output (float) – the side 1 length (a double)
getDirection1SizeInVoxel(self) → int

Gets the direction1 size in voxels.

Returns:output (int) – the size in voxels (an uint32_t)
getDirection1Spacing(self) → float

Gets the box direction1 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Returns:output (float) – the side 1 spacing (a double)
getDirection2(self) → Vector3

Gets the box direction2.

Note

The direction2 vector is normalized.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection2Size(self) → float

Gets the box direction2 side length.

Note

This is the size in meters of the box side 2.

Returns:output (float) – the side 2 length (a double)
getDirection2SizeInVoxel(self) → int

Gets the direction2 size in voxels.

Returns:output (int) – the size in voxels (an uint32_t)
getDirection2Spacing(self) → float

Gets the box direction2 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Returns:output (float) – the side 2 spacing (a double)
getDirectionMax(self) → Vector3

Get the direction of the maximal size.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirectionMid(self) → Vector3

Get the direction of the middle size.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirectionMin(self) → Vector3

Get the direction of the minimal size.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirectionSize(self, index: int) → float

Gets a box direction side length.

Note

This is the size in meters of the box side.

Parameters:index (int) – the side index (a uint16_t)
Returns:output (float) – the side length (a double)
getDirectionSizeMax(self) → float

Get the maximal direction size of the box.

Returns:output (float) – the side length (a double)
getDirectionSizeMid(self) → float

Get the middle direction size of the box.

Returns:output (float) – the side length (a double)
getDirectionSizeMin(self) → float

Get the minimal direction size of the box.

Returns:output (float) – the side length (a double)
getDirectionSizeVector(self) → Vector3

Gets the direction size as a vector.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirectionSpacing(self, index: int) → float

Gets the box direction spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:index (int) – the side index (a uint16_t)
Returns:output (float) – the side spacing (a double)
getDirectionSpacingVector(self) → Vector3

Gets the direction spacing as a vector.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getEnclosingBox(self, dir0: ORSModel.ors.Vector3, dir1: ORSModel.ors.Vector3) → Box

Makes the box containing the receiver, oriented with the provided directions.

Parameters:
Returns:

output (ORSModel.ors.Box) – the box containing the receiver (a Box)

getFace(self, faceIndex: int) → Rectangle

Gets the bounded plane of a face.

Parameters:faceIndex (int) – the side index (a uint16_t)
Returns:output (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)
getFirstIntersectingFace(self, aLine: ORSModel.ors.Line) → int

Gets the face index of intersection closest to the origin of a line.

Parameters:aLine (ORSModel.ors.Line) – a line (a Line)
Returns:output (int) – the side index (a short). This value is -1 if there is no intersection between the receiver and the given line.
getHasSameOrientation(self, pBox: ORSModel.ors.Box) → bool

Gets if the receiver has the same orientation as the given box.

Parameters:pBox (ORSModel.ors.Box) – a box to compare (a Box)
Returns:output (bool) – TRUE if the receiver has the same orientation, FALSE otherwise (a bool)
getHasSameOrthonormalBase(self, pBox: ORSModel.ors.Box) → bool

Gets if the receiver has the same orthonormal base as the given box.

Parameters:pBox (ORSModel.ors.Box) – a box to compare (a Box)
Returns:output (bool) – TRUE if the receiver has the same orthonormal base, FALSE otherwise (a bool)
getIntersectionWithLine(self, aLine: ORSModel.ors.Line) → LineSegment

Gets the intersection of the receiver with the given line.

Parameters:aLine (ORSModel.ors.Line) – a line (a Line)
Returns:output (ORSModel.ors.LineSegment) – the line segment at the intersection of the box with the given line (a LineSegment)
getIntersectionWithLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) → LineSegment

Gets the intersection of the receiver with the given line segment.

Parameters:inputLineSegment (ORSModel.ors.LineSegment) – a line segment (a LineSegment)
Returns:output (ORSModel.ors.LineSegment) – the line segment at the intersection of the box with the given line segment (a LineSegment)
getIsEqualTo(self, aBox: ORSModel.ors.Box) → bool

Checks for equality to another box.

Parameters:aBox (ORSModel.ors.Box) – a box (an Box)
Returns:output (bool) – TRUE if the boxes are equal, FALSE otherwise
getIsIntersectingBox(self, aBox: ORSModel.ors.Box) → bool

Gets if the receiver intersects the given box.

Parameters:aBox (ORSModel.ors.Box) – a box to intersect with the receiver (a Box)
Returns:output (bool) – TRUE if the receiver intersects the box, FALSE otherwise (a bool)
getIsIntersectingLine(self, aLine: ORSModel.ors.Line) → bool

Gets if the receiver intersects the given line.

Parameters:aLine (ORSModel.ors.Line) – a line (a Line)
Returns:output (bool) – TRUE if the box intersects the line, FALSE otherwise (a bool)
getIsIntersectingLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) → bool

Gets if the receiver intersects the given line segment.

Parameters:inputLineSegment (ORSModel.ors.LineSegment) – a line segment (a LineSegment)
Returns:output (bool) – TRUE if the box intersects the line segment, FALSE otherwise (a bool)
getIsIntersectingPlane(self, aPlane: ORSModel.ors.Plane) → bool

Gets if the receiver intersects the given plane.

Parameters:aPlane (ORSModel.ors.Plane) – a plane (a Plane)
Returns:output (bool) – TRUE if the box intersects the plane, FALSE otherwise (a bool)
getIsIntersectingRectangle(self, aBplane: ORSModel.ors.Rectangle) → bool

Gets if the receiver intersects the given bounded plane.

Parameters:aBplane (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)
Returns:output (bool) – TRUE if the box intersects the bounded plane, FALSE otherwise (a bool)
getIsPointInside(self, aPosition: ORSModel.ors.Vector3) → bool

Verifies if a point is inside the box.

Parameters:aPosition (ORSModel.ors.Vector3) – a point (an Vector3)
Returns:output (bool) – TRUE if the point is inside the box, FALSE otherwise
getMostSimilarDirectionIndex(self, pVect: ORSModel.ors.Vector3) → int

Gets the index of the direction vector closest to the vector given.

Parameters:pVect (ORSModel.ors.Vector3) – a direction (a Vector3)
Returns:output (int) – the direction vector index (a uint16_t)
getNearestPointOnBoxSurfaceFromLineOnPlane(self, aPlane: ORSModel.ors.Plane, aLine: ORSModel.ors.Line, insideDeep: float) → Vector3

Gets the closest point located on the box surface to the given line on the given plane.

Parameters:
  • aPlane (ORSModel.ors.Plane) – a plane (a Plane)
  • aLine (ORSModel.ors.Line) – a line (a Line)
  • insideDeep (float) – a displacement distance to add in the direction from the point found at the surface of the box to the closest point on the line (a double)
Returns:

output (ORSModel.ors.Vector3) – the point on the box (an Vector3)

getNearestPointOnBoxSurfaceFromPointOnPlane(self, aPlane: ORSModel.ors.Plane, aPoint: ORSModel.ors.Vector3, insideDeep: float) → Vector3

Gets the closest point located on the box surface to the given point on the given plane.

Parameters:
  • aPlane (ORSModel.ors.Plane) – a plane (a Plane)
  • aPoint (ORSModel.ors.Vector3) – a point (a Vector3)
  • insideDeep (float) – a displacement distance to add in the direction from the point found at the surface of the box to the provided point (a double)
Returns:

output (ORSModel.ors.Vector3) – the point on the box (an Vector3)

getOrigin(self) → Vector3

Gets the box origin position.

Note

The origin is in world coordinates.

Returns:output (ORSModel.ors.Vector3) – the origin (an Vector3)
getOriginOpposite(self) → Vector3

Gets the position of the corner opposite to the origin.

Note

The origin opposite is in world coordinates.

Returns:output (ORSModel.ors.Vector3) – the origin opposite (an Vector3)
getOutwardFacePlane(self, faceIndex: int) → Plane

Returns the given face index plane with outward normal.

Parameters:faceIndex (int) – the side index (a uint16_t)
Returns:output (ORSModel.ors.Plane) – a plane (a Plane)
getPlaneInBoxReferential(self, pPlane: ORSModel.ors.Plane) → Plane

Transforms the plane provided in the receiver referential.

Parameters:pPlane (ORSModel.ors.Plane) – a plane (a Plane)
Returns:output (ORSModel.ors.Plane) – a plane in the box referential (a Plane)
getPlaneTranslatedSoThatItIntersect(self, aPlane: ORSModel.ors.Plane) → Plane

Gets a translated plane intersecting the box at its closest location.

Parameters:aPlane (ORSModel.ors.Plane) – a plane (a Plane)
Returns:output (ORSModel.ors.Plane) – the translated plane intersecting the box (a Plane)
getPythonRepresentation(self) → str

Gets a Python evaluable string representation.

Returns:output (str) –
getRectangleOfIntersection(self, cutPlane: ORSModel.ors.Plane, upVector: ORSModel.ors.Vector3) → Rectangle

Computes the bounded plane (with direction 1 vector equal to the up vector provided) of the intersection of the receiver with a plane.

Note

The bounded plane will have an area of zero if the plane does not intersect the box.

Parameters:
Returns:

output (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)

getRotationMatrix(self) → Matrix4x4

Get the rotation matrix define by the box.

Returns:output (ORSModel.ors.Matrix4x4) – the rotation matrix (a Matrix4x4)
getSpacingInDirection(self, aDirection: ORSModel.ors.Vector3) → float

Gets the spacing in the specified direction.

Parameters:aDirection (ORSModel.ors.Vector3) – the direction vector (an Vector3)
Returns:output (float) – the spacing (a double)
getSubBoxForIndex(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int) → Box

Get a subbox for the given index.

Parameters:
  • minX (int) – the smallest index in direction0 (an int32_t)
  • minY (int) – the smallest index in direction1 (an int32_t)
  • minZ (int) – the smallest index in direction2 (an int32_t)
  • maxX (int) – the biggest index in direction0 (an int32_t)
  • maxY (int) – the biggest index in direction1 (an int32_t)
  • maxZ (int) – the biggest index in direction2 (an int32_t)
Returns:

output (ORSModel.ors.Box) – the subbox (a Box)

getSummit(self, maxDirection0: bool, maxDirection1: bool, maxDirection2: bool) → Vector3

Gets the position of one of the summits of the box.

Parameters:
  • maxDirection0 (bool) – TRUE to get maxDirection0, FALSE to get minDirection0
  • maxDirection1 (bool) – TRUE to get maxDirection1, FALSE to get minDirection1
  • maxDirection2 (bool) – TRUE to get maxDirection2, FALSE to get minDirection2
Returns:

output (ORSModel.ors.Vector3) – a summit position (a Vector3)

getSummitmmm(self) → Vector3

Gets the (minDirection0, minDirection1, minDirection2) summit position.

Returns:output (ORSModel.ors.Vector3) – a summit position (a Vector3)
getSummitmmp(self) → Vector3

Gets the (minDirection0, minDirection1, maxDirection2) summit position.

Returns:output (ORSModel.ors.Vector3) – a summit position (a Vector3)
getSummitmpm(self) → Vector3

Gets the (minDirection0, maxDirection1, minDirection2) summit position.

Returns:output (ORSModel.ors.Vector3) – a summit position (a Vector3)
getSummitmpp(self) → Vector3

Gets the (minDirection0, maxDirection1, maxDirection2) summit position.

Returns:output (ORSModel.ors.Vector3) – a summit position (a Vector3)
getSummitpmm(self) → Vector3

Gets the (maxDirection0, minDirection1, minDirection2) summit position.

Returns:output (ORSModel.ors.Vector3) – a summit position (a Vector3)
getSummitpmp(self) → Vector3

Gets the (maxDirection0, minDirection1, maxDirection2) summit position.

Returns:output (ORSModel.ors.Vector3) – a summit position (a Vector3)
getSummitppm(self) → Vector3

Gets the (maxDirection0, maxDirection1, minDirection2) summit position.

Returns:output (ORSModel.ors.Vector3) – a summit position (a Vector3)
getSummitppp(self) → Vector3

Gets the (maxDirection0, maxDirection1, maxDirection2) summit position.

Returns:output (ORSModel.ors.Vector3) – a summit position (a Vector3)
getSurface(self) → float

Gets the surface of the receiver.

Returns:output (float) – a surface (a double)
getTransformationToGoTo(self, pIBox: ORSModel.ors.Box) → Matrix4x4

Gets the 4x4 matrix transforming the receiver into the argument.

Note

The transformation can include: translation, rotation and scaling.

Parameters:pIBox (ORSModel.ors.Box) – a box (an Box)
Returns:output (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
getVolume(self) → float

Gets the volume of the receiver.

Returns:output (float) – a volume (a double)
getVoxelToWorldCoordinates(self, anIndex: ORSModel.ors.Vector3) → Vector3

Gets the position of a given voxel.

Note

Only useful if the spacing of the direction vectors have been defined.

Parameters:anIndex (ORSModel.ors.Vector3) – a voxel position (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the position in world coordinates (an Vector3)
getWorldToBox(self, inVect: ORSModel.ors.Vector3) → Vector3

Transforms the given point in the box referential.

Note

Here the spacing is not considered.

Parameters:inVect (ORSModel.ors.Vector3) – a point (an Vector3)
Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getWorldToVoxelCoordinates(self, pPointInWorld: ORSModel.ors.Vector3) → Vector3

Gets the position of a given world coordinate.

Note

Only useful if the spacing of the direction vectors have been defined.

Parameters:pPointInWorld (ORSModel.ors.Vector3) – a world coordinate position vector (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the position in local coordinates (an Vector3)
getWorldTranformation(self) → Matrix4x4

Gets the transformation from the unit box to the receiver.

Returns:output (ORSModel.ors.Matrix4x4) –
grow(self, growSize: ORSModel.ors.Vector3) → None

Grows or shrinks the receiver, arount its center.

Parameters:growSize (ORSModel.ors.Vector3) – a vector with the amount of growth of each direction vector length (an Vector3)
growToContain(self, pBox: ORSModel.ors.Box) → None

Grows to include a given box.

Note

The receiver will grow to contain the provided box, but it will never shrink.

Parameters:pBox (ORSModel.ors.Box) – a box (a Box)
growToIncludePoint(self, aPoint: ORSModel.ors.Vector3) → None

Grows the receiver as to include the provided point.

Parameters:aPoint (ORSModel.ors.Vector3) – a point to be included in the box (an Vector3)
makeAbleToContain(self, pBox: ORSModel.ors.Box) → None

Makes the box able to contain a given box.

Note

The receiver will grow or shrink to fit on the provided box.

Parameters:pBox (ORSModel.ors.Box) – a box (an Box)
moveFaceSoThatPlaneIncludesPoint(self, faceIndex: int, pVect: ORSModel.ors.Vector3) → None

Moves the face at the given index so that the given point lie on the face plane.

Parameters:
  • faceIndex (int) – the side index (a uint16_t)
  • pVect (ORSModel.ors.Vector3) – a point to be contained by the face plane (an Vector3)
none()

Box.__init__() -> Box

orthonormalizeDirections(self) → None

Orthonormalizes the directions of the box.

setDirection(self, index: int, pVect: ORSModel.ors.Vector3) → None

Sets a box direction.

Note

The direction vector will be normalized.

Parameters:
  • index (int) – the side index (a uint16_t)
  • pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirection0(self, pVect: ORSModel.ors.Vector3) → None

Sets the box direction0.

Note

The direction0 vector will be normalized.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirection0Size(self, aSize: float) → None

Sets the box direction0 vector length.

Note

This is the size in meters of the box side 0.

Parameters:aSize (float) – the side 0 length (a double)
setDirection0Spacing(self, aSpacing: float) → None

Sets the box direction0 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:aSpacing (float) – the side 0 spacing (a double)
setDirection1(self, pVect: ORSModel.ors.Vector3) → None

Sets the box direction1.

Note

The direction1 vector will be normalized.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirection1Size(self, aSize: float) → None

Sets the box direction1 vector length.

Note

This is the size in meters of the box side 1.

Parameters:aSize (float) – the side 1 length (a double)
setDirection1Spacing(self, aSpacing: float) → None

Sets the box direction1 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:aSpacing (float) – the side 1 spacing (a double)
setDirection2(self, pVect: ORSModel.ors.Vector3) → None

Sets the box direction2.

Note

The direction2 vector will be normalized.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirection2Size(self, aSize: float) → None

Sets the box direction2 vector length.

Note

This is the size in meters of the box side 2.

Parameters:aSize (float) – the side 2 length (a double)
setDirection2Spacing(self, aSpacing: float) → None

Sets the box direction2 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:aSpacing (float) – the side 2 spacing (a double)
setDirectionSize(self, index: int, aSize: float) → None

Sets a box direction vector length.

Note

This is the size in meters of the box side.

Parameters:
  • index (int) – the side index (a uint16_t)
  • aSize (float) – the side length (a double)
setDirectionSizeVector(self, pVect: ORSModel.ors.Vector3) → None

Sets the direction size as a vector.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirectionSpacing(self, index: int, aSpacing: float) → None

Sets a box direction spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:
  • index (int) – the side index (a uint16_t)
  • aSpacing (float) – the side spacing (a double)
setDirectionSpacingVector(self, pVect: ORSModel.ors.Vector3) → None

Sets the direction spacing as a vector.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setOrigin(self, pVect: ORSModel.ors.Vector3) → None

Sets the box origin position.

Note

The origin should be in world coordinates.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
shape

Camera

class ORSModel.ors.Camera

Bases: ORSModel.ors.Unmanaged

brief_description: The camera object, i.e. the view point from which we look at objects. author: Nicolas Piché. All other members of ORS participated. version: 1.0 date: May 2010

copy(self) → Camera

Gets a copy.

Returns:output (ORSModel.ors.Camera) –
copyFrom(self, aCamera: ORSModel.ors.Camera) → None

Copy the parameters of a given camera.

Parameters:aCamera (ORSModel.ors.Camera) –
createFromPythonRepresentation(aPythonRepresentation: str) → Camera

Create aCamera from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Camera) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set aCamera from a python representation

Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getAngleOfView(self) → float

Gets angle of view.

Returns:output (float) –
getCameraDirection(self) → Vector3

Gets the look at direction.

Returns:output (ORSModel.ors.Vector3) –
getCameraLeft(self) → Vector3

Gets the left direction.

Returns:output (ORSModel.ors.Vector3) –
getCameraPivot(self) → Vector3

Gets the pivot position.

Returns:output (ORSModel.ors.Vector3) –
getCameraPosition(self) → Vector3

Gets the location.

Returns:output (ORSModel.ors.Vector3) –
getCameraRight(self) → Vector3

Gets the right direction.

Returns:output (ORSModel.ors.Vector3) –
getCameraUp(self) → Vector3

Gets the up direction.

Returns:output (ORSModel.ors.Vector3) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDepthOfField(self) → float

Gets depth of field.

Returns:output (float) –
getFarRectangle(self) → Rectangle

Get camera far plane.

Returns:output (ORSModel.ors.Rectangle) – the far plane (a Rectangle)
getFocalLength(self) → float

Gets focal length.

Returns:output (float) –
getIsEqualTo(self, aCamera: ORSModel.ors.Camera) → bool

Tests if the cameras have the same parameters.

Parameters:aCamera (ORSModel.ors.Camera) –
Returns:output (bool) –
getLineOfSight(self, positionOnView: ORSModel.ors.Vector3) → Line

Get the line of sight of the camera from position on screen.

Note

Origin of the line of sight is the camera position.

Parameters:positionOnView (ORSModel.ors.Vector3) –
Returns:output (ORSModel.ors.Line) – the line of sigth (an Line)
getLineOfSightOrtho(self) → Line

Get the line of sight of the camera.

Note

Origin of the line of sight is the camera position.

Returns:output (ORSModel.ors.Line) – the line of sigth (an Line)
getNearRectangle(self) → Rectangle

Get camera near plane.

Returns:output (ORSModel.ors.Rectangle) – the near plane (a Rectangle)
getOrthoZoomFactor(self) → float

method getOrthoZoomFactor

Returns:output (float) –
getPythonRepresentation(self) → str

Gets a Python evaluable string representation.

Returns:output (str) –
getRectangle(self, fDistance: float) → Rectangle

Get camera plane at a given distance in the frustum.

Note

The distance is clipped by [getViewPortNear(), getViewPortFar()]

Parameters:fDistance (float) –
Returns:output (ORSModel.ors.Rectangle) – the plane (a Rectangle)
getRotatedAroundAxis(self, rotationAxis: ORSModel.ors.Vector3, rotationPivot: ORSModel.ors.Vector3, angle: float) → Camera

Gets a new camera rotated around an axis around a specified location by an angle.

Parameters:
Returns:

output (ORSModel.ors.Camera) –

getSceneNormalizationMatrix(self) → Matrix4x4

Get scene normalization matrix.

Returns:output (ORSModel.ors.Matrix4x4) –
getSceneNormalizationRotationMatrix(self) → Matrix4x4

Get scene normalization matrix.

Returns:output (ORSModel.ors.Matrix4x4) –
getSceneNormalizationScaleMatrix(self) → Matrix4x4

Get scene normalization matrix.

Returns:output (ORSModel.ors.Matrix4x4) –
getSceneNormalizationTranslationMatrix(self) → Matrix4x4

Get scene normalization matrix.

Returns:output (ORSModel.ors.Matrix4x4) –
getScreenToWorldCoordinate(self, xCoordinate: float, yCoordinate: float) → Vector3

Gets screen to world coordinate.

Parameters:
  • xCoordinate (float) –
  • yCoordinate (float) –
Returns:

output (ORSModel.ors.Vector3) –

getScreenToWorldDirection(self, xCoordinate: float, yCoordinate: float) → Vector3

Gets screen to world direction.

Parameters:
  • xCoordinate (float) –
  • yCoordinate (float) –
Returns:

output (ORSModel.ors.Vector3) –

getUse3DOrthoApproximationProjection(self) → bool

Gets 3D ortho approximation projection.

Returns:output (bool) –
getUseOrthoProjection(self) → bool

Gets ortho projection.

Returns:output (bool) –
getViewMatrix(self) → Matrix4x4

Gets the equivalent left-handed view matrix.

Returns:output (ORSModel.ors.Matrix4x4) –
getViewPortFar(self) → float

Gets viewport far.

Returns:output (float) –
getViewPortHeight(self) → int

Gets viewport height.

Returns:output (int) –
getViewPortNear(self) → float

Gets viewport near.

Returns:output (float) –
getViewPortTopLeftX(self) → int

Gets viewport top left x.

Returns:output (int) –
getViewPortTopLeftY(self) → int

Gets viewport top left y.

Returns:output (int) –
getViewPortWidth(self) → int

Gets viewport width.

Returns:output (int) –
none()

Camera.__init__() -> Camera

rotateAroundAxis(self, rotationAxis: ORSModel.ors.Vector3, rotationPivot: ORSModel.ors.Vector3, angle: float) → None

Rotates the camera around an axis around a specified location by an angle.

Parameters:
setAngleOfView(self, aValue: float) → None

Sets angle of view.

Parameters:aValue (float) –
setCameraDirection(self, inputVector: ORSModel.ors.Vector3) → None

Sets the look at direction.

Parameters:inputVector (ORSModel.ors.Vector3) –
setCameraPivot(self, inputVector: ORSModel.ors.Vector3) → None

Sets the pivot position.

Parameters:inputVector (ORSModel.ors.Vector3) –
setCameraPosition(self, inputVector: ORSModel.ors.Vector3) → None

Sets the location.

Parameters:inputVector (ORSModel.ors.Vector3) –
setCameraUp(self, inputVector: ORSModel.ors.Vector3) → None

Sets the up direction.

Parameters:inputVector (ORSModel.ors.Vector3) –
setDepthOfField(self, aValue: float) → None

Sets depth of field.

Parameters:aValue (float) –
setFocalLength(self, aValue: float) → None

Sets focal length.

Parameters:aValue (float) –
setFromViewMatrix(self, aMatrix: ORSModel.ors.Matrix4x4) → None

Sets the parameters from a left-handed view matrix.

Parameters:aMatrix (ORSModel.ors.Matrix4x4) –
setOrthoZoomFactor(self, zoomFactor: float) → None

method setOrthoZoomFactor

Parameters:zoomFactor (float) –
setSceneNormalizationRotationMatrix(self, aMatrix: ORSModel.ors.Matrix4x4) → None

Set scene normalization matrix.

Parameters:aMatrix (ORSModel.ors.Matrix4x4) –
setSceneNormalizationScaleMatrix(self, aMatrix: ORSModel.ors.Matrix4x4) → None

Set scene normalization matrix.

Parameters:aMatrix (ORSModel.ors.Matrix4x4) –
setSceneNormalizationTranslationMatrix(self, aMatrix: ORSModel.ors.Matrix4x4) → None

Set scene normalization matrix.

Parameters:aMatrix (ORSModel.ors.Matrix4x4) –
setUse3DOrthoApproximationProjection(self, aValue: bool) → None

Sets 3D ortho approximationprojection.

Parameters:aValue (bool) –
setUseOrthoProjection(self, aValue: bool) → None

Sets ortho projection.

Parameters:aValue (bool) –
setViewPortFar(self, aValue: float) → None

Sets viewport far.

Parameters:aValue (float) –
setViewPortHeight(self, aValue: int) → None

Sets viewport height.

Parameters:aValue (int) –
setViewPortNear(self, aValue: float) → None

Sets viewport near.

Parameters:aValue (float) –
setViewPortTopLeftX(self, aValue: int) → None

Sets viewport top left x.

Parameters:aValue (int) –
setViewPortTopLeftY(self, aValue: int) → None

Sets viewport top left y.

Parameters:aValue (int) –
setViewPortWidth(self, aValue: int) → None

Sets viewport width.

Parameters:aValue (int) –

Capsule

class ORSModel.ors.Capsule

Bases: ORSModel.ors.Shape3D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010

createFromPythonRepresentation(aPythonRepresentation: str) → Capsule

Create aCapsule from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Capsule) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set aCapsule from a python representation

Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getAxis(self) → Vector3

Returns the normal of theCapsule.

Returns:output (ORSModel.ors.Vector3) – A vector (an Vector3)
getCap1Center(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getCap2Center(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getCenter(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getHeight(self) → float

GetsCapsule Height.

Returns:output (float) – An Height (a double)
getIntersectionWithLine(self, aLine: ORSModel.ors.Line) → LineSegment
Parameters:aLine (ORSModel.ors.Line) –
Returns:output (ORSModel.ors.LineSegment) –
getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) → LineSegment

Return the vector representing the intersection of the provided line segment and the receiver.

Parameters:aLineSegment (ORSModel.ors.LineSegment) –
Returns:output (ORSModel.ors.LineSegment) – a vector (an Vector3) or NULL if not intersection
getIsEqualTo(self, Capsule: ORSModel.ors.Capsule) → bool

Verifies equality between the receiver and a givenCapsule.

Parameters:Capsule (ORSModel.ors.Capsule) –
Returns:output (bool) – TRUE if the argument Capsule is equal to the receiver, FALSE otherwise
getPythonRepresentation(self) → str
Returns:output (str) –
getRadius(self) → float
Returns:output (float) –
getSurface(self) → float

GetsCapsule Surface.

Returns:output (float) – A Surface (a double)
getVolume(self) → float

GetsCapsule Volume.

Returns:output (float) – A Volume (a double)
none()

Capsule.__init__() -> Capsule

setCap1Center(self, aPoint: ORSModel.ors.Vector3) → None
Parameters:aPoint (ORSModel.ors.Vector3) –
setCap2Center(self, aPoint: ORSModel.ors.Vector3) → None
Parameters:aPoint (ORSModel.ors.Vector3) –
setCenter(self, aPoint: ORSModel.ors.Vector3) → None
Parameters:aPoint (ORSModel.ors.Vector3) –
setRadius(self, aRadius: float) → None
Parameters:aRadius (float) –
transform(self, transformationMatrix: ORSModel.ors.Matrix4x4) → None

Applies a transformation to the receiver.

Note

The transformation can include: translation, rotation and scaling.

Parameters:transformationMatrix (Matrix4x4) – a transformation matrix (an Matrix4x4)

Channel

class ORSModel.ors.Channel

Bases: ORSModel.ors.StructuredGrid

brief_description: A container for channel data. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: CxvChannel_Description, CxvChannel_Data_Type This is used as a channel data container. Channels are used as 4D data containers, that have a depth, a description, a type, and some spacing for representation. Depth value is directly related to the channel type. To create a channel the XYZT sizes and type must be set before initializing the channel data. The channel must be initialized before the data array is set.

addGaussianNoise(std, mean=0)

Add gaussian noise to the channel

Parameters:
  • std (float) – standard deviation
  • mean (float) – mean of the gaussian distribution
addSlice(self, pSliceData: ORSModel.ors.Array) → None

Adds a slice of data to the channel.

Note

The array should be of similar channel type (ArrayUnsignedChar, ArrayUnsignedShort, ArrayUnsignedInt or ArrayFloat).

Note

It is assumed that the slice added is of same shape as the existing slices within the channel.

Note

The slice data is copied to the channel. You are responsible for releasing the array.

Parameters:pSliceData (ORSModel.ors.Array) – the slice data (an Array), see note below
addSuggestedWindowLevelValues(self, pWidth: float, pCenter: float) → None

Adds a pair of suggested window width and center values (for leveling).

Note

The window width should be >= 1.

Note

The suggested leveling values are only used to present suitable values to end users.

Parameters:
  • pWidth (float) – a window width (a double)
  • pCenter (float) – a window center (a double)
applyLevelingTransformationToData(self, minValue: float, maxValue: float) → None
Parameters:
  • minValue (float) –
  • maxValue (float) –
applyLinearTransformationToData(self, slope: float, offset: float) → None
Parameters:
  • slope (float) –
  • offset (float) –
convertToType(self, datatype: int, bNormalize: bool, iLowNormalizationRange: float, iHighNormalizationRange: float, bFilter: bool, iLowFilterRange: float, iHighFilterRange: float, iReplacementValue: float, outputChannel: ORSModel.ors.Channel, IProgress: ORSModel.ors.Progress) → Channel

Converts the data type of the receiver.

Note

The first argument should be one of CxvChannel_Data_Type (see ors_def.h for valid values).

Parameters:
  • datatype (int) – the target data type (a uint16_t, see note below)
  • bNormalize (bool) – true to normalize the output
  • iLowNormalizationRange (float) – lower bound of normalization range (a double)
  • iHighNormalizationRange (float) – higher bound of normalization range (a double)
  • bFilter (bool) – true to filter the output
  • iLowFilterRange (float) – lower bound of filter range (a double)
  • iHighFilterRange (float) – higher bound of filter range (a double)
  • iReplacementValue (float) – replacement value for the filter (a double)
  • outputChannel (ORSModel.ors.Channel) – optional output channel. if none, a new channel will be created (a Channel). output channel must have the number of voxels as the input channel and must have the same datatype aas the target type.
  • IProgress (ORSModel.ors.Progress) – a progress object, NULL for no progress (an Progress)
Returns:

output (ORSModel.ors.Channel) – a new converted channel (a Channel)

copyDICOMAttributesFrom(self, pInputChannel: ORSModel.ors.Channel, bCopyPrivateAttributes: bool) → None

Copies the DICOM attributes from another channel.

Parameters:
  • pInputChannel (ORSModel.ors.Channel) – the source channel (a Channel)
  • bCopyPrivateAttributes (bool) – true to copy also private attributes, false to exclude them
copyDICOMDatasetForSlice(self, pInputChannel: ORSModel.ors.Channel, iTSource: int, iZSource: int, iTTarget: int, iZTarget: int) → None

Copies the DICOM attributes of a given slice to another channel.

Note

If any index is invalid no copy occurs.

Parameters:
  • pInputChannel (ORSModel.ors.Channel) – the destination channel (a Channel)
  • iTSource (int) – T source index (an uint32_t)
  • iZSource (int) – Z source index (an uint32_t)
  • iTTarget (int) – T target index (an uint32_t)
  • iZTarget (int) – Z target index (an uint32_t)
copyDataFromCommonRegionInto(self, pAChannel: ORSModel.ors.Channel, tOffset: int, filterMode: int, IProgress: ORSModel.ors.Progress, clearValue: bool) → None

Copies the data common with another channel into that channel.

Note

This method copies the data from the receiver into a supplied channel, for the area that is common to both channels. This area is computed based on the world coordinates of both channels.

Parameters:
  • pAChannel (ORSModel.ors.Channel) – the companion channel (a Channel)
  • tOffset (int) – the time step to use in the channel (a uint32_t)
  • filterMode (int) – a CxvFiltering_Mode (a uint16_t)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
  • clearValue (bool) – true to clear the companion channel before copying the channel (a boolean)
copyInto(self, aDestinationChannel: ORSModel.ors.Channel) → None

Copies the receiver channel into another channel.

Parameters:aDestinationChannel (ORSModel.ors.Channel) – a destination channel (a Channel)
copyShapeFromChannelSubset(self, pISourceChannel: ORSModel.ors.Channel, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int) → None

Initializes the channel’s shape based on a subset of another channel.

Note

Shape includes size, spacing, type, description, position and location.

Note

This method does not handle the channel data array.

Parameters:
  • pISourceChannel (ORSModel.ors.Channel) – a source channel (a Channel)
  • xmin (int) – the X lower range (an uint32_t)
  • ymin (int) – the Y lower range (an uint32_t)
  • zmin (int) – the Z lower range (an uint32_t)
  • tmin (int) – the T lower range (an uint32_t)
  • xmax (int) – the X upper range (an uint32_t)
  • ymax (int) – the Y upper range (an uint32_t)
  • zmax (int) – the Z upper range (an uint32_t)
  • tmax (int) – the T upper range (an uint32_t)
dtype
emptySuggestedWindowLevelValues(self) → None

Cleans the suggested window leveling values.

classmethod fromNDArray(data, channelGUID='', ZAxis=True, TimeAxis=False) → ORSModel.ors.Channel
getAllSliceIntersectionLength(self, arrayOfIntersectionLengthPerSlice: float, timeStep: int) → float
Parameters:
  • arrayOfIntersectionLengthPerSlice (float) –
  • timeStep (int) –
Returns:

output (float) –

getAllSlicesHaveSameOrientation(self, pTIndex: int) → bool

Verifies if the channel is consistent in its slice orientations.

Note

Normally a channel has consistent slice orientations, but in some poorly formed DICOM datasets it can happen that slices do not have the same orientation. Those channels become of limited use.

Parameters:pTIndex (int) –
Returns:output (bool) – true if all slices have identical orientations, false otherwise
getAreAllZSlicesDataAvailable(self) → bool

Gets the availability of all the Z slices’ data.

Note

The channel can be set to work in “lazy” mode, where slices are made available as they are read.

Note

Use this method to know if the entire data has arrived, instead of querying each slice with getIsZSliceDataAvailable().

Returns:output (bool) – true if all the Z slices’ data is available, false otherwise
getAsAbsoluteDifferenceChannel(self, pCompareChannel: ORSModel.ors.Channel, pOutputChannel: ORSModel.ors.Channel, IProgress: ORSModel.ors.Progress) → None

Gets a channel of the same type as the receiver containing the absolute difference between the two.

Note

The provided channel serves as the reference grid and the receiver is linearly interpolated.

Parameters:
getAsChannelClosedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Creates a new channel which is the receiver dilated and afterward eroded with the provided kernel.

Parameters:
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelCrossSection(self, path: ORSModel.ors.VisualPath, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, x: int, y: int, pInChannel: ORSModel.ors.Channel) → Channel

Samples the channel data for a given path.

Note

This method finds all the voxel data found along a path, and fills another channel with that data.

Note

The X and Y sizes define a box that will contain the data along the path.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • path (ORSModel.ors.VisualPath) – the path to sample (an VisualPath)
  • iTIndex (int) – an X size (an uint32_t), see note below
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – a Y size (an uint32_t), see note below
  • x (int) – The T index to be processed (an uint32_t)
  • y (int) – an optional output channel (a Channel)
  • pInChannel (ORSModel.ors.Channel) –
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelCurved(self, pIInputChannel: ORSModel.ors.Channel, path: ORSModel.ors.VisualPath, aTransformationMatrix: ORSModel.ors.Matrix4x4, forTimeStep: int, xAxisDirectionX: float, xAxisDirectionY: float, xAxisDirectionZ: float, xSize: int, ySize: int, xSpacing: float, bestYSizeAndSpacing: bool, bNearest: bool) → Channel
Parameters:
  • pIInputChannel (ORSModel.ors.Channel) –
  • path (ORSModel.ors.VisualPath) –
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) –
  • forTimeStep (int) –
  • xAxisDirectionX (float) –
  • xAxisDirectionY (float) –
  • xAxisDirectionZ (float) –
  • xSize (int) –
  • ySize (int) –
  • xSpacing (float) –
  • bestYSizeAndSpacing (bool) –
  • bNearest (bool) –
Returns:

output (ORSModel.ors.Channel) –

getAsChannelCurvedProjected(self, pIInputChannel: ORSModel.ors.Channel, path: ORSModel.ors.VisualPath, aTransformationMatrix: ORSModel.ors.Matrix4x4, forTimeStep: int, upVect: ORSModel.ors.Vector3, rightVect: ORSModel.ors.Vector3, xSize: int, ySize: int, optimalXSizeAndSpacing: bool, optimalYSizeAndSpacing: bool, zSliceTickness: float, minProjection: bool, maxProjection: bool, averageProjection: bool, stretch: bool, bNearest: bool) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getAsChannelCurvedProjectedRotational(self, pIInputChannel: ORSModel.ors.Channel, path: ORSModel.ors.VisualPath, aTransformationMatrix: ORSModel.ors.Matrix4x4, forTimeStep: int, upVect: ORSModel.ors.Vector3, rightVect: ORSModel.ors.Vector3, xSize: int, numberOfStep: int, bNearest: bool, IProgress: ORSModel.ors.Progress) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getAsChannelCurvedRotational(self, pIInputChannel: ORSModel.ors.Channel, path: ORSModel.ors.VisualPath, aTransformationMatrix: ORSModel.ors.Matrix4x4, forTimeStep: int, normalX: float, normalY: float, normalZ: float, downX: float, downY: float, downZ: float, xSize: int, ySize: int, numberOfStep: int, xSpacing: float, bestYSizeAndSpacing: bool) → Channel
Parameters:
  • pIInputChannel (ORSModel.ors.Channel) –
  • path (ORSModel.ors.VisualPath) –
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) –
  • forTimeStep (int) –
  • normalX (float) –
  • normalY (float) –
  • normalZ (float) –
  • downX (float) –
  • downY (float) –
  • downZ (float) –
  • xSize (int) –
  • ySize (int) –
  • numberOfStep (int) –
  • xSpacing (float) –
  • bestYSizeAndSpacing (bool) –
Returns:

output (ORSModel.ors.Channel) –

getAsChannelCutAlongZWithNormal(self, normal: ORSModel.ors.Vector3, timeStep: int, outXSizeInworld: float, nearest: bool, inputChannel: ORSModel.ors.Channel) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getAsChannelCutAlongZWithNormalCurved(self, InputPath: ORSModel.ors.VisualPath, aTransformationMatrix: ORSModel.ors.Matrix4x4, normal: ORSModel.ors.Vector3, timeStep: int, outXSizeInworld: float, nearest: bool, inputChannel: ORSModel.ors.Channel) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getAsChannelDilatedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Creates a new channel which is the receiver dilated with the provided kernel.

Note

the simple tone of gray dilatation is a convolution operation selecting the maximum value in the kernel

Parameters:
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelDilatedWithKernelInRange(self, pKernel: ORSModel.ors.ConvolutionKernel, zmin: int, zmax: int, zOffsetInputToOutput: int, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Computes the dilation of the input channel in a range of slices.

Note

If no channel is provided to put the result in, a new channel is created with the number of slices corresponding to the number of slices computed.

Note

When the output channel have the same characteristics as the input channel, the output channel is not re-initialized before writing in the result of the dilation of the desired slices.

Parameters:
  • pKernel (ORSModel.ors.ConvolutionKernel) – the dilatation kernel made of 0 or 1 (an ConvolutionKernel)
  • zmin (int) – the index of the first slice to compute the dilation on
  • zmax (int) – the index of the last slice to compute the dilation on
  • zOffsetInputToOutput (int) – the number of slices of offset (the dilation on the slice Z of the input channel will be written at the slice “Z-offset” in the output channel)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or NULL for no progress
  • pOutChannel (ORSModel.ors.Channel) – the channel to put the result in (cannot be the receiver) (a Channel)
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelEmptyCrossSection(self, path: ORSModel.ors.VisualPath, aTransformationMatrix: ORSModel.ors.Matrix4x4, x: int, y: int, z: int, timeStep: int, pInChannel: ORSModel.ors.Channel) → Channel

Samples the channel data for a given path.

Note

This method finds all the voxel data found along a path, and fills another channel with that data.

Note

The X and Y sizes define a box that will contain the data along the path.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • path (ORSModel.ors.VisualPath) – the path to sample (an VisualPath)
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – an X size (a uint32_t), see note below
  • x (int) – a Y size (a uint32_t), see note below
  • y (int) – true to have the channel contain the voxel indicies, false to contain the voxel themselves
  • z (int) – an optional output channel (a Channel)
  • timeStep (int) –
  • pInChannel (ORSModel.ors.Channel) –
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelErodedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Creates a new channel which is the receiver eroded with the provided kernel.

Note

the simple tone of grey erosion is a convolution operation selecting the minimum value in the kernel

Parameters:
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelErodedWithKernelInRange(self, pKernel: ORSModel.ors.ConvolutionKernel, zmin: int, zmax: int, zOffsetInputToOutput: int, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Computes the erosion of the input channel in a range of slices.

Note

If no channel is provided to put the result in, a new channel is created with the number of slices corresponding to the number of slices computed.

Note

When the output channel have the same characteristics as the input channel, the output channel is not re-initialized before writing in the result of the erosion of the desired slices.

Parameters:
  • pKernel (ORSModel.ors.ConvolutionKernel) – the erosion kernel made of 0 or 1 (an ConvolutionKernel)
  • zmin (int) – the index of the first slice to compute the erosion on
  • zmax (int) – the index of the last slice to compute the erosion on
  • zOffsetInputToOutput (int) – the number of slices of offset (the erosion on the slice Z of the input channel will be written at the slice “Z-offset” in the output channel)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or NULL for no progress
  • pOutChannel (ORSModel.ors.Channel) – the channel to put the result in (cannot be the receiver) (a Channel)
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelFromMean(self, pBoxSize: int, pOutChannel: ORSModel.ors.Channel) → Channel

Finds the mean in a box surrounding each voxel and writes it to the channel.

Note

The box size needs to be an odd number.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • pBoxSize (int) – the box size (a uint16_t)
  • pOutChannel (ORSModel.ors.Channel) – an optional output channel (an ORSChannelPtr)
Returns:

output (ORSModel.ors.Channel) – the result channel (an ORSChannelPtr)

getAsChannelFromROI(self, pInputROI: ORSModel.ors.ROI, pOutChannel: ORSModel.ors.Channel) → Channel

Creates a new channel from a given Region of Interest.

Note

This method extracts the channel data matching the given Region of Interest into the resulting channel.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:

pInputROI (ORSModel.ors.ROI) – a region of interest (an ROI)

Returns:
getAsChannelGaussianSmoothed(self, kernelSize: int, pOutChannel: ORSModel.ors.Channel) → Channel

Applies a 2 sigma gaussian convolution.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • kernelSize (int) – the kernel size (a uint16_t, should be an odd number)
  • pOutChannel (ORSModel.ors.Channel) – an optional output channel (an ORSChannelPtr)
Returns:

output (ORSModel.ors.Channel) – the resulting channel (an ORSChannelPtr)

getAsChannelObliqueAverageFromRectangleBetweenPlanes(self, pIInputChannel: ORSModel.ors.Channel, forTimeStep: int, aBoundedPlane: ORSModel.ors.Rectangle, startPlane: ORSModel.ors.Plane, endPlane: ORSModel.ors.Plane, xSize: int, ySize: int, nbZSlice: int, zSliceThickness: float, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, nearest: bool, IProgress: ORSModel.ors.Progress) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getAsChannelObliqueFromRectangleBetweenPlanes(self, pIInputChannel: ORSModel.ors.Channel, forTimeStep: int, aBoundedPlane: ORSModel.ors.Rectangle, startPlane: ORSModel.ors.Plane, endPlane: ORSModel.ors.Plane, xSize: int, ySize: int, nbZSlice: int, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, nearest: bool, IProgress: ORSModel.ors.Progress) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getAsChannelObliqueMaxIntensityProjectionFromRectangleBetweenPlanes(self, pIInputChannel: ORSModel.ors.Channel, forTimeStep: int, aBoundedPlane: ORSModel.ors.Rectangle, startPlane: ORSModel.ors.Plane, endPlane: ORSModel.ors.Plane, xSize: int, ySize: int, nbZSlice: int, zSliceThickness: float, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, nearest: bool, IProgress: ORSModel.ors.Progress) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getAsChannelObliqueMinIntensityProjectionFromRectangleBetweenPlanes(self, pIInputChannel: ORSModel.ors.Channel, forTimeStep: int, aBoundedPlane: ORSModel.ors.Rectangle, startPlane: ORSModel.ors.Plane, endPlane: ORSModel.ors.Plane, xSize: int, ySize: int, nbZSlice: int, zSliceThickness: float, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, nearest: bool, IProgress: ORSModel.ors.Progress) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getAsChannelOpenWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Creates a new channel which is the receiver eroded and afterwards dilated with the provided kernel.

Parameters:
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelPadded(self, xPadd: int, yPadd: int, zPadd: int, pValue: float, pOutChannel: ORSModel.ors.Channel) → Channel

Pads the channel with a normalized value.

Note

The 3 padding values are applied to the beginning and end of each dimension.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • xPadd (int) – the X padding in pixels (an uint32_t, see note below)
  • yPadd (int) – the Y padding in pixels (an uint32_t, see note below)
  • zPadd (int) – the Z padding in pixels (an uint32_t, see note below)
  • pValue (float) – the padding value, normalized (a double)
  • pOutChannel (ORSModel.ors.Channel) – an optional output channel (an ORSChannelPtr)
Returns:

output (ORSModel.ors.Channel) – the resulting channel (an ORSChannelPtr)

getAsChannelSampled(self, samplingMethod: int, newXSize: int, newYSize: int, newZSize: int, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Samples the channel according to a sampling method.

Note

This method samples the source channel and produces an output channel according to the sampling method specified.

Note

If a target channel is supplied, data is written to it and the channel is returned as a result, otherwise a new channel is created.

Note

See the ORS_def.h file for enum CxvSamplingMethod values.

Parameters:
  • samplingMethod (int) – a CxvSamplingMethod (a uint16_t)
  • newXSize (int) – the new X size (an uint32_t)
  • newYSize (int) – the new Y size (an uint32_t)
  • newZSize (int) – the new Z size (an uint32_t)
  • IProgress (ORSModel.ors.Progress) – progress object (NULL for no progress bar)
  • pOutChannel (ORSModel.ors.Channel) – a target channel (a Channel)
Returns:

output (ORSModel.ors.Channel) – the resulting channel (a Channel)

getAsChannelSampledConverted(self, samplingMethod: int, newXSize: int, newYSize: int, newZSize: int, datatype: int, bNormalize: bool, iLowNormalizationRange: float, iHighNormalizationRange: float, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Samples the channel according to a sampling method, and converts its type.

Note

This method samples the source channel and produces an output channel according to the sampling method specified.

Note

If a target channel is supplied, data is written to it and the channel is returned as a result, otherwise a new channel is created.

Note

See the ORS_def.h file for enum CxvSamplingMethod values.

Parameters:
  • samplingMethod (int) – a CxvSamplingMethod (a uint16_t)
  • newXSize (int) – the new X size (an uint32_t)
  • newYSize (int) – the new Y size (an uint32_t)
  • newZSize (int) – the new Z size (an uint32_t)
  • datatype (int) – the target data type (a uint16_t, see note below)
  • bNormalize (bool) – true to normalize the output
  • iLowNormalizationRange (float) – lower bound of normalization range (a double)
  • iHighNormalizationRange (float) – higher bound of normalization range (a double)
  • IProgress (ORSModel.ors.Progress) – progress object (NULL for no progress bar)
  • pOutChannel (ORSModel.ors.Channel) – a target channel (a Channel)
Returns:

output (ORSModel.ors.Channel) – the resulting channel (a Channel)

getAsChannelSampledInterpolatedFromPlane(self, a: float, b: float, c: float, d: float, upX: float, upY: float, upZ: float, timeStep: int, pInChannel: ORSModel.ors.Channel) → Channel

Samples the channel data for a given plane, interpolating the voxels.

Note

The general plane equation is ax + by + cz + dw = 0.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • a (float) – The bounded plane
  • b (float) – true to have the channel contain the voxel indicies, false to contain the voxel themselves
  • c (float) – an optional output channel (a Channel)
  • d (float) –
  • upX (float) –
  • upY (float) –
  • upZ (float) –
  • timeStep (int) –
  • pInChannel (ORSModel.ors.Channel) –
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelSampledInterpolatedFromPlane2(self, aBoundedPlane: ORSModel.ors.Rectangle, nearest: bool, timeStep: int, pInChannel: ORSModel.ors.Channel) → Channel

Samples the channel data for a given plane, interpolating the voxels.

Note

The general plane equation is ax + by + cz + dw = 0.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • aBoundedPlane (ORSModel.ors.Rectangle) – The bounded plane
  • nearest (bool) – true to have the channel contain the voxel indicies, false to contain the voxel themselves
  • timeStep (int) – an optional output channel (a Channel)
  • pInChannel (ORSModel.ors.Channel) –
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelWithEqualizedHistogram(self, anHistogram: ORSModel.ors.HistogramData, normalizeData: bool, zmin: int, zmax: int, zOffsetInputToOutput: int, pIOutputChannel: ORSModel.ors.Channel) → Channel

Creates a new channel with the data of the receiver transformed to equalize its histogram.

Note

algorithm to be descibed later

Parameters:
  • anHistogram (ORSModel.ors.HistogramData) – histogram to be used for the equalization (OPTIONAL)
  • normalizeData (bool) – true if the output has to be normalized to the total spread of the data type (unsigned char [0,255] unsigned short [0,65535] float[0,1])
  • zmin (int) – the channel to be filled with the result (can be the receiver ) (a Channel)
  • zmax (int) –
  • zOffsetInputToOutput (int) –
  • pIOutputChannel (ORSModel.ors.Channel) –
Returns:

output (ORSModel.ors.Channel) – a result channel (a Channel)

getAsChannelWithinRange(self, minValue: float, maxValue: float, lowerReplacementValue: float, upReplacementValue: float, pIInputChannel: ORSModel.ors.Channel) → Channel

Creates a new channel within a given range.

Note

This method creates a new channel having the same shape (characteristics) as the receiver. It extracts the channel data that falls within the given range of data into the resulting channel. The lower and upper replacement values define what value gets written to the resulting channel for the data falling outside the given range.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • minValue (float) – the lower boundary of the range (a double)
  • maxValue (float) – the upper boundary of the range (a double)
  • lowerReplacementValue (float) – the lower replacement value (a double, see note)
  • upReplacementValue (float) – the upper replacement value (a double, see note)
Returns:
getAsMarchingCubeMesh(self, isovalue: float, bSnapToContour: bool, flipNormal: bool, timeStep: int, xSample: int, ySample: int, zSample: int, pNearest: bool, pWorld: bool, pProgress: ORSModel.ors.Progress, pMesh: ORSModel.ors.Mesh) → Mesh

Creates a marching cube from the channel.

Note

The isovalue is used as a threshold, any value below it (inclusive) is not considered.

Note

The channel needs to have a minimum size of 3 in its X, Y and Z axis.

Note

If a mesh model is supplied as the last argument, the results are written to it, otherwise a new mesh model is created.

Note

If a progress object is supplied, a cancellable progress bar will be displayed, otherwise no progression is shown.

Parameters:
  • isovalue (float) – an isovalue (a double)
  • bSnapToContour (bool) – true to snap vertices to contour, false to interpolate
  • flipNormal (bool) – true flips normals, false doesn’t
  • timeStep (int) – the time step to use in the channel (an uint32_t)
  • xSample (int) – the X sampling (a uint16_t, 1 means no sampling)
  • ySample (int) – the Y sampling (a uint16_t, 1 means no sampling)
  • zSample (int) – the Z sampling (a uint16_t, 1 means no sampling)
  • pNearest (bool) – true to sample to nearest value, false to sample linearly (if sampling is 1 this flag is ignored)
  • pWorld (bool) – true to have the resulting mesh in world coordinates, false in local
  • pProgress (ORSModel.ors.Progress) – a progress object (an ORSProgressPtr) to show a progress bar, NULL doesn’t show one
Returns:
getAsMultiROIInArea(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, IProgress: ORSModel.ors.Progress, pInputMultiROI: ORSModel.ors.MultiROI) → MultiROI

Creates a labeled region of interest (MultiROI) from a specified channel area, within supplied ranges.

Note

If a target MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.

Note

The area is expressed in X, Y and Z min/max pairs.

Parameters:
  • minX (int) – an X minimum coordinate, in pixel size (an uint32_t)
  • minY (int) – a Y minimum coordinate, in pixel size (an uint32_t)
  • minZ (int) – a Z minimum coordinate, in pixel size (an uint32_t)
  • maxX (int) – an X maximum coordinate, in pixel size (an uint32_t)
  • maxY (int) – a Y maximum coordinate, in pixel size (an uint32_t)
  • maxZ (int) – a Z maximum coordinate, in pixel size (an uint32_t)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
  • pInputMultiROI (ORSModel.ors.MultiROI) – a target ROI (an ROI)
Returns:

output (ORSModel.ors.MultiROI) – the resulting ROI (an ROI)

getAsROIWithinRange(self, minValue: float, maxValue: float, IProgress: ORSModel.ors.Progress, pInputROI: ORSModel.ors.ROI) → ROI

Creates a region of interest (ROI) from all the channel data within a given range.

Note

The range must be supplied in a normalized fashion, no matter the data type of the channel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
  • minValue (float) – the lower range, a normalized value (a double)
  • maxValue (float) – the upper range, a normalized value (a double)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
  • pInputROI (ORSModel.ors.ROI) – a target ROI (an ROI)
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIWithinRangeInArea(self, minValue: float, maxValue: float, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, IProgress: ORSModel.ors.Progress, pOutputROI: ORSModel.ors.ROI) → ROI

Creates a region of interest (ROI) from a specified channel area, within a range.

Note

The range must be supplied in a normalized fashion, no matter the data type of the channel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Note

The area is expressed in X, Y and Z min/max pairs.

Parameters:
  • minValue (float) – the lower range, a normalized value (a double)
  • maxValue (float) – the upper range, a normalized value (a double)
  • minX (int) – an X minimum coordinate, in pixel size (an uint32_t)
  • minY (int) – a Y minimum coordinate, in pixel size (an uint32_t)
  • minZ (int) – a Z minimum coordinate, in pixel size (an uint32_t)
  • maxX (int) – an X maximum coordinate, in pixel size (an uint32_t)
  • maxY (int) – a Y maximum coordinate, in pixel size (an uint32_t)
  • maxZ (int) – a Z maximum coordinate, in pixel size (an uint32_t)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
  • pOutputROI (ORSModel.ors.ROI) – a target ROI (an ROI)
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIWithinRangeInterpolated(self, minValue: float, maxValue: float, IProgress: ORSModel.ors.Progress, pInputROI: ORSModel.ors.ROI, cubic: bool) → ROI

Creates a region of interest (ROI) from all the channel data within a given range.

Note

The range must be supplied in a normalized fashion, no matter the data type of the channel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
  • minValue (float) – the lower range, a normalized value (a double)
  • maxValue (float) – the upper range, a normalized value (a double)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
  • pInputROI (ORSModel.ors.ROI) – a target ROI (an ROI)
  • cubic (bool) –
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIWithinRanges(self, rangeDuplets: float, nbRangeDuplets: int, IProgress: ORSModel.ors.Progress, pInputROI: ORSModel.ors.ROI) → ROI

Creates a region of interest (ROI) from all the channel data within the given ranges.

Note

The ranges must be supplied in a normalized fashion, no matter the data type of the channel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
  • rangeDuplets (float) – the pairs of ranges (a double*)
  • nbRangeDuplets (int) – number of pairs (a uint16_t), so rangeDuplet size should be nbRangeDuplet*2
  • IProgress (ORSModel.ors.Progress) – a target ROI (an ROI)
  • pInputROI (ORSModel.ors.ROI) – a progress object (an Progress) or NULL for no progress
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIWithinRangesInArea(self, rangeDuplet: float, nbRangeDuplet: int, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, IProgress: ORSModel.ors.Progress, pInputROI: ORSModel.ors.ROI) → ROI

Creates a region of interest (ROI) from a specified channel area, within supplied ranges.

Note

The ranges must be supplied in a normalized fashion, no matter the data type of the channel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Note

The area is expressed in X, Y and Z min/max pairs.

Parameters:
  • rangeDuplet (float) – the pairs of ranges (a double*)
  • nbRangeDuplet (int) – number of pairs (a uint16_t), so rangeDuplet size should be nbRangeDuplet*2
  • minX (int) – an X minimum coordinate, in pixel size (an uint32_t)
  • minY (int) – a Y minimum coordinate, in pixel size (an uint32_t)
  • minZ (int) – a Z minimum coordinate, in pixel size (an uint32_t)
  • maxX (int) – an X maximum coordinate, in pixel size (an uint32_t)
  • maxY (int) – a Y maximum coordinate, in pixel size (an uint32_t)
  • maxZ (int) – a Z maximum coordinate, in pixel size (an uint32_t)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
  • pInputROI (ORSModel.ors.ROI) – a target ROI (an ROI)
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAttenuationOnLine(self, aLine: ORSModel.ors.Line, attenuationFactor: float, timeStep: int, spacing: float, bNormalize: bool, bConvertToPhysicalUnits: bool) → float

Calculates the attenuation on the line.

Parameters:
  • aLine (ORSModel.ors.Line) – a line
  • attenuationFactor (float) – the timestep
  • timeStep (int) – the number of samples required (an int)
  • spacing (float) – true normalizes the results, false doesn’t
  • bNormalize (bool) – true returns the values in physical units, false doesn’t
  • bConvertToPhysicalUnits (bool) –
Returns:

output (float) –

getBitCount(self) → int

Gets the number of bits used to represent one pixel.

Note

It can be 8, 16 or 32.

Returns:output (int) – the bit count (a uint16_t)
getByteCountPerSample(self) → int
Returns:output (int) –
getChannelLocalMaxAsROI(self, pKernel: ORSModel.ors.ConvolutionKernel, fMinValue: float, fMaxValue: float, pOutROI: ORSModel.ors.ROI) → ROI

Find the local maximum of a dataset and returns it into a volumeROI.

Parameters:
  • pKernel (ORSModel.ors.ConvolutionKernel) – a minimum thresholdValue under which the localMax found are ignored (double)
  • fMinValue (float) – a maximum thresholdValue over which the localMax found are ignored (double)
  • fMaxValue (float) – an output ROI
  • pOutROI (ORSModel.ors.ROI) –
Returns:

output (ORSModel.ors.ROI) –

getChannelLocalMinAsROI(self, pKernel: ORSModel.ors.ConvolutionKernel, fMinValue: float, fMaxValue: float, pOutROI: ORSModel.ors.ROI) → ROI

Find the local minimum of a dataset and returns it into a volumeROI.

Parameters:
  • pKernel (ORSModel.ors.ConvolutionKernel) – a minimum thresholdValue under which the localMin found are ignored (double)
  • fMinValue (float) – a maximum thresholdValue over which the localMin found are ignored (double)
  • fMaxValue (float) – an output ROI
  • pOutROI (ORSModel.ors.ROI) –
Returns:

output (ORSModel.ors.ROI) –

classmethod getClassDenomination()
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClassicalStandardDeviation(self) → float

Computes the standard deviation.

Returns:output (float) – the standard deviation (a float)
getClipBox(timestep=0, display=None)

Gets the clip box of the channel

Parameters:
Returns:

aClipBox (ORSModel.ors.Box) – the clip box

getClipping(timestep=0, display=None)

Gets the origin and the opposite summit of the clip box of the channel

Parameters:
Returns:
getDICOMAttribute(self, iTIndex: int, iZIndex: int, pGroup: int, pElement: int, bSearchSubs: bool) → str
Parameters:
  • iTIndex (int) –
  • iZIndex (int) –
  • pGroup (int) –
  • pElement (int) –
  • bSearchSubs (bool) –
Returns:

output (str) –

getDICOMAttributeAsDouble(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → float

Retrieves a DICOM attribute as a double.

Note

Applicable to the following VRs: DS, FD.

Note

To distinguish between a return value of 0 because the attribute is absent, check for the presence of the attribute with hasDICOMAttribute().

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • iZIndex (int) – the slice index (an uint32_t)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bSearchSubs (bool) – true to search sequences, false otherwise
Returns:

output (float) – the value (a double)

getDICOMAttributeAsFloat(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → float

Retrieves a DICOM attribute as a float.

Note

Applicable to the following VRs: FL, OF.

Note

To distinguish between a return value of 0 because the attribute is absent, check for the presence of the attribute with hasDICOMAttribute().

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • iZIndex (int) – the slice index (an uint32_t)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bSearchSubs (bool) – true to search sequences, false otherwise
Returns:

output (float) – the value (a float)

getDICOMAttributeAsInt(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → int

Retrieves a DICOM attribute as a signed 32 bit number.

Note

Applicable to the following VRs: IS, SL, SS, UL, US.

Note

To distinguish between a return value of 0 because the attribute is absent, check for the presence of the attribute with hasDICOMAttribute().

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • iZIndex (int) – the slice index (an uint32_t)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bSearchSubs (bool) – true to search sequences, false otherwise
Returns:

output (int) – the value (an int)

getDICOMAttributeAsShort(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → int

Retrieves a DICOM attribute as a signed 16 bit number.

Note

Applicable to the following VRs: SS.

Note

To distinguish between a return value of 0 because the attribute is absent, check for the presence of the attribute with hasDICOMAttribute().

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • iZIndex (int) – the slice index (an uint32_t)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bSearchSubs (bool) – true to search sequences, false otherwise
Returns:

output (int) – the value (a short)

getDICOMAttributeAsUnsignedInt(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → int

Retrieves a DICOM attribute as an unsigned 32 bit number.

Note

Applicable to the following VRs: UL.

Note

The success is indicated in the seventh argument. If you’re not interested in the success, you can use NULL.

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • iZIndex (int) – the slice index (an uint32_t)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bSearchSubs (bool) – true to search sequences, false otherwise
Returns:

output (int) – the value (a uint32_t)

getDICOMAttributeAsUnsignedShort(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → int

Retrieves a DICOM attribute as an unsigned 16 bit number.

Note

Applicable to the following VRs: OW, US.

Note

To distinguish between a return value of 0 because the attribute is absent, check for the presence of the attribute with hasDICOMAttribute().

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • iZIndex (int) – the slice index (an uint32_t)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bSearchSubs (bool) – true to search sequences, false otherwise
Returns:

output (int) – the value (a uint16_t)

getDICOMAttributeFromSequence(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iItemNo: int, iElementGroup: int, iElementElement: int) → str
Parameters:
  • iTIndex (int) –
  • iZIndex (int) –
  • iGroup (int) –
  • iElement (int) –
  • iItemNo (int) –
  • iElementGroup (int) –
  • iElementElement (int) –
Returns:

output (str) –

getDICOMContainer(self, iTIndex: int, iZIndex: int) → str
Parameters:
  • iTIndex (int) –
  • iZIndex (int) –
Returns:

output (str) –

getDataDescription(self) → int

Gets the channel description.

Note

enum CxvChannel_Description (in ORS_def.h) is used to categorize channels.

Returns:output (int) – a description index (a int32_t)
getDataRange(self) → float

Gets the size of the spread of data.

Note

Unless a value was supplied via setDataRange(), the value returned by this method is assumed to cover the spread of the data type (i.e. for unsigned short it will return 2^16). Float channels are an exception, where the true data range will be computed from the smallest and largest value found in the channel (because the computed spread is too large).

Returns:output (float) – a value (a double)
getDataType(self) → int

Gets the channel data type.

Note

See CxvChannel_Data_Type (in ORS_def.h) for supported types.

Returns:output (int) – a type (a int32_t)
getDataUnit(self) → str
Returns:output (str) –
getHasDICOMAttributes(self) → bool

Checks to see if the channel has DICOM attributes.

Returns:output (bool) – true if DICOM attributes exist, false otherwise
getHasSliceOrientationAndPosition(self) → bool

Queries the channel to know if it has slice orientation and position.

Note

All channels have a zero origin orientation and position, but some channels have a greater level of detail, where each slice has orientation and position data.

Returns:output (bool) – true if it does, false otherwise
getInitialWindowLevelCenter(self) → float
Returns:output (float) –
getInitialWindowLevelWidth(self) → float
Returns:output (float) –
getInterpolatedLineSegment(self, pLineSegment: ORSModel.ors.LineSegment, nTIndex: int, fSpacing: float, nInterpolationMethod: int, values: ORSModel.ors.Array) → Array
Parameters:
Returns:

output (ORSModel.ors.Array) –

getInterpolatedPositionOnSlice(self, pTIndex: int, pZSlice: float, xPos: float, yPos: float) → Vector3

Gets the interpolated position of a point on a given slice.

Note

The X and Y positions can be outside the channel.

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (float) – the Z slice index (a double)
  • xPos (float) – the X voxel position (a double)
  • yPos (float) – the Y voxel position (a double)
Returns:

output (ORSModel.ors.Vector3) – a vector (a Vector3)

getInterpolatedValuesAtPositions(self, aWorldCoordinate: ORSModel.ors.ArrayDouble, tIndex: int, nInterpolationMethod: int, bConvertToPhysicalUnits: bool, values: ORSModel.ors.ArrayDouble) → ArrayDouble
Parameters:
Returns:

output (ORSModel.ors.ArrayDouble) –

getIsClipped(timestep=0, display=None)

Gets to know if the clip box of the channel is active

Parameters:
Returns:

isClipped (bool) – if True, the clip box of the channel is visible; False otherwise.

getIsData3D(self) → bool

Verifies if the channel holds 3D data or not.

Note

Normally channels hold 3D data, but there are cases where it is known that the data is not 3D (for example, stacks of screenshots). In those cases channels need to be told that they do not hold 3D data.

Returns:output (bool) – true if data is 3D, false otherwise
getIsDataInitialized(self) → bool

Checks if the internal data is initialized.

Note

The channel must be initialized before you start using the channel.

Returns:output (bool) – true if initialized correctly, false otherwise
getIsLossy(self) → bool

Verifies if the channel is lossy or not.

Note

A channel can be lossy for two different reasons:

Returns:output (bool) – true if data is lossy, false otherwise
getIsMarkedSlice(self, pTIndex: int, pZSlice: int) → bool

Checks to see if a slice is marked or not.

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (int) – the Z slice index (an uint32_t)
Returns:

output (bool) – true if the slice’s marker is on, false otherwise

getIsZSliceDataAvailable(self, pTIndex: int, pZSlice: int) → bool

Gets the availability of a Z slice’s data.

Note

The channel can be set to work in “lazy” mode, where slices are made available as they are read.

Note

If you want to know if the entire data has arrived, use getAreAllZSlicesDataAvailable().

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (int) – the Z slice index (an uint32_t)
Returns:

output (bool) – true if the Z slice’s data is available, false otherwise

getLabelization(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, iTIndex: int, min: float, max: float, considerDiagonal: bool, IProgress: ORSModel.ors.Progress, pInVolumeROI: ORSModel.ors.ROI, pOutData: ORSModel.ors.MultiROI) → MultiROI

Labels the channel data.

Note

This method labels areas of the channel by finding adjacent voxels and labelling them with sequential numbering.

Note

If a multi ROI object is supplied as the last argument, the results are written to it, otherwise a new one is created.

Parameters:
  • minX (int) – the minimum X range (an uint32_t)
  • minY (int) – the minimum Y range (an uint32_t)
  • minZ (int) – the minimum Z range (an uint32_t)
  • maxX (int) – the maximum X range (an uint32_t)
  • maxY (int) – the maximum Y range (an uint32_t)
  • maxZ (int) – the maximum Z range (an uint32_t)
  • iTIndex (int) – the T index (an uint32_t)
  • min (float) – the minimum data range (a double)
  • max (float) – the maximum data range (a double)
  • considerDiagonal (bool) – true to consider diagonals, false otherwise
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or NULL for no progress
  • pInVolumeROI (ORSModel.ors.ROI) – an optional input mask (an ROI)
  • pOutData (ORSModel.ors.MultiROI) – an optional output object (an MultiROI)
Returns:

output (ORSModel.ors.MultiROI) – the resulting object (an MultiROI)

getLineBoundedDoublePlane(self, pT: int, iZSlice: int, iYLine: int) → Rectangle
Parameters:
  • pT (int) –
  • iZSlice (int) –
  • iYLine (int) –
Returns:

output (ORSModel.ors.Rectangle) –

getMarkedSlicesCount(self) → int

Gets the count of marked slices.

Note

Gets the total marked slices count, across all T dimensions.

Returns:output (int) – the count of marked slices (a uint32_t)
getMaximumValue(self) → float

Gets the maximum value found in the data array, always returned as a double.

Note

Min, max and mean are kept statically and are recomputed when the channel data changes.

Returns:output (float) – the maximum value (a double)
getMeanValue(self) → float

Gets the mean value computed with the data array, always returned as a double.

Note

Min, Max and Mean are kept statically and are recomputed when the channel data changes.

Returns:output (float) – the mean value (a double)
getMinMaxSubsetAsVector(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int) → Vector3
Parameters:
  • xmin (int) –
  • ymin (int) –
  • zmin (int) –
  • tmin (int) –
  • xmax (int) –
  • ymax (int) –
  • zmax (int) –
  • tmax (int) –
Returns:

output (ORSModel.ors.Vector3) –

getMinimumValue(self) → float

Gets the minimum value found in the channel, always returned as a double.

Note

Min, max and mean are kept statically and are recomputed when the channel data changes.

Returns:output (float) – the minimum value (a double)
getNDArray(timestep=0)
getNormalizedMaxPossibleValue(self) → float

Gets the normalized maximum possible value, according to the channel’s data type.

Returns:output (float) – max value (a double)
getNormalizedMinPossibleValue(self) → float

Gets the normalized minimum possible value, according to the channel’s data type.

Returns:output (float) – min value (a double)
getNormalizedValueAt(self, x: int, y: int, z: int, t: int) → float

Gets the normalized data value at the specified coordinate.

Note

For an 8 bit channel, return value is normalized on 256.

Note

For a 16 bit channel, return value is normalized on 65536.

Note

For a 32 bit channel, return value is normalized on the spread found in the channel.

Parameters:
  • x (int) – X coordinate (an uint32_t)
  • y (int) – Y coordinate (an uint32_t)
  • z (int) – Z coordinate (an uint32_t)
  • t (int) – T coordinate (an uint32_t)
Returns:

output (float) – value (a double)

getNumberOfSuggestedWindowLevelValues(self) → int

Returns the number of known pairs of suggested window width and center values (for leveling).

Returns:output (int) – the number of pairs (a uint16_t)
getOffset(self) → float

Gets the channel offset.

Returns:output (float) – the offset (a double)
getOrientationComparisonPrecision(self) → float

Gets the channel’s orientation comparison precision.

Note

To deem if a channel is well behaved or not in terms of its orientations, one can compare all the channel slices’ orientations. This method returns the precision to use to determine if orientations are close enough.

Returns:output (float) – a double (see note)
getOtsu(timestep=0, bins=256)

Get the Otsu Threshold

Parameters:
  • timestep (int) – timestep to analyse
  • bins (int) – bin count for the calculation
getPhysicalMax(self) → float

Gets the maximum value found in the data array, always returned as a double.

Note

Min and max are kept statically and are recomputed when the channel data changes.

Note

The return value is not normalized, but it is always typecast to a double.

Returns:output (float) – the maximum value (a float)
getPhysicalMin(self) → float

Gets the minimum value found in the data array, always returned as a float.

Note

Min and max are kept statically and are recomputed when the channel data changes.

Note

The return value is not normalized, but it is always typecast to a float.

Returns:output (float) – the minimum value (a float)
getPositionOnLine(self, pT: int, iZSlice: int, iYLine: int, xIndex: float) → Vector3
Parameters:
  • pT (int) –
  • iZSlice (int) –
  • iYLine (int) –
  • xIndex (float) –
Returns:

output (ORSModel.ors.Vector3) –

getPositionOnSlice(self, pTIndex: int, pZSlice: int, xPos: int, yPos: int) → Vector3

Gets the position of a point on a given slice.

Note

The X and Y positions can be outside the channel.

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (int) – the Z slice index (an uint32_t)
  • xPos (int) – the X voxel position (an uint32_t)
  • yPos (int) – the Y voxel position (an uint32_t)
Returns:

output (ORSModel.ors.Vector3) – a position (an Vector3)

getRawDataChunk(self, iLevel1: int, iLevel2: int) → None

Gets a portion of the channel’s data.

Note

The received array is not a copy, do not release it. It will be released by the interface.

Note

Use with caution, as this method gives you direct access to the channel data. ORS encourages use of the CxvChannelData class wrapper instead of direct access.

Parameters:
  • iLevel1 (int) – the T index (an uint32_t)
  • iLevel2 (int) – the Z index (an uint32_t)
getSampledLine(self, pPoint1: ORSModel.ors.Vector3, pPoint2: ORSModel.ors.Vector3, timeStep: int) → ArrayDouble

Samples the channel data between two points.

Note

This method finds all the voxel data placed on an imaginary line drawn between the two given points, and returns the data in a normalized fashion.

Parameters:
Returns:

output (ORSModel.ors.ArrayDouble) – an array of double values (an ArrayDouble)

getSampledLineOfNPoints(self, pPoint1: ORSModel.ors.Vector3, pPoint2: ORSModel.ors.Vector3, timeStep: int, nbOutputPoint: int, bNormalize: bool, bConvertToPhysicalUnits: bool) → ArrayDouble

Samples the channel data between two points.

Note

This method finds all the voxel data placed on an imaginary line drawn between the two given points.

Parameters:
  • pPoint1 (ORSModel.ors.Vector3) – a starting coordinate (an ORSVector3Ptr)
  • pPoint2 (ORSModel.ors.Vector3) – an ending coordinate (an ORSVector3Ptr)
  • timeStep (int) – the timestep (an uint32_t)
  • nbOutputPoint (int) – the number of points required (a uint32_t)
  • bNormalize (bool) – true normalizes the results, false doesn’t
  • bConvertToPhysicalUnits (bool) – true returns the values in physical units, false doesn’t
Returns:

output (ORSModel.ors.ArrayDouble) – an array containing the results (an ArrayDouble)

getSavePixelDataWhileSavingNode(self) → int

Gets if and how the channel should save its pixel data to XML.

Note

The save mode has these meanings:

Returns:output (int) – the current save mode (a short between 0 and 2, see below)
getSerieHasBeenModified(self) → bool
Returns:output (bool) –
getSliceDirection0Size(self, timeStep: int, sliceIndex: int) → float
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
Returns:

output (float) –

getSliceDirection0Spacing(self, timeStep: int, sliceIndex: int) → float
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
Returns:

output (float) –

getSliceDirection1Size(self, timeStep: int, sliceIndex: int) → float
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
Returns:

output (float) –

getSliceDirection1Spacing(self, timeStep: int, sliceIndex: int) → float
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
Returns:

output (float) –

getSliceIntersectionLength(self, timeStep: int, sliceIndex: int) → float
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
Returns:

output (float) –

getSliceOrientation(self, pTIndex: int, pZSlice: int, index: int) → float

Gets the orientation of a given slice.

Note

First three indicies indicate X orientation, next three indicate Y orientation and last three are for Z.

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (int) – the Z slice index (an uint32_t)
  • index (int) – an index (from 0 to 9)
Returns:

output (float) – the orientation value (a double)

getSlicePosition(self, pTIndex: int, pZSlice: int) → Vector3

Gets the position of a given slice.

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (int) – the Z slice index (an uint32_t)
Returns:

output (ORSModel.ors.Vector3) – the position (an Vector3)

getSliceRectangle(self, timeStep: int, sliceIndex: int) → Rectangle
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
Returns:

output (ORSModel.ors.Rectangle) –

getSlope(self) → float

Gets the channel slope.

Returns:output (float) – the slope (a double)
getSpacingXValidity(self) → bool

Checks if X spacing is valid.

Returns:output (bool) – true if X spacing is valid, false otherwise
getSpacingYValidity(self) → bool

Checks if Y spacing is valid.

Returns:output (bool) – true if Y spacing is valid, false otherwise
getSpacingZValidity(self) → bool

Checks if Z spacing is valid.

Returns:output (bool) – true if Z spacing is valid, false otherwise
getSuggestedWindowLevelCenterAt(self, pIndex: int) → float

Gets the Nth suggested window venter value (for leveling).

Note

The suggested leveling values are only used to present suitable values to end users.

Parameters:pIndex (int) – the index (a uint16_t)
Returns:output (float) – the window center (a double)
getSuggestedWindowLevelWidthAt(self, pIndex: int) → float

Gets the Nth suggested window width value (for leveling).

Note

The suggested leveling values are only used to present suitable values to end users.

Parameters:pIndex (int) – the index (a uint32_t)
Returns:output (float) – the window width (a double)
getTRawDataChunk(self, iLevel1: int) → int

Gets a T portion of the channel’s data.

Note

The received array is not a copy, do not release it. It will be released by the interface.

Note

Use with caution, as this method gives you direct access to the channel data. ORS encourages use of the CxvChannelData class wrapper instead of direct access.

Parameters:iLevel1 (int) – the T index (an uint32_t)
Returns:output (int) – an array of array of bytes (char)
getTimeFrame(self, pTimeStep: int, pYear: int, pMonth: int, pDay: int, pHour: int, pMinutes: int, pSeconds: int, pMicroSeconds: int) → None

Gets the value of a time frame.

Note

Time frames represent the exact time at each T increment.

Note

-1 is returned if no time frames are defined or if the T index argument is invalid.

Parameters:

pTimeStep (int) – the T index (an uint32_t)

Returns:
  • pYear (int) – the year (a uint16_t*)
  • pMonth (int) – the month (a uint16_t*)
  • pDay (int) – the day (a uint16_t*)
  • pHour (int) – the hour (a uint16_t*)
  • pMinutes (int) – the minutes (a uint16_t*)
  • pSeconds (int) – the seconds (a uint16_t*)
  • pMicroSeconds (int) – the microseconds (a uint32_t*)
getTotalByteCount(self) → int

Gets the total number of bytes in the internal data.

Note

The size in bytes is represented by the formula: X size * Y size * Z size * T size * bit depth.

Returns:output (int) – number of bytes (a int64_t)
getTotalSliceIntersectionLength(self, timeStep: int) → float
Parameters:timeStep (int) –
Returns:output (float) –
getTransformationToGoTo(self, pInChannel: ORSModel.ors.Channel) → Matrix4x4
Parameters:pInChannel (ORSModel.ors.Channel) –
Returns:output (ORSModel.ors.Matrix4x4) –
getTypeDescription(self) → str
Returns:output (str) –
getValueAsDoubleAtIndex(self, xIndex: int, yIndex: int, zIndex: int, tIndex: int) → float
Parameters:
  • xIndex (int) –
  • yIndex (int) –
  • zIndex (int) –
  • tIndex (int) –
Returns:

output (float) –

getValueAsDoubleAtWorldCoordinateNearest(self, aWorldCoordinate: ORSModel.ors.Vector3, tIndex: int) → float
Parameters:
Returns:

output (float) –

getValueConvertedFromPhysicalUnits(self, pInput: float) → float

Converts a value from physical units to channel units.

Note

Slope and offset are applied to convert from physical units.

Parameters:pInput (float) – the value to convert (a double)
Returns:output (float) – the result (a double)
getValueConvertedToPhysicalUnits(self, pInput: float) → float

Converts a value from channel units to physical units.

Note

Slope and offset are applied to convert to physical units.

Parameters:pInput (float) – the value to convert (a double)
Returns:output (float) – the result (a double)
hasDICOMAttribute(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, bSearchSubs: bool) → bool

Verifies the existence of a DICOM attribute.

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • iZIndex (int) – the slice index (an uint32_t)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • bSearchSubs (bool) – true to search sequences, false otherwise
Returns:

output (bool) – true if item was found, false otherwise

classmethod imread(files)

Loads a Channel from files

Parameters:files (file) [count=[0, None]] – fully qualified file name list
Returns:outChannel (ORSModel.ors.Channel) – the resulting Channel
classmethod imreadDICOM(files)

Loads a Channel from files or folder contaning DICOM

Parameters:files (file) [count=[0, None]] – fully qualified file name list
Returns:outChannel (ORSModel.ors.Channel) – the resulting Channel
classmethod imreadDICOMFolder(folder)

Loads a Channel from folder of DICOM files

Parameters:folder (folder) – fully qualified folder
Returns:outChannel (ORSModel.ors.Channel) – the resulting Channel
classmethod imreadFolder(folder)

Loads a Channel from folder

Parameters:folder (folder) – fully qualified folder
Returns:outChannel (ORSModel.ors.Channel) – the resulting Channel
imsave(fileName, extension='tif')

Save a Channel to file in the type specified by the extension

Parameters:
  • fileName (file saving) – fully qualified file name
  • extension (str) – image file format extension
Return:

True or False

Rtype:

bool

imwrite(fileName, extension='tif')

Save a Channel to file in the type specified by the extension

Parameters:
  • fileName (file saving) – fully qualified file name
  • extension (str) – image file format extension
Return:

True or False

Rtype:

bool

initializeData(self) → bool

Initializes the channel’s internal data.

Note

The memory required by the internal data is represented by the formula: X size * Y size * Z size * T size * bitSize.

Note

The channel must be initialized before you start using the channel.

Note

The XYZT sizes, and the data type must be set prior to initializing the channel.

Note

A false result means that a memory allocation error occurred.

Returns:output (bool) – true if initialization was successful, false otherwise
initializeDataForFLOAT(self) → bool

Initializes the channel data array for 32 bit float data.

Note

The size in bytes of the data array is represented by the formula: X * Y * Z * T * 4.

Note

The channel must be initialized before you set the channel data array.

Note

The XYZT sizes must be set prior to initializing the channel.

Note

A false result means that a memory allocation error occurred.

Returns:output (bool) – true if initialization was successful, false otherwise
initializeDataForUCHAR(self) → bool

Initializes the channel data array for 8 bit unsigned data.

Note

The size in bytes of the data array is represented by the formula: X * Y * Z * T.

Note

The channel must be initialized before you set the channel data array.

Note

The XYZT sizes must be set prior to initializing the channel.

Note

A false result means that a memory allocation error occurred.

Returns:output (bool) – true if initialization was successful, false otherwise
initializeDataForUINT(self) → bool

Initializes the channel data array for 32 bit unsigned int data.

Note

The size in bytes of the data array is represented by the formula: X * Y * Z * T * 4.

Note

The channel must be initialized before you set the channel data array.

Note

The XYZT sizes must be set prior to initializing the channel.

Note

A false result means that a memory allocation error occurred.

Returns:output (bool) – true if initialization was successful, false otherwise
initializeDataForUSHORT(self) → bool

Initializes the channel data array for 16 bit unsigned integer data.

Note

The size in bytes of the data array is represented by the formula: X * Y * Z * T * 2.

Note

The channel must be initialized before you set the channel data array.

Note

The XYZT sizes must be set prior to initializing the channel.

Note

A false result means that a memory allocation error occurred.

Returns:output (bool) – true if initialization was successful, false otherwise
invert(self, invertX: bool, invertY: bool, invertZ: bool, invertData: bool, axisTransformation: int, IProgress: ORSModel.ors.Progress, IOutputChannel: ORSModel.ors.Channel) → Channel

Inverts the receiver.

Note

The axis transformation code allows to transpose the axis according to this grid: 0 -> XYZ (no transformation) 1 -> XZY 2 -> YXZ 3 -> YZX 4 -> ZXY 5 -> ZYX

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created.

Parameters:
  • invertX (bool) – true to invert the X axis
  • invertY (bool) – true to invert the Y axis
  • invertZ (bool) – true to invert the Z axis
  • invertData (bool) – true to invert the data
  • axisTransformation (int) – an axis transformation code (a uint16_t), between 0 and 5 (see note)
  • IProgress (ORSModel.ors.Progress) – a progress object, NULL for no progress (an Progress)
  • IOutputChannel (ORSModel.ors.Channel) – an optional output channel (a Channel)
Returns:

output (ORSModel.ors.Channel) – the inverted channel (a Channel)

iterateDICOMAttributes(self, iTIndex: int, iZIndex: int, callbackFunction: int, userdata: int) → None

Iterates through the DICOM attributes, calling a callback function.

Note

The callback function is called with the group and element numbers, the attribute as a string, and any user data supplied to this method. Note that PixelData and OverlayData attributes are excluded from the enumeration. The callback function should return true to continue iterating, but can return false to interrupt the iterating.

Parameters:
  • iTIndex (int) – the T index (an uint32_t)
  • iZIndex (int) – the slice index (an uint32_t)
  • callbackFunction (int) – a callback function (the address of a ORSCHANNELDICOMATTRIBUTESITERATOR function)
  • userdata (bytes) – any user data to be supplied to the callback function
mergeWithBAndProjectInC(self, channelB: ORSModel.ors.Channel, channelC: ORSModel.ors.Channel, IProgress: ORSModel.ors.Progress) → None

Merges the channel with another channel, feeding a third channel.

Note

Merging respects both channels’ orientation, size, spacing, etc.

Parameters:
moveChannelDataInto(self, otherChannel: ORSModel.ors.Channel) → bool

move the data from the left channel to the right channel

Parameters:otherChannel (ORSModel.ors.Channel) – the other channel to move data into
Returns:output (bool) –
moveSlicedata(self, zIndex: int, timeStep: int, xTranslation: int, yTranslation: int) → None
Parameters:
  • zIndex (int) –
  • timeStep (int) –
  • xTranslation (int) –
  • yTranslation (int) –
none()

Channel.__init__() -> Channel

ones(aShape, dtype=<class 'numpy.uint8'>)
overwriteRangeWithValue(self, minValue: float, maxValue: float, replacementValue: float) → None

Overwrites data within a range with a given value.

Note

All three arguments are supplied in double for convenience only, and are converted into the native type of the channel. For each pixel of the channel, if its value is > minimum range and < maximum range, then its pixel is replaced with the replacement value.

Parameters:
  • minValue (float) – the minimum range value (a double, see note below), non-inclusive
  • maxValue (float) – the maximum range value (a double, see note below), non-inclusive
  • replacementValue (float) – the replacement value (a double, see note below)
overwriteValueAtIndicies(self, indices: int, indicesSize: int, repValue: float) → None

Overwrites the channel data at the specified indicies with a supplied (normalized) value.

Note

The replacement value must be supplied in double format, no matter the data type of the channel.

Note

The sender is responsible for releasing the array of indices.

Parameters:
  • indices (int) – an array of data indicies (an array of int64_t)
  • indicesSize (int) – the array element count (an uint32_t)
  • repValue (float) – the replacement value (a double)
overwriteValueAtWorldCoordinates(self, positionTriplets: float, nbTriplet: int, tIndex: int, replacementValue: float) → None

Overwrites the values at positions specified by world triplets and time T.

Note

The replacement value must be supplied in normalized format, no matter the data type of the channel.

Parameters:
  • positionTriplets (float) – An array of world coordinates triplets (a double*)
  • nbTriplet (int) – The number of triplets in the above array (an uint32_t)
  • tIndex (int) – The T index to be processed (an uint32_t)
  • replacementValue (float) – The replacement value (a double)
overwriteValueWithMultiROI(self, aMultiROI: ORSModel.ors.MultiROI, labelOffset: int) → None

Overwrites the channel data at a givenMultiROI.

Note

The channel and multiROI doesn’t need to have the same shape

Note

This method overwrites the channel data according to a MultiROI.

Note

The new value needs to be a normalized value, and will be converted to the native channel type.

Parameters:
  • aMultiROI (ORSModel.ors.MultiROI) – a MultiROI (an MultiROI)
  • labelOffset (int) – the label offset (an uint32_t)
overwriteValueWithMultiROIConsideringOpacity(self, aMultiROI: ORSModel.ors.MultiROI, labelOffset: int, fHightlightOpacity: float, fHightlightOpacityOutRange: float, fROIOpacity: float, fROIOpacityOutRange: float) → None

Overwrites the channel data at a givenMultiROI.

Note

The channel and multiROI doesn’t need to have the same shape

Note

This method overwrites the channel data according to a MultiROI.

Note

The new value needs to be a normalized value, and will be converted to the native channel type.

Parameters:
  • aMultiROI (ORSModel.ors.MultiROI) – a MultiROI (an MultiROI)
  • labelOffset (int) – the label offset (an uint32_t)
  • fHightlightOpacity (float) –
  • fHightlightOpacityOutRange (float) –
  • fROIOpacity (float) –
  • fROIOpacityOutRange (float) –
overwriteValueWithMultiROIOnSubBox(self, aVolumeROI: ORSModel.ors.MultiROI, labelOffset: int, subBox: ORSModel.ors.Box, iTIndex: int) → None

Overwrites the channel data at a givenMultiROI included in the given box.

Note

The channel and multiROI doesn’t need to have the same shape

Note

The box must have orthonormal base with the channel box.

Note

This method overwrites the channel data according to a MultiROI.

Note

The new value needs to be a normalized value, and will be converted to the native channel type.

Parameters:
  • aVolumeROI (ORSModel.ors.MultiROI) – a MultiROI (an MultiROI)
  • labelOffset (int) – the label offset (an uint32_t)
  • subBox (ORSModel.ors.Box) – the box (a Box)
  • iTIndex (int) – the time step index (uint32_t)
overwriteValueWithMultiROIOnSubBoxConsideringOpacity(self, aVolumeROI: ORSModel.ors.MultiROI, labelOffset: int, subBox: ORSModel.ors.Box, fHightlightOpacity: float, fHightlightOpacityOutRange: float, fROIOpacity: float, fROIOpacityOutRange: float, iTIndex: int) → None

Overwrites the channel data at a givenMultiROI included in the given box.

Note

The channel and multiROI doesn’t need to have the same shape

Note

The box must have orthonormal base with the channel box.

Note

This method overwrites the channel data according to a MultiROI.

Note

The new value needs to be a normalized value, and will be converted to the native channel type.

Parameters:
  • aVolumeROI (ORSModel.ors.MultiROI) – a MultiROI (an MultiROI)
  • labelOffset (int) – the label offset (an uint32_t)
  • subBox (ORSModel.ors.Box) – the box (a Box)
  • fHightlightOpacity (float) – the time step index (uint32_t)
  • fHightlightOpacityOutRange (float) –
  • fROIOpacity (float) –
  • fROIOpacityOutRange (float) –
  • iTIndex (int) –
overwriteValueWithROI(self, aVolumeROI: ORSModel.ors.ROI, pReplacementValue: float) → None

Overwrites the channel data at a given Region of Interest.

Note

The channel and ROI doesn’t need to have the same shape

Note

This method overwrites the channel data according to a Region of Interest.

Note

The new value needs to be a normalized value, and will be converted to the native channel type.

Parameters:
  • aVolumeROI (ORSModel.ors.ROI) – a ROI (an ROI)
  • pReplacementValue (float) – the new value (a double)
overwriteValueWithROIOnSubBox(self, aROI: ORSModel.ors.ROI, pReplacementValue: float, subBox: ORSModel.ors.Box, iTIndex: int) → None

Overwrites the channel data at a given Region of Interest included in the given box.

Note

The channel and ROI doesn’t need to have the same shape

Note

The box must have orthonormal base with the channel box.

Note

This method overwrites the channel data according to a Region of Interest.

Note

The new value needs to be a normalized value, and will be converted to the native channel type.

Parameters:
  • aROI (ORSModel.ors.ROI) – a ROI (an ROI)
  • pReplacementValue (float) – the new value (a double)
  • subBox (ORSModel.ors.Box) – the box (a Box)
  • iTIndex (int) – the time step index (uint32_t)
prepareForObliqueExtractionFromRectangleBetweenPlanes(self, aBoundedPlane: ORSModel.ors.Rectangle, startPlane: ORSModel.ors.Plane, endPlane: ORSModel.ors.Plane, xSize: int, ySize: int, nbZSlice: int, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, IOutChannel: ORSModel.ors.Channel) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

removeAllPrivateDICOMAttributes(self) → None

Removes all private DICOM attributes.

removeSlice(self, pSliceIndex: int) → None

Removes a slice of data from the channel.

Note

Note that the same slice index will be removed in all T dimensions of the channel.

Parameters:pSliceIndex (int) – the slice number (an uint32_t, 0 based)
resize(shape, dtype=<class 'numpy.uint8'>)
setAllData(self, aValue: float) → None

Sets the entire channel data to a single value.

Note

The new value needs to be a normalized value, and will be converted to the native channel type.

Parameters:aValue (float) – the new value (a double)
setAllDataOnSubBox(self, aValue: float, subBox: ORSModel.ors.Box, iTIndex: int) → None

Sets the channel data included in a box to a single value.

Note

The box must have orthonormal base with the channel box.

Note

The new value needs to be a normalized value, and will be converted to the native channel type.

Parameters:
  • aValue (float) – the new value (a double)
  • subBox (ORSModel.ors.Box) – the subBox (a Box)
  • iTIndex (int) – the T index (an uint32_t)
setAllMarkedSlices(self, pValue: bool) → None

Sets the boolean marker of all slices.

Note

Each slice has a BOOLEAN marker associated to it.

Parameters:pValue (bool) – true to set the entire slices’ marker on, false otherwise
setAreAllZSlicesDataAvailable(self, pValue: bool) → None

Sets the availability of all Z slices’ data.

Note

The channel can be set to work in “lazy” mode, where slices are made available as they are read.

Parameters:pValue (bool) – true to set the entire Z slices’ data as available, false otherwise
setDICOMAttribute(self, sValue: str, iTIndex: int, iZIndex: int, pGroup: int, pElement: int, bReplaceExisting: bool) → bool

Sets a string DICOM attribute.

Note

To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is uint32_t.

Note

Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OF, OW, PN, SH, SL, SS, ST, TM, UI, UL, US, UT.

Parameters:
  • sValue (str) – the string value (a string)
  • iTIndex (int) – the T index (an int64_t, see note)
  • iZIndex (int) – the slice index (an int64_t, see note)
  • pGroup (int) – the group number (a uint16_t)
  • pElement (int) – the element number (a uint16_t)
  • bReplaceExisting (bool) – true to replace an existing value, false otherwise
Returns:

output (bool) – true if successful, false otherwise

setDICOMAttributeDouble(self, iValue: float, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool

Sets a double DICOM attribute.

Note

Applicable to the following VRs: DS, FD.

Note

To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is uint32_t.

Parameters:
  • iValue (float) – the value (a double)
  • iTIndex (int) – the T index (an int64_t, see note)
  • iZIndex (int) – the slice index (an int64_t, see note)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bReplaceExisting (bool) – true to replace an existing value, false otherwise
Returns:

output (bool) – true if successful, false otherwise

setDICOMAttributeFloat(self, iValue: float, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool

Sets a float DICOM attribute.

Note

Applicable to the following VRs: FL, OF.

Note

To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is uint16_t.

Parameters:
  • iValue (float) – the value (a float)
  • iTIndex (int) – the T index (an int64_t, see note)
  • iZIndex (int) – the slice index (an int64_t, see note)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bReplaceExisting (bool) – true to replace an existing value, false otherwise
Returns:

output (bool) – true if successful, false otherwise

setDICOMAttributeInt(self, iValue: int, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool

Sets a signed 32 bit DICOM attribute.

Note

Applicable to the following VRs: IS, SL, SS, UL, US.

Note

To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is uint32_t.

Parameters:
  • iValue (int) – the value (an int)
  • iTIndex (int) – the T index (an int64_t, see note)
  • iZIndex (int) – the slice index (an int64_t, see note)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bReplaceExisting (bool) – true to replace an existing value, false otherwise
Returns:

output (bool) – true if successful, false otherwise

setDICOMAttributeShort(self, iValue: int, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool

Sets a signed 16 bit DICOM attribute.

Note

Applicable to the following VRs: SS.

Note

To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is uint32_t.

Parameters:
  • iValue (int) – the value (a short)
  • iTIndex (int) – the T index (an int64_t, see note)
  • iZIndex (int) – the slice index (an int64_t, see note)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bReplaceExisting (bool) – true to replace an existing value, false otherwise
Returns:

output (bool) – true if successful, false otherwise

setDICOMAttributeUnsignedChar(self, iValue: int, iTIndex: int, iZIndex: int, pGroup: int, pElement: int, iIndex: int, bReplaceExisting: bool) → bool

Sets an unsigned 8 bit DICOM attribute.

Note

Applicable to the following VRs: OB.

Note

To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is uint32_t.

Parameters:
  • iValue (int) – the value (an short char)
  • iTIndex (int) – the T index (an int64_t, see note)
  • iZIndex (int) – the slice index (an int64_t, see note)
  • pGroup (int) – the group number (a uint16_t)
  • pElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bReplaceExisting (bool) – true to replace an existing value, false otherwise
Returns:

output (bool) – true if successful, false otherwise

setDICOMAttributeUnsignedInt(self, iValue: int, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool

Sets an unsigned 32 bit DICOM attribute.

Note

Applicable to the following VRs: UL.

Note

To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is uint32_t.

Parameters:
  • iValue (int) – the value (a uint32_t)
  • iTIndex (int) – the T index (an int64_t, see note)
  • iZIndex (int) – the slice index (an int64_t, see note)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bReplaceExisting (bool) – true to replace an existing value, false otherwise
Returns:

output (bool) – true if successful, false otherwise

setDICOMAttributeUnsignedShort(self, iValue: int, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool

Sets an unsigned 16 bit DICOM attribute.

Note

Applicable to the following VRs: OW, US.

Note

To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is uint32_t.

Parameters:
  • iValue (int) – the value (a uint16_t)
  • iTIndex (int) – the T index (an int64_t, see note)
  • iZIndex (int) – the slice index (an int64_t, see note)
  • iGroup (int) – the group number (a uint16_t)
  • iElement (int) – the element number (a uint16_t)
  • iIndex (int) – index of the item in case of multi-valued elements (0..vm-1)
  • bReplaceExisting (bool) – true to replace an existing value, false otherwise
Returns:

output (bool) – true if successful, false otherwise

setDICOMContainer(self, iTIndex: int, iZIndex: int, sData: int) → None

Private.

Parameters:
  • iTIndex (int) –
  • iZIndex (int) –
  • sData (bytes) –
setDataDescription(self, pChannelDescriptionEnumValue: int) → None

Sets the channel description.

Note

Channel description is used to categorize channels.

Note

See the constants defined in ORS_def.h, enum CxvChannel_Description, for valid values.

Parameters:pChannelDescriptionEnumValue (int) – a description index (a int32_t*)
setDataRange(self, pValue: float) → None

Sets the size of the spread of data.

Note

Normally the channel knows its data spread, for example the spread of an 8 bit channel is 256 (from 0 to 255). This method becomes useful when it is known that the pixel data is smaller that the data type. For example, it is common for DICOM data to have its pixel data represented in 12 bits, but the data is stored in 16 bits.

Parameters:pValue (float) – a value (a double)
setDataType(self, pDataType: int) → None

Sets the channel data type.

Note

See CxvChannel_Data_Type (in ORS_def.h) for supported data types.

Parameters:pDataType (int) –
setDataUnit(self, bDimensionalUnit: str) → None

Sets the channel data unit description.

Parameters:bDimensionalUnit (str) – a string
setInitialWindowLevelValues(self, pWidth: float, pCenter: float) → None

Sets the initial window leveling value.

Note

This leveling will only be applied when the channel is first shown in a volume.

Note

Two special values are accepted: -1 means to normalize from the channel data spread, and 0 means to use no leveling at all.

Parameters:
  • pWidth (float) – the window width (a double)
  • pCenter (float) – the window center (a double)
setIsData3D(self, pValue: bool) → None

Sets the channel to be true 3D data or not.

Note

Normally channels hold 3D data, but there are cases where it is known that the data is not 3D (for example, stacks of screenshots). In those cases channels need to be told that they do not hold 3D data.

Parameters:pValue (bool) – true if data is 3D, false otherwise
setIsLossy(self, pValue: bool) → None

Sets the channel to be lossy or not.

Note

A channel can be lossy for two different reasons:

Parameters:pValue (bool) – true if data is lossy, false otherwise
setIsMarkedSlice(self, pTIndex: int, pZSlice: int, pValue: bool) → None

Sets a slice to be marked or not.

Note

Each slice has a BOOLEAN marker associated to it.

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (int) – the Z slice index (an uint32_t)
  • pValue (bool) – true to set the slice to be marked, false otherwise
setIsZSliceDataAvailable(self, pTIndex: int, pZSlice: int, pValue: bool) → None

Sets the availability of a Z slice’s data.

Note

The channel can be set to work in “lazy” mode, where slices are made available as they are read.

Parameters:
  • pTIndex (int) – the T index (a uint32_t)
  • pZSlice (int) – the Z slice index (a uint32_t)
  • pValue (bool) – true to set the Z slice’s data available, false otherwise
setOffset(self, pOffset: float) → None

Sets the channel offset.

Parameters:pOffset (float) – the offset (a double)
setSavePixelDataWhileSavingNode(self, pFlag: int) → None

Controls if and how the channel should save its pixel data to XML.

Note

The save mode has these meanings:

Parameters:pFlag (int) – the save mode (a short between 0 and 2, see below)
setSerieHasBeenModified(self, seriesHasBeenChangedFlag: bool) → None
Parameters:seriesHasBeenChangedFlag (bool) –
setSliceDirection0Size(self, timeStep: int, sliceIndex: int, direction0Size: float) → None
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
  • direction0Size (float) –
setSliceDirection0Spacing(self, timeStep: int, sliceIndex: int, direction0Spacing: float) → None
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
  • direction0Spacing (float) –
setSliceDirection1Size(self, timeStep: int, sliceIndex: int, direction1Size: float) → None
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
  • direction1Size (float) –
setSliceDirection1Spacing(self, timeStep: int, sliceIndex: int, direction1Spacing: float) → None
Parameters:
  • timeStep (int) –
  • sliceIndex (int) –
  • direction1Spacing (float) –
setSliceOrientation(self, pTIndex: int, pZSlice: int, index: int, value: float) → None

Sets the orientation of a given slice.

Note

First three indicies indicate X orientation, next three indicate Y orientation and last three are for Z.

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (int) – the Z slice index (an uint32_t)
  • index (int) – an index (from 0 to 9)
  • value (float) – the orientation value (a double)
setSlicePosition(self, pTIndex: int, pZSlice: int, pPosition: ORSModel.ors.Vector3) → None

Sets the position of a given slice.

Parameters:
  • pTIndex (int) – the T index (an uint32_t)
  • pZSlice (int) – the Z slice index (an uint32_t
  • pPosition (ORSModel.ors.Vector3) – a position (an Vector3)
setSliceRectangle(self, timeStep: int, sliceIndex: int, pBoundedPlane: ORSModel.ors.Rectangle) → None
Parameters:
setSlope(self, pSlope: float) → None

Sets the channel slope.

Parameters:pSlope (float) – the slope (a double)
setSpacingValidity(self, bXSpacing: bool, bYSpacing: bool, bZSpacing: bool) → None

Sets if the channel has valid spacing.

Parameters:
  • bXSpacing (bool) – validity of X spacing
  • bYSpacing (bool) – validity of Y spacing
  • bZSpacing (bool) – validity of Z spacing
setSubset(self, pSourceChannel: ORSModel.ors.Channel, xMinSource: int, yMinSource: int, zMinSource: int, tMinSource: int, xSize: int, ySize: int, zSize: int, tSize: int, xMinDestination: int, yMinDestination: int, zMinDestination: int, tMinDestination: int) → None

Writes a channel subset into the current channel data.

Parameters:
  • pSourceChannel (ORSModel.ors.Channel) – the channel to read the data from (the “source”)
  • xMinSource (int) – the first index in X to copy from the source channel (a uint32_t)
  • yMinSource (int) – the first index in Y to copy from the source channel (a uint32_t)
  • zMinSource (int) – the first index in Z to copy from the source channel (a uint32_t)
  • tMinSource (int) – the first index in T to copy from the source channel (a uint32_t)
  • xSize (int) – the number of pixels in X to copy from the source channel (a uint32_t)
  • ySize (int) – the number of pixels in Y to copy from the source channel (a uint32_t)
  • zSize (int) – the number of pixels in Z to copy from the source channel (a uint32_t)
  • tSize (int) – the number of pixels in T to copy from the source channel (a uint32_t)
  • xMinDestination (int) – the index in X of the first pixel to copy into the current channel (a uint32_t)
  • yMinDestination (int) – the index in Y of the first pixel to copy into the current channel (a uint32_t)
  • zMinDestination (int) – the index in Z of the first pixel to copy into the current channel (a uint32_t)
  • tMinDestination (int) – the index in T of the first pixel to copy into the current channel (a uint32_t)
setTimeFrame(self, pTimeStep: int, pYear: int, pMonth: int, pDay: int, pHour: int, pMinutes: int, pSeconds: int, pMicroSeconds: int) → None

Sets the value of a time frame.

Note

Time frames represent the exact time at each T increment.

Parameters:
  • pTimeStep (int) – the T index (a uint32_t)
  • pYear (int) – the year (a uint16_t)
  • pMonth (int) – the month (a uint16_t)
  • pDay (int) – the day (a uint16_t)
  • pHour (int) – the hour (a uint16_t)
  • pMinutes (int) – the minutes (a uint16_t)
  • pSeconds (int) – the seconds (a uint16_t)
  • pMicroSeconds (int) – the microseconds (a uint32_t)
shape
swapSliceData(self, iTSource: int, iZSource: int, iTTarget: int, iZTarget: int) → None

Swap two slices.

Note

If any index is invalid no swap occurs.

Parameters:
  • iTSource (int) – T source index (an uint32_t)
  • iZSource (int) – Z source index (an uint32_t)
  • iTTarget (int) – T target index (an uint32_t)
  • iZTarget (int) – Z target index (an uint32_t)
transform(self, transformationMatrix: ORSModel.ors.Matrix4x4) → None
Parameters:transformationMatrix (ORSModel.ors.Matrix4x4) –
updateCrossSection(self, path: ORSModel.ors.VisualPath, aTransformationMatrix: ORSModel.ors.Matrix4x4, timeStep: int, pInChannel: ORSModel.ors.Channel) → None
Parameters:
updateSliceMatricesWithGlobalMatrixValue(self) → None
zeros(shape, dtype=<class 'numpy.uint8'>)

Channel2DOverlapMergerHelper

class ORSModel.ors.Channel2DOverlapMergerHelper

Bases: ORSModel.ors.Unmanaged

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getOverLap(self, outputChannel: ORSModel.ors.Channel, listOfChannelsToMerge: ORSModel.ors.List, z: int, t: int, method: int, onlyOverlap: bool) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

none()

Channel2DOverlapMergerHelper.__init__() -> Channel2DOverlapMergerHelper

updateOverlapAtPos(self, outputChannel: ORSModel.ors.Channel, listOfChannelsToMerge: ORSModel.ors.List, oldXMin: int, oldXMax: int, oldYMin: int, oldYMax: int, newXmin: int, newXMax: int, newYMin: int, newYMax: int) → None
Parameters:
  • outputChannel (ORSModel.ors.Channel) –
  • listOfChannelsToMerge (ORSModel.ors.List) –
  • oldXMin (int) –
  • oldXMax (int) –
  • oldYMin (int) –
  • oldYMax (int) –
  • newXmin (int) –
  • newXMax (int) –
  • newYMin (int) –
  • newYMax (int) –

Channel3DBlendingHelper

class ORSModel.ors.Channel3DBlendingHelper

Bases: ORSModel.ors.Unmanaged

blend(self, outputChannel: ORSModel.ors.Channel, listOfChannelsToMerge: ORSModel.ors.List, t: int, method: int, interpolation: int, progress: ORSModel.ors.Progress) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

Channel3DBlendingHelper.__init__() -> Channel3DBlendingHelper

ChannelRegistrationHelper

class ORSModel.ors.ChannelRegistrationHelper

Bases: ORSModel.ors.Unmanaged

applyTransformationDegreeOfFreedomOnChannel(self, kindOfDegreeOfFreedom: int, numeroDirection: int, backward: bool) → None
Parameters:
  • kindOfDegreeOfFreedom (int) –
  • numeroDirection (int) –
  • backward (bool) –
getChannelA(self) → Channel
Returns:output (ORSModel.ors.Channel) –
getChannelB(self) → Channel
Returns:output (ORSModel.ors.Channel) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCurrentSimilarity(self) → float
Returns:output (float) –
getEpsilonRotation(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getEpsilonScaleFactor(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getEpsilonTranslation(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getFactorOfCompressionHistogramA(self) → int
Returns:output (int) –
getFactorOfCompressionHistogramB(self) → int
Returns:output (int) –
getHistogramASize(self) → int
Returns:output (int) –
getHistogramBSize(self) → int
Returns:output (int) –
getMaxSimilarityMetric(self) → float
Returns:output (float) –
getMutualInformationFor(self, p_entropyA: float, p_entropyB: float, p_entropyAB: float, histoASize: int, histoBSize: int, fractionOfChannelConsidered: float) → float
Parameters:
  • p_entropyA (float) –
  • p_entropyB (float) –
  • p_entropyAB (float) –
  • histoASize (int) –
  • histoBSize (int) –
  • fractionOfChannelConsidered (float) –
Returns:

output (float) –

getNearestInterpolation(self) → bool
Returns:output (bool) –
getRegistration3DTransformation(self, bApplyTransformation: bool, IProgress: ORSModel.ors.Progress) → Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getRotationScaleCenter(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getRotationScaleCenterAlwaysAtCenter(self) → bool
Returns:output (bool) –
getSearchDeltaRotation(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getSearchDeltaScaleFactor(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getSearchDeltaTranslation(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getSuggestedHistogramSizesSturgesRule(self, pIChannelA: ORSModel.ors.Channel, pIChannelB: ORSModel.ors.Channel, pSuggestedSizeOfHistogram: int) → None
Parameters:
getTimeA(self) → int
Returns:output (int) –
getTimeB(self) → int
Returns:output (int) –
getUseMultiScale(self) → bool
Returns:output (bool) –
getUseMutualInfo(self) → bool
Returns:output (bool) –
getXSampling(self) → int
Returns:output (int) –
getYSampling(self) → int
Returns:output (int) –
getZSampling(self) → int
Returns:output (int) –
none()

ChannelRegistrationHelper.__init__() -> ChannelRegistrationHelper

resetRotationScaleCenter(self) → None
setChannelA(self, pIChannel: ORSModel.ors.Channel) → None
Parameters:pIChannel (ORSModel.ors.Channel) –
setChannelAB(self, pIChannelA: ORSModel.ors.Channel, pIChannelB: ORSModel.ors.Channel) → None
Parameters:
setChannelB(self, pIChannel: ORSModel.ors.Channel) → None
Parameters:pIChannel (ORSModel.ors.Channel) –
setEpsilonRotation(self, pVector: ORSModel.ors.Vector3) → None
Parameters:pVector (ORSModel.ors.Vector3) –
setEpsilonScaleFactor(self, pVector: ORSModel.ors.Vector3) → None
Parameters:pVector (ORSModel.ors.Vector3) –
setEpsilonTranslation(self, pVector: ORSModel.ors.Vector3) → None
Parameters:pVector (ORSModel.ors.Vector3) –
setFactorOfCompressionHistogramA(self, factor: int) → None
Parameters:factor (int) –
setFactorOfCompressionHistogramB(self, factor: int) → None
Parameters:factor (int) –
setHistogramASize(self, value: int) → None
Parameters:value (int) –
setHistogramBSize(self, value: int) → None
Parameters:value (int) –
setMask(self, pROiMask: ORSModel.ors.ROI) → None
Parameters:pROiMask (ORSModel.ors.ROI) –
setNearestInterpolation(self, aFlag: bool) → None
Parameters:aFlag (bool) –
setRotationScaleCenter(self, pVect: ORSModel.ors.Vector3) → None
Parameters:pVect (ORSModel.ors.Vector3) –
setRotationScaleCenterAlwaysAtCenter(self, aFlag: bool) → None
Parameters:aFlag (bool) –
setSearchDeltaEpsilonRotation(self, pIInputChannel: ORSModel.ors.Channel, searchDelta: float, epsilon: float) → None
Parameters:
setSearchDeltaEpsilonScaleFactor(self, pIInputChannel: ORSModel.ors.Channel, searchDelta: float, epsilon: float) → None
Parameters:
setSearchDeltaEpsilonTranslation(self, pIInputChannel: ORSModel.ors.Channel, searchDelta: float, epsilon: float) → None
Parameters:
setSearchDeltaRotation(self, pVector: ORSModel.ors.Vector3) → None
Parameters:pVector (ORSModel.ors.Vector3) –
setSearchDeltaScaleFactor(self, pVector: ORSModel.ors.Vector3) → None
Parameters:pVector (ORSModel.ors.Vector3) –
setSearchDeltaTranslation(self, pVector: ORSModel.ors.Vector3) → None
Parameters:pVector (ORSModel.ors.Vector3) –
setSearchDirectionBox(self, pIChannelBox: ORSModel.ors.Box) → None
Parameters:pIChannelBox (ORSModel.ors.Box) –
setSearchDirectionChannel(self, pIChannel: ORSModel.ors.Channel) → None
Parameters:pIChannel (ORSModel.ors.Channel) –
setTimeA(self, time: int) → None
Parameters:time (int) –
setTimeB(self, time: int) → None
Parameters:time (int) –
setUseMultiScale(self, aFlag: bool) → None
Parameters:aFlag (bool) –
setUseMutualInfo(self, aFlag: bool) → None
Parameters:aFlag (bool) –
setXSampling(self, aSampling: int) → None
Parameters:aSampling (int) –
setYSampling(self, aSampling: int) → None
Parameters:aSampling (int) –
setZSampling(self, aSampling: int) → None
Parameters:aSampling (int) –

ChannelSliceRegistrationHelper

class ORSModel.ors.ChannelSliceRegistrationHelper

Bases: ORSModel.ors.Node

addTranslation(self, zIndex: int, tIndex: int, aVect: ORSModel.ors.Vector3) → None
Parameters:
applySliceRegistrationToChannel(self, pInputChannel: ORSModel.ors.Channel, iTIndex: int, IProgress: ORSModel.ors.Progress, pOutputChannel: ORSModel.ors.Channel) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

composeMatrix(self, zIndex: int, tIndex: int, aMatrix: ORSModel.ors.Matrix4x4) → None

Compose the transformation matrix from slice (zIndex-1) registered position to slice zIndex registered position with thw given matrix.

Parameters:
copyInto(self, aDestinationRegistration: ORSModel.ors.ChannelSliceRegistrationHelper) → None
Parameters:aDestinationRegistration (ORSModel.ors.ChannelSliceRegistrationHelper) –
copyShapeFromChannel(self, aChannel: ORSModel.ors.Channel) → None
Parameters:aChannel (ORSModel.ors.Channel) –
extractSliceChannel(self, pInputChannel: ORSModel.ors.Channel, aCutPlane: ORSModel.ors.Plane, IOutputSliceChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

extractZSliceChannel(self, pInputChannel: ORSModel.ors.Channel, aCutPlane: ORSModel.ors.Plane, IOutputSliceChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getApplicableChannelList(self) → List
Returns:output (ORSModel.ors.List) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getComposeMatrixFromSliceIToJ(self, zIndexI: int, zIndexJ: int, tIndex: int) → Matrix4x4
Parameters:
  • zIndexI (int) –
  • zIndexJ (int) –
  • tIndex (int) –
Returns:

output (ORSModel.ors.Matrix4x4) –

getGlobalMatrix(self, zIndex: int, tIndex: int) → Matrix4x4

Returns the transformation matrix from channel original position to slice zIndex registered position.

Parameters:
  • zIndex (int) –
  • tIndex (int) –
Returns:

output (ORSModel.ors.Matrix4x4) –

getIsSliceUnmovable(self, zIndex: int, tIndex: int) → bool
Parameters:
  • zIndex (int) –
  • tIndex (int) –
Returns:

output (bool) –

getMatrix(self, zIndex: int, tIndex: int) → Matrix4x4

Returns the transformation matrix from slice (zIndex-1) registered position to slice zIndex registered position.

Parameters:
  • zIndex (int) –
  • tIndex (int) –
Returns:

output (ORSModel.ors.Matrix4x4) –

getMaxTranslation(self, tIndex: int) → Vector3
Parameters:tIndex (int) –
Returns:output (ORSModel.ors.Vector3) –
getMaximumXOffsetBetweenSlice(self) → int
Returns:output (int) –
getMaximumYOffsetBetweenSlice(self) → int
Returns:output (int) –
getMinTranslation(self, tIndex: int) → Vector3
Parameters:tIndex (int) –
Returns:output (ORSModel.ors.Vector3) –
getOpticalFluxMaximalLevelGaussianPyramid(self, aChannel: ORSModel.ors.Channel, nZIndex: int, nTIndex: int, pIBoundingBoxSearchArea: ORSModel.ors.Box) → int
Parameters:
Returns:

output (int) –

getRegisteredChannelBox(self, aChannel: ORSModel.ors.Channel) → Box
Parameters:aChannel (ORSModel.ors.Channel) –
Returns:output (ORSModel.ors.Box) –
getSimilarityXSampling(self) → int
Returns:output (int) –
getSimilarityYSampling(self) → int
Returns:output (int) –
getTSize(self) → int
Returns:output (int) –
getTranslation(self, zIndex: int, tIndex: int) → Vector3
Parameters:
  • zIndex (int) –
  • tIndex (int) –
Returns:

output (ORSModel.ors.Vector3) –

getZSize(self) → int
Returns:output (int) –
mergeSliceRegistrationHelper(self, pInputRegistrationHelper: ORSModel.ors.ChannelSliceRegistrationHelper, startZ: int, endZ: int, startT: int, endT: int, pOutputRegistrationHelper: ORSModel.ors.ChannelSliceRegistrationHelper) → ChannelSliceRegistrationHelper
Parameters:
Returns:

output (ORSModel.ors.ChannelSliceRegistrationHelper) –

none()

ChannelSliceRegistrationHelper.__init__() -> ChannelSliceRegistrationHelper

registerSliceMutualInfo(self, aChannel: ORSModel.ors.Channel, startZ: int, endZ: int, tIndex: int, nbIteration: int, bResetRegistration: bool, IProgress: ORSModel.ors.Progress) → None

Voxel based slice registration using Mutual info algorithm.

Note

Set the parameter with setSimilarityXSampling(), setSimilarityYSampling(), setMaximumXOffsetBetweenSlice(), setMaximumYOffsetBetweenSlice()

Parameters:
  • aChannel (ORSModel.ors.Channel) – the channel to register (a Channel)
  • startZ (int) – the slice start index (a uint32_t)
  • endZ (int) – the slice end index (a uint32_t)
  • tIndex (int) – the channel T index (a uint32_t)
  • nbIteration (int) – the maximum number of iteration(an unsigned short)
  • bResetRegistration (bool) – the progress bar (an Progress)
  • IProgress (ORSModel.ors.Progress) –
registerSliceMutualInfoSubVoxel(self, aChannel: ORSModel.ors.Channel, startZ: int, endZ: int, tIndex: int, fDeltaTranslationX: float, fDeltaTranslationY: float, fEpsilonTranslationX: float, fEpsilonTranslationY: float, fDeltaRotation: float, fEpsilonRotation: float, bResetRegistration: bool, bUseFixReferenceSlice: bool, nFixReferenceSliceIdx: int, IProgress: ORSModel.ors.Progress) → None

Sub-Voxel based slice registration using Mutual info algorithm.

Parameters:
  • aChannel (ORSModel.ors.Channel) – the channel to register (a Channel)
  • startZ (int) – the slice start index (a uint32_t)
  • endZ (int) – the slice end index (a uint32_t)
  • tIndex (int) – the channel T index (a uint32_t)
  • fDeltaTranslationX (float) – the initial step on X axis is the first translation that will be applied and tested by the algorithm
  • fDeltaTranslationY (float) – the initial step on Y axis is the first translation that will be applied and tested by the algorithm
  • fEpsilonTranslationX (float) – the smallest step on X axis is the minimum distance that could be tested by the algorithm
  • fEpsilonTranslationY (float) – the smallest step on Y axis is the minimum distance that could be tested by the algorithm
  • fDeltaRotation (float) – the initial step is the first rotation that will be applied and tested by the algorithm
  • fEpsilonRotation (float) – the smallest step is the is minimum rotation that could be tested by the algorithm
  • bResetRegistration (bool) – indicate if the registration matrix should be reseted (a bool)
  • bUseFixReferenceSlice (bool) – indicate if we register on a fixed slice (a bool)
  • nFixReferenceSliceIdx (int) – indicate the fixed slice index (if we register on a fixed slice) (a uint32_t)
  • IProgress (ORSModel.ors.Progress) – the progress bar (an Progress)
registerSliceOpticalFlow(self, aChannel: ORSModel.ors.Channel, startZ: int, endZ: int, tIndex: int, bUseTranslation: bool, fMinimalDistanceToStop: float, bUseRotation: bool, fMinimalRotationToStop: float, nMaxIteration: int, nGaussianPyramid: int, bUseLinearFactor: bool, bUseConstantFactor: bool, bUseMIRegistration: bool, IInterestBox: ORSModel.ors.Box, ISearchBox: ORSModel.ors.Box, bResetRegistration: bool, IProgress: ORSModel.ors.Progress) → None

Sub - Voxel based slice registration using Optical Flow algorithm.

Parameters:
  • aChannel (ORSModel.ors.Channel) – the channel to register(a Channel)
  • startZ (int) – the slice start index(a uint32_t)
  • endZ (int) – the slice end index(a uint32_t)
  • tIndex (int) – the channel T index(a uint32_t)
  • bUseTranslation (bool) – indicate that the algorithm should use translation(a bool)
  • fMinimalDistanceToStop (float) – the smallest distance in translation(from the last iteration) that should be reached to stop the iterative process(a double)
  • bUseRotation (bool) – indicate that the algorithm should use rotation(a bool)
  • fMinimalRotationToStop (float) – smallest rotation (in radians) (from the last iteration) that should be reached to stop the iterative process(a double)
  • nMaxIteration (int) – maximal number of iterations(an unsigned short)
  • nGaussianPyramid (int) – the minimal level (highest resolution) of the Gaussian pyramid to use to evaluate the transformation.A value of 0 is the resolution of the input image(and is usually a source of instability); each increment of 1 of this value reduces the resolution by half and would usually increase the stability of the result and reduce the computation time. (an int)
  • bUseLinearFactor (bool) – indicate if the linear factor of brightness correction(for stabilization) should be used(a bool)
  • bUseConstantFactor (bool) – indicate if the constant factor of brightness correction(for stabilization) should be used.This value will be considered only if the linear factor is used. (a bool)
  • bUseMIRegistration (bool) – indicate if a pass of registration by mutual information should be performed after the pass of optical flow(a bool)
  • IInterestBox (ORSModel.ors.Box) – the section of the image of reference to be detected in the other image(an Box)
  • ISearchBox (ORSModel.ors.Box) – the area where the section of the image of reference should be found in the other image(an Box)
  • bResetRegistration (bool) – indicate if the registration matrix should be reset(a bool)
  • IProgress (ORSModel.ors.Progress) – the progress bar(an Progress)
registerSliceSSD(self, aChannel: ORSModel.ors.Channel, startZ: int, endZ: int, tIndex: int, nbIteration: int, bResetRegistration: bool, IProgress: ORSModel.ors.Progress) → None

Voxel based slice registration using SSD algorithm.

Note

Set the parameter with setSimilarityXSampling(), setSimilarityYSampling(), setMaximumXOffsetBetweenSlice(), setMaximumYOffsetBetweenSlice()

Parameters:
  • aChannel (ORSModel.ors.Channel) – the channel to register (a Channel)
  • startZ (int) – the slice start index (a uint32_t)
  • endZ (int) – the slice end index (a uint32_t)
  • tIndex (int) – the channel T index (a uint32_t)
  • nbIteration (int) – the maximum number of iteration(an unsigned short)
  • bResetRegistration (bool) – the progress bar (an Progress)
  • IProgress (ORSModel.ors.Progress) –
registerSliceSSDSubVoxel(self, aChannel: ORSModel.ors.Channel, startZ: int, endZ: int, tIndex: int, fDeltaTranslationX: float, fDeltaTranslationY: float, fEpsilonTranslationX: float, fEpsilonTranslationY: float, fDeltaRotation: float, fEpsilonRotation: float, bResetRegistration: bool, bUseFixReferenceSlice: bool, nFixReferenceSliceIdx: int, IProgress: ORSModel.ors.Progress) → None

Sub-Voxel based slice registration using SSD algorithm.

Parameters:
  • aChannel (ORSModel.ors.Channel) – the channel to register (a Channel)
  • startZ (int) – the slice start index (a uint32_t)
  • endZ (int) – the slice end index (a uint32_t)
  • tIndex (int) – the channel T index (a uint32_t)
  • fDeltaTranslationX (float) – the initial step on X axis is the first translation that will be applied and tested by the algorithm
  • fDeltaTranslationY (float) – the initial step on Y axis is the first translation that will be applied and tested by the algorithm
  • fEpsilonTranslationX (float) – the smallest step on X axis is the minimum distance that could be tested by the algorithm
  • fEpsilonTranslationY (float) – the smallest step on Y axis is the minimum distance that could be tested by the algorithm
  • fDeltaRotation (float) – the initial step is the first rotation that will be applied and tested by the algorithm
  • fEpsilonRotation (float) – the smallest step is the is minimum rotation that could be tested by the algorithm
  • bResetRegistration (bool) – indicate if the registration matrix should be reseted (a bool)
  • bUseFixReferenceSlice (bool) – indicate if we register on a fixed slice (a bool)
  • nFixReferenceSliceIdx (int) – indicate the fixed slice index (if we register on a fixed slice) (a uint32_t)
  • IProgress (ORSModel.ors.Progress) – the progress bar (an Progress)
resetRegistration(self) → None
setEndOfInterestZone(self, xEnd: int, yEnd: int) → None
Parameters:
  • xEnd (int) –
  • yEnd (int) –
setIsSliceUnmovable(self, zIndex: int, tIndex: int, bUnmovable: bool) → None
Parameters:
  • zIndex (int) –
  • tIndex (int) –
  • bUnmovable (bool) –
setMatrix(self, zIndex: int, tIndex: int, aMatrix: ORSModel.ors.Matrix4x4) → None

Set the transformation matrix from slice (zIndex-1) registered position to slice zIndex registered position.

Parameters:
setMaximumXOffsetBetweenSlice(self, maxOffset: int) → None
Parameters:maxOffset (int) –
setMaximumYOffsetBetweenSlice(self, maxOffset: int) → None
Parameters:maxOffset (int) –
setSimilarityXSampling(self, sampling: int) → None
Parameters:sampling (int) –
setSimilarityYSampling(self, sampling: int) → None
Parameters:sampling (int) –
setStartOfInterestZone(self, xStart: int, yStart: int) → None
Parameters:
  • xStart (int) –
  • yStart (int) –
setTSize(self, tSize: int) → None
Parameters:tSize (int) –
setTranslation(self, zIndex: int, tIndex: int, aVect: ORSModel.ors.Vector3) → None
Parameters:
setZSize(self, zSize: int) → None
Parameters:zSize (int) –

ChannelSliceReplacementHelper

class ORSModel.ors.ChannelSliceReplacementHelper

Bases: ORSModel.ors.Unmanaged

analyzeAndReplaceMarkedSlices(self) → None
canSliceReplacementBePerformed(self) → bool
Returns:output (bool) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

ChannelSliceReplacementHelper.__init__() -> ChannelSliceReplacementHelper

setChannel(self, pIInputChannel: ORSModel.ors.Channel) → None
Parameters:pIInputChannel (ORSModel.ors.Channel) –
setTime(self, value: int) → None
Parameters:value (int) –

Circle

class ORSModel.ors.Circle

Bases: ORSModel.ors.Shape2D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010

copy(self) → Circle

Copies aCircle.

Note

The copied Circle has the same equation as the source Circle.

Returns:output (ORSModel.ors.Circle) – A new Circle (an Circle)
createFromPythonRepresentation(aPythonRepresentation: str) → Circle

Create aCircle from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Circle) –
from3Points(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3, point2: ORSModel.ors.Vector3) → None

Initializes theCircle from 3 points.

Parameters:
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set aCircle from a python representation

Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getArea(self) → float
Returns:output (float) –
getCenter(self) → Vector3

Returns the normal of theCircle.

Returns:output (ORSModel.ors.Vector3) – A vector (an Vector3)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getIntersectionWithLine(self, aLine: ORSModel.ors.Line) → Vector3

Return the vector representing the intersection of the provided line and the receiver.

Parameters:aLine (ORSModel.ors.Line) –
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if not intersection
getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) → Vector3

Return the vector representing the intersection of the provided line and the receiver.

Parameters:aLineSegment (ORSModel.ors.LineSegment) –
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if not intersection
getIntersectionWithPlane(self, aPlane: ORSModel.ors.Plane) → LineSegment

Return the vector representing the intersection of the provided line and the receiver.

Parameters:aPlane (ORSModel.ors.Plane) –
Returns:output (ORSModel.ors.LineSegment) – a vector (an Vector3) or NULL if not intersection
getIsEqualTo(self, Circle: ORSModel.ors.Circle) → bool
Parameters:Circle (ORSModel.ors.Circle) –
Returns:output (bool) –
getNormal(self) → Vector3

Returns the normal of theCircle.

Returns:output (ORSModel.ors.Vector3) – A vector (an Vector3)
getPlane(self) → Plane
Returns:output (ORSModel.ors.Plane) –
getPythonRepresentation(self) → str
Returns:output (str) –
getRadius(self) → float
Returns:output (float) –
getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → Circle
Parameters:
Returns:

output (ORSModel.ors.Circle) –

none()

Circle.__init__() -> Circle

rotate(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → None

Applies a rotation to the receiver.

Note

The box is a right handed bounded referential.

Parameters:
  • axisInWorld (ORSModel.ors.Vector3) – a rotation axis (an Vector3)
  • aroundPointInWorld (ORSModel.ors.Vector3) – a center of rotation (an Vector3)
  • angleInRadian (float) – an angle in radian (a double)
setCenter(self, aCenter: ORSModel.ors.Vector3) → None
Parameters:aCenter (ORSModel.ors.Vector3) –
setNormal(self, aNormal: ORSModel.ors.Vector3) → None

Returns the normal of theCircle.

Parameters:aNormal (ORSModel.ors.Vector3) –
setRadius(self, aRadius: float) → None
Parameters:aRadius (float) –

Collection

class ORSModel.ors.Collection

Bases: ORSModel.ors.Managed

brief_description: Abstraction class for collections. author: Normand Mongeau. version: 1.0 Abstraction class for collections. The main difference between collections and arrays is that with collections, you do not need to worry about the capacity, you can just add elements; while for arrays you need to manage the size yourself.

applyLinearTransformation(self, slope: float, offset: float) → None
Parameters:
  • slope (float) –
  • offset (float) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getSize(self) → int
Returns:output (int) –
none()

Collection.__init__() -> Collection

Color

class ORSModel.ors.Color

Bases: ORSModel.ors.Unmanaged

brief_description: Wraps and defines colors. author: N Mongeau All other members of ORS participated. version: 1.0 date: December 2015 Defines a color. Colors are composed of components, each stored in the form of a double between 0 and 1. Colors can have as many components as wanted, but slots 0 to 3 are reserved for red, green, blue and alpha. Any additional component should thus be stored starting at index 4.

createFromPythonRepresentation(aPythonRepresentation: str) → Color

Create an OrientedPlane from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Color) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set an OrientedPlane from a python representation

Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
fromQColor(qColor)
getAlpha(self) → float

Gets the alpha component of the color.

Note

Color components are expressed as values between 0 and 1.

Returns:output (float) – the alpha value (a double)
getAsQColor()
getBlue(self) → float

Gets the blue component of the color.

Note

Color components are expressed as values between 0 and 1.

Returns:output (float) – the blue value (a double)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getComponentAtIndex(self, index: int) → float

Gets a component of the color.

Note

Color components are expressed as values between 0 and 1.

Note

Color components indexes are zero-based.

Parameters:index (int) – the component index (a uint16_t)
Returns:output (float) – a double value
getComponentCount(self) → int

Gets the number of component of the color.

Returns:output (int) – the component count (a uint16_t)
getComponents(self) → ArrayDouble

Gets all the components of the color.

Note

Color components are expressed as values between 0 and 1.

Returns:output (ORSModel.ors.ArrayDouble) – a double array (an ArrayDouble)
getGreen(self) → float

Gets the green component of the color.

Note

Color components are expressed as values between 0 and 1.

Returns:output (float) – the green value (a double)
getIsEqualTo(self, aColor: ORSModel.ors.Color) → bool

Checks for equality to another color.

Parameters:aColor (ORSModel.ors.Color) – a color (a Color)
Returns:output (bool) – true if the colors are equal, false otherwise
getPythonRepresentation(self) → str

Gets a Python evaluable string representation.

Returns:output (str) –
getRed(self) → float

Gets the red component of the color.

Note

Color components are expressed as values between 0 and 1.

Returns:output (float) – the red value (a double)
none()

Color.__init__() -> Color

setAlpha(self, alpha: float) → None

Sets the alpha component of the color.

Note

Color components are expressed as values between 0 and 1.

Parameters:alpha (float) – the alpha value (a double)
setBlue(self, blue: float) → None

Sets the blue component of the color.

Note

Color components are expressed as values between 0 and 1.

Parameters:blue (float) – the blue value (a double)
setComponentAtIndex(self, index: int, component: float) → None

Sets a component of the color.

Note

Color components are expressed as values between 0 and 1.

Note

Color components indexes are zero-based.

Parameters:
  • index (int) – the component index (a uint16_t)
  • component (float) – a double value
setComponents(self, components: ORSModel.ors.ArrayDouble) → None

Sets all the components of the color.

Note

Color components are expressed as values between 0 and 1.

Parameters:components (ORSModel.ors.ArrayDouble) – a double array (an ArrayDouble)
setGreen(self, green: float) → None

Sets the green component of the color.

Note

Color components are expressed as values between 0 and 1.

Parameters:green (float) – the green value (a double)
setRed(self, red: float) → None

Sets the red component of the color.

Note

Color components are expressed as values between 0 and 1.

Parameters:red (float) – the red value (a double)

ConvolutionHelper

class ORSModel.ors.ConvolutionHelper

Bases: ORSModel.ors.Unmanaged

fastGaussian2D(self, pInputChannel: ORSModel.ors.Channel, nMinZ: int, nMaxZ: int, nMinT: int, nMaxT: int, pKernelSize: int, standarDeviation: float, nBorderHandling: int, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

get1DConvolution(self, inputValues: ORSModel.ors.Array, pKernel: ORSModel.ors.ConvolutionKernel, nBorderHandling: int, values: ORSModel.ors.Array) → Array

Convolutes a given 1D kernel through a Float array.

Note

The convolution’s size needs to be an odd number.

Note

The kernel is a one dimension array where the dimension is of equal size to the convolution.

Note

If a Float array is supplied as the last argument, the results are written to it, otherwise a new array is created.

Parameters:
  • inputValues (ORSModel.ors.Array) – the input array (an Array)
  • pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel, see note below)
  • nBorderHandling (int) – The border handling algorithm to use(an int). One of: CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution. CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then convolve the central image using portions of the adjacent tiles at the borders. CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation.
  • values (ORSModel.ors.Array) – an optional output array to fill (an Array)
Returns:

output (ORSModel.ors.Array) – the resulting output array (an Array)

get1DMedian(self, inputValues: ORSModel.ors.Array, kernelSize: int, nBorderHandling: int, values: ORSModel.ors.Array) → Array
Parameters:
Returns:

output (ORSModel.ors.Array) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getConvolution(self, pInputChannel: ORSModel.ors.Channel, nMinZ: int, nMaxZ: int, nMinT: int, nMaxT: int, pKernel: ORSModel.ors.ConvolutionKernel, nBorderHandling: int, nOutputChannelDatatype: int, bLeaveDataOfOutChannelOutsizeZRangeUnaffected: bool, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Convolutes a given 2D kernel through the channel’s data.

Note

The convolution’s size needs to be an odd number.

Note

The kernel is a two dimensional array where each dimension is of equal size to the convolution. Thus a convolution size of 5 needs a kernel of 5 x 5. It should be arranged in [y][x] order.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created of the size of the input channel.

Parameters:
  • pInputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • nMinZ (int) – the minimal z slice index (an int)
  • nMaxZ (int) – the maximal z slice index (an int)
  • nMinT (int) – the kernel (a double**, see note below)
  • nMaxT (int) – the convolution’s size (a short)
  • pKernel (ORSModel.ors.ConvolutionKernel) – The border handling algorithm to use(an int). One of: CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution. CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then convolve the central image using portions of the adjacent tiles at the borders. CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation.
  • nBorderHandling (int) – a progress object (an Progress)
  • nOutputChannelDatatype (int) – an optional output channel to fill(an Channel)
  • bLeaveDataOfOutChannelOutsizeZRangeUnaffected (bool) –
  • IProgress (ORSModel.ors.Progress) –
  • pOutChannel (ORSModel.ors.Channel) –
Returns:

output (ORSModel.ors.Channel) – the resulting channel (an Channel)

getConvolutionSubsetOnOther(self, pInputChannel: ORSModel.ors.Channel, xMinInput: int, yMinInput: int, zMinInput: int, tMinInput: int, xSize: int, ySize: int, zSize: int, tSize: int, xMinOutput: int, yMinOutput: int, zMinOutput: int, tMinOutput: int, pKernel: ORSModel.ors.ConvolutionKernel, nBorderHandling: int, nOutputChannelDatatypeIfOutputChannelIsNull: int, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Convolutes a given 1D, 2D or 3D kernel through the channel’s data.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created of the minimal size needed to agree with the indexes of output specified.

Parameters:
  • pInputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • xMinInput (int) – the minimal x index of the input channel to compute the convolution on (an unsigned int)
  • yMinInput (int) – the minimal y index of the input channel to compute the convolution on (an unsigned int)
  • zMinInput (int) – the minimal z (slice) index of the input channel to compute the convolution on (an unsigned int)
  • tMinInput (int) – the minimal t (time) index of the input channel to compute the convolution on (an unsigned int)
  • xSize (int) – the number of pixels to compute in x (an unsigned int)
  • ySize (int) – the number of pixels to compute in y (an unsigned int)
  • zSize (int) – the number of pixels to compute in z (an unsigned int)
  • tSize (int) – the number of time steps to compute (an unsigned int)
  • xMinOutput (int) – the minimal x index of the output channel to write the result in (an unsigned int)
  • yMinOutput (int) – the minimal y index of the output channel to write the result in (an unsigned int)
  • zMinOutput (int) – the minimal z index of the output channel to write the result in (an unsigned int)
  • tMinOutput (int) – the minimal t index of the output channel to write the result in (an unsigned int)
  • pKernel (ORSModel.ors.ConvolutionKernel) – the kernel
  • nBorderHandling (int) – The border handling algorithm to use(an int). One of: CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution. CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then convolve the central image using portions of the adjacent tiles at the borders. CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation.
  • nOutputChannelDatatypeIfOutputChannelIsNull (int) – the data type of the output channel, if the output channel is not given
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
  • pOutChannel (ORSModel.ors.Channel) – an optional output channel to fill(an Channel)
Returns:

output (ORSModel.ors.Channel) – the resulting channel (an Channel)

getConvolutionSubsetOnSelf(self, pInputChannel: ORSModel.ors.Channel, xMinInput: int, yMinInput: int, zMinInput: int, tMinInput: int, xSize: int, ySize: int, zSize: int, tSize: int, pKernel: ORSModel.ors.ConvolutionKernel, nBorderHandling: int, IProgress: ORSModel.ors.Progress) → None

Convolutes a given 1D, 2D or 3D kernel through the channel’s data.

Parameters:
  • pInputChannel (ORSModel.ors.Channel) – the input channel (an Channel), in which the result is written
  • xMinInput (int) – the minimal x index of the input channel to compute the convolution on (an unsigned int)
  • yMinInput (int) – the minimal y index of the input channel to compute the convolution on (an unsigned int)
  • zMinInput (int) – the minimal z (slice) index of the input channel to compute the convolution on (an unsigned int)
  • tMinInput (int) – the minimal t (time) index of the input channel to compute the convolution on (an unsigned int)
  • xSize (int) – the number of pixels to compute in x (an unsigned int)
  • ySize (int) – the number of pixels to compute in y (an unsigned int)
  • zSize (int) – the number of pixels to compute in z (an unsigned int)
  • tSize (int) – the number of time steps to compute (an unsigned int)
  • pKernel (ORSModel.ors.ConvolutionKernel) – the kernel
  • nBorderHandling (int) – The border handling algorithm to use(an int). One of: CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution. CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then convolve the central image using portions of the adjacent tiles at the borders. CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation.
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
getMaximumSubsetOnOther(self, pInputChannel: ORSModel.ors.Channel, xMinInput: int, yMinInput: int, zMinInput: int, tMinInput: int, xSize: int, ySize: int, zSize: int, tSize: int, xMinOutput: int, yMinOutput: int, zMinOutput: int, tMinOutput: int, pKernel: ORSModel.ors.ConvolutionKernel, nBorderHandling: int, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Gets the maximum value over a given 1D, 2D or 3D kernel through the channel’s data.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created of the minimal size needed to agree with the indexes of output specified.

Parameters:
  • pInputChannel (ORSModel.ors.Channel) – the input channel (a Channel)
  • xMinInput (int) – the minimal x index of the input channel to evaluate the maximum value on (a uint32_t)
  • yMinInput (int) – the minimal y index of the input channel to evaluate the maximum value on (a uint32_t)
  • zMinInput (int) – the minimal z (slice) index of the input channel to evaluate the maximum value on (a uint32_t)
  • tMinInput (int) – the minimal t (time) index of the input channel to evaluate the maximum value on (a uint32_t)
  • xSize (int) – the number of pixels to evaluate in x (a uint32_t)
  • ySize (int) – the number of pixels to evaluate in y (a uint32_t)
  • zSize (int) – the number of pixels to evaluate in z (a uint32_t)
  • tSize (int) – the number of time steps to evaluate (a uint32_t)
  • xMinOutput (int) – the minimal x index of the output channel to write the result in (a uint32_t)
  • yMinOutput (int) – the minimal y index of the output channel to write the result in (a uint32_t)
  • zMinOutput (int) – the minimal z index of the output channel to write the result in (a uint32_t)
  • tMinOutput (int) – the minimal t index of the output channel to write the result in (a uint32_t)
  • pKernel (ORSModel.ors.ConvolutionKernel) – the kernel
  • nBorderHandling (int) – The border handling algorithm to use(a uint16_t). One of: CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the data. CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then evalutes the central image using portions of the adjacent tiles at the borders. CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation.
  • IProgress (ORSModel.ors.Progress) – a progress object (a Progress)
  • pOutChannel (ORSModel.ors.Channel) – an optional output channel to fill (a Channel)
Returns:

output (ORSModel.ors.Channel) – the resulting channel (a Channel)

getMedian(self, pInputChannel: ORSModel.ors.Channel, nMinZ: int, nMaxZ: int, nMinT: int, nMaxT: int, pKernel: ORSModel.ors.ConvolutionKernel, nBorderHandling: int, nOutputChannelDatatype: int, bLeaveDataOfOutChannelOutsizeZRangeUnaffected: bool, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getMinimumSubsetOnOther(self, pInputChannel: ORSModel.ors.Channel, xMinInput: int, yMinInput: int, zMinInput: int, tMinInput: int, xSize: int, ySize: int, zSize: int, tSize: int, xMinOutput: int, yMinOutput: int, zMinOutput: int, tMinOutput: int, pKernel: ORSModel.ors.ConvolutionKernel, nBorderHandling: int, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) → Channel

Gets the minimum value over a given 1D, 2D or 3D kernel through the channel’s data.

Note

If a channel is supplied as the last argument, the results are written to it, otherwise a new channel is created of the minimal size needed to agree with the indexes of output specified.

Parameters:
  • pInputChannel (ORSModel.ors.Channel) – the input channel (a Channel)
  • xMinInput (int) – the minimal x index of the input channel to evaluate the minimum value on (a uint32_t)
  • yMinInput (int) – the minimal y index of the input channel to evaluate the minimum value on (a uint32_t)
  • zMinInput (int) – the minimal z (slice) index of the input channel to evaluate the minimum value on (a uint32_t)
  • tMinInput (int) – the minimal t (time) index of the input channel to evaluate the minimum value on (a uint32_t)
  • xSize (int) – the number of pixels to evaluate in x (a uint32_t)
  • ySize (int) – the number of pixels to evaluate in y (a uint32_t)
  • zSize (int) – the number of pixels to evaluate in z (a uint32_t)
  • tSize (int) – the number of time steps to evaluate (a uint32_t)
  • xMinOutput (int) – the minimal x index of the output channel to write the result in (a uint32_t)
  • yMinOutput (int) – the minimal y index of the output channel to write the result in (a uint32_t)
  • zMinOutput (int) – the minimal z index of the output channel to write the result in (a uint32_t)
  • tMinOutput (int) – the minimal t index of the output channel to write the result in (a uint32_t)
  • pKernel (ORSModel.ors.ConvolutionKernel) – the kernel
  • nBorderHandling (int) – The border handling algorithm to use(a uint16_t). One of: CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the data. CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then evalutes the central image using portions of the adjacent tiles at the borders. CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation.
  • IProgress (ORSModel.ors.Progress) – a progress object (a Progress)
  • pOutChannel (ORSModel.ors.Channel) – an optional output channel to fill (a Channel)
Returns:

output (ORSModel.ors.Channel) – the resulting channel (a Channel)

getPaddingValue(self) → float
Returns:output (float) –
getZOffsetInputToOutputWithOutsideZRangeUnaffected(self) → int
Returns:output (int) –
none()

ConvolutionHelper.__init__() -> ConvolutionHelper

setPaddingValue(self, aValue: float) → None
Parameters:aValue (float) –
setZOffsetInputToOutputWithOutsideZRangeUnaffected(self, aValue: int) → None
Parameters:aValue (int) –

ConvolutionKernel

class ORSModel.ors.ConvolutionKernel

Bases: ORSModel.ors.Unmanaged

createFromPythonRepresentation(aPythonRepresentation: str) → ConvolutionKernel

Create aConvolutionKernel from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.ConvolutionKernel) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set aConvolutionKernel from a python representation

Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getElementSummation(self) → float
Returns:output (float) –
getIs1DKernel(self) → bool
Returns:output (bool) –
getIs2DKernel(self) → bool
Returns:output (bool) –
getIs3DKernel(self) → bool
Returns:output (bool) –
getIsEqualTo(self, aConvolutionKernel: ORSModel.ors.ConvolutionKernel) → bool

Checks for equality to another kernel.

Parameters:aConvolutionKernel (ORSModel.ors.ConvolutionKernel) – a kernel (a ConvolutionKernel)
Returns:output (bool) – TRUE if the kernels are equal, FALSE otherwise
getKernelStarPoint(self, pIndexX: int, pIndexY: int, pIndexZ: int) → None
Parameters:
  • pIndexX (int) –
  • pIndexY (int) –
  • pIndexZ (int) –
getKernelXSize(self) → int
Returns:output (int) –
getKernelYSize(self) → int
Returns:output (int) –
getKernelZSize(self) → int
Returns:output (int) –
getPythonRepresentation(self) → str
Returns:output (str) –
getValueAt(self, indexX: int, indexY: int, indexZ: int) → float
Parameters:
  • indexX (int) –
  • indexY (int) –
  • indexZ (int) –
Returns:

output (float) –

initializeAs1DKernel(self, indexX: int) → None
Parameters:indexX (int) –
initializeAs2DKernel(self, indexX: int, indexY: int) → None
Parameters:
  • indexX (int) –
  • indexY (int) –
initializeAs3DKernel(self, indexX: int, indexY: int, indexZ: int) → None
Parameters:
  • indexX (int) –
  • indexY (int) –
  • indexZ (int) –
multiplyAllElementBy(self, aValue: float) → None
Parameters:aValue (float) –
none()

ConvolutionKernel.__init__() -> ConvolutionKernel

setAsGaussianWithMinimumUnnormalizedSmallestValue(self, aValue: float) → None
Parameters:aValue (float) –
setAsGaussianWithStandarDeviation(self, sigma: float) → None
Parameters:sigma (float) –
setKernelStarPoint(self, indexX: int, indexY: int, indexZ: int) → None
Parameters:
  • indexX (int) –
  • indexY (int) –
  • indexZ (int) –
setValueAt(self, indexX: int, indexY: int, indexZ: int, aValue: float) → None
Parameters:
  • indexX (int) –
  • indexY (int) –
  • indexZ (int) –
  • aValue (float) –

Cursor3D

class ORSModel.ors.Cursor3D

Bases: ORSModel.ors.Visual

brief_description: A visual artifact used to illustrate a position in a 3D referential. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

getActivePlaneColor(self) → Color

Gets the active plane color of the 3D cursor.

Note

The color is expressed in RGB fashion.

Returns:output (ORSModel.ors.Color) – a color (an Color)
getAllHighlightedViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View) → List
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (ORSModel.ors.List) –
getAllHighlightedViewLineInView(self, pCurrentDisplay: ORSModel.ors.View) → List
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (ORSModel.ors.List) –
getAllHighlightedViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View) → List
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (ORSModel.ors.List) –
getAllParentViewsExcludingCurrent(self, pCurrentDisplay: ORSModel.ors.View) → List
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (ORSModel.ors.List) –
getAllParentViewsExcludingCurrentCount(self, pCurrentDisplay: ORSModel.ors.View) → int
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (int) –
getAllShownViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View) → List
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (ORSModel.ors.List) –
getAllShownViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View) → List
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (ORSModel.ors.List) –
getAnyHighlightedViewLineInView(self, pCurrentDisplay: ORSModel.ors.View) → bool
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (bool) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getColor(self) → Color

Gets the color of the 3D cursor.

Note

The color is expressed in RGB fashion.

Returns:output (ORSModel.ors.Color) – a color (an Color)
getCrossHairMode(self) → int

Gets the crosshair mode of the 3D cursor.

Note

See the Cxv3DCursor_Crosshair enum in the ORS_def.h header file for valid crosshair modes.

Returns:output (int) – a crosshair mode (a int32_t)
getCrossHairWidth(self) → float
Returns:output (float) –
getHideReferenceLinesInCurrentView(self) → bool
Returns:output (bool) –
getHighlightedCircleInView(self, pCurrentDisplay: ORSModel.ors.View) → bool
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (bool) –
getHighlightedObliqueSliderInView(self, pCurrentDisplay: ORSModel.ors.View) → bool
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (bool) –
getIsHighlightedViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) → bool
Parameters:
Returns:

output (bool) –

getIsHighlightedViewLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) → bool
Parameters:
Returns:

output (bool) –

getIsHighlightedViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) → bool
Parameters:
Returns:

output (bool) –

getIsShowViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) → bool
Parameters:
Returns:

output (bool) –

getIsShowViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) → bool
Parameters:
Returns:

output (bool) –

getLineThickness(self) → float

Gets the line thickness (in screen one thousandths)

Returns:output (float) –
getMiddleHoleSize(self) → float

Gets the size of the blank hole in the middle of the 3D cursor (in screen one thousandths)

Returns:output (float) –
getPickAnchor(self, pDisplay: ORSModel.ors.View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → View

Picks for an anchor in the given display.

Parameters:
  • pDisplay (ORSModel.ors.View) – a display (an View)
  • pixelXPositionInDisplay (int) –
  • pixelYPositionInDisplay (int) –
Returns:

output (ORSModel.ors.View) – aView

getPickMIPAnchor(self, pDisplay: ORSModel.ors.View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → View
Parameters:
  • pDisplay (ORSModel.ors.View) –
  • pixelXPositionInDisplay (int) –
  • pixelYPositionInDisplay (int) –
Returns:

output (ORSModel.ors.View) –

getPickMPRAnchor(self, pDisplay: ORSModel.ors.View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → View
Parameters:
  • pDisplay (ORSModel.ors.View) –
  • pixelXPositionInDisplay (int) –
  • pixelYPositionInDisplay (int) –
Returns:

output (ORSModel.ors.View) –

getPickObliqueCircleAnchor(self, pDisplay: ORSModel.ors.View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → bool
Parameters:
  • pDisplay (ORSModel.ors.View) –
  • pixelXPositionInDisplay (int) –
  • pixelYPositionInDisplay (int) –
Returns:

output (bool) –

getPickObliqueSliderAnchor(self, pDisplay: ORSModel.ors.View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → int
Parameters:
  • pDisplay (ORSModel.ors.View) –
  • pixelXPositionInDisplay (int) –
  • pixelYPositionInDisplay (int) –
Returns:

output (int) –

getPosition(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getShowAllSynchStudyReferenceLines(self) → bool
Returns:output (bool) –
getShowCircleForView(self, pCurrentDisplay: ORSModel.ors.View) → bool
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (bool) –
getShowFirstLastSynchStudyReferenceLines(self) → bool
Returns:output (bool) –
getShowObliqueSliderForView(self, pCurrentDisplay: ORSModel.ors.View) → bool
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (bool) –
getShowSynchStudyReferenceLine(self) → bool
Returns:output (bool) –
getSynchronizedMode(self) → bool
Returns:output (bool) –
getViewsDefineAValidCursorPosition(self, pCurrentDisplay: ORSModel.ors.View) → bool
Parameters:pCurrentDisplay (ORSModel.ors.View) –
Returns:output (bool) –
hideAllCircle(self) → None
hideAllMIPLine(self) → None
hideAllObliqueSlider(self) → None
hideAllViewAnchors(self) → None
none()

Cursor3D.__init__() -> Cursor3D

setActivePlaneColor(self, IColor: ORSModel.ors.Color) → None

Sets the active plane color of the 3D cursor.

Note

The color is expressed in RGB fashion.

Parameters:IColor (ORSModel.ors.Color) – a color (an Color)
setColor(self, IColor: ORSModel.ors.Color) → None

Sets the color of the 3D cursor.

Note

The color is expressed in RGB fashion.

Parameters:IColor (ORSModel.ors.Color) – a color (an Color)
setCrossHairMode(self, iMode: int) → None

Sets the crosshair mode of the 3D cursor.

Note

See the Cxv3DCursor_Crosshair enum in the ORS_def.h header file for valid crosshair modes.

Parameters:iMode (int) – a crosshair mode (a int32_t*)
setCrossHairWidth(self, value: float) → None
Parameters:value (float) –
setCursorPositionFromParentView(self, pDisplay: ORSModel.ors.View) → bool
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (bool) –
setHideReferenceLinesInCurrentView(self, value: bool) → None
Parameters:value (bool) –
setHighlightedCircleInView(self, pCurrentDisplay: ORSModel.ors.View, highlight: bool) → None
Parameters:
setHighlightedObliqueSliderInView(self, pCurrentDisplay: ORSModel.ors.View, highlight: bool) → None
Parameters:
setHighlightedViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, highlight: bool) → None
Parameters:
setHighlightedViewLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, highlight: bool) → None
Parameters:
setHighlightedViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, highlight: bool) → None
Parameters:
setLineThickness(self, value: float) → None

Sets the line thickness (in screen one thousandths)

Parameters:value (float) –
setMiddleHoleSize(self, value: float) → None

Sets the size of the blank hole in the middle of the 3D cursor (in screen one thousandths)

Parameters:value (float) –
setPosition(self, pPosition: ORSModel.ors.Vector3) → None

Sets the position of the 3D cursor.

Parameters:pPosition (ORSModel.ors.Vector3) – a screen position (an Vector3)
setShowAllSynchStudyReferenceLines(self, value: bool) → None
Parameters:value (bool) –
setShowCircleInView(self, pCurrentDisplay: ORSModel.ors.View, showC: bool) → None
Parameters:
setShowFirstLastSynchStudyReferenceLines(self, value: bool) → None
Parameters:value (bool) –
setShowObliqueSliderInView(self, pCurrentDisplay: ORSModel.ors.View, showO: bool) → None
Parameters:
setShowSynchStudyReferenceLine(self, value: bool) → None
Parameters:value (bool) –
setShowViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, showA: bool) → None
Parameters:
setShowViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, showA: bool) → None
Parameters:
setSynchronizedMode(self, aBool: bool) → None
Parameters:aBool (bool) –
unHighlightedAllCircle(self) → None
unHighlightedAllMIPLine(self) → None
unHighlightedAllObliqueSlider(self) → None
unHighlightedAllViewAnchors(self) → None
unHighlightedAllViewLine(self) → None

Cylinder

class ORSModel.ors.Cylinder

Bases: ORSModel.ors.Shape3D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010

copy(self) → Cylinder

Copies aCylinder.

Note

The copied Cylinder has the same equation as the source Cylinder.

Returns:output (ORSModel.ors.Cylinder) – A new Cylinder (an Cylinder)
createFromPythonRepresentation(aPythonRepresentation: str) → Cylinder

Create aCylinder from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Cylinder) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set aCylinder from a python representation

Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getAxis(self) → Vector3

Returns the normal of theCylinder.

Returns:output (ORSModel.ors.Vector3) – A vector (an Vector3)
getCap1Center(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getCap2Center(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getCenter(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getHeight(self) → float

GetsCylinder Height.

Returns:output (float) – An Height (a double)
getIntersectionWithLine(self, aLine: ORSModel.ors.Line) → LineSegment

Return the vector representing the intersection of the provided line segment and the receiver.

Parameters:aLine (ORSModel.ors.Line) –
Returns:output (ORSModel.ors.LineSegment) – a vector (an Vector3) or NULL if not intersection
getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) → LineSegment

Return the vector representing the intersection of the provided line segment and the receiver.

Parameters:aLineSegment (ORSModel.ors.LineSegment) –
Returns:output (ORSModel.ors.LineSegment) – a vector (an Vector3) or NULL if not intersection
getIsEqualTo(self, Cylinder: ORSModel.ors.Cylinder) → bool

Verifies equality between the receiver and a givenCylinder.

Parameters:Cylinder (ORSModel.ors.Cylinder) –
Returns:output (bool) – TRUE if the argument Cylinder is equal to the receiver, FALSE otherwise
getPythonRepresentation(self) → str
Returns:output (str) –
getRadius(self) → float
Returns:output (float) –
getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → Cylinder
Parameters:
Returns:

output (ORSModel.ors.Cylinder) –

getSurface(self) → float

GetsCylinder Surface.

Returns:output (float) – A Surface (a double)
getVolume(self) → float

GetsCylinder Volume.

Returns:output (float) – A Volume (a double)
none()

Cylinder.__init__() -> Cylinder

rotate(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → None

Applies a rotation to the receiver.

Note

The box is a right handed bounded referential.

Parameters:
  • axisInWorld (ORSModel.ors.Vector3) – a rotation axis (an Vector3)
  • aroundPointInWorld (ORSModel.ors.Vector3) – a center of rotation (an Vector3)
  • angleInRadian (float) – an angle in radian (a double)
setCap1Center(self, aPoint: ORSModel.ors.Vector3) → None
Parameters:aPoint (ORSModel.ors.Vector3) –
setCap2Center(self, aPoint: ORSModel.ors.Vector3) → None
Parameters:aPoint (ORSModel.ors.Vector3) –
setCenter(self, aPoint: ORSModel.ors.Vector3) → None
Parameters:aPoint (ORSModel.ors.Vector3) –
setRadius(self, aRadius: float) → None
Parameters:aRadius (float) –
transform(self, transformationMatrix: ORSModel.ors.Matrix4x4) → None

Applies a transformation to the receiver.

Note

The transformation can include: translation, rotation and scaling.

Parameters:transformationMatrix (Matrix4x4) – a transformation matrix (an Matrix4x4)

DatasetPresenter

class ORSModel.ors.DatasetPresenter

Bases: ORSModel.ors.Visual

get2DWindowLevel2Center(self) → float
Returns:output (float) –
get2DWindowLevel2Max(self) → float
Returns:output (float) –
get2DWindowLevel2Min(self) → float
Returns:output (float) –
get2DWindowLevel2Range(self, fMin: float, fMax: float) → None

Gets the current second level 2D window level values range.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Note

Return values are written to the supplied arguments.

Returns:
  • fMin (float) – The lower range value (a double)
  • fMax (float) – The upper range value (a double)
get2DWindowLevel2Values(self, pWindowWidth: float, pWindowCenter: float) → None

Gets the second 2D window level values for the double leveling mode.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

Return values are written to the supplied arguments.

Parameters:
  • pWindowWidth (float) –
  • pWindowCenter (float) –
get2DWindowLevel2Width(self) → float
Returns:output (float) –
get2DWindowLevelCenterForAllViews(self) → float
Returns:output (float) –
get2DWindowLevelCenterForView(self, pDisplay: ORSModel.ors.View) → float
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (float) –
get2DWindowLevelMaxForAllViews(self) → float
Returns:output (float) –
get2DWindowLevelMaxForView(self, pDisplay: ORSModel.ors.View) → float
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (float) –
get2DWindowLevelMinForAllViews(self) → float
Returns:output (float) –
get2DWindowLevelMinForView(self, pDisplay: ORSModel.ors.View) → float
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (float) –
get2DWindowLevelRangeForAllViews(self, pMin: float, pMax: float) → None

Gets the current 2D window level range values, for all displays.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Note

Return values are written to the supplied arguments.

Returns:
  • pMin (float) – The current 2D window level range lower value (a double)
  • pMax (float) – The current 2D window level range supper value (a double)
get2DWindowLevelRangeForView(self, pDisplay: ORSModel.ors.View, pMin: float, pMax: float) → None

Gets the current 2D window level range values.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Note

Return values are written to the supplied arguments.

Parameters:

pMax (float) –

Returns:
  • pDisplay (ORSModel.ors.View) – The current 2D window level range lower value (a double)
  • pMin (float) – The current 2D window level range supper value (a double)
get2DWindowLevelValuesForAllViews(self, pWindowWidth: float, pWindowCenter: float) → None

Gets the current 3D window level values (width and center) for all displays.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

Return values are written to the supplied arguments.

Returns:
  • pWindowWidth (float) – the window level width (a double*)
  • pWindowCenter (float) – the window level center (a double*)
get2DWindowLevelValuesForView(self, pDisplay: ORSModel.ors.View, pWindowWidth: float, pWindowCenter: float) → None

Gets the current 2D window level values (width and center) for a given display.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

Return values are written to the supplied arguments.

Parameters:

pDisplay (ORSModel.ors.View) – the display (an View)

Returns:
  • pWindowWidth (float) – the window level width (a double*)
  • pWindowCenter (float) – the window level center (a double*)
get2DWindowLevelWidthForAllViews(self) → float
Returns:output (float) –
get2DWindowLevelWidthForView(self, pDisplay: ORSModel.ors.View) → float
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (float) –
get3DWindowLevelCenterForAllViews(self) → float
Returns:output (float) –
get3DWindowLevelCenterForView(self, pDisplay: ORSModel.ors.View) → float
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (float) –
get3DWindowLevelMaxForAllViews(self) → float
Returns:output (float) –
get3DWindowLevelMaxForView(self, pDisplay: ORSModel.ors.View) → float
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (float) –
get3DWindowLevelMinForAllViews(self) → float
Returns:output (float) –
get3DWindowLevelMinForView(self, pDisplay: ORSModel.ors.View) → float
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (float) –
get3DWindowLevelRangeForAllViews(self, pMin: float, pMax: float) → None

Gets the current 2D window level range values, for all displays.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Note

Return values are written to the supplied arguments.

Returns:
  • pMin (float) – The current 2D window level range lower value (a double)
  • pMax (float) – The current 2D window level range supper value (a double)
get3DWindowLevelRangeForView(self, IDisplay: ORSModel.ors.View, pMin: float, pMax: float) → None

Gets the current 2D window level range values.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Note

Return values are written to the supplied arguments.

Parameters:

pMax (float) –

Returns:
  • IDisplay (ORSModel.ors.View) – The current 2D window level range lower value (a double)
  • pMin (float) – The current 2D window level range supper value (a double)
get3DWindowLevelValuesForAllViews(self, pWindowWidth: float, pWindowCenter: float) → None

Gets the current 3D window level values (width and center) for all views.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D views.

Note

The values are expressed in physical units.

Note

Return values are written to the supplied arguments.

Returns:
  • pWindowWidth (float) – the window level width (a double*)
  • pWindowCenter (float) – the window level center (a double*)
get3DWindowLevelValuesForView(self, pDisplay: ORSModel.ors.View, pWindowWidth: float, pWindowCenter: float) → None

Gets the current 2D window level values (width and center) for a given display.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

Return values are written to the supplied arguments.

Parameters:

pDisplay (ORSModel.ors.View) – the display (an View)

Returns:
  • pWindowWidth (float) – the window level width (a double*)
  • pWindowCenter (float) – the window level center (a double*)
get3DWindowLevelWidthForAllViews(self) → float
Returns:output (float) –
get3DWindowLevelWidthForView(self, pDisplay: ORSModel.ors.View) → float
Parameters:pDisplay (ORSModel.ors.View) –
Returns:output (float) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getRangeSelectionColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getUseLUTAlphaIn2DForAllViews(self) → bool

Ask the dataset presenter to use the applied lut alpha component.

Returns:output (bool) – bool
getUseLUTAlphaIn2DForView(self, pDisplay: ORSModel.ors.View) → bool

Ask the dataset presenter to use the applied lut alpha component.

Parameters:pDisplay (ORSModel.ors.View) – the view (an View)
Returns:output (bool) – bool
none()

DatasetPresenter.__init__() -> DatasetPresenter

set2DWindowLevel2Range(self, fMin: float, fMax: float) → None

Sets the current second level 2D window level values range.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Parameters:
  • fMin (float) – The lower range value (a double)
  • fMax (float) – The upper range value (a double)
set2DWindowLevel2Values(self, pWindowWidth: float, pWindowCenter: float) → None

Sets the second 2D window level values for the double leveling mode.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values should be expressed in physical units.

Parameters:
  • pWindowWidth (float) – the window width (a float)
  • pWindowCenter (float) – the window center (a float)
set2DWindowLevelRangeForAllViews(self, iMin: float, iMax: float) → None

Sets the current 2D window level values via a range, for all displays.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Parameters:
  • iMin (float) – The lower range value (a double)
  • iMax (float) – The upper range value (a double)
set2DWindowLevelRangeForView(self, pDisplay: ORSModel.ors.View, iMin: float, iMax: float) → None

Sets the current 2D window level values via a range, for a given display.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Parameters:
  • pDisplay (ORSModel.ors.View) – The lower range value (a double)
  • iMin (float) – The upper range value (a double)
  • iMax (float) –
set2DWindowLevelValuesForAllViews(self, iWindowWidth: float, iWindowCenter: float) → None

Sets the current 2D window level values (width and center) for all displays.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values should be expressed in physical units.

Parameters:
  • iWindowWidth (float) – the window width (a double)
  • iWindowCenter (float) – the window center (a double)
set2DWindowLevelValuesForView(self, pDisplay: ORSModel.ors.View, iWindowWidth: float, iWindowCenter: float) → None

Sets the current 3D window level values (width and center).

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values should be expressed in physical units.

Parameters:
  • pDisplay (ORSModel.ors.View) – the display (an View)
  • iWindowWidth (float) – the window level width (a double)
  • iWindowCenter (float) – the window level center (a double)
set3DWindowLevelRangeForAllViews(self, iMin: float, iMax: float) → None

Sets the current 2D window level values via a range, for all displays.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Parameters:
  • iMin (float) – The lower range value (a double)
  • iMax (float) – The upper range value (a double)
set3DWindowLevelRangeForView(self, IDisplay: ORSModel.ors.View, iMin: float, iMax: float) → None

Sets the current 2D window level values via a range, for a given display.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values are expressed in physical units.

Note

The level width and center can be derived from the min/max.

Parameters:
  • IDisplay (ORSModel.ors.View) – The lower range value (a double)
  • iMin (float) – The upper range value (a double)
  • iMax (float) –
set3DWindowLevelValuesForAllViews(self, iWindowWidth: float, iWindowCenter: float) → None

Sets the current 2D window level values (width and center) for all displays.

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values should be expressed in physical units.

Parameters:
  • iWindowWidth (float) – the window width (a double)
  • iWindowCenter (float) – the window center (a double)
set3DWindowLevelValuesForView(self, pDisplay: ORSModel.ors.View, iWindowWidth: float, iWindowCenter: float) → None

Sets the current 3D window level values (width and center).

Note

Volumes support two leveling modes, one for 3D displays and the other for 2D displays.

Note

The values should be expressed in physical units.

Parameters:
  • pDisplay (ORSModel.ors.View) – the display (an View)
  • iWindowWidth (float) – the window level width (a double)
  • iWindowCenter (float) – the window level center (a double)
setRangeSelectionColor(self, IColor: ORSModel.ors.Color) → None
Parameters:IColor (ORSModel.ors.Color) –
setUseLUTAlphaIn2DForAllViews(self, aFlag: bool) → None

Tell the dataset presenter to use the applied lut alpha componenet.

Parameters:aFlag (bool) – bool
setUseLUTAlphaIn2DForView(self, pDisplay: ORSModel.ors.View, aFlag: bool) → None

Tell the dataset presenter to use the applied lut alpha componenet.

Parameters:

Dijkstra

class ORSModel.ors.Dijkstra

Bases: ORSModel.ors.Unmanaged

cleanDistanceMapChannel(self, outputChannel: ORSModel.ors.Channel) → None

Removes boundaries or non reached value from a distance map channel.

Parameters:outputChannel (ORSModel.ors.Channel) – a distance map channel (an Channel)
createDistanceMap(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel) → None

Creates a distance map starting from all the providedROI sources.

Parameters:
  • lOutputChannelDistanceMap (ORSModel.ors.Channel) – the distance map generated by the Dijkstra algorithm (an Channel)
  • lOutputChannelTraceBack (ORSModel.ors.Channel) – a traceback channel, can be NULL (an Channel)
  • lOutputChannelLabel (ORSModel.ors.Channel) – a label channel, can be NULL (an Channel)
createDistanceMapForMaxDistance(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, maxDistance: float, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, continueDijkstra: bool) → None

Creates a distance map until a providedDijkstra distance is reached, starting from all the provided ROI sources.

Parameters:
  • lOutputChannelDistanceMap (ORSModel.ors.Channel) – the distance map generated by the Dijkstra algorithm (an Channel)
  • maxDistance (float) – the Dijkstra distance to reach before stopping to process new voxels (a double)
  • lOutputChannelTraceBack (ORSModel.ors.Channel) – a traceback channel, can be NULL (an Channel)
  • lOutputChannelLabel (ORSModel.ors.Channel) – a label channel, can be NULL (an Channel)
  • continueDijkstra (bool) – TRUE if it is not the first time this call is done on this instance of Dijkstra with the same distance map and that the algorithm must continue, FALSE to start over
createDistanceMapForNBIteration(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, forNbIteration: int, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, autoUpdateROI: bool, continueDijkstra: bool) → None

Creates a distance map for a given number of voxels, starting from all the providedROI sources.

Parameters:
  • lOutputChannelDistanceMap (ORSModel.ors.Channel) – the distance map generated by the Dijkstra algorithm (an Channel)
  • forNbIteration (int) – the number of voxels to be processed by the Dijkstra algorithm (an unsigned int)
  • lOutputChannelTraceBack (ORSModel.ors.Channel) – a traceback channel, can be NULL (an Channel)
  • lOutputChannelLabel (ORSModel.ors.Channel) – a label channel, can be NULL (an Channel)
  • autoUpdateROI (bool) – TRUE if the source ROIs should be updated with their diffusion result, FALSE otherwise
  • continueDijkstra (bool) – TRUE if it is not the first time this call is done on this instance of Dijkstra with the same distance map and that the algorithm must continue, FALSE to start over
createDistanceMapUntilAnyPointInTargetRoiIsReached(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, aTargetVolumeROI: ORSModel.ors.ROI, lOutputChannelTraceBack: ORSModel.ors.Channel, continueDijkstra: bool) → None

Creates a distance map until any stop point provided in aROI are reached, starting from all the provided ROI sources.

Parameters:
  • lOutputChannelDistanceMap (ORSModel.ors.Channel) – the distance map generated by the Dijkstra algorithm (an Channel)
  • aTargetVolumeROI (ORSModel.ors.ROI) – TODO DOCUMENT_ME
  • lOutputChannelTraceBack (ORSModel.ors.Channel) – a traceback channel, can be None (a Channel)
  • continueDijkstra (bool) – a label channel, can be None (a Channel)
createDistanceMapUntilPointInWorldCoordinatesIsReached(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, xStopPointInWorld: float, yStopPointInWorld: float, zStopPointInWorld: float, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, continueDijkstra: bool) → None

Creates a distance map until a stop point provided in world coordinates is reached, starting from all the providedROI sources.

Parameters:
  • lOutputChannelDistanceMap (ORSModel.ors.Channel) – the distance map generated by the Dijkstra algorithm (an Channel)
  • xStopPointInWorld (float) – X position of a world coordinate
  • yStopPointInWorld (float) – Y position of a world coordinate
  • zStopPointInWorld (float) – Z position of a world coordinate
  • lOutputChannelTraceBack (ORSModel.ors.Channel) – the number of voxels to be processed after the stop condition is matched (an uint32_t)
  • lOutputChannelLabel (ORSModel.ors.Channel) – a traceback channel, can be NULL (an Channel)
  • continueDijkstra (bool) – a label channel, can be NULL (an Channel)
createDistanceMapUntilPointsAreReached(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, positionTripleInSourceRef: int, nbPosition: int, waitForNIndex: int, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, breakForAny: bool, continueDijkstra: bool) → None

Creates a distance map until any or all stop points provided are reached, starting from all the providedROI sources.

Parameters:
  • lOutputChannelDistanceMap (ORSModel.ors.Channel) – the distance map generated by the Dijkstra algorithm (an Channel)
  • positionTripleInSourceRef (int) – a collection of x,y,z triplets stop points in input channel referential (an uint32_t*)
  • nbPosition (int) – the number of triplets present in the collection of triplets stop points (an uint32_t)
  • waitForNIndex (int) – the number of voxels to be processed after the stop condition is matched (an uint32_t)
  • lOutputChannelTraceBack (ORSModel.ors.Channel) – a traceback channel, can be NULL (an Channel)
  • lOutputChannelLabel (ORSModel.ors.Channel) – a label channel, can be NULL (an Channel)
  • breakForAny (bool) – TRUE if the algorithm has to stop for any points, FALSE if all the points have to be reached to stop
  • continueDijkstra (bool) – TRUE if it is not the first time this call is done on this instance of Dijkstra with the same distance map and that the algorithm must continue, FALSE to start over
getAlphaParameter(self) → float

Gets the alpha parameter for the metric == 1.

Note

Only useful when metric is set to 1.

Returns:output (float) – the alpha parameter (an double)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEuclideanBias(self) → float

Gets the Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm

Note

Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm

Returns:output (float) – the minimum distance between voxels (an double)
getGaussianPeakCenterValue(self) → float

Sets the peak position of the gaussian used if the metric == 1.

Note

Only useful when metric is set to 1.

Returns:output (float) – peak center of the gaussian (a double)
getIndexOfStopPointReach(self) → int

Retrieve the index reached by theDijkstra algorithm.

Note

Only useful when distance map was generated using methods createDistanceMapUntilAnyPointInTargetRoiIsReached, createDistanceMapUntilPointInWorldCoordinatesIsReached or createDistanceMapUntilPointsAreReached.

Returns:output (int) – index in the input channel (a int64_t)
getKappa(self) → float

Gets the kappa parameter for the metric == 1.

Note

Only useful when metric is set to 1.

Returns:output (float) – the kappa parameter (an double)
getMetric(self) → int

Gets the metric used by theDijkstra algorithm.

Note

If the metric chosen is 0, the metric function will be: DijkstraDistanceBetween(a,b) = (Ia-Ib)^2 + EuclideanBias*EuclideanDistance(a,b);

Note

If the metric chosen is 1, the metric function will be: DijkstraDistanceBetween(a,b) = (Ia-Ib)^2 + EuclideanBias*EuclideanDistance(a,b) + alpha(1.0 - exp(-(b-gaussianPeakCenterValue)^2/kappa*sigmaPow2)); where a and b are Neighbor, Ia and Ib are intensity at a and b

Returns:output (int) – 0 or 1
getNeighborCount(self) → int

Gets the number of neighbors used by theDijkstra algorithm (the connectivity).

Note

Can be 6, 18 or 26

Returns:output (int) – the number of neighbors (an char)
getROI(self, index: int) → ROI

Retrieves a particularROI from the index specified slot.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:index (int) – the slot index (an unsigned char)
Returns:output (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
getROICount(self) → int

Returns the number of ROIs that have been set as sources.

Note

A maximum of 10 ROI can be provided.

Returns:output (int) – the number of ROIs that have been provided (an char)
getSigmaPow2(self) → float

Gets the variance used by the gaussian used if the metric == 1.

Note

Only useful when metric is set to 1.

Returns:output (float) – variance of the gaussian (an double)
none()

Dijkstra.__init__() -> Dijkstra

resetROIs(self) → None

Empties all the sourceROI slots.

setAlphaParameter(self, alpha: float) → None

Sets the alpha parameter for the metric == 1.

Note

Only useful when metric is set to 1.

Parameters:alpha (float) – the alpha parameter (an double)
setEuclideanBias(self, EuclideanBias: float) → None

Provides an Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm.

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm.

Note

Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm.

Parameters:EuclideanBias (float) – the minimum distance between voxels (a double)
setGaussianPeakCenterValue(self, aPeakCenter: float) → None

Sets the peak position of the gaussian used if the metric == 1.

Note

Only useful when metric is set to 1.

Parameters:aPeakCenter (float) – peak center of the gaussian (a double)
setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None

Sets the channel that will be used by theDijkstra algorithm to calculate distance.

Note

The min and max boundaries must not describe a space bigger than the input channel.

Parameters:
  • inputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • minX (int) – the minimum X index in the input channel (an unsigned short)
  • minY (int) – the minimum Y index in the input channel (an unsigned short)
  • minZ (int) – the minimum Z index in the input channel (an unsigned short)
  • maxX (int) – the maximum X index in the input channel (an unsigned short)
  • maxY (int) – the maximum Y index in the input channel (an unsigned short)
  • maxZ (int) – the maximum Z index in the input channel (an unsigned short)
  • currentT (int) –
setInputLabelsChannel(self, aInputLabelsChannel: ORSModel.ors.Channel) → None
Parameters:aInputLabelsChannel (ORSModel.ors.Channel) –
setInputMultiROI(self, aInputMultiROI: ORSModel.ors.MultiROI) → None
Parameters:aInputMultiROI (ORSModel.ors.MultiROI) –
setKappa(self, kappa: float) → None

Sets the kappa parameter for the metric == 1.

Note

Only useful when metric is set to 1.

Parameters:kappa (float) – the kappa parameter (an double)
setMaskROI(self, IMaskROI: ORSModel.ors.ROI) → None
Parameters:IMaskROI (ORSModel.ors.ROI) –
setMetric(self, metricType: int) → None

Selects the metric to be used by theDijkstra algorithm.

Note

If the metric chosen is 0, the metric function will be: DijkstraDistanceBetween(a,b) = (Ia-Ib)^2 + EuclideanBias*EuclideanDistance(a,b);

Note

If the metric chosen is 1, the metric function will be: DijkstraDistanceBetween(a,b) = (Ia-Ib)^2 + EuclideanBias*EuclideanDistance(a,b) + alpha(1.0 - exp(-(b-gaussianPeakCenterValue)^2/kappa*sigmaPow2)); where a and b are Neighbors, Ia and Ib are intensity at a and b

Parameters:metricType (int) – 0 or 1
setNeighborCountTo18(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 6 ( Neighbor distance == 1).

setNeighborCountTo26(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 6 ( Neighbor distance == 1).

setNeighborCountTo6(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 6 ( Neighbor distance == 1).

setProgressObject(self, IProgress: ORSModel.ors.Progress) → None
Parameters:IProgress (ORSModel.ors.Progress) –
setROI(self, index: int, aVolROI: ORSModel.ors.ROI) → None

Fills a particularROI slot to be used as a source for the Dijkstra algorithm.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:
  • index (int) – the slot index (an unsigned char)
  • aVolROI (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI)
setSigmaPow2(self, aLimit: float) → None

Sets the variance used by the gaussian used if the metric == 1.

Note

Only useful when metric is set to 1.

Parameters:aLimit (float) – variance of the gaussian (an double)
tracebackCPU(self, aROI: ORSModel.ors.ROI, linputChannelTraceBack: ORSModel.ors.Channel, aPath: ORSModel.ors.VisualPath) → None

Uses a traceback channel to fill a path from aROI to the nearest source ROI.

Parameters:
updateDistanceMapForMaxDistance(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, maxDistance: float, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel) → None
Parameters:

Dijkstra2D

class ORSModel.ors.Dijkstra2D

Bases: ORSModel.ors.Unmanaged

cleanDistanceMapChannel(self, outputChannel: ORSModel.ors.Channel) → None

Removes boundaries or non reached value from a distance map channel.

Parameters:outputChannel (ORSModel.ors.Channel) – a distance map channel (an Channel)
createDistanceMap(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel) → None
Parameters:
createDistanceMapWithTraceBack(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, traceBackChannel: ORSModel.ors.Channel) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEuclideanBias(self) → float

Get the Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm.

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm.

Note

Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm.

Returns:output (float) – the minimum distance between voxel (an double)
getNeighborCount(self) → int
Returns:output (int) –
getROICount(self) → int

Returns the number of ROIs that have been set as sources.

Note

A maximum of 10 ROI can be provided.

Returns:output (int) – the number of ROIs that have been provided (an char)
getVolumeROI(self, index: int) → ROI

Retrieves a particularROI from the index specified slot.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:index (int) – the slot index (an unsigned char)
Returns:output (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
none()

Dijkstra2D.__init__() -> Dijkstra2D

resetVolumeROIs(self) → None

Empties all the sourceROI slots.

setEuclideanBias(self, EuclideanBias: float) → None

Provides an Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm.

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm.

Note

Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm.

Parameters:EuclideanBias (float) – the minimum distance between voxels (a double)
setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, maxX: int, maxY: int, currentT: int) → None

Sets the channel that will be used by the 2DDijkstra algorithm to calculate distance.

Note

The min and max boundaries must not describe a space bigger than the input channel.

Parameters:
  • inputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • minX (int) – the minimum X index in the input channel (an integer)
  • minY (int) – the minimum Y index in the input channel (an integer) TODO DOCUMENT_ME: Should this be removed?
  • maxX (int) – the minimum Z index in the input channel (an unsigned short)
  • maxY (int) – the maximum X index in the input channel (an integer)
  • currentT (int) – the maximum Y index in the input channel (an integer) TODO DOCUMENT_ME
setNeighborCountTo4(self) → None

Sets the number of neighbors used by the 2DDijkstra algorithm to 4.

setNeighborCountTo8(self) → None

Sets the number of neighbors used by the 2DDijkstra algorithm to 8.

setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI) → None

Fills a particularROI slot to be used as a source for the Dijkstra algorithm.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:
  • index (int) – the slot index (an unsigned char)
  • aVolROI (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI)
traceback(self, traceBackChannel: ORSModel.ors.Channel, worldPosition: ORSModel.ors.Vector3, outArray: ORSModel.ors.Array) → Array
Parameters:
Returns:

output (ORSModel.ors.Array) –

DimensionUnit

class ORSModel.ors.DimensionUnit

Bases: ORSModel.ors.Managed

brief_description: An entity describing a unit of measure used by author: Eric Fournier. All other members of ORS participated. version: 1.0 date: august 2005 An entity describing a unit of measure used by the SDK. Units are predefined in the SDK.

convertToUnit(self, aVolume: float, anIDimensionUnit: ORSModel.ors.DimensionUnit) → float

Converts from a unit to another unit.

Parameters:
Returns:

output (float) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDefault(self, dimensionType: int) → DimensionUnit

Gets the default system unit.

Parameters:dimensionType (int) –
Returns:output (ORSModel.ors.DimensionUnit) – a DimensionUnit
getDimensionID(self) → int

Gets the unit dimension ID.

Note

See the CxvUniverse_Dimension enum in ORS_def.h to know the supported values.

Returns:output (int) – a CxvUniverse_Dimension
getDimensionType(self) → int

Returns a CxvUniverse_Dimension_Type describing the dimensionality of the dimension unit. 1: length; 2: surface; 3: volume; 4: angle.

Returns:output (int) –
getReferenceUnitConvertedToUnit(self, aVolume: float) → float

Converts from MKS to another unit.

Parameters:aVolume (float) –
Returns:output (float) –
getReferenceUnitToUnitFactor(self) → float

Gets the unit factor.

Note

All factors are expressed in relation to 1 meter (the base unit).

Returns:output (float) – a multiplying factor (a double)
getTypeForID(self, pDimension: int) → int

Returns a CxvUniverse_Dimension_Type describing the dimensionality of the dimension type. 1: length; 2: surface; 3: volume; 4: angle.

Parameters:pDimension (int) –
Returns:output (int) –
getUnitAbbreviation(self) → str

Gets the unit abbreviation.

Returns:output (str) –
getUnitConvertedToReferenceUnit(self, aVolume: float) → float

Converts to MKS from another unit.

Parameters:aVolume (float) –
Returns:output (float) –
getUnitForID(self, pDimension: int) → DimensionUnit

Gets the unit for the specified index.

Note

See the CxvUniverse_Dimension enum in ORS_def.h to know the supported values.

Parameters:pDimension (int) – a dimension index (an int)
Returns:output (ORSModel.ors.DimensionUnit) – a DimensionUnit
getUnitName(self) → str

Gets the unit name.

Returns:output (str) –
getUnitWithAbbreviation(self, sAbbreviation: str) → DimensionUnit

Gets the unit that has the specified abbreviation.

Parameters:sAbbreviation (str) – a text abbreviation (a string)
Returns:output (ORSModel.ors.DimensionUnit) – a DimensionUnit or none
none()

DimensionUnit.__init__() -> DimensionUnit

DistanceChannelAnalyzer

class ORSModel.ors.DistanceChannelAnalyzer

Bases: ORSModel.ors.Unmanaged

climbFromROI(self, lDistanceChannel: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI) → ROI
Parameters:
Returns:

output (ORSModel.ors.ROI) –

descentPathTowardMinimum(self, lDistanceChannel: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, InputPath: ORSModel.ors.VisualPath) → VisualPath
Parameters:
Returns:

output (ORSModel.ors.VisualPath) –

descentTowardMinimum(self, lDistanceChannel: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI) → ROI
Parameters:
Returns:

output (ORSModel.ors.ROI) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

DistanceChannelAnalyzer.__init__() -> DistanceChannelAnalyzer

DualQuaternion

class ORSModel.ors.DualQuaternion

Bases: ORSModel.ors.Unmanaged

brief_description: A wrapper to a author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: august 2018

add(self, aVector: ORSModel.ors.DualQuaternion) → None

Adds a vector to the receiver.

Parameters:aVector (ORSModel.ors.DualQuaternion) – a vector (an Vector3)
copy(self) → DualQuaternion

Returns a new vector identical to the receiver (a copy).

Returns:output (ORSModel.ors.DualQuaternion) –
createFromPythonRepresentation(aPythonRepresentation: str) → DualQuaternion

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.DualQuaternion) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool
Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getAdditionWith(self, aVector: ORSModel.ors.DualQuaternion) → DualQuaternion

Gets the result of adding a vector to the receiver.

Note

The receiver is not modified.

Parameters:aVector (ORSModel.ors.DualQuaternion) – a vector (an Vector3)
Returns:output (ORSModel.ors.DualQuaternion) – the resulting vector (an Vector3)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getIsEqualTo(self, aVector: ORSModel.ors.DualQuaternion) → bool
Parameters:aVector (ORSModel.ors.DualQuaternion) –
Returns:output (bool) –
getLinearInterpolationWith(self, point1: ORSModel.ors.DualQuaternion, normalizePosition: float) → DualQuaternion

Computes the lerp with another vector.

Parameters:
Returns:

output (ORSModel.ors.DualQuaternion) – the lerp vector (an Vector3)

getNegated(self) → DualQuaternion

Gets the receiver negated in a new vector.

Note

The receiver is not modified.

Returns:output (ORSModel.ors.DualQuaternion) – the resulting vector (an Vector3)
getNormalized(self) → DualQuaternion
Returns:output (ORSModel.ors.DualQuaternion) –
getPythonRepresentation(self) → str
Returns:output (str) –
getScaledBy(self, scaleFactor: float) → DualQuaternion

Gets the result of sacling a vector to the receiver.

Note

The receiver is not modified.

Parameters:scaleFactor (float) – a scale a double
Returns:output (ORSModel.ors.DualQuaternion) – the resulting vector (an Vector3)
getSphericalInterpolationWith(self, point1: ORSModel.ors.DualQuaternion, normalizePosition: float) → DualQuaternion

Computes the lerp with another vector.

Parameters:
Returns:

output (ORSModel.ors.DualQuaternion) – the lerp vector (an Vector3)

getSubtractionFrom(self, aVector: ORSModel.ors.DualQuaternion) → DualQuaternion

Gets the result of subtracting a vector from the receiver.

Note

The receiver is not modified.

Parameters:aVector (ORSModel.ors.DualQuaternion) – a vector (an Vector3)
Returns:output (ORSModel.ors.DualQuaternion) – the resulting vector (an Vector3)
negate(self) → None

Negates the vector.

none()

DualQuaternion.__init__() -> DualQuaternion

normalize(self) → None

Normalizes the vector.

Note

A normalized vector has norm (length) 1.

scale(self, scaleFactor: float) → None

Scales the vector.

Parameters:scaleFactor (float) – a scale factor (a double)
subtract(self, aVector: ORSModel.ors.DualQuaternion) → None

Subtracts a vector from the receiver.

Parameters:aVector (ORSModel.ors.DualQuaternion) – a vector (an Vector3)

EuclideanDistanceMapGenerator

class ORSModel.ors.EuclideanDistanceMapGenerator

Bases: ORSModel.ors.Unmanaged

brief_description: Exact euclidean distance map generator. author: N Piche All other members of ORS participated. version: 1.0 date: December 2015 Object used to generate euclidean distance map

createDistanceMap(self, seedChannel: ORSModel.ors.Channel, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

createDistanceMapFromROI(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

EuclideanDistanceMapGenerator.__init__() -> EuclideanDistanceMapGenerator

FaceVertexMesh

class ORSModel.ors.FaceVertexMesh

Bases: ORSModel.ors.Mesh

copyInto(self, aDestinationUnstructuredGrid: ORSModel.ors.Node) → None

Copies the receiver unstructured grid into another unstructured grid.

Parameters:aDestinationUnstructuredGrid (ORSModel.ors.Node) – a destination unstructured grid
getAsHalfEdgeModelCopy(self, pInOutMeshModel: ORSModel.ors.HalfEdgeMesh) → HalfEdgeMesh
Parameters:pInOutMeshModel (ORSModel.ors.HalfEdgeMesh) –
Returns:output (ORSModel.ors.HalfEdgeMesh) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

FaceVertexMesh.__init__() -> FaceVertexMesh

FastMarching

class ORSModel.ors.FastMarching

Bases: ORSModel.ors.Unmanaged

cleanSpeedMapChannel(self, outputChannel: ORSModel.ors.Channel) → None

Remove boundary or non reached value from a speed mapChannel.

Parameters:outputChannel (ORSModel.ors.Channel) – a distance map Channel (an Channel)
continueDistanceMapForNBIteration(self, lOutputChannelSpeedMap: ORSModel.ors.Channel, forNbIteration: int, autoUpdateROI: bool) → None
Parameters:
  • lOutputChannelSpeedMap (ORSModel.ors.Channel) –
  • forNbIteration (int) –
  • autoUpdateROI (bool) –
createDistanceMap(self, inChannelDistanceMap: ORSModel.ors.Channel, positionTripleInSourceRef: int, nbPosition: int, lMaskChannel: ORSModel.ors.Channel, traceBackChannel: ORSModel.ors.Channel) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

createDistanceMapForNBIteration(self, lOutputChannelSpeedMap: ORSModel.ors.Channel, forNbIteration: int, autoUpdateROI: bool, lMaskChannel: ORSModel.ors.Channel) → None
Parameters:
createDistanceMapWithMask(self, inChannelDistanceMap: ORSModel.ors.Channel, lMaskChannel: ORSModel.ors.Channel) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEuclideanBias(self) → float

get the Euclidean bias that will be the minimumDijkstra distance between voxels

Note

Neighbor of distance 1 will have a bias of spacialTerm

Note

Neighbor of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm

Note

Neighbor of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm

Returns:output (float) – the minimum distance between voxel (an double)
getForcedMeanValue(self) → float
Returns:output (float) –
getIndexOfStopPointReach(self) → int
Returns:output (int) –
getMaxValueToConsider(self) → float
Returns:output (float) –
getMinValueToConsider(self) → float
Returns:output (float) –
getROI(self, index: int) → ROI

Retrieves a particularROI from the index specified slot.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:index (int) – the slot index (an unsigned char)
Returns:output (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
getROICount(self) → int

Returns the number of ROIs that have been set as sources.

Note

A maximum of 10 ROI can be provided.

Returns:output (int) – the number of ROIs that have been provided (an char)
getStopValue(self) → float
Returns:output (float) –
getStopWhenValueIsEncountered(self) → bool
Returns:output (bool) –
getUsedForcedMean(self) → bool
Returns:output (bool) –
none()

FastMarching.__init__() -> FastMarching

recomputeValueWindow(self, aVolumeROI: ORSModel.ors.ROI) → None
Parameters:aVolumeROI (ORSModel.ors.ROI) –
resetROIs(self) → None

Empties all the sourceROI slots.

setEuclideanBias(self, EuclideanBias: float) → None

Provides an Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm.

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm.

Note

Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm.

Parameters:EuclideanBias (float) – the minimum distance between voxels (a double)
setForcedMeanValue(self, aVal: float) → None
Parameters:aVal (float) –
setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None

Sets the channel that will be used by theFastMarching algorithm to calculate distance.

Note

The min and max boundaries must not describe a space bigger than the input channel.

Parameters:
  • inputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • minX (int) – the minimum X index in the input channel (an integer)
  • minY (int) – the minimum Y index in the input channel (an integer) TODO DOCUMENT_ME: Should this be removed?
  • minZ (int) – the minimum Z index in the input channel (an unsigned short)
  • maxX (int) – the maximum X index in the input channel (an integer)
  • maxY (int) – the maximum Y index in the input channel (an integer) TODO DOCUMENT_ME
  • maxZ (int) – the maximum Z index in the input channel (an unsigned short)
  • currentT (int) – the current time point (an unsigned short)
setMaxValueToConsider(self, maxValue: float) → None
Parameters:maxValue (float) –
setMinValueToConsider(self, minValue: float) → None
Parameters:minValue (float) –
setROI(self, index: int, aVolROI: ORSModel.ors.ROI) → None

Fills a particularROI slot to be used as a source for the Dijkstra algorithm.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:
  • index (int) – the slot index (an unsigned char)
  • aVolROI (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI)
setStopPosition(self, xP: int, yP: int, zP: int) → None
Parameters:
  • xP (int) –
  • yP (int) –
  • zP (int) –
setStopValue(self, stopValue: float) → None
Parameters:stopValue (float) –
setStopWhenValueIsEncountered(self, aF: bool) → None
Parameters:aF (bool) –
setUseValueWindow(self, aF: bool) → None
Parameters:aF (bool) –
setUsedForcedMean(self, aF: bool) → None
Parameters:aF (bool) –
useDijkstraMetric(self, aF: bool) → None
Parameters:aF (bool) –

FastMarching2D

class ORSModel.ors.FastMarching2D

Bases: ORSModel.ors.Unmanaged

author: Benjamin Provencher. All other members of ORS participated. version: 1.0 date: June 2010

cleanSpeedMapChannel(self, outputChannel: ORSModel.ors.Channel) → None

Removes boundaries or non reached values from a speed map channel.

Parameters:outputChannel (ORSModel.ors.Channel) – a distance map channel (an Channel)
createDistanceMap(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, lMaskChannel: ORSModel.ors.Channel) → None
Parameters:
createDistanceMapForNBIteration(self, lOutputChannelSpeedMap: ORSModel.ors.Channel, forNbIteration: int, autoUpdateROI: bool, lMaskChannel: ORSModel.ors.Channel) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMeanValue(self) → float

get the mean value used in the setian metric

Returns:output (float) – float a normalized value
getROICount(self) → int

Returns the number of ROIs that have been set as sources.

Note

A maximum of 10 ROI can be provided.

Returns:output (int) – the number of ROIs that have been provided (an char)
getVolumeROI(self, index: int) → ROI

Retrieves a particularROI from the index specified slot.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:index (int) – the slot index (an unsigned char)
Returns:output (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
none()

FastMarching2D.__init__() -> FastMarching2D

resetVolumeROIs(self) → None

Empties all the sourceROI slots.

setEuclideanBias(self, EuclideanBias: float) → None

Provides an Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm.

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm.

Note

Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm.

Parameters:EuclideanBias (float) – the minimum distance between voxels (a float)
setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, maxX: int, maxY: int, currentT: int) → None

Sets the channel that will be used by the 2DFastMarching algorithm to calculate distance.

Note

The min and max boundaries must not describe a space bigger than the input channel.

Parameters:
  • inputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • minX (int) – the minimum X index in the input channel (an unsigned short)
  • minY (int) – the minimum Y index in the input channel (an unsigned short)
  • maxX (int) – the minimum Z index in the input channel (an unsigned short)
  • maxY (int) – the maximum X index in the input channel (an unsigned short)
  • currentT (int) – the maximum Y index in the input channel (an unsigned short)
setMeanValue(self, mean: float) → None

Set the mean value used in the setian metric.

Parameters:mean (float) – float a normalized value
setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI) → None

Fills a particularROI slot to be used as a source for the Dijkstra algorithm.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:
  • index (int) – the slot index (an unsigned char)
  • aVolROI (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI)
useDijkstraMetric(self, pFlag: bool) → None
Parameters:pFlag (bool) –

FastMarchingWatershed2D

class ORSModel.ors.FastMarchingWatershed2D

Bases: ORSModel.ors.FastMarching2D

author: Nicolas Piché. All other members of ORS participated. version: 1.0 date: July 2010

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getGradMinimumSearchRange(self) → int
Returns:output (int) –
none()

FastMarchingWatershed2D.__init__() -> FastMarchingWatershed2D

setGradChannel(self, gradChannel: ORSModel.ors.Channel) → None
Parameters:gradChannel (ORSModel.ors.Channel) –
setGradMinimumSearchRange(self, range: int) → None
Parameters:range (int) –
setLabelChannel(self, labelChannel: ORSModel.ors.Channel) → None
Parameters:labelChannel (ORSModel.ors.Channel) –

FordBellmanAutomata

class ORSModel.ors.FordBellmanAutomata

Bases: ORSModel.ors.Unmanaged

cleanDistanceMapChannel(self, outputChannel: ORSModel.ors.Channel) → None

Remove boundary or non reached value from a distance mapChannel.

Parameters:outputChannel (ORSModel.ors.Channel) – a distance map Channel (an Channel)
createDistanceMap(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, nbIteration: int) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEuclideanBias(self) → float

get the Euclidean bias that will be the minimumDijkstra distance between voxels

Note

Neighbor of distance 1 will have a bias of spacialTerm

Note

Neighbor of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm

Note

Neighbor of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm

Returns:output (float) – the minimum distance between voxel (an float)
getMetric(self) → int
Returns:output (int) –
getNeighborCount(self) → int
Returns:output (int) –
getROI(self, index: int) → ROI

Retrieves a particularROI from the index specified slot.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:index (int) – the slot index (an unsigned char)
Returns:output (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
getROICount(self) → int

Returns the number of ROIs that have been set as sources.

Note

A maximum of 10 ROI can be provided.

Returns:output (int) – the number of ROIs that have been provided (an char)
none()

FordBellmanAutomata.__init__() -> FordBellmanAutomata

resetVolumeROIs(self) → None

Empties all the sourceROI slots.

setEuclideanBias(self, EuclideanBias: float) → None

Provides an Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm.

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm.

Note

Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm.

Parameters:EuclideanBias (float) – the minimum distance between voxels (a float)
setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None

Sets the channel that will be used by the FordBellman algorithm to calculate distance.

Note

The min and max boundaries must not describe a space bigger than the input channel.

Parameters:
  • inputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • minX (int) – the minimum X index in the input channel (an unsigned short)
  • minY (int) – the minimum Y index in the input channel (an unsigned short)
  • minZ (int) – the minimum Z index in the input channel (an unsigned short)
  • maxX (int) – the maximum X index in the input channel (an unsigned short)
  • maxY (int) – the maximum Y index in the input channel (an unsigned short)
  • maxZ (int) – the maximum Z index in the input channel (an unsigned short)
  • currentT (int) –
setMetric(self, metricType: int) → None
Parameters:metricType (int) –
setNeighborCountTo18(self) → None
setNeighborCountTo26(self) → None
setNeighborCountTo6(self) → None
setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI) → None

Fills a particularROI slot to be used as a source for the Dijkstra algorithm.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:
  • index (int) – the slot index (an int)
  • aVolROI (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI)

GaussianPyramid

class ORSModel.ors.GaussianPyramid

Bases: ORSModel.ors.Unmanaged

createGaussianPyramid(self, pIOutChannelsGaussianPyramid: ORSModel.ors.Channel, pNumberOfLevels: int) → None
Parameters:
getChannelBase(self) → Channel
Returns:output (ORSModel.ors.Channel) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getGaussianPyramid(self, firstLevelChannel: ORSModel.ors.Channel, secondLevelChannel: ORSModel.ors.Channel, thirdLevelChannel: ORSModel.ors.Channel, fourthLevelChannel: ORSModel.ors.Channel) → None
Parameters:
getHalfsizeKernel(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
getMaxLevelGaussianPyramid(self) → int
Returns:output (int) –
getMinLevelGaussianPyramid(self) → int
Returns:output (int) –
getOriginSubsetPixels(self, x: int, y: int, z: int, t: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
  • t (int) –
getPerformZReduction(self) → bool
Returns:output (bool) –
getSigma(self) → float
Returns:output (float) –
getSizeSubsetPixels(self, x: int, y: int, z: int, t: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
  • t (int) –
none()

GaussianPyramid.__init__() -> GaussianPyramid

setChannelBase(self, pIInputChannel: ORSModel.ors.Channel) → None
Parameters:pIInputChannel (ORSModel.ors.Channel) –
setHalfsizeKernel(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
setLevelsGaussianPyramid(self, minLevel: int, maxLevel: int) → None
Parameters:
  • minLevel (int) –
  • maxLevel (int) –
setOriginSubsetPixels(self, x: int, y: int, z: int, t: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
  • t (int) –
setPerformZReduction(self, bValue: bool) → None
Parameters:bValue (bool) –
setSigma(self, value: float) → None
Parameters:value (float) –
setSizeSubsetPixels(self, x: int, y: int, z: int, t: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
  • t (int) –

GeodesicDistanceMap

class ORSModel.ors.GeodesicDistanceMap

Bases: ORSModel.ors.Unmanaged

createDistanceMap(maskROI: ORSModel.ors.ROI, seedROI: ORSModel.ors.ROI) → Channel
Parameters:
Returns:

output (ORSModel.ors.Channel) –

Graph

class ORSModel.ors.Graph

Bases: ORSModel.ors.UnstructuredGrid

addSlot(self, iTIndex: int, aChannel: ORSModel.ors.Channel, toAddSlotToVertices: bool, toAddSlotToEdges: bool, aProgress: ORSModel.ors.Progress) → None
Parameters:
findNeighbours(self, iTIndex: int) → ArrayUnsignedLong
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayUnsignedLong) –
getAnglesCount(self, iTIndex: int) → int
Parameters:iTIndex (int) –
Returns:output (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCurrentEdgeScalarValuesSlot(self) → int

gets the current face scalar.

Note

The scalar index is zero-based, and thus should be less than getEdgeScalarValuesSlotCount().

Returns:output (int) – the scalar slot index (an short)
getDefaultEdgeAlphaColor(self) → float

Queries the Edge to get its default alpha color.

Returns:output (float) – Default alpha color used for the edge (a double)
getDefaultEdgeColor(self) → Color

Gets the edge default color.

Note

Each color value goes between 0 (none) and 1 (full).

Returns:output (ORSModel.ors.Color) – a color (an Color)
getEdgeCount(self, iTIndex: int) → int

Returns the number of edges.

Parameters:iTIndex (int) – the the time step (a uint32_t)
Returns:output (int) – an uint64_t
getEdgeScalarValue(self, nScalarValueSlotIndex: int, scalarValueEdgeIndex: int, iTIndex: int) → float

Gets the value of a face scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • scalarValueEdgeIndex (int) – the face index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the value of a face scalar (a double)

getEdgeScalarValueDescription(self, nScalarValueSlotIndex: int, iTIndex: int) → str

Gets a face scalar description.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (str) – the description (a std::wstring)

getEdgeScalarValueMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

method getEdgeScalarValueMax

Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getEdgeScalarValueMaxs(self, iTIndex: int) → ArrayDouble

method getEdgeScalarValueMaxs

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getEdgeScalarValueMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getEdgeScalarValueMins(self, iTIndex: int) → ArrayDouble

method getEdgeScalarValueMins

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getEdgeScalarValueOffset(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar offset value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar offset value (a double)

getEdgeScalarValueOffsets(self, iTIndex: int) → ArrayDouble

Get the face scalar offset values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar offset values (an ArrayDouble)
getEdgeScalarValueSlope(self, scalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar slope value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar slope value (a double)

getEdgeScalarValueSlopes(self, iTIndex: int) → ArrayDouble

Get the face scalar slope values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar slope values (an ArrayDouble)
getEdgeScalarValueSlotLookUpTable(self, nScalarValueSlotIndex: int, iTIndex: int) → dict
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (dict) –

getEdgeScalarValueUnit(self, nScalarValueSlotIndex: int, iTIndex: int) → int
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (int) –

getEdgeScalarValues(self, nScalarValueSlotIndex: int, iTIndex: int) → Array

Gets the values of a face scalar.

Note

The array of values is of length getEdgeCount() * getEdgeScalarValuesSlotCount().

Note

The scalar value in the slot s of the face v is located at the index (getEdgeScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • nScalarValueSlotIndex (int) – the face scalar value slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (ORSModel.ors.Array) – an array of values (an ArrayFloat)

getEdgeScalarValuesDatatype(self, nScalarValueSlotIndex: int, iTIndex: int) → int
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (int) –

getEdgeScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getEdgeScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getEdgeScalarValuesRangeMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getEdgeScalarValuesRangeMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getEdgeScalarValuesSlotCount(self) → int

Gets the number of slots for face scalar values.

Returns:output (int) – the number of slots (an short)
getEdgeScalarValuesWindowMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getEdgeScalarValuesWindowMaxs(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getEdgeScalarValuesWindowMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar window min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getEdgeScalarValuesWindowMins(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getEdges(self, iTIndex: int) → ArrayUnsignedLong

Get the edge array.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayUnsignedLong) – an array of int32_t (an ArrayLong)
getHideOutOfRangeEdgeScalarValues(self) → bool

Indicate if out of range values should be hiden.

Returns:output (bool) – (a bool)
getMinMaxEdgeScalarValue(self, nScalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float) → None
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
  • fMinValue (float) –
  • fMaxValue (float) –
getNumVertices(self, iTIndex: int) → int
Parameters:iTIndex (int) –
Returns:output (int) –
getUnstructuredGridHelperClass()
getUseDefaultEdgeAlphaColor(self) → bool

Queries the edge to see if it uses its default alpha color.

Returns:output (bool) – TRUE if a default alpha color is used for the edge, FALSE otherwise
getUseDefaultEdgeColor(self) → bool

Queries the edge to see if it uses its default color.

Returns:output (bool) – TRUE if the edge uses its default color, FALSE otherwise
getUseEdgeScalarValues(self) → bool

Sets the edge to have face scalar values or not.

Returns:output (bool) – TRUE to use scalar values, FALSE otherwise
getVerticesWithConnectivity(self, iTIndex: int, NumOfNeighbours: int) → ArrayUnsignedLong
Parameters:
  • iTIndex (int) –
  • NumOfNeighbours (int) –
Returns:

output (ORSModel.ors.ArrayUnsignedLong) –

interTrabecularAngle(self, iTIndex: int, NumOutEdges: int, arrayAngles: ORSModel.ors.ArrayDouble, arrayFirstEdgeOfAngles: ORSModel.ors.ArrayUnsignedLong, arraySecondEdgeOfAngles: ORSModel.ors.ArrayUnsignedLong, arrayVertexOfAngles: ORSModel.ors.ArrayUnsignedLong) → None
Parameters:
isIndexInArray(self, iTIndex: int, index: int, array: ORSModel.ors.ArrayUnsignedLong) → bool
Parameters:
Returns:

output (bool) –

mergeVertices(self, iTIndex: int) → None
Parameters:iTIndex (int) –
nodeAbundance(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
none() → Graph

Returns a none object, equivalent to a non-existent object (or null).

Returns:output (Graph) –
removeAnEdgeScalarValuesSlot(self, nScalarValueSlotIndex: int, iTIndex: int) → None

Remove an edge scalar slot.

Parameters:
  • nScalarValueSlotIndex (int) – the index of the slot to be removed (a uint32_t)
  • iTIndex (int) – the time step (a uint32_t)
removeDeadEnds(self, iTIndex: int) → None
Parameters:iTIndex (int) –
removeDuplicateEdges(self, iTIndex: int) → None
Parameters:iTIndex (int) –
removeIsolatedEdges(self, iTIndex: int) → None
Parameters:iTIndex (int) –
removeIsolatedVertices(self, iTIndex: int) → None
Parameters:iTIndex (int) –
reverseEdges(self, iTIndex: int) → None
Parameters:iTIndex (int) –
setCurrentEdgeScalarValuesSlot(self, slotIndex: int) → None

Sets the current face scalar.

Note

The scalar index is zero-based, and thus should be less than getEdgeScalarValuesSlotCount().

Parameters:slotIndex (int) – the current scalar slot index (an unsigned short)
setDefaultEdgeAlphaColor(self, value: float) → None

Sets the edge its default alpha color.

Parameters:value (float) – Alpha color (double)
setDefaultEdgeColor(self, IColor: ORSModel.ors.Color) → None

Sets the edge default color.

Note

Each color value goes between 0 (none) and 1 (full).

Note

You need to call setUseDefaultColor(TRUE) for the default color to be used.

Note

You need to call initializeVisual after color changes for them to be visible on the screen.

Parameters:IColor (ORSModel.ors.Color) – a color (an Color)
setEdgeScalarValue(self, nScalarValueSlotIndex: int, scalarValueEdgeIndex: int, aValue: float, iTIndex: int) → None

Sets the value of a face scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • scalarValueEdgeIndex (int) – the face index (an uint32_t)
  • aValue (float) – the value of a face scalar to set (a double)
  • iTIndex (int) – the time step (a uint32_t)
setEdgeScalarValueDescription(self, nScalarValueSlotIndex: int, value: str, iTIndex: int) → None
Parameters:
  • nScalarValueSlotIndex (int) –
  • value (str) –
  • iTIndex (int) –
setEdgeScalarValueMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar max value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (an unsigned short)
  • value (float) – scalar max value (a double)
  • iTIndex (int) – time step (a uint32_t)
setEdgeScalarValueMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setEdgeScalarValueMaxs

Parameters:
setEdgeScalarValueMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setEdgeScalarValueMin

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a unsigned short)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setEdgeScalarValueMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setEdgeScalarValueMins

Parameters:
setEdgeScalarValueOffset(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar offset value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • value (float) – the scalar offset value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setEdgeScalarValueOffsets(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the face scalar offset values.

Parameters:
  • pScalarValues (ORSModel.ors.ArrayDouble) – scalar offset values (an ArrayDouble)
  • iTIndex (int) – time step (a uint32_t)
setEdgeScalarValueSlope(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Gets a face scalar slope value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (an unsigned short)
  • value (float) – scalar slope value (a double)
  • iTIndex (int) – time step (a uint32_t)
setEdgeScalarValueSlopes(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the face scalar slope values.

Parameters:
  • pScalarValues (ORSModel.ors.ArrayDouble) – scalar slope values (an ArrayDouble)
  • iTIndex (int) – time step (a uint32_t)
setEdgeScalarValueSlotLookUpTable(self, lookUpTable: dict, nScalarValueSlotIndex: int, iTIndex: int) → None
Parameters:
  • lookUpTable (dict) –
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
setEdgeScalarValueUnit(self, nScalarValueSlotIndex: int, value: int, iTIndex: int) → None
Parameters:
  • nScalarValueSlotIndex (int) –
  • value (int) –
  • iTIndex (int) –
setEdgeScalarValues(self, pScalarValues: ORSModel.ors.Array, nScalarValueSlotIndex: int, iTIndex: int) → None

Sets the values of a face scalar.

Note

The array of values is of length getEdgeCount() * getEdgeScalarValuesSlotCount().

Note

The scalar value in the slot s of the face v is located at the index (getEdgeScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • pScalarValues (ORSModel.ors.Array) – an array of values (an ArrayFloat)
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • iTIndex (int) – the time step (a uint32_t)
setEdgeScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int, nEdgeScalarValuesDatatype: int) → None
Parameters:
  • iSlotIndex (int) –
  • iTIndex (int) –
  • nEdgeScalarValuesDatatype (int) –
setEdgeScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a unsigned short)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setEdgeScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setEdgeScalarValuesRangeMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a unsigned short)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step(a unsigned short)
setEdgeScalarValuesRangeMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (an unsigned short)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setEdgeScalarValuesSlotCount(self, value: int) → None

Sets the number of slots for face scalar values.

Parameters:value (int) – the number of slots (an unsigned short)
setEdgeScalarValuesWindowMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar max value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (an unsigned short)
  • value (float) – scalar max value (a double)
  • iTIndex (int) – time step (a uint32_t)
setEdgeScalarValuesWindowMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setEdgeScalarValuesWindowMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setEdgeScalarValuesWindowMin

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a unsigned short)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setEdgeScalarValuesWindowMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setEdges(self, pEdges: ORSModel.ors.ArrayUnsignedLong, iTIndex: int) → None

Sets the edges.

Parameters:
setHideOutOfRangeEdgeScalarValues(self, value: bool) → None

Indicate if out of range values should be hiden.

Parameters:value (bool) –
setUseDefaultEdgeAlphaColor(self, value: bool) → None

Sets the edge to use its default alpha color.

Parameters:value (bool) – TRUE for using a default alpha color for the edge, FALSE otherwise (bool)
setUseDefaultEdgeColor(self, value: bool) → None

Sets the edge to use its default color.

Parameters:value (bool) – TRUE to use the edge default color, FALSE otherwise
setUseEdgeScalarValues(self, value: bool) → None

Gets the status of face scalar values usage.

Parameters:value (bool) –

Group

class ORSModel.ors.Group

Bases: ORSModel.ors.Node

add(self, pObject: ORSModel.ors.Managed) → None

Adds an object to the group.

Note

This container behaves like a set, i.e. objects can only appear once.

Parameters:pObject (ORSModel.ors.Managed) – object to add (an Object)
addAll(self, IInputGroup: ORSModel.ors.Group) → None

Appends the objects found in the supplied group to the group.

Note

This container behaves like a set, i.e. objects can only appear once.

Parameters:IInputGroup (ORSModel.ors.Group) – another group (an Group)
empty(self) → None

Empties the group.

getAllContainedInstancesOf(self, pProgId: str) → List

Returns all the objects of the supplied class found in the group.

Parameters:pProgId (str) – a class name (a string)
Returns:output (ORSModel.ors.List) – a list of objects (an List)
getAllContainedObjectsOfClassAndPrivateTitle(self, pProgId: str, pPrivateTitle: str) → List

Returns all the objects of the supplied class and private title found in the group.

Parameters:
  • pProgId (str) – a class name (a string)
  • pPrivateTitle (str) – a private title (a string)
Returns:

output (ORSModel.ors.List) – a list of objects (an List)

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCount(self) → int

Returns the count of objects in the group.

Returns:output (int) – object count (a uint32_t)
getIncludes(self, pObject: ORSModel.ors.Managed) → bool

Checks to see if an object is in the group.

Parameters:pObject (ORSModel.ors.Managed) – object to check (an Object)
Returns:output (bool) – TRUE if object is in the group, FALSE otherwise
getIndexOf(self, pObject: ORSModel.ors.Managed) → int

Returns the index of the supplied object in the group.

Parameters:pObject (ORSModel.ors.Managed) – an object (an Object)
Returns:output (int) – an index (an int), or -1 if the object is not in the group
getIntersectionWith(self, IInputGroup: ORSModel.ors.Group, IInOutGroup: ORSModel.ors.Group) → Group

Intersects the group with another group.

Note

If a target group is supplied, data is written to it and returned, otherwise a new group is created.

Note

The output group can be the same as the receiver group (i.e. can intersect with another group into itself).

Parameters:
Returns:

output (ORSModel.ors.Group) – the intersected group

getObjectAt(self, pos: int) → Managed

Returns the Nth object in the group.

Parameters:pos (int) – an index (a uint32_t)
Returns:output (ORSModel.ors.Managed) – an object (an Object)
getSubtractionFrom(self, IInputGroup: ORSModel.ors.Group, IInOutGroup: ORSModel.ors.Group) → Group

Subtracts another group from the group.

Note

If a target group is supplied, data is written to it and returned, otherwise a new group is created.

Note

The output group can be the same as the receiver group (i.e. can subtract another group into itself), but the output group cannot be the subtraction group.

Parameters:
Returns:

output (ORSModel.ors.Group) – the subtracted group

getUnionWith(self, IInputGroup: ORSModel.ors.Group, IInOutGroup: ORSModel.ors.Group) → Group

Merges the group with another group.

Note

This container behaves like a set, i.e. objects can only appear once.

Note

If a target group is supplied, data is written to it and returned, otherwise a new group is created.

Note

The output group can be the same as the receiver group (i.e. can merge with another group into itself).

Parameters:
Returns:

output (ORSModel.ors.Group) – the merged group

none()

Group.__init__() -> Group

remove(self, pObject: ORSModel.ors.Managed) → None

Removes an object from the group.

Parameters:pObject (ORSModel.ors.Managed) – object to remove (an Object)
removeAll(self, IInputGroup: ORSModel.ors.Group) → None

Removes all the objects found in the supplied group from the group.

Note

This container behaves like a set, i.e. objects can only appear once.

Parameters:IInputGroup (ORSModel.ors.Group) – another group (an Group)

HalfEdgeMesh

class ORSModel.ors.HalfEdgeMesh

Bases: ORSModel.ors.Mesh

copyInto(self, aDestinationUnstructuredGrid: ORSModel.ors.Node) → None

Copies the receiver unstructured grid into another unstructured grid.

Parameters:aDestinationUnstructuredGrid (ORSModel.ors.Node) – a destination unstructured grid
getAsFaceVertexModelCopy(self, pInOutMeshModel: ORSModel.ors.FaceVertexMesh) → FaceVertexMesh
Parameters:pInOutMeshModel (ORSModel.ors.FaceVertexMesh) –
Returns:output (ORSModel.ors.FaceVertexMesh) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEdgesInFaceVertexTopology(self, iTIndex: int) → ArrayUnsignedLong
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayUnsignedLong) –
getFacesAdjacencyArray(self, iTIndex: int) → ArrayUnsignedLong

Get the Faces Adjacent EdgeArray, containning, for each face f, the index e of an adjacent edge (i.e. pFaceAdjacentEdges->at(faceIdx) == edgeIdx)

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayUnsignedLong) – an array of int32_t (an ArrayLong)
getVerticesAdjacencyArray(self, iTIndex: int) → ArrayUnsignedLong

Get the Vertices Outgoing EdgeArray, containning, for each vertex v, the index e of a edge outgoing from v (i.e. pVerticesOutgoingEdges->at(vertexIdx) == outgoingEdgeIdx)

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayUnsignedLong) – an array of int32_t (an ArrayLong)
none()

HalfEdgeMesh.__init__() -> HalfEdgeMesh

setEdgesInFaceVertexTopology(self, pEdges: ORSModel.ors.ArrayUnsignedLong, iTIndex: int) → None
Parameters:

HistogramAnalyzer

class ORSModel.ors.HistogramAnalyzer

Bases: ORSModel.ors.Unmanaged

fillHistogram1DFromChannel(self, IHistogramData: ORSModel.ors.HistogramData, IChannel1: ORSModel.ors.Channel, tChannel: int, IROI: ORSModel.ors.ROI, tROI: int) → None

Fill a 1D histogram from the channel values, over the voxels specified by theROI.

Parameters:
  • IHistogramData (ORSModel.ors.HistogramData) – the 1D histogram to fill (an HistogramData)
  • IChannel1 (ORSModel.ors.Channel) – the channel (an Channel)
  • tChannel (int) – the t index of the channel (an unsigned int)
  • IROI (ORSModel.ors.ROI) – the ROI specifying what channel voxels to include (an ROI). If this parameter is given as nullptr, all channel voxels will be used.
  • tROI (int) – the t index of the ROI (an unsigned int)
fillHistogram1DFromChannelSubset(self, IHistogramData: ORSModel.ors.HistogramData, IChannel1: ORSModel.ors.Channel, tChannel: int, xmin: int, ymin: int, zmin: int, xmax: int, ymax: int, zmax: int) → None

Fill a 1D histogram from the channel values, over a subset of the volume.

Parameters:
  • IHistogramData (ORSModel.ors.HistogramData) – the 1D histogram to fill (an HistogramData)
  • IChannel1 (ORSModel.ors.Channel) – the channel (an Channel)
  • tChannel (int) – the t index of the channel (an unsigned int)
  • xmin (int) – the minimal x index of the channel to use (an unsigned int)
  • ymin (int) – the minimal y index of the channel to use (an unsigned int)
  • zmin (int) – the minimal z index of the channel to use (an unsigned int)
  • xmax (int) – the maximal x index of the channel to use (an unsigned int)
  • ymax (int) – the maximal y index of the channel to use (an unsigned int)
  • zmax (int) – the maximal z index of the channel to use (an unsigned int)
fillHistogram1DFromCollection(self, IHistogramData: ORSModel.ors.HistogramData, ICollection1: ORSModel.ors.SequenceableCollection, IFilterCollection: ORSModel.ors.SequenceableCollection, IArrayBinIndexes: ORSModel.ors.ArrayUnsignedLONGLONG) → None

Fill a 1D histogram from the collection values, over the elements specified by the filter collection.

Parameters:
fillHistogram1DFromCollectionSubset(self, IHistogramData: ORSModel.ors.HistogramData, ICollection1: ORSModel.ors.SequenceableCollection, indexStart: int, indexEnd: int) → None

Fill a 1D histogram from the collection values, over a subset of the collection.

Parameters:
  • IHistogramData (ORSModel.ors.HistogramData) – the 1D histogram to fill (an HistogramData)
  • ICollection1 (ORSModel.ors.SequenceableCollection) – the collection (a SequenceableCollection)
  • indexStart (int) – the first index of the collection to use (an uint64_t)
  • indexEnd (int) – the last index of the collection to use (an uint64_t)
fillHistogram2DFromChannels(self, IHistogramData: ORSModel.ors.HistogramData, IChannel1: ORSModel.ors.Channel, IChannel2: ORSModel.ors.Channel, tChannel1: int, tChannel2: int, IROI: ORSModel.ors.ROI, tROI: int, IProgress: ORSModel.ors.Progress) → None

Fill a 2D histogram from the channels values, over the voxels specified by theROI.

Parameters:
  • IHistogramData (ORSModel.ors.HistogramData) – the 2D histogram to fill (an HistogramData)
  • IChannel1 (ORSModel.ors.Channel) – the channel of the first dimension (an Channel)
  • IChannel2 (ORSModel.ors.Channel) – the channel of the second dimension (an Channel)
  • tChannel1 (int) – the t index of the channel of the first dimension (an unsigned int)
  • tChannel2 (int) – the t index of the channel of the second dimension (an unsigned int)
  • IROI (ORSModel.ors.ROI) – the ROI specifying what channel voxels to include (an ROI). If this parameter is given as nullptr, all channel voxels will be used.
  • tROI (int) – the t index of the ROI (an unsigned int)
  • IProgress (ORSModel.ors.Progress) –
fillHistogram2DFromChannelsSubset(self, IHistogramData: ORSModel.ors.HistogramData, IChannel1: ORSModel.ors.Channel, IChannel2: ORSModel.ors.Channel, tChannel: int, xmin: int, ymin: int, zmin: int, xmax: int, ymax: int, zmax: int) → None

Fill a 2D histogram from the channels values, over a subset of the volume.

Parameters:
  • IHistogramData (ORSModel.ors.HistogramData) – the 2D histogram to fill (an HistogramData)
  • IChannel1 (ORSModel.ors.Channel) – the channel of the first dimension (an Channel)
  • IChannel2 (ORSModel.ors.Channel) – the channel of the second dimension (an Channel)
  • tChannel (int) – the t index of the channels (an unsigned int)
  • xmin (int) – the minimal x index of the channels to use (an unsigned int)
  • ymin (int) – the minimal y index of the channels to use (an unsigned int)
  • zmin (int) – the minimal z index of the channels to use (an unsigned int)
  • xmax (int) – the maximal x index of the channels to use (an unsigned int)
  • ymax (int) – the maximal y index of the channels to use (an unsigned int)
  • zmax (int) – the maximal z index of the channels to use (an unsigned int)
fillHistogram2DFromCollections(self, IHistogramData: ORSModel.ors.HistogramData, ICollection1: ORSModel.ors.SequenceableCollection, ICollection2: ORSModel.ors.SequenceableCollection, IFilterCollection: ORSModel.ors.SequenceableCollection, IArrayBinIndexes: ORSModel.ors.ArrayUnsignedLONGLONG) → None

Fill a 2D histogram from the collections values, over the elements specified by the filter collection.

Parameters:
fillHistogram2DFromCollectionsSubset(self, IHistogramData: ORSModel.ors.HistogramData, ICollection1: ORSModel.ors.SequenceableCollection, ICollection2: ORSModel.ors.SequenceableCollection, indexStart: int, indexEnd: int) → None

Fill a 2D histogram from the collections values, over a subset of the collection.

Parameters:
  • IHistogramData (ORSModel.ors.HistogramData) – the 2D histogram to fill (an HistogramData)
  • ICollection1 (ORSModel.ors.SequenceableCollection) – the collection of the first dimension (a SequenceableCollection)
  • ICollection2 (ORSModel.ors.SequenceableCollection) – the collection of the second dimension (a SequenceableCollection)
  • indexStart (int) – the first index of the collections to use (an uint64_t)
  • indexEnd (int) – the last index of the collections to use (an uint64_t)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getOtsuThreshold(self, IHistogramData: ORSModel.ors.HistogramData, dimension: int) → float

Computes the Otsu threshold value along a dimension.

Parameters:
  • IHistogramData (ORSModel.ors.HistogramData) – the ND histogram (an HistogramData)
  • dimension (int) – the dimension along which the threshold is computed (an unsigned int)
Returns:

output (float) –

mapHistogram2DLabels(self, IHistogramData: ORSModel.ors.HistogramData, ILMRHistogramLabels: ORSModel.ors.MultiROI, IChannel1: ORSModel.ors.Channel, IChannel2: ORSModel.ors.Channel, tChannel1: int, tChannel2: int, IROI: ORSModel.ors.ROI, tROI: int, ILMROutput: ORSModel.ors.MultiROI, tLMR: int) → None

Map labels of a LMR having the same shape as the 2D histogram into a LMR using the channels values.

Parameters:
  • IHistogramData (ORSModel.ors.HistogramData) – the 2D histogram (an HistogramData)
  • ILMRHistogramLabels (ORSModel.ors.MultiROI) – the LMR of labels (histogram classification) (an MultiROI)
  • IChannel1 (ORSModel.ors.Channel) – the channel of the first dimension (an Channel)
  • IChannel2 (ORSModel.ors.Channel) – the channel of the second dimension (an Channel)
  • tChannel1 (int) – the t index of the channel of the first dimension (an unsigned int)
  • tChannel2 (int) – the t index of the channel of the second dimension (an unsigned int)
  • IROI (ORSModel.ors.ROI) – the ROI specifying what channel voxels to include (an ROI). If this parameter is given as nullptr, all channel voxels will be used.
  • tROI (int) – the t index of the ROI (an unsigned int)
  • ILMROutput (ORSModel.ors.MultiROI) – the LMR receiving the labels (volume segmentation) (an MultiROI)
  • tLMR (int) – the t index of the LMR (an unsigned int)
none()

HistogramAnalyzer.__init__() -> HistogramAnalyzer

HistogramData

class ORSModel.ors.HistogramData

Bases: ORSModel.ors.Node

brief_description: An object that contains histogram data. author: Thierry Côté. All other members of ORS participated. version: 1.0 date: August 2005 An object that contains histogram data. Histograms can contain multiple dimensions (ex: one dimension for each color in a multicolor volume, and another for all of them). And, it can be in 1D or 2D, based on intensity for the 1D, and on both intensity and gradient in 2D. Size of bins stays constant across dimensions, but it is possible to choose different bin sizes for 1D and 2D.

addCountAtIndex1D(self, iIndex: int, countToAdd: int) → None

Add a number of counts at the given indexes.

Parameters:
  • iIndex (int) – bin index of the dimension 0
  • countToAdd (int) – number of counts to add
addCountAtIndex2D(self, iIndex0: int, iIndex1: int, countToAdd: int) → None

Add a number of counts at the given indexes.

Parameters:
  • iIndex0 (int) – bin index of the dimension 0
  • iIndex1 (int) – bin index of the dimension 1
  • countToAdd (int) – number of counts to add
addCountAtValue1D(self, dValue: float, countToAdd: int, pBinIndex: int) → None

Add a number of counts for the given values.

Parameters:
  • dValue (float) – value in dimension 0
  • countToAdd (int) – number of counts to add
  • pBinIndex (int) – returned value of the linear bin index where the count is added
addCountAtValue2D(self, dValue0: float, dValue1: float, countToAdd: int, pLinearBinIndex: int) → None

Add a number of counts for the given values.

Parameters:
  • dValue0 (float) – value in dimension 0
  • dValue1 (float) – value in dimension 1
  • countToAdd (int) – number of counts to add
  • pLinearBinIndex (int) – returned value of the linear bin index where the count is added
copyInto(self, destination: ORSModel.ors.HistogramData) → None

Copies the current histogram data in to the destination.

Parameters:destination (HistogramData) – destination Histogram
downSample(self, dimension: int, dStart: float, dEnd: float, nBins: int) → HistogramData

Returns a downsampled histogram.

Parameters:
  • dimension (int) – index of the dimension (starting at 0)
  • dStart (float) – start of the bin edge
  • dEnd (float) – end of the bin edge
  • nBins (int) – number of bins for the new histogram
Returns:

output (ORSModel.ors.HistogramData) – HistogramData

HistogramData.downSample(self, dimension: int, nBins: int) -> HistogramData

Returns a downsampled histogram.

Parameters:
  • dimension (int) – index of the dimension (starting at 0)
  • nBins (int) – number of bins for the new histogram
Returns:

output (ORSModel.ors.HistogramData) – HistogramData

getBinCount(self, dimension: int) → int

Get the number of bins in a given dimension.

Parameters:dimension (int) – index of the dimension (starting at 0)
Returns:output (int) – The number of bins
getBinCounts(self) → ArrayUnsignedLong

Get the number of bins in each dimension.

Returns:output (ORSModel.ors.ArrayUnsignedLong) – An array with the number of bins in each dimension (an ArrayUnsignedLong)
getBinEdges(self, dimension: int) → ArrayDouble

Get the bin edges of the range in a given dimension.

Parameters:dimension (int) – index of the dimension (starting at 0)
Returns:output (ORSModel.ors.ArrayDouble) – An array with the bin edges (the number of edges is 1 more than the number of bins)
getBinEdgesEnd(self, dimension: int) → float

Get the ending value of the range in a given dimension.

Parameters:dimension (int) – index of the dimension (starting at 0)
Returns:output (float) – The ending value of the range
getBinEdgesStart(self, dimension: int) → float

Get the starting value of the range in a given dimension.

Parameters:dimension (int) – index of the dimension (starting at 0)
Returns:output (float) – The starting value of the range
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCountAtIndex1D(self, iIndex: int) → int

Get the number of counts at the given index.

Parameters:iIndex (int) – bin index
Returns:output (int) – Number of counts
getCountAtIndex2D(self, iIndex0: int, iIndex1: int) → int

Get the number of counts at the given index.

Parameters:
  • iIndex0 (int) – bin index
  • iIndex1 (int) –
Returns:

output (int) – Number of counts

getCumulativeDistribution(self, dimension: int) → HistogramData

Computes the cumulative distribution along one dimension.

Parameters:dimension (int) – dimension along which the cumulation is made
Returns:output (ORSModel.ors.HistogramData) – New histogramData
getData(self) → ArrayUnsignedLONGLONG
Returns:output (ArrayUnsignedLONGLONG) –
getDimensionCount(self) → int

Get the number of dimensions.

Returns:output (int) – The number of dimensions (a uint32_t)
getIndexAtValue1D(self, dValue: float) → int

Determines the bin index for a given value.

Parameters:dValue (float) – value
Returns:output (int) – bin index
getIndexAtValueForDimension(self, dimension: int, dValue: float) → int

Determines the bin index for a given value in a given dimension.

Parameters:
  • dimension (int) – index of the dimension (starting at 0)
  • dValue (float) – value
Returns:

output (int) – bin index

getIsDataInitialized(self) → bool

Get the status of the data.

Returns:output (bool) – TRUE if the data is initialized, FALSE otherwise
getIsHistogramDegenerated(self) → bool

Get the degenerated state of the histogram.

Returns:output (bool) – TRUE if the histogram is degenerated, FALSE otherwise
getIsSparse(self) → bool

Get the sparse representation state.

Returns:output (bool) – true if using a sparse representation, false if using a dense representation
initializeData(self) → bool

Initialize the memory to contain the histogram data. If the data is already initialized, all values of the data are set to 0.

Returns:output (bool) – TRUE if successful, FALSE otherwise
isValueInsideRangeLimits(self, dimension: int, dValue: float) → bool

Determines if the given value is in the range.

Parameters:
  • dimension (int) – index of the dimension (starting at 0)
  • dValue (float) – value to test
Returns:

output (bool) – TRUE if the value is inside the range, FALSE otherwise

none()

HistogramData.__init__() -> HistogramData

setBinEdgesFromArray(self, dimension: int, dValues: ORSModel.ors.ArrayDouble) → None

Set the range for a given dimension, with bin edges specified individually.

Parameters:
  • dimension (int) – array of bin edges (the number of bins is 1 less than the number of edges specified)
  • dValues (ORSModel.ors.ArrayDouble) –
setBinEdgesFromRange(self, dimension: int, dStart: float, dEnd: float, nbBins: int) → None

Set the range for a given dimension, for equally spaced bins, using the starting value, the end value and the number of bins.

Parameters:
  • dimension (int) – index of the dimension (starting at 0)
  • dStart (float) – range start
  • dEnd (float) – range end
  • nbBins (int) – number of bins
setBinEdgesFromWidth(self, dimension: int, dStart: float, dWidth: float, nbBins: int) → None

Set the range for a given dimension, for equally spaced bins, using the starting value, the bin width and the number of bins.

Parameters:
  • dimension (int) – index of the dimension (starting at 0)
  • dStart (float) – range start
  • dWidth (float) – bin width
  • nbBins (int) – number of bins
setCountAtIndex1D(self, iIndex: int, countToSet: int) → None

Set the number of counts at the given index.

Parameters:
  • iIndex (int) – bin index in which the count should be set (a uint32_t)
  • countToSet (int) – number of counts to set
setCountAtIndex2D(self, iIndex0: int, iIndex1: int, countToSet: int) → None

Set the number of counts at the given index.

Parameters:
  • iIndex0 (int) – bin index in which the count should be set
  • iIndex1 (int) – number of counts to set
  • countToSet (int) –
setDimensionCount(self, nbDimensions: int) → None

Sets the number of dimensions.

Parameters:nbDimensions (int) – number of dimensions (a uint32_t)
setUseSparse(self, bUseSparse: bool) → None

Specifies if a sparse representation should be used internally.

Parameters:bUseSparse (bool) – true to use a sparse representation, false to use a dense representation
sumAlongDimension(self, dimension: int) → HistogramData

Sum the counts along one dimension.

Parameters:dimension (int) – dimension along which the sum is made
Returns:output (ORSModel.ors.HistogramData) – New histogramData

Image

class ORSModel.ors.Image

Bases: ORSModel.ors.Node

copy(self) → Image

Copies the current image object.

Returns:output (ORSModel.ors.Image) – a new image copied (an Image)
copyDataFromChannel(self, aChannel: ORSModel.ors.Channel, timeStep: int) → None
Parameters:
copyDataFromChannelWithLookupTable(self, aChannel: ORSModel.ors.Channel, timeStep: int, levelingMinValue: float, levelingMaxValue: float, slabThickness: float, aLUT: ORSModel.ors.LookupTable, alpha: float) → None
Parameters:
dtype
exportToFile(filename)

Exports an image to a file

Parameters:filename (file saving) – fully qualified file name
Returns:exportSuccess (bool) – True if succeeded, False otherwise
flipImageDataHorizontally(self) → None
flipImageDataVertically(self) → None
getAllocatedSize(self) → int
Returns:output (int) –
getBoundedPlane(self) → Rectangle
Returns:output (ORSModel.ors.Rectangle) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getComponent(index)
getComponentCountPerPixel(self) → int

Gets the number of components per pixel.

Returns:output (int) – a count (an short)
getComponents()
getDataOffsetForPixelComponent(self, componentIndex: int) → float
Parameters:componentIndex (int) –
Returns:output (float) –
getDataSlopeForPixelComponent(self, componentIndex: int) → float
Parameters:componentIndex (int) –
Returns:output (float) –
getDataType(self) → int

Gets the image data type.

Note

See CxvChannel_Data_Type (in ORS_def.h) for supported types.

Returns:output (int) – a type (a int32_t)
getIsDataInitialized(self) → bool

Checks if the internal data is initialized.

Note

The channel must be initialized before you start using the channel.

Returns:output (bool) – true if initialized correctly, false otherwise
getMaxU(self) → float
Returns:output (float) –
getMaxV(self) → float
Returns:output (float) –
getMinU(self) → float
Returns:output (float) –
getMinV(self) → float
Returns:output (float) –
getNDArray()
getRawImageData(self) → None
getXSize(self) → int

Gets the X size of the image.

Returns:output (int) – the X size (a uint32_t)
getYSize(self) → int

Gets the Y size of the image.

Returns:output (int) – the Y size (a uint32_t)
initialize(self, aDataType: int, componentPerPixelCount: int, aBoundedPlane: ORSModel.ors.Rectangle) → bool

Initializes the image.

Note

See CxvChannel_Data_Type (in ORS_def.h) for supported data types.

Parameters:
  • aDataType (int) – the datatype (a int32_t*, see note below)
  • componentPerPixelCount (int) – the number of components per pixel (an unsigned short)
  • aBoundedPlane (ORSModel.ors.Rectangle) – the image size (a Rectangle)
Returns:

output (bool) – TRUE if successful, FALSE otherwise

loadFromFile(filename)

Loads an image from a file

Parameters:filename (file) – fully qualified file name
Returns:exportSuccess (bool) – True if succeeded, False otherwise
none()

Image.__init__() -> Image

setBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle) → None
Parameters:aBoundedPlane (ORSModel.ors.Rectangle) –
setDataOffsetForPixelComponent(self, offset: float, componentIndex: int) → None
Parameters:
  • offset (float) –
  • componentIndex (int) –
setDataSlopeForPixelComponent(self, slope: float, componentIndex: int) → None
Parameters:
  • slope (float) –
  • componentIndex (int) –
setDirections(self, direction0: ORSModel.ors.Vector3, direction1: ORSModel.ors.Vector3) → None
Parameters:
setMaxU(self, aValue: float) → None
Parameters:aValue (float) –
setMaxV(self, aValue: float) → None
Parameters:aValue (float) –
setMinU(self, aValue: float) → None
Parameters:aValue (float) –
setMinV(self, aValue: float) → None
Parameters:aValue (float) –
setOrigin(self, origin: ORSModel.ors.Vector3) → None
Parameters:origin (ORSModel.ors.Vector3) –
setSpacings(self, xSpacing: float, ySpacing: float) → None
Parameters:
  • xSpacing (float) –
  • ySpacing (float) –
shape
transform(self, aTransformationMatrix: ORSModel.ors.Matrix4x4) → None
Parameters:aTransformationMatrix (ORSModel.ors.Matrix4x4) –

ImageCollection

class ORSModel.ors.ImageCollection

Bases: ORSModel.ors.Node

deleteAllImages(self) → None

Deletes all images.

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getImageAtIndex(self, imageIndex: int) → Image

Gets the image at an index position.

Parameters:imageIndex (int) – the image index (an uint32_t)
Returns:output (ORSModel.ors.Image) – an image (an Image or NULL if index is invalid)
getImageCount(self) → int

Gets the image count.

Returns:output (int) – the count of images (an uint32_t)
getIndexOfImage(self, anImage: ORSModel.ors.Image) → int

Gets the index position of an image.

Note

Returns -1 if image is not present.

Parameters:anImage (ORSModel.ors.Image) – an image (an Image)
Returns:output (int) – the image index (an int)
insertImageAtIndex(self, imageIndex: int, anImage: ORSModel.ors.Image) → None

Inserts an image at a given index.

Parameters:
  • imageIndex (int) – the image index (an uint32_t)
  • anImage (ORSModel.ors.Image) – an image (an Image)
insertImageFirst(self, anImage: ORSModel.ors.Image) → None

Inserts an image at start of list.

Parameters:anImage (ORSModel.ors.Image) – an image (an Image)
insertImageLast(self, anImage: ORSModel.ors.Image) → None

Inserts an image at end of list.

Parameters:anImage (ORSModel.ors.Image) – an image (an Image)
none()

ImageCollection.__init__() -> ImageCollection

removeAllImages(self) → None

Removes all images.

removeImage(self, anImage: ORSModel.ors.Image) → None

Removes an image.

Parameters:anImage (ORSModel.ors.Image) – an image (an Image)
removeImageAtIndex(self, imageIndex: int) → None

Removes the image at given index.

Parameters:imageIndex (int) – the image index (an uint32_t)

ImageCollectionPresenter

class ORSModel.ors.ImageCollectionPresenter

Bases: ORSModel.ors.DatasetPresenter

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getImageIndexForView(self, aView: ORSModel.ors.View) → int
Parameters:aView (ORSModel.ors.View) –
Returns:output (int) –
getNodeVisibleForAllImage(self, aNode: ORSModel.ors.Node) → bool
Parameters:aNode (ORSModel.ors.Node) –
Returns:output (bool) –
getNodeVisibleForImage(self, aNode: ORSModel.ors.Node, anImage: ORSModel.ors.Image) → bool
Parameters:
Returns:

output (bool) –

getPresentationBoundedPlane(self) → Rectangle
Returns:output (ORSModel.ors.Rectangle) –
none()

ImageCollectionPresenter.__init__() -> ImageCollectionPresenter

setImageIndexForView(self, aView: ORSModel.ors.View, imageIndex: int) → None
Parameters:
setNodeNotVisibleForAllImage(self, aNode: ORSModel.ors.Node) → None
Parameters:aNode (ORSModel.ors.Node) –
setNodeNotVisibleForImage(self, aNode: ORSModel.ors.Node, anImage: ORSModel.ors.Image) → None
Parameters:
setNodeVisibleForAllImage(self, aNode: ORSModel.ors.Node) → None
Parameters:aNode (ORSModel.ors.Node) –
setNodeVisibleForImage(self, aNode: ORSModel.ors.Node, anImage: ORSModel.ors.Image) → None
Parameters:
setPresentationBoundedPlane(self, aBoudedPlane: ORSModel.ors.Rectangle) → None
Parameters:aBoudedPlane (ORSModel.ors.Rectangle) –

Intersection

class ORSModel.ors.Intersection

Bases: ORSModel.ors.Unmanaged

brief_description: Represents a ray pick result. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: View::pick(), Node::pick()

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClosestVisual(self) → Visual

Returns the picked visual object closest to the pick point.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the closest visual to the pick point.

Returns:output (ORSModel.ors.Visual) – a visual (an Visual), or NULL if no visual was picked
getClosestVisualOfClass(self, pProgId: str) → Visual

Returns the visual object of a given class closest to the pick point.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the closest visual to the pick point.

Parameters:pProgId (str) –
Returns:output (ORSModel.ors.Visual) – a visual (a Visual), or NULL if no visual was picked
getColor(self) → Color

Returns the color value of the intersection.

Returns:output (ORSModel.ors.Color) – a color (a Color)
getColorInPhysicalUnits(self) → Color

Gets the color value, adjusted to physical units (slope and offset).

Returns:output (ORSModel.ors.Color) – the color (a Color)
getControlPointIndexHit(self) → int
Returns:output (int) –
getDataUnit(self) → str
Returns:output (str) –
getDistance(self) → float

Returns the distance from the ray pick origin to the intersection.

Note

Distances are calculated in pixels.

Returns:output (float) – a double
getFarthestVisual(self) → Visual

Returns the picked visual object farthest from the pick point.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the farthest visual from the pick point.

Returns:output (ORSModel.ors.Visual) – a visual (a Visual), or NULL if no visual was picked
getFarthestVisualOfClass(self, pProgId: str) → Visual

Returns the visual object of a given class farthest from the pick point.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the farthest visual from the pick point.

Parameters:pProgId (str) –
Returns:output (ORSModel.ors.Visual) – a visual (a Visual), or NULL if no visual was picked
getHit(self) → bool

Checks if the ray pick intersects something.

Returns:output (bool) – true if the intersection is valid, false otherwise
getHitCount(self) → int
Returns:output (int) –
getMeshFace(self) → int

When picking a mesh, returns the face index of the triangle being picked.

Returns:output (int) – a face index in the mesh (a int32_t)
getMeshFaceBary1(self) → float

Returns the barycentric coordinate 1.

Returns:output (float) – a double between 0 and 1
getMeshFaceBary2(self) → float

Returns the barycentric coordinate 1.

Returns:output (float) – a double between 0 and 1
getMeshVertexIndex0(self) → int

When picking a mesh, returns the index 1 of the vertex being picked.

Returns:output (int) – a vertex index 1 (a int32_t)
getMeshVertexIndex1(self) → int

When picking a mesh, returns the index 1 of the vertex being picked.

Returns:output (int) – a vertex index 1 (a int32_t)
getMeshVertexIndex2(self) → int

When picking a mesh, returns the index 1 of the vertex being picked.

Returns:output (int) – a vertex index 1 (a int32_t)
getNearestMeshVertexIndex(self) → int

When picking a mesh, returns the vertex index nearest to the point being picked.

Returns:output (int) – a vertex index in the mesh (a int32_t)
getNthDistance(self, nth: int) → float
Parameters:nth (int) –
Returns:output (float) –
getNthLabel(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthMeshFace(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthMeshFaceBary1(self, nth: int) → float
Parameters:nth (int) –
Returns:output (float) –
getNthMeshFaceBary2(self, nth: int) → float
Parameters:nth (int) –
Returns:output (float) –
getNthMeshVertexIndex0(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthMeshVertexIndex1(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthMeshVertexIndex2(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthNearestMeshVertexIndex(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthPositionInLocalCoordinates(self, nth: int) → Vector3
Parameters:nth (int) –
Returns:output (ORSModel.ors.Vector3) –
getNthPositionInWorldCoordinates(self, nth: int) → Vector3
Parameters:nth (int) –
Returns:output (ORSModel.ors.Vector3) –
getNthScalarValue(self, nth: int) → float
Parameters:nth (int) –
Returns:output (float) –
getOffset(self) → float

Gets the intersection offset, which is the offset of the channel being picked.

Returns:output (float) – the offset (a double)
getPickDirection(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getPickOrigin(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getPixelPositionInView(self) → Vector3

Returns the position of the intersection in screen coordinates.

Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getPositionInLocalCoordinates(self) → Vector3

Returns the position of the intersection in local coordinates.

Returns:output (ORSModel.ors.Vector3) – a point (a Vector3)
getPositionInVoxelIndex(self) → Vector3

Returns the position of the intersection as X/Y/Z indicies.

Note

The point vector will contain X/Y/Z indicies.

Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getPositionInWorldCoordinates(self) → Vector3

Returns the position of the intersection in world coordinates.

Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getScalarValue(self) → float

Returns the scalar value of the picked triangle.

Returns:output (float) – the scalar value (a double)
getSlope(self) → float

Gets the intersection slope, which is the slope of the channel being picked.

Returns:output (float) – the slope (a double)
getStructuredGridAtIndex(self, iIndex: int) → StructuredGrid

Returns the Nth picked structured grid object.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the Nth visual.

Parameters:iIndex (int) – the structured grid index (an unsigned short, zero based)
Returns:output (ORSModel.ors.StructuredGrid) – a structured grid (a StructuredGrid), or NULL if the index given is invalid
getStructuredGridCount(self) → int

Returns the number of structured grid objects that were intersected by the ray pick.

Note

Since more than one structured grid can be found at any given point, this method returns how many visual objects were touched by the ray pick.

Returns:output (int) – a structured grid object count (an short)
getTimeStep(self) → int

Returns the T value of the intersection.

Returns:output (int) – a uint32_t
getVisualAtIndex(self, iIndex: int) → Visual

Returns the Nth picked visual object.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the Nth visual.

Parameters:iIndex (int) – the visual index (an unsigned short, zero based)
Returns:output (ORSModel.ors.Visual) – a visual (a Visual), or NULL if the index given is invalid
getVisualCount(self) → int

Returns the number of visual objects that were intersected by the ray pick.

Note

Since more than one visual can be found at any given point, this method returns how many visual objects were touched by the ray pick.

Returns:output (int) – a visual object count (an short)
getVoxelIndex(self) → int

Returns the index of the voxel being picked.

Note

The index is computed as follows: (T value * zSize * ySize * xSize) + (Z value * xSize * ySize) + (Y value * xSize) + (X value)

Returns:output (int) – an index (a int64_t)
getWindowLeveledNormalizedValue(self) → float

Returns the value with window leveling applied, normalized between 0 and 1.

Returns:output (float) – a double between 0 and 1
getXIndexInCurvedChannel(self) → float
Returns:output (float) –
getYIndexInCurvedChannel(self) → float
Returns:output (float) –
none()

Intersection.__init__() -> Intersection

Layout

class ORSModel.ors.Layout

Bases: ORSModel.ors.Managed

brief_description: object used to describe a view layout author: N Piche All other members of ORS participated. version: 1.0 date: December 2015 Object that represent a layout of views

addFirst(self, aLayout: ORSModel.ors.Layout) → None
Parameters:aLayout (ORSModel.ors.Layout) –
addLast(self, aLayout: ORSModel.ors.Layout) → None
Parameters:aLayout (ORSModel.ors.Layout) –
copy(self) → Layout

Returns a copy of the managed.

Note

Only the immediate attributes of the managed are copied. The graph surrounding the new managed is the same one as the source managed.

Note

You can type the return value of this method to any subclass of Managed, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be NULL.

Returns:output (ORSModel.ors.Layout) – a new managed (a Managed)
getAllChildLayout(self) → List
Returns:output (ORSModel.ors.List) –
getAllChildViews(self) → List
Returns:output (ORSModel.ors.List) –
getAllLeaves(self) → List
Returns:output (ORSModel.ors.List) –
getBottomRight(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getBottomRightPositionOfChildren(self, aLayout: ORSModel.ors.Layout) → Vector3
Parameters:aLayout (ORSModel.ors.Layout) –
Returns:output (ORSModel.ors.Vector3) –
getChildWithPrivateTitle(self, privateTitle: str) → Layout
Parameters:privateTitle (str) –
Returns:output (ORSModel.ors.Layout) –
getChildren(self) → List
Returns:output (ORSModel.ors.List) –
getChildrenAtIndex(self, index: int) → Layout
Parameters:index (int) –
Returns:output (ORSModel.ors.Layout) –
getChildrenCount(self) → int
Returns:output (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getContext()
getEnabled(self) → bool
Returns:output (bool) –
getEnabledChildrenCount(self) → int
Returns:output (int) –
getGenealogicalName(self) → str
Returns:output (str) –
getHasChildren(self) → bool
Returns:output (bool) –
getIsLayoutMyDescendent(self, aLayout: ORSModel.ors.Layout) → bool
Parameters:aLayout (ORSModel.ors.Layout) –
Returns:output (bool) –
getIsLinear(self) → bool
Returns:output (bool) –
getIsMyChildren(self, aLayout: ORSModel.ors.Layout) → bool
Parameters:aLayout (ORSModel.ors.Layout) –
Returns:output (bool) –
getIsVertical(self) → bool
Returns:output (bool) –
getLayoutClass(self) → str
Returns:output (str) –
getLeaveEmpty(self) → bool
Returns:output (bool) –
getParent(self) → Layout
Returns:output (ORSModel.ors.Layout) –
getTopLeft(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getTopLeftPositionOfChildren(self, aLayout: ORSModel.ors.Layout) → Vector3
Parameters:aLayout (ORSModel.ors.Layout) –
Returns:output (ORSModel.ors.Vector3) –
getViewGUID(self) → str
Returns:output (str) –
getWeight(self) → float
Returns:output (float) –
none()

Layout.__init__() -> Layout

normalizeChildrenWeights(self) → None
propagateLayoutUpdated(self) → bool
Returns:output (bool) –
removeAllChildren(self) → None
removeChildren(self, aLayout: ORSModel.ors.Layout) → None
Parameters:aLayout (ORSModel.ors.Layout) –
replaceChildren(self, aLayoutToBeReplace: ORSModel.ors.Layout, aLayoutReplacement: ORSModel.ors.Layout) → bool
Parameters:
Returns:

output (bool) –

setBottomRight(self, aVector: ORSModel.ors.Vector3) → None
Parameters:aVector (ORSModel.ors.Vector3) –
setEnabled(self, bEnabled: bool) → None
Parameters:bEnabled (bool) –
setIsLinear(self, aValue: bool) → None
Parameters:aValue (bool) –
setIsVertical(self, aValue: bool) → None
Parameters:aValue (bool) –
setLayoutClass(self, aClass: str) → None
Parameters:aClass (str) –
setLeaveEmpty(self, aValue: bool) → None
Parameters:aValue (bool) –
setTopLeft(self, aVector: ORSModel.ors.Vector3) → None
Parameters:aVector (ORSModel.ors.Vector3) –
setViewGUID(self, aGUID: str) → None
Parameters:aGUID (str) –
setWeight(self, aValue: float) → None
Parameters:aValue (float) –

Line

class ORSModel.ors.Line

Bases: ORSModel.ors.Shape2D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010

copy(self) → Line

Gets a copy of the receiver.

Returns:output (ORSModel.ors.Line) – a line (an Line)
createFromPythonRepresentation(aPythonRepresentation: str) → Line

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Line) –
fromOriginAndOrientation(self, origin: ORSModel.ors.Vector3, orientation: ORSModel.ors.Vector3) → None

Sets the the origin and orientation of the line.

Note

The orientation vector will be normalized.

Parameters:
fromPythonRepresentation(self, aPythonRepresentation: str) → bool
Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
fromTwoPoints(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3) → None

Sets the the origin and orientation of the line based on the two provided points.

Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClosestPointOnLineFromPoint(self, aPoint: ORSModel.ors.Vector3) → Vector3
Parameters:aPoint (ORSModel.ors.Vector3) –
Returns:output (ORSModel.ors.Vector3) –
getDistanceFromLine(self, aLine: ORSModel.ors.Line) → float
Parameters:aLine (ORSModel.ors.Line) –
Returns:output (float) –
getDistanceFromPoint(self, pVect: ORSModel.ors.Vector3) → float

Gets the distance from the receiver to the provided point.

Parameters:pVect (ORSModel.ors.Vector3) – a point (an Vector3)
Returns:output (float) – the distance (a double)
getIsEqualTo(self, aLine: ORSModel.ors.Line) → bool
Parameters:aLine (ORSModel.ors.Line) –
Returns:output (bool) –
getOrientation(self) → Vector3

Gets the receiver orientation.

Note

The orientation vector is normalized.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getOrigin(self) → Vector3

Gets the receiver origin position.

Note

The origin is in world coordinates.

Returns:output (ORSModel.ors.Vector3) – the origin (an Vector3)
getPythonRepresentation(self) → str
Returns:output (str) –
none()

Line.__init__() -> Line

setOrientation(self, pVect: ORSModel.ors.Vector3) → None

Sets the receiver orientation.

Note

The orientation vector will be normalized.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setOrigin(self, pVect: ORSModel.ors.Vector3) → None

Sets the receiver origin position.

Note

The origin should be in world coordinates.

Parameters:pVect (ORSModel.ors.Vector3) – a poing (an Vector3)

LineSegment

class ORSModel.ors.LineSegment

Bases: ORSModel.ors.Shape2D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010

copy(self) → LineSegment

Gets a copy of the receiver.

Returns:output (ORSModel.ors.LineSegment) – a box (an LineSegment)
createFromPythonRepresentation(aPythonRepresentation: str) → LineSegment

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.LineSegment) –
fromOriginAndDirectionAndLength(self, origin: ORSModel.ors.Vector3, direction: ORSModel.ors.Vector3, length: float) → None
Parameters:
fromPythonRepresentation(self, aPythonRepresentation: str) → bool
Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDistanceFromPoint(self, pVect: ORSModel.ors.Vector3) → float

Gets the distance from the receiver to the provided point,.

Parameters:pVect (ORSModel.ors.Vector3) – a point (an Vector3)
Returns:output (float) – the distance (a double)
getEnd(self) → Vector3

Gets the receiver end point.

Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getIsEqualTo(self, aLineSegment: ORSModel.ors.LineSegment) → bool
Parameters:aLineSegment (ORSModel.ors.LineSegment) –
Returns:output (bool) –
getLength(self) → float

Gets the receiver length.

Returns:output (float) – a length (a double)
getPythonRepresentation(self) → str
Returns:output (str) –
getStart(self) → Vector3

Gets the receiver start point.

Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
none()

LineSegment.__init__() -> LineSegment

setEnd(self, pVect: ORSModel.ors.Vector3) → None

Sets the receiver end point.

Parameters:pVect (ORSModel.ors.Vector3) – a point (an Vector3)
setStart(self, pVect: ORSModel.ors.Vector3) → None

Set the receiver start point.

Parameters:pVect (ORSModel.ors.Vector3) – a point (an Vector3)

List

class ORSModel.ors.List

Bases: ORSModel.ors.ORSBaseClass

brief_description: A list of author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: Managed, Node A list of Managed instances. Several methods in the SDK return lists of objects. Some typecasts are necessary to convert Object instances to their correct type because all services of List take or return only Managed instances.

add(self, pObject: ORSModel.ors.Managed) → None

Adds an object to the list.

Parameters:pObject (ORSModel.ors.Managed) – an object (an Object)
appendAllObjects(self, pList: ORSModel.ors.List) → None

Appends a list to the list.

Note

All objects are taken from the appended list, whether or not they are already in the receiver list.

Parameters:pList (ORSModel.ors.List) – a list (a List)
appendNonPresentObjects(self, pList: ORSModel.ors.List) → None

Appends a list to the list, taking only the objects not present in the receiver.

Note

Only the objects not already in the receiver are taken from the appended list.

Parameters:pList (ORSModel.ors.List) – a list (a List)
extend(iterable)
getAllElementsOfClass(self, sClassname: str) → List

Gets all the elements that belong to a given class.

Parameters:sClassname (str) – the class name of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list (a List)
getClassNameStatic() → str
Returns:output (str) –
getCount(self) → int

Returns the count of objects in the list.

Returns:output (int) – object count (an uint32_t)
getIncludes(self, pObject: ORSModel.ors.Managed) → bool

Verifies if an object is present in the list.

Parameters:pObject (ORSModel.ors.Managed) – an object (an Object)
Returns:output (bool) – true if object is in the list, false otherwise
getIndexOf(self, pObject: ORSModel.ors.Managed) → int
Parameters:pObject (ORSModel.ors.Managed) –
Returns:output (int) –
getIntersectionWith(self, pList: ORSModel.ors.List) → List

Returns the intersection of the list with another list.

Note

Objects duplicated in both lists only appear once in the intersected list.

Parameters:pList (ORSModel.ors.List) – a list (a List)
Returns:output (ORSModel.ors.List) – a new list (a List)
getObjectAt(self, pos: int) → Managed

Gets an object from the list at the specified index.

Note

Index starts at zero (zero-based).

Note

When the type of the object is known, you can pre-type it as it will automatically typecast to the correct type, for example: Channel IChan = someList->getObjectAt(0). If the object at index 0 is not a channel, IChan will be none.

Parameters:pos (int) – an index (an uint32_t)
Returns:output (ORSModel.ors.Managed) – an object (a Managed)
getPythonRepresentation(self) → str

Returns the python representation of the list.

Returns:output (str) – str
getSubtractionFrom(self, pList: ORSModel.ors.List) → List

Returns the subtraction of another list from the list.

Note

The subtraction results in a list of objects only in the receiver (union of both lists is removed from the list, or A - (A U B)).

Parameters:pList (ORSModel.ors.List) – a list (a List)
Returns:output (ORSModel.ors.List) – a new list (a List)
getUnionWith(self, pList: ORSModel.ors.List) → List

Returns the union of the list with another list.

Note

Objects duplicated in both lists only appear once in the unionized list.

Parameters:pList (ORSModel.ors.List) – a list (a List)
Returns:output (ORSModel.ors.List) – a new list (a List)
index(item)
isNone(self) → bool
Returns:output (bool) –
isNotNone(self) → bool
Returns:output (bool) –
loadEmptyObjectsFromFile(self, sFilename: str) → None

Create empty objects from all the objects found within the file and adds them to the list.

Note

This is meant to quickly analyze an object or session file to know what types of objects are within. An empty object of the correct class will be created for every object defined in the file.

Parameters:sFilename (str) – an input filename (a string)
loadFromFile(self, sFilename: str, preserveIdentity: bool, progress: ORSModel.ors.Progress) → None

Loads all the objects found within the file and adds them to the list.

Note

This illustrates the meaning of the “preserve identity” argument, if you load a file that has the same object twice in a row, if you preserve identity you’ll obtain 1 object, if you don’t preserve identity you’ll obtain 2 objects (both having the same internal state).

Parameters:
  • sFilename (str) – an input filename (a string)
  • preserveIdentity (bool) – true to preserve identity, false otherwise (see note)
  • progress (ORSModel.ors.Progress) – a progress object
loadFromFileFiltered(self, sFilename: str, preserveIdentity: bool, classNames: ORSModel.ors.typing.List[str], progress: ORSModel.ors.Progress) → None

Loads all the objects found within the file and adds them to the list, keeping only specified classes.

Note

This illustrates the meaning of the “preserve identity” argument, if you load a file that has the same object twice in a row, if you preserve identity you’ll obtain 1 object, if you don’t preserve identity you’ll obtain 2 objects (both having the same internal state).

Note

The filter list should be a list of class names to filter on, for example, to load only ROI and MultiROI objects, one would specify ROI.getClassNameStatic() and MultiROI.getClassNameStatic().

Parameters:
  • sFilename (str) – an input filename (a string)
  • preserveIdentity (bool) – true to preserve identity, false otherwise (see note)
  • classNames (typing.List[str]) – list of class names (see note)
  • progress (ORSModel.ors.Progress) – a progress object
none()

List.__init__() -> List

remove(self, pObject: ORSModel.ors.Managed) → bool

Removes an object from the list.

Parameters:pObject (ORSModel.ors.Managed) – an object (an Object)
Returns:output (bool) – true if object was removed, false otherwise (it wasn’t in the list)
removeDuplicates(self) → None
saveToFile(self, sFilename: str) → int

Saves all the objects in the list to a file.

Parameters:sFilename (str) – an output filename (a string)
Returns:output (int) – a result (an int, 0 for no error, otherwise an error code)

Loader

class ORSModel.ors.Loader

Bases: ORSModel.ors.Managed

brief_description: Allows to load previously saved author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: Saver Allows to load previously saved ORS objects. ORS objects are saved in XML format, so this loader uses internally the msxml framework (hence the frequent mention of DOM). Can be used to load and parse any XML (i.e. not only to load objects).

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCurrentNodeAttributeValue(self, attributeName: str) → str
Parameters:attributeName (str) –
Returns:output (str) –
getCurrentNodeBoolAttributeValue(self, sAttributeName: str) → bool

Gets a boolean attribute from the current node in an XML tree being parsed.

Note

Return is false if attribute name is not found.

Parameters:sAttributeName (str) – the attribute name (a string)
Returns:output (bool) – the value (a bool)
getCurrentNodeBoolValue(self) → bool

Gets the current node boolean value in an XML tree being parsed.

Returns:output (bool) – the node value (a bool)
getCurrentNodeDoubleAttributeValue(self, sAttributeName: str) → float

Gets a double attribute from the current node in an XML tree being parsed.

Note

Return is 0.0 if attribute name is not found.

Parameters:sAttributeName (str) – the attribute name (a string)
Returns:output (float) – the value (a double)
getCurrentNodeDoubleValue(self) → float

Gets the current node double value in an XML tree being parsed.

Returns:output (float) – the node value (a double)
getCurrentNodeFloatAttributeValue(self, sAttributeName: str) → float

Gets a float attribute from the current node in an XML tree being parsed.

Note

Return is 0.0f if attribute name is not found.

Parameters:sAttributeName (str) – the attribute name (a string)
Returns:output (float) – the value (a float)
getCurrentNodeFloatValue(self) → float

Gets the current node float value in an XML tree being parsed.

Returns:output (float) – the node value (a float)
getCurrentNodeIntAttributeValue(self, sAttributeName: str) → int

Gets an int attribute from the current node in an XML tree being parsed.

Note

Return is 0 if attribute name is not found.

Parameters:sAttributeName (str) – the attribute name (a string)
Returns:output (int) – the value (an int)
getCurrentNodeIntValue(self) → int

Gets the current node int value in an XML tree being parsed.

Returns:output (int) – the node value (an int)
getCurrentNodeLONGLONGValue(self) → int

Gets the current node int64_t value in an XML tree being parsed.

Returns:output (int) – the node value (a int64_t)
getCurrentNodeName(self) → str
Returns:output (str) –
getCurrentNodeShortAttributeValue(self, sAttributeName: str) → int

Gets a short attribute from the current node in an XML tree being parsed.

Note

Return is 0 if attribute name is not found.

Parameters:sAttributeName (str) – the attribute name (a string)
Returns:output (int) – the value (a short)
getCurrentNodeShortValue(self) → int

Gets the current node short value in an XML tree being parsed.

Returns:output (int) – the node value (a short)
getCurrentNodeULONGLONGValue(self) → int

Gets the current node uint64_t value in an XML tree being parsed.

Returns:output (int) – the node value (an uint64_t)
getCurrentNodeUnsignedIntAttributeValue(self, sAttributeName: str) → int

Gets an unsigned int attribute from the current node in an XML tree being parsed.

Note

Return is 0 if attribute name is not found.

Parameters:sAttributeName (str) – the attribute name (a string)
Returns:output (int) – the value (an int)
getCurrentNodeUnsignedIntValue(self) → int

Gets the current node unsigned int value in an XML tree being parsed.

Returns:output (int) – the node value (an int)
getCurrentNodeUnsignedShortAttributeValue(self, sAttributeName: str) → int

Gets an unsigned short attribute from the current node in an XML tree being parsed.

Note

Return is 0 if attribute name is not found.

Parameters:sAttributeName (str) – the attribute name (a string)
Returns:output (int) – the value (an short)
getCurrentNodeUnsignedShortValue(self) → int

Gets the current node unsigned short value in an XML tree being parsed.

Returns:output (int) – the node value (an short)
getCurrentNodeValue(self) → str
Returns:output (str) –
getNodeBoolValueFromCurrentNode(self, sElementName: str) → bool

Gets a boolean element from the current node in an XML tree being parsed.

Note

Return is false if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (bool) – the value (a bool)
getNodeCount(self, pXpath: str) → int

Returns the nodes count according to an XPATH.

Parameters:pXpath (str) – the XPATH to search for (a string)
Returns:output (int) – the number of nodes found (an int)
getNodeDoubleValueFromCurrentNode(self, sElementName: str) → float

Gets a double element from the current node in an XML tree being parsed.

Note

Return is 0.0f if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (float) – the value (a double)
getNodeFloatValueFromCurrentNode(self, sElementName: str) → float

Gets a float element from the current node in an XML tree being parsed.

Note

Return is 0.0f if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (float) – the value (a float)
getNodeIntValueFromCurrentNode(self, sElementName: str) → int

Gets an int element from the current node in an XML tree being parsed.

Note

Return is 0 if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (int) – the value (an int)
getNodeLONGLONGValueFromCurrentNode(self, sElementName: str) → int

Gets a int64_t element from the current node in an XML tree being parsed.

Note

Return is 0 if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (int) – the value (a int64_t)
getNodeShortValueFromCurrentNode(self, sElementName: str) → int

Gets a short element from the current node in an XML tree being parsed.

Note

Return is 0 if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (int) – the value (a short)
getNodeULONGLONGValueFromCurrentNode(self, sElementName: str) → int

Gets a uint64_t element from the current node in an XML tree being parsed.

Note

Return is 0 if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (int) – the value (an uint64_t)
getNodeUnsignedIntValueFromCurrentNode(self, sElementName: str) → int

Gets an unsigned int element from the current node in an XML tree being parsed.

Note

Return is 0 if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (int) – the value (an int)
getNodeUnsignedShortValueFromCurrentNode(self, sElementName: str) → int

Gets an unsigned short element from the current node in an XML tree being parsed.

Note

Return is 0 if element name is not valid nor found.

Parameters:sElementName (str) – the element name (a string)
Returns:output (int) – the value (an short)
getNodeValueFromCurrentNode(self, pXpath: str) → str
Parameters:pXpath (str) –
Returns:output (str) –
getVersionFromFile(self, filename: str) → str

Returns the version number stored in a session file.

Parameters:filename (str) – the file name (a string)
Returns:output (str) – the version number (a string)
loadObjectsFromFile(self, filename: str) → None

Loads objects from a file.

Note

All ORS objects can save themselves to file, in an XML format.

Parameters:filename (str) – the file name (a string)
loadObjectsFromXML(self, anXML: str) → None

Loads objects from an XML string.

Note

All ORS objects can save themselves in an XML format.

Parameters:anXML (str) – the XML (a string)
none()

Loader.__init__() -> Loader

pop(self) → None

Goes up one level in an XML tree being parsed.

setCurrentNode(self, pXpath: str) → bool

Selects a node in an XML tree being parsed.

Parameters:pXpath (str) – an XPath (a string)
Returns:output (bool) – true if successful, false otherwise
setCurrentNodeFromCurrentNode(self, pXpath: str) → bool

Selects a node in an XML tree, under the current node.

Note

The node is only searched under the current node of the tree.

Parameters:pXpath (str) – the node name (a string)
Returns:output (bool) – true if successful, false otherwise
setCurrentNodeToCurrentNodeNextSibling(self) → bool

Moves to the next node equivalent to the current node, in an XML tree being parsed.

Returns:output (bool) – true if successful, false otherwise
setXMLString(self, aXMLString: str) → bool

Gives an XML string to the loader and DOMifies it.

Parameters:aXMLString (str) – an XML string (a string)
Returns:output (bool) – true if the XML is valid, false otherwise
setXMLStringFromFilename(self, filename: str) → bool

Gives an XML string from a file to the loader and DOMifies it.

Parameters:filename (str) – a filename containing the XML string (a string)
Returns:output (bool) – true if the XML is valid, false otherwise

LookupTable

class ORSModel.ors.LookupTable

Bases: ORSModel.ors.Node

brief_description: A Lookup Table that can adopt predefined and/or custom looks. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: August 2005 see: VisualMesh::setLookupTable(), Vector3::setLookupTable() A Lookup Table that can adopt predefined and/or custom looks. It contains the ambiant, power, diffuse, emissive and specular properties.

appendColor(self, IColor: ORSModel.ors.Color) → None

Add a color at the end of the table.

Parameters:IColor (ORSModel.ors.Color) –
build(self) → None

Builds the LUT according to its settings.

buildDiscreteLUT(self) → None

Build Discrete lut control point array from color table.

Note

User-defined LUTs use control points.

copyFrom(self, ILookupTable: ORSModel.ors.LookupTable) → None

Copy internal parameters from the given lookup table.

Parameters:ILookupTable (ORSModel.ors.LookupTable) –
fillRGBAColorArray(self, startIndex: int, endIndex: int, colorsArray: int, subtractFactors: int) → None

Dump the lut in arrays.

Parameters:
  • startIndex (int) – startIndex
  • endIndex (int) – endIndex
  • colorsArray (bytes) – colorsArray an unsigned char* array of size 4*getTableSize()
  • subtractFactors (bytes) – subtractFactors an unsigned char* array of size getTableSize()
findControlPointIndexForPosition(self, pX: float) → int

Searches for a control point according to its position.

Parameters:pX (float) – the X coordinate of the control point (a double)
Returns:output (int) – the index control point (a uint32_t)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getColorAtIndex(self, inValue: int) → Color

Get color at a given index.

Parameters:inValue (int) – the color index (in range [0, getTableSize()-1] ) (a uint32_t)
Returns:output (ORSModel.ors.Color) –
getColorAtPosition(self, position: float) → Color

Gets the color at a given position.

Note

This method returns a color at a position normalized between 0 and 1. If the position does not exactly match an existing control point, the returned color will be an interpolation of the two closest colors.

Parameters:position (float) – the position (a double, see note)
Returns:output (ORSModel.ors.Color) – the color (a Color)
getColorFromPosition(self, position: float, aColor: ORSModel.ors.Color) → None

Gets the color at a given position.

Note

This method returns the color at a position normalized between 0 and 1. If the position does not exactly match an existing control point, the returned color will be an interpolation of the two closest colors.

Parameters:
  • position (float) – the position (a double, see note)
  • aColor (ORSModel.ors.Color) – a Color object
getControlPointColor(self, index: int) → Color

Retrieves the color of a control point.

Parameters:index (int) – the control point index (a uint32_t)
Returns:output (ORSModel.ors.Color) – the color (an Color)
getControlPointCount(self) → int

Retrieves the total number of control points in the LUT.

Returns:output (int) – the number of control points (a uint32_t)
getControlPointPositionX(self, index: int) → float

Retrieves the X coordinate of a control point.

Parameters:index (int) – the control point index (a uint32_t)
Returns:output (float) – the X coordinate of the control point (a double)
getControlPointPositionY(self, index: int) → float

Retrieves the Y coordinate of a control point.

Parameters:index (int) – the control point index (a uint32_t)
Returns:output (float) – the Y coordinate of the control point (a double)
getGamma(self) → float

Gets the gamma value.

Returns:output (float) – the gamma value (a double)
getIsDiscrete(self) → bool

Get if the lookup table is discrete.

Returns:output (bool) –
getTableSize(self) → int

Get the table size.

Returns:output (int) – the table size (a uint32_t)
insertControlPointAt(self, index: int, x: float, y: float, IColor: ORSModel.ors.Color) → None

Inserts a control point.

Parameters:
  • index (int) – the control point index (a uint32_t)
  • x (float) – the X coordinate of the control point (a double)
  • y (float) – the Y coordinate of the control point (a double)
  • IColor (ORSModel.ors.Color) – the color (a Color)
none()

LookupTable.__init__() -> LookupTable

removeAllControlPoints(self) → None

Removes all LUT control points.

removeColorAtIndex(self, nIndex: int) → bool

Removes the color at the given index.

Parameters:nIndex (int) –
Returns:output (bool) –
removeControlPointAt(self, index: int) → None

Removes a control point.

Parameters:index (int) – the control point index (a uint32_t)
setColorAtIndex(self, nIndex: int, IColor: ORSModel.ors.Color) → None

Sets the color at the given index.

Parameters:
setColorAtPosition(self, position: float, IColor: ORSModel.ors.Color) → None

Sets the color at a given position.

Note

The position is normalized between 0 and 1. The color that will be changed will be the closest control point color.

Parameters:
setColorForIndexRange(self, nStartIndex: int, nEndIndex: int, IColor: ORSModel.ors.Color) → None

Set color at a given index range.

Parameters:
  • nStartIndex (int) – the color start index (in range [0, getTableSize()-1] ) (a uint32_t)
  • nEndIndex (int) – the color end index (in range [0, getTableSize()-1] ) (a uint32_t)
  • IColor (ORSModel.ors.Color) – the color (a Color)
setControlPointColor(self, index: int, IColor: ORSModel.ors.Color) → None

Changes the color of a control point.

Parameters:
  • index (int) – the control point index (a uint32_t)
  • IColor (ORSModel.ors.Color) – the color (a Color)
setControlPointPosition(self, index: int, pX: float, pY: float) → None

Changes the position of a control point.

Parameters:
  • index (int) – the control point index (a uint32_t)
  • pX (float) – the new X coordinate of the control point (a double)
  • pY (float) – the new Y coordinate of the control point (a double)
setGamma(self, value: float) → None

Sets the gamma value.

Parameters:value (float) – the gamma value (a double)
setIsDiscrete(self, bDiscrete: bool) → None

Sets the lookup table as discrete.

Parameters:bDiscrete (bool) –
setRampBMPFile(self, filepath: str) → None

Sets the LUT to BMP file.

Parameters:filepath (str) –
setRampGrayScale(self) → None

Sets the LUT to be gray scale.

Note

Gray scale LUTs divide the color range in 255 gray tones.

setRampRainbow(self) → None

Sets the LUT to be rainbow.

Note

Rainbow LUTs divide the color range in 4 sections.

setRampUserDefined(self) → None

Sets the LUT to be user-defined.

Note

User-defined LUTs use control points.

setTableSize(self, size: int) → None

Sets the table size.

Parameters:size (int) –

Managed

class ORSModel.ors.Managed

Bases: ORSModel.ors.ORSBaseClass

brief_description: The “mother” of all author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

addCallbackToEvent(self, anEventName: str, sCallbackName: str, callbackData: int) → bool

Adds a callback subscription to an event.

Note

The callback name for a given event needs to be unique for that event, i.e. no two callbacks for a given event can have the same name.

Parameters:
  • anEventName (str) – name of the event to subscribe to (a string)
  • sCallbackName (str) – callback name (a string)
  • callbackData (int) – a pointer to a ORS_EVENT_CALLBACK_INFO structure
Returns:

output (bool) – true if subscription succeeded, false otherwise

addToDeleteSet(self, anIObject: ORSModel.ors.Managed) → None

Add an object to the delete set.

Note

All objects have a delete set, which designates those objects that should also be deleted when the receiver gets deleted.

Parameters:anIObject (ORSModel.ors.Managed) – an object (a Managed)
applyPreferences()

Helper for setting the attribute of the object following the preferences

atomicLoad(sFilename: str, bPreserveIdentity: bool) → Managed

Creates an object from a file where an object was save.

Parameters:
  • sFilename (str) – path of the file to load
  • bPreserveIdentity (bool) – if true, preserves the identity of the object, false otherwise
Returns:

output (Managed) – a managed object, or none() if the load fails

atomicLoadFrom(self, anXML: str) → None

Loads an object from an XML string.

Parameters:anXML (str) –

Managed.atomicLoadFrom(self, buffer: int, nBytes: int) -> None

Loads an object from a buffer. Used for python pickling.

Parameters:
  • buffer (bytes) – the buffer
  • nBytes (int) – the number of bytes in the buffer (a 64 bit unsigned int)
atomicLoadSpecificNode(self, aFilename: str, aXPathOfTheNodeToLoad: str) → bool

Loads an object from a file containing several objects.

Parameters:
  • aFilename (str) –
  • aXPathOfTheNodeToLoad (str) –
Returns:

output (bool) –

atomicSave(self, aFilename: str, isTemporary: bool) → int

Saves the object to a file.

Parameters:
  • aFilename (str) – path of the file to save
  • isTemporary (bool) – if true, try to keep file in memory
Returns:

output (int) – 0 if successful, otherwise an error code

copy(self) → Managed

Returns a copy of the managed.

Note

Only the immediate attributes of the managed are copied. The graph surrounding the new managed is the same one as the source managed.

Note

You can type the return value of this method to any subclass of Managed, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be NULL.

Returns:output (ORSModel.ors.Managed) – a new managed (a Managed)
deleteObject(self) → None

Explicitly deletes the core object wrapped by this Interface object.

deleteObjectAndAllItsChildren(self) → None

Explicitly deletes the core object wrapped by this Interface object, along with all its children.

getAllGroupsContaining(self, anIObject: ORSModel.ors.Managed) → List

Gets all the groups that contain the given object.

Parameters:anIObject (ORSModel.ors.Managed) –
Returns:output (ORSModel.ors.List) –
classmethod getAllInstances()
getAllInstancesOf(pProgId: str) → List

Gathers all existing objects of the specified class.

Parameters:pProgId (str) –
Returns:output (ORSModel.ors.List) –
classmethod getAllObjectsOfClass(cls_name)
getAllObjectsOfClassAndPrivateTitle(pProgId: str, pPrivateTitle: str) → List

Gathers all existing objects of the specified class, that have a matching private title.

Parameters:
  • pProgId (str) – name of the class (a string)
  • pPrivateTitle (str) – private title to search for (a string)
Returns:

output (ORSModel.ors.List) – all the objects that match the search criteria (a List)

getAllObjectsOfClassAndUserData(pProgId: str, userDataKey: str, userDataValue: str) → List

Gathers all existing objects of the specified class, that have a matching user data.

Parameters:
  • pProgId (str) – name of the class (a string)
  • userDataKey (str) – key of the user data (a string)
  • userDataValue (str) – value to look for (a string)
Returns:

output (ORSModel.ors.List) – all the objects that match the search criteria (a List)

classmethod getAllSubclasses(outputCollection=None)
getAtomicTextRepresentation(self, bSelfContained: bool) → str

Retrieves the object’s atomic text representation.

Parameters:bSelfContained (bool) –
Returns:output (str) –
getBinaryUserInfo(self, pTag: str) → None

Retrieves a user defined binary value. Typed as void* for sip, but it’s in reality an unsigned char*.

Note

If the key doesn’t exist, nullptr is returned

Parameters:pTag (str) – key of the data (a string)
getBinaryUserInfoAsBytes(name)
getBinaryUserInfoSize(self, pTag: str) → int

Retrieves the size of a user defined binary value.

Note

If the key doesn’t exist, 0 is returned

Parameters:pTag (str) – key of the data (a string)
Returns:output (int) – the size of the data (a uint32_t)
getCallbacksEnabled(self) → bool

Queries the object to know if its callbacks are enabled or disabled.

Returns:output (bool) – true if callbacks are enabled, false otherwise
getCanBeDeleted(self) → bool

Queries the object to know if it can safely be deleted.

Returns:output (bool) –
classmethod getClassDenomination()
static getClassFromProgId(progId)
getClassName(self) → str

Retrieves the class name of the core object wrapped by this Interface object.

Returns:output (str) – the class name (a string)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCreationTime(self) → int

Returns the time Number of seconds since Jan 1 2000 of creation of this object.

Returns:output (int) – a uint32_t
getDataDirtySignature()

Gets the current dirty signature for the flag OrsDataDirty

Returns:dataDirtySignature (int) – the dirty signature
getDirtySignature(self, dirtyFlag: str) → int

Gets the current dirty signature.

Note

Objects can be dirty for several aspects, see the ors_def.h file for the different dirty aspects.

Parameters:dirtyFlag (str) – dirty flag name (a string, see note below)
Returns:output (int) – dirty signature (a uint32_t)
getEventCallbackEnabled(self, sEventName: str, sCallbackName: str) → bool

Gets the enabled state of a callback subscription to an event.

Parameters:
  • sEventName (str) – event name (a string)
  • sCallbackName (str) – callback name (a string)
Returns:

output (bool) – true if callback is enabled, false if disabled or if the callback subscription did not exist

getGUID(self) → str

Retrieves the GUID of the core object.

Note

The GUID is the unique identifier of the object. No two objects can have the same GUID. Once you have an object’s GUID, at any time you can obtain a reference to that object via its GUID, given that the object is still alive.

Returns:output (str) –
getGeometryDirtySignature()

Gets the current dirty signature for the flag OrsGeometryDirty

Returns:geometryDirtySignature (int) – the dirty signature
getHasCallbacksForEvent(self, anEventName: str) → bool

Checks if the receiver has any callbacks for an event.

Parameters:anEventName (str) – name of the event (a string)
Returns:output (bool) –
getIsDirty(self, dirtyFlag: str) → bool

Gets if the object is dirty for a specific dirty flag.

Parameters:dirtyFlag (str) – dirty flag name (a string, see note below)
Returns:output (bool) – true if object is dirty, false otherwise
getIsDirtyAnyDirtyFlag(self) → bool

Gets if the object is dirty for any of the dirty flags.

Returns:output (bool) – true if object is dirty, false otherwise
getIsEqualTo(self, aManaged: ORSModel.ors.Managed) → bool

Checks if the two objects are equal.

Parameters:aManaged (ORSModel.ors.Managed) – an object to compare with (a Managed)
Returns:output (bool) – true if the receiver and the argument are equal (class dependent), false otherwise
getIsIdentityPreservedForPickling(self) → bool

Returns True if the GUID is preserved when pickling and unpickling an object.

Returns:output (bool) – Returns True if the GUID is preserved when pickling and unpickling an object
getIsInstanceOf(self, pProgId: str) → bool

Queries the object to know if it is an instance of a certain class.

Parameters:pProgId (str) –
Returns:output (bool) –
getIsInstanceOfAtLeastOneClasses(progIdList)
getIsRepresentable(self) → bool

Queries the object to know if it is representable.

Returns:output (bool) –
getIsSameObjectAs(self, anObject: ORSModel.ors.Managed) → bool

Checks to see if the receiver wraps the same underlying object as the supplied argument.

Parameters:anObject (ORSModel.ors.Managed) – an object to compare with (a Managed)
Returns:output (bool) – true if underlying object is the same for both the receiver and the argument, false otherwise
classmethod getIsSubclassOf(parentClass)
getIsToBeKeptAliveUntilExit(self) → bool

Queries the object to know if it is permanent for the life of the application.

Note

Permanent objects survive a new session, i.e. they live until the application is terminated.

Returns:output (bool) – true if object is permanent, false otherwise
getIsToBeSaved(self) → bool

Queries the object to know if it should be saved in a session file.

Returns:output (bool) – true if object should be saved, false otherwise
getObjectWithGUID(guid: str) → Managed

Retrieves an object from its GUID.

Parameters:guid (str) – a GUID (a string)
Returns:output (ORSModel.ors.Managed) – An object or none if object is not found
getPrivateTitle(self) → str

Gets the private title of the object.

Note

The private title is never shown in the application, but is a means by which an object can be found (getAllObjectsOfClassAndPrivateTitle for example).

Returns:output (str) –
getPropertyDirtySignature()

Gets the current dirty signature for the flag OrsPropertyDirty

Returns:propertyDirtySignature (int) – the dirty signature
getPythonRepresentation(self) → str

Gets a Python evaluable string representation.

Returns:output (str) – The object’s representation (a string)
getReferenceCount(self) → int

Returns the count of references to the object.

Returns:output (int) – the count of references (an int)
getTitle(self) → str

Gets the title of the object.

Returns:output (str) – the title (a string)
getUserInfo(self, pTag: str) → str

Retrieves a user defined value.

Note

If the key doesn’t exist an empty string is returned.

Parameters:pTag (str) – key of the data (a string)
Returns:output (str) – the data (a string)
getVisibilityDirtySignature()

Gets the current dirty signature for the flag OrsVisibilityDirty

Returns:visibilityDirtySignature (int) – the dirty signature
isManaged(self) → bool
Returns:output (bool) –
isNone(self) → bool

check if the object is none

Returns:output (bool) –
isNotNone(self) → bool

check if the object is Not none

Returns:output (bool) –
none()

Managed.__init__() -> Managed

publish()

Sets an object as representable and notifies the Dragonfly UI of a new available object

removeBinaryUserInfo(self, pTag: str) → None

Removes a user defined binary value.

Parameters:pTag (str) – key name of the binary value (a string)
removeCallbackFromEvent(self, sEventName: str, sCallbackName: str) → bool

Removes a callback subscription to an event.

Parameters:
  • sEventName (str) – name of the callback event (a string)
  • sCallbackName (str) – name of the callback (a string)
Returns:

output (bool) – true callback existed, false otherwise

removeFromDeleteSet(self, anIObject: ORSModel.ors.Managed) → None

Remove an object from the delete set.

Note

The delete set is a list of objects that are to be deleted when the receiver is deleted.

Parameters:anIObject (ORSModel.ors.Managed) – object to be removed from the delete set (a Managed)
removeUserInfo(self, pTag: str) → None

Removes a user defined value.

Parameters:pTag (str) – key of the data (a string)
setAsTemporaryObject(isTemporaryObject=True)

Helper for setting useful properties when marking an object as a (non-)temporary object.

Parameters:isTemporaryObject (bool) – if True, the object will be set as temporary (not representable, not to be saved, callbacks disabled). Otherwise, these properties are set as the opposite.
setBinaryUserInfo(self, pTag: str, pValue: int, iDataSize: int) → None

Sets a user defined binary value.

Note

Objects can carry user defined data in the form of strings or binary data.

Parameters:
  • pTag (str) – key of the data (a string)
  • pValue (bytes) – the data (an unsigned char* buffer)
  • iDataSize (int) – the size of the data (a uint32_t)
setCallbacksEnabled(self, enabled: bool) → None

Sets the object’s callbacks to be enabled or not.

Note

When an object’s callbacks are disabled, absolutely no callbacks are triggered from the receiver.

Parameters:enabled (bool) – true to enable callbacks, false otherwise
setCanBeDeleted(self, bFlag: bool) → None

Sets the object to be deletable or not.

Parameters:bFlag (bool) –
setDataDirty()

Calls for a setDirty with the flag OrsDataDirty

setDirty(self, dirtyFlag: str) → None

Sets the object as being dirty for a given aspect.

Note

A dirty object is an object that has changed, giving its observers a chance to refresh their view on the object. Several aspects of an object can be dirty, see ORS_def.h for dirty signature flags.

Parameters:dirtyFlag (str) – dirty flag name (a string)
setEventCallbackEnabled(self, sEventName: str, sCallbackName: str, bValue: bool) → bool

Enables/disables a callback subscription to an event.

Note

Works for all callback types (object, class and global)

Parameters:
  • sEventName (str) – event name (a string)
  • sCallbackName (str) – callback name (a string)
  • bValue (bool) – true to enable the callback, false to disable it
Returns:

output (bool) – true if callback subscription existed, false otherwise

setGeometryDirty()

Calls for a setDirty with the flag OrsGeometryDirty

setIdentityIsPreservedForPickling(self, value: bool) → None

Set to True if the GUID is to be preserved when pickling and unpickling an object.

Parameters:value (bool) –
setIsNotDirty(self) → None

Sets the object as not being dirty for all dirty flags.

setIsRepresentable(self, isRepresentable: bool) → None

Sets the object to be representable or not.

Note

Non representable objects don’t appear in lists and such, the implicit meaning is that these objects are transient and temporary.

Parameters:isRepresentable (bool) – true to make the object representable, false otherwise
setIsToBeKeptAliveUntilExit(self, pFlag: bool) → None

Sets the object to be permanent for the life of the application.

Note

Permanent objects survive a new session, i.e. they live until the application is terminated.

Parameters:pFlag (bool) – true to make the object permanent, false otherwise
setIsToBeSaved(self, pIsToBeSaved: bool) → None

Sets the object to be saved to session files or not.

Parameters:pIsToBeSaved (bool) – true to cause the object to be saved to session files, false otherwise
setPrivateTitle(self, newPrivateTitle: str) → None

Sets the private title of the object.

Note

The private title can later be used to find a reference to that object, given that it’s still alive.

Parameters:newPrivateTitle (str) – a title (a string)
setPropertyDirty()

Calls for a setDirty with the flag OrsPropertyDirty

setTitle(self, newVal: str) → None

Sets the title of the object.

Parameters:newVal (str) –
setUserInfo(self, pTag: str, pValue: str) → None

Sets a user defined value.

Note

Stores the key/value pair in an internal dictionary. If the key already exists its previous value is overwritten.

Parameters:
  • pTag (str) – a key name (a string)
  • pValue (str) – a value (a string)
setVisibilityDirty()

Calls for a setDirty with the flag OrsVisibilityDirty

triggerClassEvent(self, sEventName: str) → bool

Triggers a class event.

Parameters:sEventName (str) –
Returns:output (bool) –
unpublish()

Sets an object as non-representable and notifies the Dragonfly UI of a loss of the availability of the object.

MassiveMarchingAutomata

class ORSModel.ors.MassiveMarchingAutomata

Bases: ORSModel.ors.Unmanaged

cleanSpeedMapChannel(self, outputChannel: ORSModel.ors.Channel) → None

Removes boundaries or non reached value from a Speed map channel.

Parameters:outputChannel (ORSModel.ors.Channel) – a distance map channel (an Channel)
createDistanceMap(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, nbIteration: int) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEuclideanBias(self) → float

Gets the Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm

Note

Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm

Returns:output (float) – the minimum distance between voxels (a double)
getNeighborCount(self) → int
Returns:output (int) –
getROICount(self) → int

Returns the number of ROIs that have been set as sources.

Note

A maximum of 10 ROI can be provided.

Returns:output (int) – the number of ROIs that have been provided (an char)
getVolumeROI(self, index: int) → ROI

Retrieves a particularROI from the index specified slot.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:index (int) – the slot index (an unsigned char)
Returns:output (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
none()

MassiveMarchingAutomata.__init__() -> MassiveMarchingAutomata

resetVolumeROIs(self) → None

Empties all the sourceROI slots.

setEuclideanBias(self, EuclideanBias: float) → None

Provides an Euclidean bias that will be the minimumDijkstra distance between voxels.

Note

Neighbors of distance 1 will have a bias of spacialTerm.

Note

Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm.

Note

Neighbor of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm.

Parameters:EuclideanBias (float) – the minimum distance between voxels (a double)
setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None

Sets the channel that will be used by the MassiveMarching algorithm to calculate distance.

Note

The min and max boundaries must not describe a space bigger than the input channel.

Parameters:
  • inputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • minX (int) – the minimum X index in the input channel (a uint32_t)
  • minY (int) – the minimum Y index in the input channel (a uint32_t)
  • minZ (int) – the minimum Z index in the input channel (a uint32_t)
  • maxX (int) – the maximum X index in the input channel (a uint32_t)
  • maxY (int) – the maximum Y index in the input channel (a uint32_t)
  • maxZ (int) – the maximum Z index in the input channel (a uint32_t)
  • currentT (int) – the T index (a uint32_t)
setNeighborCountTo18(self) → None
setNeighborCountTo26(self) → None
setNeighborCountTo6(self) → None
setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI) → None

Fills a particularROI slot to be used as a source for the Dijkstra algorithm.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:
  • index (int) – the slot index (an unsigned char)
  • aVolROI (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI)

Material

class ORSModel.ors.Material

Bases: ORSModel.ors.Node

brief_description: Represents the material of a visual ( author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: Visual::setMaterial(), Visual::getMaterial() Represents a material that can be used with any Visual object. It contains the ambiant, power, diffuse, emissive and specular properties.

getAmbiant(self) → Color

Gets the ambiant color of the material.

Returns:output (ORSModel.ors.Color) – ambiant (a Color)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDiffuse(self) → Color

Gets the diffuse color of the material.

Returns:output (ORSModel.ors.Color) – diffuse (a Color)
getEmissive(self) → Color

Gets the emissive color of the material.

Returns:output (ORSModel.ors.Color) – an emissive (a Color)
getPower(self) → float

Gets the power property of the material.

Returns:output (float) – power value (a float)
getShadowIntensity(self) → float

Gets the shadow intensity.

Note

Should be between 0.0 and 1.0.

Returns:output (float) – an intensity factor (a float)
getSpecular(self) → Color

Gets the specular color of the material.

Returns:output (ORSModel.ors.Color) – specular (a Color)
getTexture(self, stage: int) → str
Parameters:stage (int) –
Returns:output (str) –
getTextureScale(self) → float

Gets the texture scale factor.

Returns:output (float) – the scale factor (a float)
none()

Material.__init__() -> Material

setAmbiant(self, IColor: ORSModel.ors.Color) → None

Sets the ambiant color, in Red-Green-Blue.

Note

Each color value goes between 0 (none) and 1 (full).

Parameters:IColor (ORSModel.ors.Color) – a color object (a Color)
setDiffuse(self, IColor: ORSModel.ors.Color) → None

Sets the diffuse color, in Red-Green-Blue.

Note

Each color value goes between 0 (none) and 1 (full).

Parameters:IColor (ORSModel.ors.Color) – a color object (a Color)
setEmissive(self, IColor: ORSModel.ors.Color) → None

Sets the emissive color, in Red-Green-Blue.

Note

Each color value goes between 0 (none) and 1 (full).

Parameters:IColor (ORSModel.ors.Color) – a color object (a Color)
setPower(self, value: float) → None

Sets the power property of the material.

Parameters:value (float) – a power value (a float)
setShadowIntensity(self, value: float) → None

Sets the shadow intensity.

Note

Should be between 0.0 and 1.0.

Parameters:value (float) – an intensity factor (a float)
setSpecular(self, IColor: ORSModel.ors.Color) → None

Sets the specular color, in Red-Green-Blue.

Note

Each color value goes between 0 (none) and 1 (full).

Parameters:IColor (ORSModel.ors.Color) – a color object (a Color)
setTexture(self, filename: str, stage: int) → None

Sets the texture from a texture file.

Note

Stages are valued between 0 and 7.

Parameters:
  • filename (str) – a file name (a string)
  • stage (int) – a stage (a LONG)
setTextureScale(self, value: float) → None

Sets the texture scale factor.

Parameters:value (float) – a scale factor (a float)

Matrix4x4

class ORSModel.ors.Matrix4x4

Bases: ORSModel.ors.Unmanaged

brief_description: A wrapper to a 3D matrix. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

asRotationMatrix(self, inputVector: ORSModel.ors.Vector3) → None

As rotation matrix from quaternion.

Parameters:inputVector (ORSModel.ors.Vector3) –
copy(self) → Matrix4x4

Gets a copy.

Returns:output (ORSModel.ors.Matrix4x4) –
createFromPythonRepresentation(aPythonRepresentation: str) → Matrix4x4

Create a Matrix from a python representation static method.

Parameters:aPythonRepresentation (str) – aPythonRepresentation (an wstring)
Returns:output (ORSModel.ors.Matrix4x4) – a Matrix4x4 (Matrix4x4)
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set a Matrix from a python representation

Parameters:aPythonRepresentation (str) – aPythonRepresentation (an wstring)
Returns:output (bool) – true if the parsing worked, else false (a bool)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getInverted(self) → Matrix4x4

Gets an inverted matrix.

Note

The receiver is not affected.

Returns:output (ORSModel.ors.Matrix4x4) – an inverted matrix (an Matrix4x4)
getIsEqualTo(self, aMatrix4x4: ORSModel.ors.Matrix4x4) → bool

Checks for equality to another matrix.

Parameters:aMatrix4x4 (ORSModel.ors.Matrix4x4) – a matrix (a Matrix4x4)
Returns:output (bool) – TRUE if the matrices are equal, FALSE otherwise
getIsIdentity(self) → bool

Tests for identity.

Returns:output (bool) –
getMultiply(self, IMatrix: ORSModel.ors.Matrix4x4) → Matrix4x4

Matrix4x4 product.

Parameters:IMatrix (ORSModel.ors.Matrix4x4) –
Returns:output (ORSModel.ors.Matrix4x4) –
getPythonRepresentation(self) → str

Gets a Python evaluable string representation.

Returns:output (str) –
getScale(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getTransformedBoundedPlane(self, inputBoundedPlane: ORSModel.ors.Rectangle) → Rectangle

Applies a matrix transformation to a bounded plane.

Parameters:inputBoundedPlane (ORSModel.ors.Rectangle) –
Returns:output (ORSModel.ors.Rectangle) –
getTransformedBox(self, inputBox: ORSModel.ors.Box) → Box

Applies a matrix transformation to a box.

Parameters:inputBox (ORSModel.ors.Box) –
Returns:output (ORSModel.ors.Box) –
getTransformedCoordinate(self, inputCoordinate: ORSModel.ors.Vector3) → Vector3

Applies a matrix transformation to an augmented vector ([x, y, z, 1]).

Parameters:inputCoordinate (ORSModel.ors.Vector3) –
Returns:output (ORSModel.ors.Vector3) –
getTransformedLine(self, inputLine: ORSModel.ors.Line) → Line

Applies a matrix transformation to a line.

Parameters:inputLine (ORSModel.ors.Line) –
Returns:output (ORSModel.ors.Line) –
getTransformedLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) → LineSegment

Applies a matrix transformation to a line segment.

Parameters:inputLineSegment (ORSModel.ors.LineSegment) –
Returns:output (ORSModel.ors.LineSegment) –
getTransformedOrientedPlane(self, inputOrientedPlane: ORSModel.ors.OrientedPlane) → OrientedPlane

Applies a matrix transformation to an oriented plane.

Parameters:inputOrientedPlane (ORSModel.ors.OrientedPlane) –
Returns:output (ORSModel.ors.OrientedPlane) –
getTransformedPlane(self, inputPlane: ORSModel.ors.Plane) → Plane

Applies a matrix transformation to a plane.

Parameters:inputPlane (ORSModel.ors.Plane) –
Returns:output (ORSModel.ors.Plane) –
getTransformedVector(self, inputVector: ORSModel.ors.Vector3) → Vector3

Applies a matrix transformation to an augmented vector ([x, y, z, 0]).

Parameters:inputVector (ORSModel.ors.Vector3) –
Returns:output (ORSModel.ors.Vector3) –
getTranslation(self) → Vector3

Gets the translation vector.

Returns:output (ORSModel.ors.Vector3) –
getTransposed(self) → Matrix4x4

Gets the transpose of the matrix.

Returns:output (ORSModel.ors.Matrix4x4) –
getValue(self, row: int, column: int) → float

Gets a value from the matrix.

Note

Row and column are both between 0 and 3.

Parameters:
  • row (int) – row (an int)
  • column (int) – column (an int)
Returns:

output (float) – a float

multiply(self, IMatrix: ORSModel.ors.Matrix4x4) → None

Multiplies the matrix by another matrix.

Note

The receiver is modified.

Parameters:IMatrix (ORSModel.ors.Matrix4x4) – a matrix to multiply with (an Matrix4x4)
none()

Matrix4x4.__init__() -> Matrix4x4

setAsRotation(self, axisOfRotation: ORSModel.ors.Vector3, angleInRadian: float) → None

As rotation matrix from rotation axis and angle.

Parameters:
setScale(self, scaleVector: ORSModel.ors.Vector3) → None

Sets the scale vector.

Parameters:scaleVector (ORSModel.ors.Vector3) –
setTranslation(self, translation: ORSModel.ors.Vector3) → None

Sets the translation vector.

Parameters:translation (ORSModel.ors.Vector3) –
setValue(self, row: int, column: int, value: float) → None

Sets a value in the matrix.

Note

Row and column are both between 0 and 3.

Parameters:
  • row (int) – row (an int)
  • column (int) – column (an int)
  • value (float) – a float value
setValues(self, values: float) → None

Sets the matrix values from an array of floats.

Note

The array of floats should contain 16 float (4 rows X 4 colums).

Parameters:values (float) – an array of 16 float values (a floatPtr)
setupAsIdentity(self) → None

Initializes the matrix.

Mesh

class ORSModel.ors.Mesh

Bases: ORSModel.ors.UnstructuredGrid

brief_description: A visual that represents a author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 A visual that represents a VisualMesh.

computeAnisotropyMappingFromSurfaceNormals(self, iTIndex: int, channelToFill: ORSModel.ors.Channel, vectorFieldEigenvectorMax: ORSModel.ors.VectorField, channelToFillNormOfGradient: ORSModel.ors.Channel, channelToFillDivergence: ORSModel.ors.Channel, vectorFielCurl: ORSModel.ors.VectorField, channelToFillNormOfCurl: ORSModel.ors.Channel, radiusOfInfluence: float, useProjectionBasedAnisotropy: bool, IProgress: ORSModel.ors.Progress) → None

Computes the anisotropy mapping of a mesh at the specified locations, using the surface normals.

Note

The vector field object will be cleared before being filled with the current information.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • channelToFill (ORSModel.ors.Channel) – the channel (anisotropy) to fill at each voxel location (a Channel)
  • vectorFieldEigenvectorMax (ORSModel.ors.VectorField) – the vector field (eigenvector associated to the highest eigenvalue) to fill at each voxel location of the given channel (a VectorField)
  • channelToFillNormOfGradient (ORSModel.ors.Channel) – the channel (norm of the gradient of the orientation) to fill at each voxel location (a Channel)
  • channelToFillDivergence (ORSModel.ors.Channel) – the channel (divergence of the orientation) to fill at each voxel location (a Channel)
  • vectorFielCurl (ORSModel.ors.VectorField) – the vector field (curl of the orientation) to fill at each voxel location of the given channel (a VectorField)
  • channelToFillNormOfCurl (ORSModel.ors.Channel) – the channel (norm of the curl of the orientation) to fill at each voxel location (a Channel)
  • radiusOfInfluence (float) – distance from the analysis point to the last considered anisotropy element (a double)
  • useProjectionBasedAnisotropy (bool) – anisotropy computation method. If true, the projection based method is used; if false, the eigenvalues from the tensor of inertia are taken (a bool)
  • IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
convertToVTKPolyData(currentTimeStep, includeScalar=False, vertexXScaleFactor=1.0, vertexYScaleFactor=1.0, vertexZScaleFactor=1.0, progress=None)
static createFromVTKPolyData(vtkPolyData, currentTimeStep=0, includeScalar=False, generatedMeshisFaceVertex=True, progress=None)
findMeshContourPointsAndConnectionOnAPlane(self, cuttingPlane: ORSModel.ors.Plane, anOctreeBox: ORSModel.ors.Octree, iTIndex: int, oPoints: ORSModel.ors.ArrayDouble, oPointsConnection: ORSModel.ors.ArrayUnsignedLONGLONG, outNbOfPts: int, outNbOfConnection: int) → None

Find points of the mesh on a plane and all connection between those points.

Parameters:
  • cuttingPlane (ORSModel.ors.Plane) – a cutting plane (Plane)
  • anOctreeBox (ORSModel.ors.Octree) – an octree, if the octree is none a default one will be created (Octree)
  • iTIndex (int) – the time step (a uint32_t)
  • oPoints (ORSModel.ors.ArrayDouble) – output points collection (ArrayDouble)
  • oPointsConnection (ORSModel.ors.ArrayUnsignedLONGLONG) – output points connection (edges with size = 2) collection (ArrayUnsignedLongLong)
  • outNbOfPts (int) – number of point that make the contour on plane (int)
  • outNbOfConnection (int) – number of edges that make the contour on plane (int)
fromVTKPolyData(vtkPolyData, currentTimeStep=0, includeScalar=False, progress=None)
getArea(self, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4, IProgress: ORSModel.ors.Progress) → float

Gets the one sided area from closed mesh.

Note

Result for an open mesh is undefined.

Parameters:
  • iTIndex (int) – the T index to compute (a uint32_t)
  • aWorldTransformMatrix (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
Returns:

output (float) – the area (a double)

getAsMeshProjectedOnPlane(self, aPlane: ORSModel.ors.Plane, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4, inMesh: ORSModel.ors.Mesh) → Mesh
Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getAsMeshWithEdgesDecimatedSmallerThan(self, value: float, IProgress: ORSModel.ors.Progress, worldTransform: ORSModel.ors.Matrix4x4, inoutMesh: ORSModel.ors.Mesh) → Mesh

Decimates all edges with a length smaller than a threshold value.

Note

This method is recursive and will decimate edges until all edges length are greater than the supplied threshold value.

Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getAsROI(self, iTIndex: int, worldTransform: ORSModel.ors.Matrix4x4, pOutputROI: ORSModel.ors.ROI, progress: ORSModel.ors.Progress) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getContourAreaForPlane(self, nax: float, nby: float, ncz: float, nd: float, iTIndex: int) → float

Gets area of contours of mesh for plane.

Note

Results for an open contour is undefined.

Note

Only works for triangular primitive type mesh.

Note

The algorithm uses winding to find the inside part of faces. Thus the result for meshes with wrong winding is undefined.

Parameters:
  • nax (float) – the a value of the plane (a float)
  • nby (float) – the b value of the plane (a float)
  • ncz (float) – the c value of the plane (a float)
  • nd (float) – the d value of the plane (a float)
  • iTIndex (int) –
Returns:

output (float) – the area (a float)

getContourMeshForPlane(self, nax: float, nby: float, ncz: float, nd: float, iTIndex: int, inoutMesh: ORSModel.ors.Mesh) → Mesh

Returns a mesh representing the contour of the mesh intersecting the specifed plane.

Note

If a target mesh is supplied, data is written to it and returned, otherwise a new mesh is created.

Note

The general plane equation is ax + by + cz + dw = 0.

Parameters:
  • nax (float) – The a coefficient of the plane (a float)
  • nby (float) – The b coefficient of the plane (a float)
  • ncz (float) – The c coefficient of the plane (a float)
  • nd (float) – The d coefficient of the plane (a float)
  • iTIndex (int) – the target mesh (a Mesh, see note below)
  • inoutMesh (ORSModel.ors.Mesh) –
Returns:

output (ORSModel.ors.Mesh) – the resulting mesh (an VisualMesh)

getCurrentFaceScalarValuesSlot(self) → int

gets the current face scalar.

Note

The scalar index is zero-based, and thus should be less than getFaceScalarValuesSlotCount().

Returns:output (int) – the scalar slot index (a uint16_t)
getDefaultColor(self) → Color

Gets the mesh default color.

Note

Each color value goes between 0 (none) and 1 (full).

Returns:output (ORSModel.ors.Color) – a color (an Color)
getDefaultMeshAlphaColor(self) → float

Queries the mesh to get its default alpha color.

Returns:output (float) – Default alpha color used for the mesh (a double)
getEdgeCount(self, iTIndex: int) → int

Returns the number of edges.

Parameters:iTIndex (int) – the the time step (a uint32_t)
Returns:output (int) – an uint64_t
getEdgeCountPerFace(self) → int
Returns:output (int) –
getEdges(self, iTIndex: int) → ArrayUnsignedLong

Get the edge array.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayUnsignedLong) – an array of int32_t (an ArrayLong)
getExtractedSubMesh(self, IMeshROI: ORSModel.ors.MeshFacesROI, IOutputMesh: ORSModel.ors.Mesh, bExtractSubMeshROI: bool) → Mesh
Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getFaceCount(self, iTIndex: int) → int

Gets the number of faces.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (int) – an uint64_t
getFaceScalarValue(self, nScalarValueSlotIndex: int, scalarValueFaceIndex: int, iTIndex: int) → float

Gets the value of a face scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • scalarValueFaceIndex (int) – the face index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the value of a face scalar (a double)

getFaceScalarValueDescription(self, nScalarValueSlotIndex: int, iTIndex: int) → str

Gets a face scalar description.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (str) – the description (a std::wstring)

getFaceScalarValueMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

method getFaceScalarValueMax

Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getFaceScalarValueMaxs(self, iTIndex: int) → ArrayDouble

method getFaceScalarValueMaxs

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getFaceScalarValueMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValueMins(self, iTIndex: int) → ArrayDouble

method getFaceScalarValueMins

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getFaceScalarValueOffset(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar offset value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar offset value (a double)

getFaceScalarValueOffsets(self, iTIndex: int) → ArrayDouble

Get the face scalar offset values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar offset values (an ArrayDouble)
getFaceScalarValueSlope(self, scalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar slope value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar slope value (a double)

getFaceScalarValueSlopes(self, iTIndex: int) → ArrayDouble

Get the face scalar slope values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar slope values (an ArrayDouble)
getFaceScalarValueSlotLookUpTable(self, nScalarValueSlotIndex: int, iTIndex: int) → dict
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (dict) –

getFaceScalarValueUnit(self, nScalarValueSlotIndex: int, iTIndex: int) → int
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (int) –

getFaceScalarValues(self, nScalarValueSlotIndex: int, iTIndex: int) → Array

Gets the values of a face scalar.

Note

The array of values is of length getFaceCount() * getFaceScalarValuesSlotCount().

Note

The scalar value in the slot s of the face v is located at the index (getFaceScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • nScalarValueSlotIndex (int) – the face scalar value slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (ORSModel.ors.Array) – an array of values (an ArrayFloat)

getFaceScalarValuesAsPandaDataFrame()
getFaceScalarValuesDatatype(self, nScalarValueSlotIndex: int, iTIndex: int) → int
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (int) –

getFaceScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesRangeMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesRangeMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesSlotCount(self) → int

Gets the number of slots for face scalar values.

Returns:output (int) – the number of slots (a uint16_t)
getFaceScalarValuesWindowMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getFaceScalarValuesWindowMaxs(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getFaceScalarValuesWindowMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar window min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesWindowMins(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getHideOutOfRangeFaceScalarValues(self) → bool

Indicate if out of range values should be hiden.

Returns:output (bool) – (a bool)
getMinMaxFaceScalarValue(self, nScalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float) → None
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
  • fMinValue (float) –
  • fMaxValue (float) –
getNormalsMomentOfInertia(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getSignedVerticesDistance(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress) → ArrayFloat

Get signed distance between vertices of two meshes.

Parameters:
Returns:

output (ORSModel.ors.ArrayFloat) –

getTransformed(self, aTransformationMatrix: ORSModel.ors.Matrix4x4, pInOutMesh: ORSModel.ors.Mesh) → Mesh
Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getUVs(self, iTIndex: int) → ArrayFloat

Gets the UV values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayFloat) – an array of float (an ArrayFloat)
getUnstructuredGridHelperClass()
getUseDefaultMeshAlphaColor(self) → bool

Queries the mesh to see if it uses its default alpha color.

Returns:output (bool) – true if a default alpha color is used for the mesh, false otherwise
getUseDefaultMeshColor(self) → bool

Queries the mesh to see if it uses its default color.

Returns:output (bool) – true if the mesh uses its default color, false otherwise
getUseFaceScalarValues(self) → bool

Sets the mesh to have face scalar values or not.

Returns:output (bool) – TRUE to use scalar values, FALSE otherwise
getVertexScalarValuesAsPandaDataFrame()
getVerticesClosestFacesId(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress, oMapping: ORSModel.ors.ArrayLong, oCollisionPoints: ORSModel.ors.ArrayDouble) → None

Get for each vertex of a mesh the closest faces id of an other mesh.

Parameters:
getVerticesDistance(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress) → ArrayFloat

Get absolute distance between vertices of two meshes.

Parameters:
Returns:

output (ORSModel.ors.ArrayFloat) –

getVerticesNormals(self, iTIndex: int) → ArrayFloat

Gets the normals.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayFloat) – the normals data (an ArrayFloat)
getVolume(self, aPlane: ORSModel.ors.Plane, timeStep: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4, IProgress: ORSModel.ors.Progress) → float

Gets the volume from closed mesh.

Note

Result for an open mesh is undefined.

Note

Only works for triangular primitive type mesh.

Note

The algorithm uses winding to find the inside part of faces. Thus the result for meshes with wrong winding is undefined.

Parameters:
Returns:

output (float) – the volume (a double)

getWorldTransform(timestep=0)

Get the Matrix4x4 for transforming from local to world coordinates

Parameters:timestep (int) –
Return:
Rtype:ORSModel.ors.Matrix4x4
isWindingSoThatFaceNormalAreOutside(self, iTIndex: int, progress: ORSModel.ors.Progress) → bool

Check if face vertex normal direction point outside of the mesh.

Parameters:
  • iTIndex (int) – the time step (a uint32_t)
  • progress (ORSModel.ors.Progress) – a progress object (a Progress) or none for no progress
Returns:

output (bool) –

labelizeMesh(self, nScalarValueSlotIndex: int, iTIndex: int) → int

Labelizes mesh vertices based on connectivity.

Note

The scalar for the specified index should be already initialized.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar index where to place labels (a uint16_t)
  • iTIndex (int) –
Returns:

output (int) – the number of labels found (an uint32_t)

laplacianSmooth(self, nNbIterations: int, iTIndex: int) → None
Parameters:
  • nNbIterations (int) –
  • iTIndex (int) –
mapScalarValuesFromAnOtherMesh(self, referenceMesh: ORSModel.ors.Mesh, mapping: ORSModel.ors.ArrayLong, collisionPoints: ORSModel.ors.ArrayDouble, referenceSlotIndex: int, sourceSlotIndex: int, referenceTIndex: int, sourceTIndex: int, defaultScalarValue: float) → None

Maps vertices scalar values of a reference mesh to a source mesh.

Parameters:
  • referenceMesh (ORSModel.ors.Mesh) – the reference mesh (a Mesh)
  • mapping (ORSModel.ors.ArrayLong) – an array that give which face ID of the reference mesh match with the source mesh (an ArrayLong)
  • collisionPoints (ORSModel.ors.ArrayDouble) – an array that give the collision point on the reference mesh (an ArrayDouble)
  • referenceSlotIndex (int) – the slot of the reference mesh to map (a uint32_t)
  • sourceSlotIndex (int) – the slot destination of the source mesh (a uint32_t)
  • referenceTIndex (int) – the time step of the reference mesh (a uint32_t)
  • sourceTIndex (int) – the time step of the soruce mesh (a uint32_t)
  • defaultScalarValue (float) – a default value in case that no match is found between a vertexe and a face (double)
none()

Mesh.__init__() -> Mesh

removeDuplicateVertices(self, fEpsilon: float, iTIndex: int, pInOutMesh: ORSModel.ors.Mesh) → Mesh

Removes duplicate vertices of the mesh.

Note

If a target mesh is supplied, data is written to it and returned, otherwise a new mesh is created.

Parameters:
  • fEpsilon (float) – an epsilon value (a float)
  • iTIndex (int) – the time step (a uint32_t)
  • pInOutMesh (ORSModel.ors.Mesh) – the output mesh (a Mesh)
Returns:

output (ORSModel.ors.Mesh) – the result mesh (a Mesh)

setCurrentFaceScalarValuesSlot(self, slotIndex: int) → None

Sets the current face scalar.

Note

The scalar index is zero-based, and thus should be less than getFaceScalarValuesSlotCount().

Parameters:slotIndex (int) – the current scalar slot index (a uint16_t)
setDefaultColor(self, IColor: ORSModel.ors.Color) → None

Sets the mesh default color.

Note

Each color value goes between 0 (none) and 1 (full).

Note

You need to call setUseDefaultColor(TRUE) for the default color to be used.

Note

You need to call initializeVisual after color changes for them to be visible on the screen.

Parameters:IColor (ORSModel.ors.Color) – a color (an Color)
setDefaultMeshAlphaColor(self, value: float) → None

Sets the mesh its default alpha color.

Parameters:value (float) – Alpha color (double)
setEdgeCountPerFace(self, value: int) → None
Parameters:value (int) –
setFaceScalarValue(self, nScalarValueSlotIndex: int, scalarValueFaceIndex: int, aValue: float, iTIndex: int) → None

Sets the value of a face scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • scalarValueFaceIndex (int) – the face index (an uint32_t)
  • aValue (float) – the value of a face scalar to set (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValueDescription(self, nScalarValueSlotIndex: int, value: str, iTIndex: int) → None
Parameters:
  • nScalarValueSlotIndex (int) –
  • value (str) –
  • iTIndex (int) –
setFaceScalarValueMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar max value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • value (float) – scalar max value (a double)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValueMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setFaceScalarValueMaxs

Parameters:
setFaceScalarValueMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setFaceScalarValueMin

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValueMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setFaceScalarValueMins

Parameters:
setFaceScalarValueOffset(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar offset value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the scalar offset value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValueOffsets(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the face scalar offset values.

Parameters:
  • pScalarValues (ORSModel.ors.ArrayDouble) – scalar offset values (an ArrayDouble)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValueSlope(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Gets a face scalar slope value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • value (float) – scalar slope value (a double)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValueSlopes(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the face scalar slope values.

Parameters:
  • pScalarValues (ORSModel.ors.ArrayDouble) – scalar slope values (an ArrayDouble)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValueSlotLookUpTable(self, lookUpTable: dict, nScalarValueSlotIndex: int, iTIndex: int) → None
Parameters:
  • lookUpTable (dict) –
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
setFaceScalarValueUnit(self, nScalarValueSlotIndex: int, value: int, iTIndex: int) → None
Parameters:
  • nScalarValueSlotIndex (int) –
  • value (int) –
  • iTIndex (int) –
setFaceScalarValues(self, pScalarValues: ORSModel.ors.Array, nScalarValueSlotIndex: int, iTIndex: int) → None

Sets the values of a face scalar.

Note

The array of values is of length getFaceCount() * getFaceScalarValuesSlotCount().

Note

The scalar value in the slot s of the face v is located at the index (getFaceScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • pScalarValues (ORSModel.ors.Array) – an array of values (an ArrayFloat)
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int, nFaceScalarValuesDatatype: int) → None
Parameters:
  • iSlotIndex (int) –
  • iTIndex (int) –
  • nFaceScalarValuesDatatype (int) –
setFaceScalarValuesFromPandaDataFrame(dataFrame, iTIndex=0)
setFaceScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesRangeMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesRangeMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesSlotCount(self, value: int) → None

Sets the number of slots for face scalar values.

Parameters:value (int) – the number of slots (a uint16_t)
setFaceScalarValuesWindowMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar max value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • value (float) – scalar max value (a double)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValuesWindowMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setFaceScalarValuesWindowMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setFaceScalarValuesWindowMin

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesWindowMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setHideOutOfRangeFaceScalarValues(self, value: bool) → None

Indicate if out of range values should be hiden.

Parameters:value (bool) –
setUseDefaultMeshAlphaColor(self, value: bool) → None

Sets the mesh to use its default alpha color.

Parameters:value (bool) – TRUE for using a default alpha color for the mesh, FALSE otherwise (bool)
setUseDefaultMeshColor(self, value: bool) → None

Sets the mesh to use its default color.

Parameters:value (bool) – TRUE to use the mesh default color, FALSE otherwise
setUseFaceScalarValues(self, value: bool) → None

Gets the status of face scalar values usage.

Parameters:value (bool) –
setVertexScalarValuesFromPandaDataFrame(dataFrame, iTIndex=0)
updateVerticesNormal(self, iTIndex: int) → None
Parameters:iTIndex (int) –

MeshFacesROI

class ORSModel.ors.MeshFacesROI

Bases: ORSModel.ors.Node

brief_description: Represents a region of interest for a mesh ( author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 warning: Not currently supported. see: ROI Represents a region of interest for a Mesh.

addFaceIndex(self, nFaceIndex: int, nTIndex: int) → None
Parameters:
  • nFaceIndex (int) –
  • nTIndex (int) –
addFacesIndexes(self, indexes: ORSModel.ors.ArrayUnsignedLong, nNbIndex: int, nTIndex: int) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFaceIndexAtPosition(self, pos: int, nTIndex: int) → int
Parameters:
  • pos (int) –
  • nTIndex (int) –
Returns:

output (int) –

getFaceIndexes(self, nTimeStep: int, IInputFaceIndexes: ORSModel.ors.ArrayUnsignedLong) → ArrayUnsignedLong
Parameters:
Returns:

output (ORSModel.ors.ArrayUnsignedLong) –

getFaceIndexesCount(self, nTIndex: int) → int
Parameters:nTIndex (int) –
Returns:output (int) –
getHasFaceIndex(self, nFaceIndex: int, nTIndex: int) → bool
Parameters:
  • nFaceIndex (int) –
  • nTIndex (int) –
Returns:

output (bool) –

getIntersectionWithMeshFacesROI(self, IInputMeshROI: ORSModel.ors.MeshFacesROI, nTimeStep: int, IOutputMeshROI: ORSModel.ors.MeshFacesROI) → MeshFacesROI
Parameters:
Returns:

output (ORSModel.ors.MeshFacesROI) –

getInverseMeshFacesROI(self, nTimeStep: int, IOutputMeshROI: ORSModel.ors.MeshFacesROI) → MeshFacesROI
Parameters:
Returns:

output (ORSModel.ors.MeshFacesROI) –

getIsVisibleForAllDisplays(self) → bool

Gets the visibility of the receiver in all displays.

Returns:output (bool) – true if the receiver is visible is all displays, false otherwise
getIsVisibleForDisplay(self, IDisplay: ORSModel.ors.View) → bool

Gets the visibility of the receiver in a given display.

Parameters:IDisplay (ORSModel.ors.View) – the display (an View)
Returns:output (bool) – true if the receiver is visible, false otherwise
getSubtractionFromMeshFacesROI(self, IInputMeshROI: ORSModel.ors.MeshFacesROI, nTimeStep: int, IOutputMeshROI: ORSModel.ors.MeshFacesROI) → MeshFacesROI
Parameters:
Returns:

output (ORSModel.ors.MeshFacesROI) –

getUnionWithMeshFacesROI(self, IInputMeshROI: ORSModel.ors.MeshFacesROI, nTimeStep: int, IOutputMeshROI: ORSModel.ors.MeshFacesROI) → MeshFacesROI
Parameters:
Returns:

output (ORSModel.ors.MeshFacesROI) –

none()

MeshFacesROI.__init__() -> MeshFacesROI

removeAllFaceIndexes(self, nTIndex: int) → None
Parameters:nTIndex (int) –
removeFaceIndex(self, nFaceIndex: int, nTIndex: int) → None
Parameters:
  • nFaceIndex (int) –
  • nTIndex (int) –
removeFaceIndexAtPosition(self, pos: int, nTimeStep: int) → int
Parameters:
  • pos (int) –
  • nTimeStep (int) –
Returns:

output (int) –

setColor(self, aColor: ORSModel.ors.Color) → None
Parameters:aColor (ORSModel.ors.Color) –
setIsVisibleForAllDisplays(self, bValue: bool) → None

Sets the visibility of the receiver in all displays.

Note

This API overrides all prior calls to setIsVisibleForDisplay(), or in other words, any display specific setting is erased.

Parameters:bValue (bool) – true to make the receiver visible in all displays, false to hide it
setIsVisibleForDisplay(self, IDisplay: ORSModel.ors.View, bValue: bool) → None

Sets the visibility of the receiver in a given display.

Note

This API overrides a prior call to setIsVisibleForAllDisplays(), for a given display.

Parameters:
  • IDisplay (ORSModel.ors.View) – the display (an View)
  • bValue (bool) – true to make the receiver visible, false to hide it

Model

class ORSModel.ors.Model

Bases: sip.wrapper

brief_description: Main gateway into the author: Normand Mongeau. All other members of ORS participated. version: 1.2 date: September 2006 Main gateway into the ORS Core library. Used for general functionality of the ORS Core library.

addCallbackToClassEvent(aClassName: str, anEventName: str, sCallbackName: str, callbackInfo: int, permanent: bool) → bool

Adds a callback subscription to a class event.

Parameters:
  • aClassName (str) – the class name (a string)
  • anEventName (str) – the event name (a string)
  • sCallbackName (str) – the callback name (a string)
  • callbackInfo (bytes) – a pointer to a ORS_EVENT_CALLBACK_INFO struct
  • permanent (bool) – true to make the callback permanent (will survive a new session), false for a normal callback
Returns:

output (bool) – true if operation was successful, false otherwise (the callback already existed)

addCallbackToGlobalEvent(anEventName: str, sCallbackName: str, callbackInfo: int, permanent: bool) → bool

Adds a callback subscription to a global event.

Parameters:
  • anEventName (str) – the event name (a string)
  • sCallbackName (str) – the callback name (a string)
  • callbackInfo (bytes) – a pointer to a ORS_EVENT_CALLBACK_INFO struct
  • permanent (bool) – true to make the callback permanent (will survive a new session), false for a normal callback
Returns:

output (bool) – true if operation was successful, false otherwise (the callback already existed)

checkFeature(iProduct: int, iFeature: int) → bool
Parameters:
  • iProduct (int) –
  • iFeature (int) –
Returns:

output (bool) –

deleteAllObjects(pFinalExit: bool) → None

Deletes every core object.

Parameters:pFinalExit (bool) –
downgrade() → None
getActiveWorkerThreadsCount() → int

Returns the number of active worker threads.

Returns:output (int) – a count of active worker threads (a uint32_t)
getAvailableCPUCount() → int

Returns how many CPUs are available.

Note

In order to prepare some computations to be multi-threaded, this method returns how many CPUs are available.

Returns:output (int) – a CPU count (a uint16_t)
getBuildNumber() → str

Returns the Core library internal build number.

Returns:output (str) – a build number text (a string)
getClassEventCallbackEnabled(aClassName: str, sEventName: str, sCallbackName: str) → bool

Gets the enabled state of a callback subscription to a class event.

Parameters:
  • aClassName (str) – the event name (a string)
  • sEventName (str) – the callback name (a string)
  • sCallbackName (str) –
Returns:

output (bool) – true if the callback is enabled, false if the callback is disabled or if the callback was not found

getDLLFilename() → str

Returns the Core library file name.

Returns:output (str) – a fully qualified file path (a string)
getDLLVersion() → str

Returns the Core library internal version.

Returns:output (str) – a version text (a string)
getDebugMode() → bool

Checks if the Core library is in debug mode.

Returns:output (bool) – true if in debug mode, false otherwise
getEpsilon() → float
Returns:output (float) –
getFontNames() → str

Gets the available font names.

Returns:output (str) –
getGlobalEventCallbackEnabled(sEventName: str, sCallbackName: str) → bool

Gets the enabled state of a callback subscription to a global event.

Parameters:
  • sEventName (str) – the event name (a string)
  • sCallbackName (str) – the callback name (a string)
Returns:

output (bool) – true if the callback is enabled, false if the callback is disabled or if the callback was not found

getIsRunningInReleaseMode() → bool

Checks if the Core library is running in release mode.

Returns:output (bool) – true if in release mode, false otherwise
getLicenseExpiry() → int
Returns:output (int) –
getLicenseInformation(iKey: int) → str
Parameters:iKey (int) –
Returns:output (str) –
getMajorVersion() → str

Returns the Core library internal major version.

Returns:output (str) – a version text (a string)
getMaximumViewportHeight() → int
Returns:output (int) –
getMaximumViewportWidth() → int
Returns:output (int) –
getPresetFileExtension() → str

Gets the extension of preset files.

Returns:output (str) –
getSessionUserName() → str

Gets the current user account name.

Returns:output (str) –
getStartupResultCode() → int
Returns:output (int) –
getWasLicenseDowngraded() → bool
Returns:output (bool) –
isNVidia() → bool
Returns:output (bool) –
isNotNone(self) → bool
Returns:output (bool) –
loadSessionFromFile(aFilename: str) → bool

Loads a session file.

Parameters:aFilename (str) – a fully qualified file path (a string)
Returns:output (bool) – true if operation was successful, false otherwise
removeCallbackFromClassEvent(aClassName: str, sEventName: str, sCallbackName: str) → bool

Removes a callback subscription to a class event.

Parameters:
  • aClassName (str) – the class name (a string)
  • sEventName (str) – the event name (a string)
  • sCallbackName (str) – the callback name (a string)
Returns:

output (bool) – true if operation was successful, false otherwise (the callback was not found)

removeCallbackFromGlobalEvent(sEventName: str, sCallbackName: str) → bool

Removes a callback subscription to a global event.

Parameters:
  • sEventName (str) – the event name (a string)
  • sCallbackName (str) – the callback name (a string)
Returns:

output (bool) – true if removal was successful, false otherwise (the callback did not exist)

saveSessionToFile(pSessionName: str, aFilename: str) → int

Saves the current session to a file.

Parameters:
  • pSessionName (str) – a session name (a string)
  • aFilename (str) – a fully qualified file path (a string)
Returns:

output (int) – 0 if operation was successful, otherwise an error code

setAvailableCPUCount(pNbCPUs: int) → None

Tells the Core library to limit the number of CPUs it should use.

Note

Many algorithms are multi-threaded, use this method if you want to limit the number of CPUs used internally, to allow other applications to be responsive for example.

Note

Setting this value to 0 means to use all CPUs.

Parameters:pNbCPUs (int) – a count (a uint16_t)
setClassEventCallbackEnabled(aClassName: str, sEventName: str, sCallbackName: str, bValue: bool) → bool

Enables/disables a callback subscription to a class event.

Parameters:
  • aClassName (str) – the event name (a string)
  • sEventName (str) – the callback name (a string)
  • sCallbackName (str) – true to enable the callback, false to disable it
  • bValue (bool) –
Returns:

output (bool) – true if operation was successful, false otherwise (the callback was not found)

setDebugMode(pState: bool) → None

Sets the COM’s debug mode on or off.

Parameters:pState (bool) –
setEpsilon(anEpsilon: float) → None
Parameters:anEpsilon (float) –
setGlobalEventCallbackEnabled(sEventName: str, sCallbackName: str, bValue: bool) → bool

Enables/disables a callback subscription to a global event.

Parameters:
  • sEventName (str) – the event name (a string)
  • sCallbackName (str) – the callback name (a string)
  • bValue (bool) – true to enable the callback, false to disable it
Returns:

output (bool) – true if operation was successful, false otherwise (the callback was not found)

setPrecision(iPrecision: int) → None

Sets the precision of computations when displayed.

Parameters:iPrecision (int) –
setSessionUserName(aName: str) → None

Sets the current user account name.

Parameters:aName (str) –
setStartupCode(iVal: int) → None
Parameters:iVal (int) –
setStartupExpiry(iVal: int) → None
Parameters:iVal (int) –
startWorkersFor(pWorkData: int) → None
Parameters:pWorkData (bytes) –
stopWorkersWithID(id: int) → None
Parameters:id (int) –
triggerGlobalEvent(anEventName: str, sData: str) → bool

Triggers a global event.

Parameters:
  • anEventName (str) – the event name (a string)
  • sData (str) – an event specific string
Returns:

output (bool) – true if event was triggered, false otherwise

yieldUIWorker() → None

Gives the UI worker control to process any pending tasks that it holds.

MultiROI

class ORSModel.ors.MultiROI

Bases: ORSModel.ors.StructuredGrid

brief_description: Container for multiple ROIs. author: Normand Mongeau. All other members of ORS participated. version: 1.0 date: February 2010

addToVolumeROI(self, pOutputROI: ORSModel.ors.ROI, pLabel: int) → None

Adds all the voxels associated to a label to a VolumeROI.

Note

The ROI is not cleared prior to adding.

Parameters:
  • pOutputROI (ORSModel.ors.ROI) – the output Volume ROI (a ROI)
  • pLabel (int) – the label to extract (a uint32_t)
addToVolumeROILabelAtIndex(self, pOutputROI: ORSModel.ors.ROI, pIndex: int) → None

Finds the label at a given index, then extracts the label data and adds it to a VolumeROI.

Parameters:
  • pOutputROI (ORSModel.ors.ROI) – the output Volume ROI (an ROI)
  • pIndex (int) – the index (a int64_t)
addToVolumeROILabelAtPosition(self, pOutputROI: ORSModel.ors.ROI, tIndex: int, pVector: ORSModel.ors.Vector3) → None

Finds the label at a given position, then extracts the label data and adds it to a VolumeROI.

Parameters:
addVolumeROIToLabel(self, aLabel: int, pROI: ORSModel.ors.ROI) → bool
Parameters:
Returns:

output (bool) –

appendMultiROI(self, pLabeledMultiROI: ORSModel.ors.MultiROI, pLabelArray: ORSModel.ors.ArrayUnsignedLong) → None
Parameters:
clear(self) → None

Clears the entire data.

clearLabel(self, pLabel: int) → None

Clears a label.

Parameters:pLabel (int) – the label to clear (a uint32_t)
clearLabels(self, pLabelArray: ORSModel.ors.ArrayUnsignedLong) → None

Clears a set of labels.

Parameters:pLabelArray (ORSModel.ors.ArrayUnsignedLong) – an array of labels to clear (an ArrayUnsignedLong)
copyInto(self, aMultiROI: ORSModel.ors.MultiROI) → None

Copies the receiver into anotherROI.

Parameters:aMultiROI (ORSModel.ors.MultiROI) – a destination multiROI (an MultiROI)
fromChannel(self, pChan: ORSModel.ors.Channel) → None
Parameters:pChan (ORSModel.ors.Channel) –
generateAnalyzer(self, inputChannel: ORSModel.ors.Channel, pROI: ORSModel.ors.ROI, aTimeStep: int, pStats: int, pCompute2DStats: bool, IProgress: ORSModel.ors.Progress) → MultiROIAnalyzer
Parameters:
Returns:

output (ORSModel.ors.MultiROIAnalyzer) –

getAsArray(self, tIndex: int, pOutputArray: ORSModel.ors.ArrayUnsignedLong) → ArrayUnsignedLong

Extracts the labels and adds them all to anArray.

Note

If an output Array is supplied, data is written to it and returned, otherwise a new Array is created.

Note

The Array is cleared prior to adding.

Parameters:
Returns:

output (ORSModel.ors.ArrayUnsignedLong) – the resulting Array (an ArrayUnsignedLong)

getAsChannelWithLabelOffset(self, labelOffset: int, pOutputChannel: ORSModel.ors.Channel) → Channel

Extracts the labels and adds them all to a channel.

Note

If an output channel is supplied, data is written to it and returned, otherwise a new channel is created.

Note

The channel’s data type is determined by the total number of labels within:

Parameters:
  • labelOffset (int) – a label offset to add to output channel values (a uint32_t)
  • pOutputChannel (ORSModel.ors.Channel) – an optional output channel (an Channel)
Returns:

output (ORSModel.ors.Channel) – the resulting channel (an Channel)

getAsCubicMesh(self, bWorld: bool, IProgress: ORSModel.ors.Progress, IInMesh: ORSModel.ors.Mesh) → Mesh
Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getAsCubicMeshSubset(self, IEnabledLabel: ORSModel.ors.ArrayChar, bWorld: bool, IProgress: ORSModel.ors.Progress, IInMesh: ORSModel.ors.Mesh) → Mesh
Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getAsGraph(self, optionalInputGraph: ORSModel.ors.Graph, IProgress: ORSModel.ors.Progress) → Graph

Computes the graph of theMultiROI’s connectivity.

Parameters:
Returns:

output (ORSModel.ors.Graph) – graph of the MultiROI’s connectivity

getBoundingBoxOfLabel(self, pTIndex: int, iLabel: int) → Box
Parameters:
  • pTIndex (int) –
  • iLabel (int) –
Returns:

output (ORSModel.ors.Box) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClipBox(timestep=0, display=None)

Gets the clip box of the ROI or of the MultiROI

Parameters:
Returns:

aClipBox (ORSModel.ors.Box) – the clip box

getClipping(timestep=0, display=None)

Gets the origin and the opposite summit of the clip box of the ROI or MultiROI

Parameters:
Returns:
getCurrentScalarValuesSlot(self) → int

gets the current scalar value slot index.

Note

The scalar index is zero-based, and thus should be less than getScalarValuesSlotCount().

Returns:output (int) – the scalar slot index (a uint16_t)
getHideOutOfRangeScalarValues(self) → bool

Indicate if out of range values should be hidden.

Returns:output (bool) – (a bool)
getIntersectionWithLabeledMultiROI(self, pInputLabeledMultiROI: ORSModel.ors.MultiROI, anOutputLabeledMultiROI: ORSModel.ors.MultiROI) → MultiROI

Intersects theMultiROI with another MultiROI.

Note

If a target MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.

Parameters:
Returns:

output (ORSModel.ors.MultiROI) – the intersection result

getIntersectionWithROI(self, aROI: ORSModel.ors.ROI, anOutputMultiROI: ORSModel.ors.MultiROI) → MultiROI

Intersects theMultiROI with a ROI.

Note

If a target MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.

Parameters:
Returns:

output (ORSModel.ors.MultiROI) – the intersection result

getIsClipped(timestep=0, display=None)

Gets to know if the clip box of the ROI or MultiROI is active

Parameters:
Returns:

isClipped (bool) – if True, the clip box of the ROI or MultiROI is visible; False otherwise.

getIsEmpty(self) → bool

Verifies to see if all labels are empty or not.

Returns:output (bool) – TRUE if no labels within, FALSE otherwise
getLabelAtIndex(self, pIndex: int) → int

Gets the label value at a given index.

Note

If no label exists at the given index 0 is returned.

Parameters:pIndex (int) – the index (a int64_t)
Returns:output (int) – the resulting label (a uint32_t)
getLabelAtPosition(self, tIndex: int, pVector: ORSModel.ors.Vector3) → int

Gets the label value at a given World position.

Note

If no label exists at the given position, 0 is returned.

Parameters:
  • tIndex (int) – the T value (a uint32_t)
  • pVector (ORSModel.ors.Vector3) – the position (an Vector3)
Returns:

output (int) – the resulting label (a uint32_t)

getLabelColor(self, label: int) → Color
Parameters:label (int) –
Returns:output (ORSModel.ors.Color) –
getLabelCount(self) → int

Gets the number of distinct labels within.

Returns:output (int) – the number of labels (a uint32_t)
getLabelSize(self, pLabel: int) → int

Gets the size of a given label.

Parameters:pLabel (int) – the label value (a uint32_t)
Returns:output (int) – the size of the label (an int64_t)
getMergedLabelsIntersectingMultiROI(self, pInputMROI: ORSModel.ors.MultiROI) → MultiROI
Parameters:pInputMROI (ORSModel.ors.MultiROI) –
Returns:output (ORSModel.ors.MultiROI) –
getMergedLabelsIntersectingROI(self, inputROI: ORSModel.ors.ROI) → MultiROI
Parameters:inputROI (ORSModel.ors.ROI) –
Returns:output (ORSModel.ors.MultiROI) –
getMinimalBox(self, iTIndex: int) → Box

Get miminal box (also know as Oriented BoundingBox in litterature)

Parameters:iTIndex (int) – the T index (a uint32_t)
Returns:output (Box) –
getNonEmptyLabelCount(self) → int

Gets the number of distinct labels within.

Returns:output (int) – the number of non empty labels (a uint32_t)
getNonEmptyLabels(self, pOutputArray: ORSModel.ors.ArrayUnsignedLong) → ArrayUnsignedLong

Returns an array of all non empty labels.

Note

If an output array is supplied, data is written to it and returned, otherwise a new array is created.

Note

The array is cleared prior to adding.

Parameters:pOutputArray (ORSModel.ors.ArrayUnsignedLong) – an optional output array (an ArrayUnsignedLong)
Returns:output (ORSModel.ors.ArrayUnsignedLong) – the resulting array (an ArrayUnsignedLong)
getProjectionIn(self, aLabeledMultiROI: ORSModel.ors.MultiROI, sourceTimeOffset: int, pProgress: ORSModel.ors.Progress) → MultiROI
Parameters:
Returns:

output (ORSModel.ors.MultiROI) –

getScalarValueDescription(self, nScalarValueSlotIndex: int, iTIndex: int) → str

Gets a scalar description value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (str) – the scalar description value (a std::wstring)

getScalarValueId(self, nScalarValueSlotIndex: int, iTIndex: int) → str

Gets a scalar id value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (str) – the scalar id value (a std::wstring)

getScalarValueMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a scalar max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar max value (a float)

getScalarValueMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a scalar min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar min value (a float)

getScalarValueOffset(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a scalar offset value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar offset value (a float)

getScalarValueSlope(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a scalar slope value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar slope value (a float)

getScalarValueSlotLookUpTable(self, nScalarValueSlotIndex: int, iTIndex: int) → dict
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (dict) –

getScalarValueUnit(self, nScalarValueSlotIndex: int, iTIndex: int) → int

Gets a scalar value unit.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • iTIndex (int) – time step (a uint32_t)
Returns:

output (int) – the scalar value unit (an uint16_t)

getScalarValues(self, nScalarValueSlotIndex: int, iTIndex: int) → Array

Gets the values of a scalar.

Note

The scalar value in the slot s of the v is located at the index (getScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • nScalarValueSlotIndex (int) – the time step (a uint32_t)
  • iTIndex (int) –
Returns:

output (ORSModel.ors.Array) – an array of values (an Array)

getScalarValuesAsPandaDataFrame(iTIndex=0)
getScalarValuesDatatype(self, nScalarValueSlotIndex: int, iTIndex: int) → int
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (int) –

getScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getScalarValuesRangeMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot indexuint16_t(a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getScalarValuesRangeMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getScalarValuesSlotCount(self) → int

Gets the number of slots for scalar values.

Returns:output (int) – the number of slots (a uint16_t)
getScalarValuesWindowMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a scalar window max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar max value (a float)

getScalarValuesWindowMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a scalar window min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar min value (a float)

getTotalVoxelCount(self) → int

Gets the total size of all labels.

Returns:output (int) – the total size (a int64_t)
getUseScalarValues(self) → bool
Returns:output (bool) –
getVoxelCount(self, iTIndex: int) → int

Gets the size of all labels for a given T value.

Parameters:iTIndex (int) –
Returns:output (int) – the number of voxels in the MultiROI (a int64_t)
grid(self, celXSize: int, celYSize: int, celZSize: int, minT: int, maxT: int) → None
Parameters:
  • celXSize (int) –
  • celYSize (int) –
  • celZSize (int) –
  • minT (int) –
  • maxT (int) –
classmethod imread(files)

Loads a MultiROI from files

Parameters:files (file) [count=[0, None]] – fully qualified file name list
Returns:outMultiROI (ORSModel.ors.MultiROI) – the resulting MultiROI
classmethod imreadDICOM(files)

Loads a MultiROI from files or folder contaning DICOM

Parameters:files (file) [count=[0, None]] – fully qualified file name list
Returns:outMultiROI (ORSModel.ors.MultiROI) – the resulting MultiROI
classmethod imreadDICOMFolder(folder)

Loads a MultiROI from folder of DICOM files

Parameters:folder (folder) – fully qualified folder
Returns:outMultiROI (ORSModel.ors.MultiROI) – the resulting MultiROI
classmethod imreadFolder(folder)

Loads a MultiROI from folder

Parameters:folder (folder) – fully qualified folder
Returns:outMultiROI (ORSModel.ors.MultiROI) – the resulting MultiROI
imsave(fileName)

Save a MultiROI to file in the type specified by the extension

Parameters:fileName (file saving) – fully qualified file name
Return:True or False
Rtype:bool
imwrite(fileName)

Save a MultiROI to file in the type specified by the extension

Parameters:fileName (file saving) – fully qualified file name
Return:True or False
Rtype:bool
insertLabeledMultiROI(self, pLabeledMultiROI: ORSModel.ors.MultiROI, insertionLabel: int) → bool

Insert all the labels of aMultiROI starting at an insertion label.

Parameters:
  • pLabeledMultiROI (ORSModel.ors.MultiROI) – the MultiROI to insert (a MultiROI)
  • insertionLabel (int) – the label at which the insertion begins (a uint32_t)
Returns:

output (bool) – true if the operation succeeded, false otherwise

mapLabelsToColors(self, anILUT: ORSModel.ors.LookupTable) → None
Parameters:anILUT (ORSModel.ors.LookupTable) –
mapLabelsToDiscreteColors(self, anILUT: ORSModel.ors.LookupTable) → None
Parameters:anILUT (ORSModel.ors.LookupTable) –
mapScalarValuesToColors(self, pData: ORSModel.ors.Array, pHightlightOpacityValue: ORSModel.ors.ArrayFloat, pLMROpacityValue: ORSModel.ors.ArrayFloat, fMinDisplayableValue: float, fMaxDisplayableValue: float, anILUT: ORSModel.ors.LookupTable) → None
Parameters:
mapScalarValuesToColorsWithRange(self, pData: ORSModel.ors.Array, fMinDisplayableValue: float, fMaxDisplayableValue: float, fMinSelectionRangeValue: float, fMaxSelectionRangeValue: float, hideOutOfRangeValues: bool, anILUT: ORSModel.ors.LookupTable) → None

ComputeMultiROI color table using scalar value.

Parameters:
  • pData (ORSModel.ors.Array) – the scalar value to use (an Array)
  • fMinDisplayableValue (float) – the minimum value used for the LUT range (a double)
  • fMaxDisplayableValue (float) – the maximum value used for the LUT range (a double)
  • fMinSelectionRangeValue (float) – the minimum range value (a double)
  • fMaxSelectionRangeValue (float) – the maximum range value (a double)
  • hideOutOfRangeValues (bool) – indicate if the out of range value should be displayed (a bool)
  • anILUT (ORSModel.ors.LookupTable) – the LookUpTable (a LookupTable)
mapScalarValuesToDiscreteColors(self, pData: ORSModel.ors.Array, pHightlightOpacityValue: ORSModel.ors.ArrayFloat, pLMROpacityValue: ORSModel.ors.ArrayFloat, nMinDisplayableValue: float, nMaxDisplayableValue: float, anILUT: ORSModel.ors.LookupTable) → None
Parameters:
mergeLabels(self, targetLabel: int, sourceLabel: int) → bool

Merge a label into another one.

Parameters:
  • targetLabel (int) – the receiving label (a uint32_t)
  • sourceLabel (int) – the source label (a uint32_t)
Returns:

output (bool) – true if the operation succeeded, false otherwise

mergeLabelsIntersectingMultiROI(self, pInputMROI: ORSModel.ors.MultiROI) → bool

assign the label of all intersecting labels to the smallest label intersecting, per label

Parameters:pInputMROI (ORSModel.ors.MultiROI) –
Returns:output (bool) – return true if labels where collapse
mergeLabelsIntersectingROI(self, pInputROI: ORSModel.ors.ROI) → bool

assign the label of all intersecting labels to the smallest label intersecting

Parameters:pInputROI (ORSModel.ors.ROI) –
Returns:output (bool) – return true if labels where collapse
none()

MultiROI.__init__() -> MultiROI

removeAScalarValuesSlot(self, nScalarValueSlotIndex: int, iTIndex: int) → None

Remove a scalar values slot from aMultiROI.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the T value (a uint32_t)
removeEmptyLabelsAndRenumber(self) → None

Removes all empty labels and renumber the remaining labels in the same order.

removeFromVolumeROI(self, pOutputROI: ORSModel.ors.ROI, pLabel: int) → None

Remove all the voxels associated to a label from a VolumeROI.

Parameters:
  • pOutputROI (ORSModel.ors.ROI) – the output Volume ROI (an ROI)
  • pLabel (int) – the label to extract (a uint32_t)
removeLabelAndRenumber(self, pLabel: int) → None

Removes the specified label and renumber the remaining labels in the same order.

Parameters:pLabel (int) – the label to remove (a uint32_t)
removeLabelIntersectingROI(self, pInputROI: ORSModel.ors.ROI) → bool

Remove label that are intersecting the givenROI.

Parameters:pInputROI (ORSModel.ors.ROI) –
Returns:output (bool) – return true if label where removed (a bool)
removeLabelNotIntersectingROI(self, pInputROI: ORSModel.ors.ROI) → bool

Remove label that are not intersecting the givenROI.

Parameters:pInputROI (ORSModel.ors.ROI) –
Returns:output (bool) – return true if label where removed (a bool)
removeLabeledMultiROI(self, pInputLabeledMultiROI: ORSModel.ors.MultiROI) → None

Removes aMultiROI.

Parameters:pInputLabeledMultiROI (ORSModel.ors.MultiROI) – the MultiROI to remove (a MultiROI)
removeLabelsAndRenumber(self, pLabelArray: ORSModel.ors.ArrayUnsignedLong) → None

Removes the specified labels and renumber the remaining labels in the same order.

Parameters:pLabelArray (ORSModel.ors.ArrayUnsignedLong) – an array of labels to remove (an ArrayUnsignedLong)
removeVolumeROI(self, pInputROI: ORSModel.ors.ROI) → None

Removes a VolumeROI.

Parameters:pInputROI (ORSModel.ors.ROI) – the Volume ROI to remove (an ROI)
removeVolumeROIFromLabel(self, aLabel: int, pROI: ORSModel.ors.ROI) → bool
Parameters:
Returns:

output (bool) –

setCurrentScalarValuesSlot(self, nScalarValueSlotIndex: int) → None

Sets the current scalar.

Note

The scalar index is zero-based, and thus should be less than getScalarValuesSlotCount().

Parameters:nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
setHideOutOfRangeScalarValues(self, value: bool) → None

Indicate if out of range values should be hidden.

Parameters:value (bool) –
setLabelColor(self, label: int, IColor: ORSModel.ors.Color) → None
Parameters:
setLabelCount(self, aCount: int) → None

Sets the label count.

Parameters:aCount (int) – the label count to set (a uint32_t)
setScalarValueDescription(self, nScalarValueSlotIndex: int, sDesc: str, iTIndex: int) → None

Sets a face scalar description value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • sDesc (str) – scalar description value (a std::wstring)
  • iTIndex (int) – time step (a uint32_t)
setScalarValueMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a scalar max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the scalar max value (a float)
  • iTIndex (int) – the time step (a uint32_t)
setScalarValueMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a scalar min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the scalar min value (a float)
  • iTIndex (int) – the time step (a uint32_t)
setScalarValueOffset(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a scalar offset value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the scalar offset value (a float)
  • iTIndex (int) – the time step (a uint32_t)
setScalarValueSlope(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a scalar slope value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • value (float) – scalar slope value (a float)
  • iTIndex (int) – time step (a uint32_t)
setScalarValueSlotLookUpTable(self, lookUpTable: dict, nScalarValueSlotIndex: int, iTIndex: int) → None
Parameters:
  • lookUpTable (dict) –
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
setScalarValueUnit(self, nScalarValueSlotIndex: int, iUnit: int, iTIndex: int) → None

Sets a scalar unit value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • iUnit (int) – iUnit (a uint16_t)
  • iTIndex (int) – time step (a uint32_t)
setScalarValues(self, pScalarValues: ORSModel.ors.Array, nScalarValueSlotIndex: int, iTIndex: int) → None

Sets the values of a scalar.

Parameters:
  • pScalarValues (ORSModel.ors.Array) – an array of values (example an ArrayFloat)
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the the time step (a uint32_t)
setScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int, nFaceScalarValuesDatatype: int) → None
Parameters:
  • iSlotIndex (int) –
  • iTIndex (int) –
  • nFaceScalarValuesDatatype (int) –
setScalarValuesFromPandaDataFrame(dataFrame, iTIndex=0)
setScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step(a uint32_t)
setScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setScalarValuesRangeMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step(a uint32_t)
setScalarValuesRangeMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (auint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setScalarValuesSlotCount(self, nScalarValueSlotCount: int) → None

Sets the number of slots for scalar values.

Parameters:nScalarValueSlotCount (int) – the number of slots (a uint16_t)
setScalarValuesWindowMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a scalar window max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the scalar max value (a float)
  • iTIndex (int) – the time step (a uint32_t)
setScalarValuesWindowMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a scalar window min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the scalar min value (a float)
  • iTIndex (int) – the time step (a uint32_t)
sortAndRenumberLabelsOnSize(self, bAscending: bool, bRemoveEmptyLabels: bool) → None

Sorts and renumbers the labels based on their sizes (number of labels).

Parameters:
  • bAscending (bool) – TRUE to sort in ascending order, FALSE to sort in descending order
  • bRemoveEmptyLabels (bool) – TRUE to remove empty labels, FALSE to keep them
updateUndo()

MultiROIAnalyzer

class ORSModel.ors.MultiROIAnalyzer

Bases: ORSModel.ors.Unmanaged

brief_description: Analyzer for multi-ROIs. author: Nicolas Piché. All other members of ORS participated. version: 1.0 date: May 2010

computeStatisticsFor(self, IChannel: ORSModel.ors.Channel, pTimeStep: int, IROI: ORSModel.ors.ROI, IProgress: ORSModel.ors.Progress) → None
Parameters:
getCenterOfMassMinMax(self, pXMin: float, pYMin: float, pZMin: float, pXMax: float, pYMax: float, pZMax: float) → None
Parameters:
  • pXMin (float) –
  • pYMin (float) –
  • pZMin (float) –
  • pXMax (float) –
  • pYMax (float) –
  • pZMax (float) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDataHistogramInRangeForLabels(self, IChannel: ORSModel.ors.Channel, IMultiROI: ORSModel.ors.MultiROI, IListOfLabels: ORSModel.ors.ArrayUnsignedLong, tChannel: int, tLMR: int, bins: int, pMinRange: float, pMaxRange: float) → ArrayUnsignedLONGLONG
Parameters:
Returns:

output (ORSModel.ors.ArrayUnsignedLONGLONG) –

getEquivalentRadiusMinMax(self, pMin: float, pMax: float) → None
Parameters:
  • pMin (float) –
  • pMax (float) –
getFeretLengthMax(self) → ArrayDouble

Gets maximum feret size.

Returns:output (ORSModel.ors.ArrayDouble) – feret maximum size (an ArrayDouble)
getFeretLengthMean(self) → ArrayDouble

Gets medium feret size.

Returns:output (ORSModel.ors.ArrayDouble) – feret medium size (an ArrayDouble)
getFeretLengthMin(self) → ArrayDouble

Gets minimum feret size.

Returns:output (ORSModel.ors.ArrayDouble) – feret minimum size (an ArrayDouble)
getFeretLengthMinOrtho(self) → ArrayDouble

Gets minimum orthogonal feret diameter.

Returns:output (ORSModel.ors.ArrayDouble) – feret minimum orthogonal (an ArrayDouble)
getIndiciesCountInLabels(self) → ArrayLONGLONG
Returns:output (ORSModel.ors.ArrayLONGLONG) –
getLabelAspectRatio(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelCenterOfMass(self, pLabel: int) → Vector3
Parameters:pLabel (int) –
Returns:output (ORSModel.ors.Vector3) –
getLabelEntropy(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelEquivalentRadius(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelInertiaEigenValue(self, pLabel: int, vectorIndex: int) → float

Gets the eigenvalue of the inertia tensor for the specified label and eigenvalue index.

Parameters:
  • pLabel (int) – label (a uint32_t)
  • vectorIndex (int) – eigenvalue index (0: minimum eigenvalue; 1: medium eigenvalue; 2: maximum eigenvalue) (a uint16_t)
Returns:

output (float) – the eigenvalue (a double)

getLabelInertiaEigenValueMax(self, pLabel: int) → float

Gets the maximum eigenvalue of the inertia tensor for the specified label.

Parameters:pLabel (int) – label (a uint32_t)
Returns:output (float) – the eigenvalue (a double)
getLabelInertiaEigenValueMed(self, pLabel: int) → float

Gets the medium eigenvalue of the inertia tensor for the specified label.

Parameters:pLabel (int) – label (a uint32_t)
Returns:output (float) – the eigenvalue (a double)
getLabelInertiaEigenValueMin(self, pLabel: int) → float

Gets the minimum eigenvalue of the inertia tensor for the specified label.

Parameters:pLabel (int) – label (a uint32_t)
Returns:output (float) – the eigenvalue (a double)
getLabelInertiaEigenVector(self, pLabel: int, vectorIndex: int) → Vector3

Gets the eigenvector associated to an eigenvalue index of the inertia tensor for the specified label.

Parameters:
  • pLabel (int) – label (a uint32_t)
  • vectorIndex (int) – eigenvalue index (0: minimum eigenvalue; 1: medium eigenvalue; 2: maximum eigenvalue) (a uint16_t)
Returns:

output (ORSModel.ors.Vector3) – the eigenvector (a Vector3)

getLabelInertiaEigenVectorWithMaxEigenValue(self, pLabel: int) → Vector3

Gets the eigenvector associated to the maximum eigenvalue of the inertia tensor for the specified label.

Parameters:pLabel (int) – label (a uint32_t)
Returns:output (ORSModel.ors.Vector3) – the eigenvector (a Vector3)
getLabelInertiaEigenVectorWithMedEigenValue(self, pLabel: int) → Vector3

Gets the eigenvector associated to the medium eigenvalue of the inertia tensor for the specified label.

Parameters:pLabel (int) – label (a uint32_t)
Returns:output (ORSModel.ors.Vector3) – the eigenvector (a Vector3)
getLabelInertiaEigenVectorWithMinEigenValue(self, pLabel: int) → Vector3

Gets the eigenvector associated to the minimum eigenvalue of the inertia tensor for the specified label.

Parameters:pLabel (int) – label (a uint32_t)
Returns:output (ORSModel.ors.Vector3) – the eigenvector (a Vector3)
getLabelInertiaEigenVectorWithMinEigenValuePhiAngle(self, pLabel: int) → float

Gets the phi angle for the eigenvector associated to the minimum eigenvalue of the inertia tensor for the specified label. It is the angle from the X axis of the projection on the XZ plane of that orientation.

Parameters:pLabel (int) – label (a uint32_t)
Returns:output (float) – the phi angle in radian (a double)
getLabelInertiaEigenVectorWithMinEigenValueThetaAngle(self, pLabel: int) → float

Gets the theta angle for the eigenvector associated to the minimum eigenvalue of the inertia tensor for the specified label. It is the angle from the X axis of the projection on the XY plane of that orientation.

Parameters:pLabel (int) – label (a uint32_t)
Returns:output (float) – the theta angle in radian (a double)
getLabelMaximumVoxel(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelMeanVoxel(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelMinimumVoxel(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelSizeMinMax(self, pMin: int, pMax: int) → None
Parameters:
  • pMin (int) –
  • pMax (int) –
getLabelSphericity(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelStandardDeviationVoxel(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelSurfaceArea(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelSurfaceXArea(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelSurfaceYArea(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelSurfaceZArea(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelVarianceVoxel(self, pLabel: int) → float
Parameters:pLabel (int) –
Returns:output (float) –
getLabelWeightedCenterOfMass(self, pLabel: int) → Vector3
Parameters:pLabel (int) –
Returns:output (ORSModel.ors.Vector3) –
getLabelsAspectRatio(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsCenterOfMassX(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsCenterOfMassY(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsCenterOfMassZ(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsContinueSurfaceArea(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsEntropy(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsEquivalentRadius(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsInertiaEigenValueMax(self) → ArrayDouble

Gets the maximum eigenvalues of the inertia tensor.

Returns:output (ORSModel.ors.ArrayDouble) – the eigenvalues (an ArrayDouble)
getLabelsInertiaEigenValueMed(self) → ArrayDouble

Gets the medium eigenvalues of the inertia tensor.

Returns:output (ORSModel.ors.ArrayDouble) – the eigenvalues (an ArrayDouble)
getLabelsInertiaEigenValueMin(self) → ArrayDouble

Gets the minimum eigenvalues of the inertia tensor.

Returns:output (ORSModel.ors.ArrayDouble) – the eigenvalues (an ArrayDouble)
getLabelsInertiaEigenVectorWithMinEigenValuePhiAngle(self) → ArrayDouble

Gets the phi angle for the eigenvector associated to the minimum eigenvalue of the inertia tensor for each label.

Returns:output (ORSModel.ors.ArrayDouble) – the phi angles in radian (an ArrayDouble)
getLabelsInertiaEigenVectorWithMinEigenValueThetaAngle(self) → ArrayDouble

Gets the theta angle for the eigenvector associated to the minimum eigenvalue of the inertia tensor for each label.

Returns:output (ORSModel.ors.ArrayDouble) – the theta angles in radian (an ArrayDouble)
getLabelsMaxLocationX(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsMaxLocationY(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsMaxLocationZ(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsMaximumVoxel(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsMeanVoxel(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsMinLocationX(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsMinLocationY(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsMinLocationZ(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsMinimumVoxel(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsSphericity(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsStandardDeviationVoxel(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsSurfaceArea(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsSurfaceXArea(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsSurfaceYArea(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsSurfaceZArea(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsVarianceVoxel(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsWeightedCenterOfMassX(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsWeightedCenterOfMassY(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getLabelsWeightedCenterOfMassZ(self) → ArrayDouble
Returns:output (ORSModel.ors.ArrayDouble) –
getMaximumVoxelMinMax(self, pMin: float, pMax: float) → None
Parameters:
  • pMin (float) –
  • pMax (float) –
getMeanVoxelMinMax(self, pMin: float, pMax: float) → None
Parameters:
  • pMin (float) –
  • pMax (float) –
getMinimumVoxelMinMax(self, pMin: float, pMax: float) → None
Parameters:
  • pMin (float) –
  • pMax (float) –
getNumberOfROIIndiciesInLabel(self, pLabel: int) → int
Parameters:pLabel (int) –
Returns:output (int) –
getNumberOfROIIndiciesInLabelsMinMax(self, pMin: int, pMax: int) → None
Parameters:
  • pMin (int) –
  • pMax (int) –
getSphericityMinMax(self, pMin: float, pMax: float) → None
Parameters:
  • pMin (float) –
  • pMax (float) –
getStandardDeviationVoxelMinMax(self, pMin: float, pMax: float) → None
Parameters:
  • pMin (float) –
  • pMax (float) –
getSurfaceAreaMax(self) → float
Returns:output (float) –
getSurfaceAreaMin(self) → float
Returns:output (float) –
getSurfaceAreaMinMax(self, pMin: float, pMax: float) → None
Parameters:
  • pMin (float) –
  • pMax (float) –
getSurfaceXAreaMax(self) → float
Returns:output (float) –
getSurfaceXAreaMin(self) → float
Returns:output (float) –
getSurfaceYAreaMax(self) → float
Returns:output (float) –
getSurfaceYAreaMin(self) → float
Returns:output (float) –
getSurfaceZAreaMax(self) → float
Returns:output (float) –
getSurfaceZAreaMin(self) → float
Returns:output (float) –
getVarianceVoxelMinMax(self, pMin: float, pMax: float) → None
Parameters:
  • pMin (float) –
  • pMax (float) –
getWeightedCenterOfMassMinMax(self, pXMin: float, pYMin: float, pZMin: float, pXMax: float, pYMax: float, pZMax: float) → None
Parameters:
  • pXMin (float) –
  • pYMin (float) –
  • pZMin (float) –
  • pXMax (float) –
  • pYMax (float) –
  • pZMax (float) –
initializeFor(self, IMultiROI: ORSModel.ors.MultiROI, pStats: int, pCompute2DStats: bool) → None
Parameters:
none()

MultiROIAnalyzer.__init__() -> MultiROIAnalyzer

class stats

Bases: enum.IntEnum

An enumeration.

basic = 1
center_of_mass = 32
continue_surface_area = 512
entropy = 128
equivalent_radius = 4
feret_length = 1024
min_max_location = 64
sphericity = 2
surface_area = 8
tensor_inertia = 16

Node

class ORSModel.ors.Node

Bases: ORSModel.ors.Managed

brief_description: An abstract class for any object that can be a node in the visualization flow. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

attachChild(self, anINode: ORSModel.ors.Node) → bool

Attaches a child node.

Note

Certain parent-child relationships are forbidden, hence the need to verify the result.

Note

Calling this method several times will still result in the child node only appearing once in its parent.

Parameters:anINode (ORSModel.ors.Node) – the node to attach (a Node)
Returns:output (bool) – true if child was attached, false otherwise
attachChildAtPosition(self, anINode: ORSModel.ors.Node, position: int) → bool

Attaches a child node at a given position.

Note

Certain parent-child relationships are forbidden, hence the need to verify the result.

Note

Calling this method several times will still result in the child node only appearing once in its parent.

Parameters:
  • anINode (ORSModel.ors.Node) – the node to attach (a Node)
  • position (int) – the position index (a uint32_t)
Returns:

output (bool) – true if child was attached, false otherwise

copyGraph(self) → Node

Returns a copy of the node, including its graph.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Returns:output (ORSModel.ors.Node) – a new node (a Node)
detachChild(self, anINode: ORSModel.ors.Node) → bool

Detaches a child node.

Parameters:anINode (ORSModel.ors.Node) – the node to detach (a Node)
Returns:output (bool) – true if child was detached, false otherwise
getAllChildrenNodes(self) → List

Returns a flattened list of the child hierarchy of the node.

Note

The child hierarchy is flattened.

Note

Expect no particular ordering of the nodes.

Returns:output (ORSModel.ors.List) – a list of all nodes below the node (a List)
getAllChildrenOfClass(self, pProgId: str) → List

Returns all the nodes of the specified class found in the child hierarchy.

Note

Result will be an empty list if no match is found.

Note

The search is done breadth-first.

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of nodes (a List)
getAllChildrenOfClassReachableByRenderer(self, pProgId: str) → List

Returns a flattened list of all the child nodes, of the given class, that are renderable.

Note

The list contains only Managed objects (they will need to be typecast to the appropriate class).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of all child nodes that can be rendered (an List)
getAllParentNodes(self) → List

Returns a flattened list of the parent hierarchy of the node.

Note

The parent hierarchy is flattened.

Note

Expect no particular ordering of the nodes.

Returns:output (ORSModel.ors.List) – a list of all nodes above the node (an List)
getAllParentsOfClass(self, pProgId: str) → List

Returns all the nodes of the specified class found in the parent hierarchy.

Note

Result will be an empty list if no match is found.

Note

The search is done breadth-first.

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of nodes (an List)
getChildWithGUID(self, aGUID: str) → Node

Gets an immediate child node with the given GUID.

Note

Only immediate children are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:aGUID (str) – a GUID (a string)
Returns:output (ORSModel.ors.Node) – a child node if found (a Node), none() otherwise
getChildWithTitle(self, aTitle: str) → Node

Gets an immediate child node with the given title.

Note

Only immediate children are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:aTitle (str) – a string (a string)
Returns:output (ORSModel.ors.Node) – a child node if found (a Node), none() otherwise
getChildrenNodes(self) → List

Returns the list of immediate child nodes.

Returns:output (ORSModel.ors.List) – a list of nodes (an List)
getChildrenOfClass(self, pProgId: str) → List

Returns the nodes of the specified class found in the immediate children.

Note

Result will be an empty list if no match is found.

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of nodes (an List)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirstChildOfClass(self, pProgId: str) → Node

Returns the first object of the specified class found in the child hierarchy.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.Node) – a node if one exists (a Node), none() otherwise
getFirstChildOfClassAndPrivateTitle(self, pProgId: str, privateTitle: str) → Node

Searches the hierarchy for a child node with the specified class and private title.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:
  • pProgId (str) – the ProgId of the class to test against (a string)
  • privateTitle (str) – some text (a string)
Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getFirstNodeWithClassNameTowardsNode(self, pProgId: str, anINode: ORSModel.ors.Node) → Node

Searches the hierarchy for a parent node with the specified class toward a specific parent nopde.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:
  • pProgId (str) – the ProgId of the class to test against (a string)
  • anINode (ORSModel.ors.Node) – a target node
Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getFirstParentOfClass(self, pProgId: str) → Node

Returns the first object of the specified class found in the parent hierarchy.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.Node) – a node if one exists (a Node), none() otherwise
getFirstParentOfClassAndPrivateTitle(self, pProgId: str, privateTitle: str) → Node

Searches the hierarchy for a parent node with the specified class and private title.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:
  • pProgId (str) – the ProgId of the class to test against (a string)
  • privateTitle (str) – some text (a string)
Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getImmediateChildOfClass(self, pProgId: str) → Node

Searches for a child node with the specified class.

Note

Only the immediate children are searched, not the hierarchy.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise
getImmediateParentOfClass(self, pProgId: str) → Node

Searches for a parent node with the specified class.

Note

Only the immediate parents are searched, not the hierarchy.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise
getImmediateParentWithGUID(self, pGUID: str) → Node

Gets a parent node with the given GUID.

Note

Only immediate parents are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:pGUID (str) – a GUID (a string)
Returns:output (ORSModel.ors.Node) – a parent node if found (a Node), none() otherwise
getIsNodeOneOfMyAscendants(self, anINode: ORSModel.ors.Node) → bool

Checks to see if a specified node is in the parent hierarchy of the node.

Note

The parent hierarchy is searched in its entirety for the specified node.

Note

The search is conducted depth-first.

Parameters:anINode (ORSModel.ors.Node) –
Returns:output (bool) – true if the specified node in the parent hierarchy, false otherwise
getIsNodeOneOfMyDescendants(self, anINode: ORSModel.ors.Node) → bool

Checks to see if a specified node is in the child hierarchy of the node.

Note

The child hierarchy is searched in its entirety for the specified node.

Note

The search is conducted depth-first.

Parameters:anINode (ORSModel.ors.Node) –
Returns:output (bool) – true if the specified node in the child hierarchy, false otherwise
getMaxTSize(self) → int

Get Maximum T Size of all children node of this node.

Returns:output (int) –
getParentNodes(self) → List

Gets the immediate parent nodes.

Returns:output (ORSModel.ors.List) – a list of nodes (a List)
getParentWithGUID(self, pGUID: str) → Node

Gets a parent node (from the hierarchy) with the given GUID.

Note

The whole parent hierarchy is searched.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:pGUID (str) – a GUID (a string)
Returns:output (ORSModel.ors.Node) – a parent node if found (a Node), none() otherwise
getParentsOfClass(self, pProgId: str) → List

Returns the nodes of the specified class found in the immediate parents.

Note

Result will be an empty list if no match is found.

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of nodes (a List)
none()

Node.__init__() -> Node

propagateDataDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsDataDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
propagateDirty(self, dirtyFlag: str, includeSelf: bool) → None

Causes a dirty message to be sent to all children nodes.

Note

See ORS_def.h for default dirty flag (ex: ORSDataDirty).

Note

A dirty message has different results for different objects, but generally causes a refresh on the data.

Note

Message propagation is done depth-first.

Parameters:
  • dirtyFlag (str) – a string dirty flag (a string)
  • includeSelf (bool) – should set this dirty (a bool)
propagateGeometryDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsGeometryDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
propagatePropertyDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsPropertyDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
propagateVisibilityDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsVisibilityDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
refresh()

Refreshes the views related to the current object

refreshAll2DParentViews(self) → None

Causes all 3D views in the parent hierarchy of the node to be refreshed.

refreshAll3DParentViews(self) → None

Causes all 3D views in the parent hierarchy of the node to be refreshed.

refreshAllParentViews(self) → None

Causes all views in the parent hierarchy of the node to be refreshed.

setAllowRenderingInAllParentViews(self, bValue: bool) → None

Allows or prevents rendering in the views affected by a node.

Parameters:bValue (bool) – true to allow rendering, false to disallow it.
switchOrderOfPrecedenceOfChildrenNodes(self, anINode1: ORSModel.ors.Node, anINode2: ORSModel.ors.Node) → bool

Rearranges the order of child nodes.

Note

When child nodes are not in the desired order, they can be switched with this method (for example, the order in which they are rendered can be undesired).

Note

Both nodes are swapped in the list of nodes. For example, if nodes are A B C D and this call is made switchOrderOfPrecedenceOfChildrenNodes(A, C), the nodes are then in this order: C B A D.

Note

This method dives down in the child hierarchy until it finds a node where both arguments appear, then performs the switch at that level.

Parameters:
Returns:

output (bool) – true if successful, false otherwise

switchOrderOfPrecedenceOfParentNodes(self, anINode1: ORSModel.ors.Node, anINode2: ORSModel.ors.Node) → bool

Rearranges the ordering of immediate parent nodes.

Note

When parent nodes are not in the desired order, they can be switched with this method.

Note

Both nodes are swapped in the list of nodes. For example, if nodes are A B C D and this call is made switchOrderOfPrecedenceOfParentNodes(A, C), the nodes are then in this order: C B A D.

Note

This method acts only on immediate parent nodes, not the entire parent hierarchy.

Parameters:
Returns:

output (bool) – true if successful, false otherwise

ORSBaseClass

class ORSModel.ors.ORSBaseClass

Bases: sip.wrapper

getPythonTraceBack() → typing.List[str]

Set the python traceback for a call from python.

Returns:output (typing.List[str]) –
isManaged(self) → bool
Returns:output (bool) –
isNone(self) → bool
Returns:output (bool) –
setPythonTraceBack(tb: ORSModel.ors.typing.List[str]) → None

Set the python traceback for a call from python.

Parameters:tb (typing.List[str]) –

Octree

class ORSModel.ors.Octree

Bases: ORSModel.ors.Node

buildOctreeBox(self, pGrid: ORSModel.ors.UnstructuredGrid, iTIndex: int, bAppend: bool) → None
Parameters:
buildOctreeBoxMultiThread(self, pGrid: ORSModel.ors.UnstructuredGrid, iTIndex: int, bAppend: bool) → None
Parameters:
buildSpheresOctreeBox(self, pCollection: ORSModel.ors.SequenceableCollection, boxThatContainTheSpheres: ORSModel.ors.Box, iTIndex: int, bAppend: bool) → None
Parameters:
getAtomsForPoint(self, x: float, y: float, z: float, iTIndex: int) → ArrayLong
Parameters:
  • x (float) –
  • y (float) –
  • z (float) –
  • iTIndex (int) –
Returns:

output (ORSModel.ors.ArrayLong) –

getAtomsIntersectingBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle, iTIndex: int) → List
Parameters:
Returns:

output (ORSModel.ors.List) –

getAtomsIntersectingBox(self, aBox: ORSModel.ors.Box, iTIndex: int) → List
Parameters:
Returns:

output (ORSModel.ors.List) –

getAtomsIntersectingLine(self, aLine: ORSModel.ors.Line, iTIndex: int) → List
Parameters:
Returns:

output (ORSModel.ors.List) –

getAtomsIntersectingPlane(self, a: float, b: float, c: float, d: float, iTIndex: int) → List
Parameters:
  • a (float) –
  • b (float) –
  • c (float) –
  • d (float) –
  • iTIndex (int) –
Returns:

output (ORSModel.ors.List) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
isEqualTo(self, anOctree: ORSModel.ors.Octree, iTIndex: int) → bool
Parameters:
Returns:

output (bool) –

none()

Octree.__init__() -> Octree

OpticalFlow

class ORSModel.ors.OpticalFlow

Bases: ORSModel.ors.Unmanaged

computeAverageSpeedAndRotation(self, bUsePonderationByIntensityIm1: bool, pAverageSpeedX: float, pAverageSpeedY: float, pAverageSpeedZ: float, pAverageRotationAroundZ: float, pBarycenterX: float, pBarycenterY: float) → None
Parameters:
  • bUsePonderationByIntensityIm1 (bool) –
  • pAverageSpeedX (float) –
  • pAverageSpeedY (float) –
  • pAverageSpeedZ (float) –
  • pAverageRotationAroundZ (float) –
  • pBarycenterX (float) –
  • pBarycenterY (float) –
computeOpticalFlow(self) → None
createGaussianPyramid(self, pIOutChannelsGaussianPyramidIm1: ORSModel.ors.Channel, pIOutChannelsGaussianPyramidIm2: ORSModel.ors.Channel, pNumberOfLevels: int) → None
Parameters:
findMaximalLevelGaussianPyramid(self) → int
Returns:output (int) –
findMaximalLevelGaussianPyramidChannelAWithChannelB(self, pIBoundingBoxSearchArea: ORSModel.ors.Box) → int
Parameters:pIBoundingBoxSearchArea (ORSModel.ors.Box) –
Returns:output (int) –
findMaximalLevelGaussianPyramidForThisImageSize(self, sizeX: int, sizeY: int, sizeZ: int, bPerformZReduction: bool) → int
Parameters:
  • sizeX (int) –
  • sizeY (int) –
  • sizeZ (int) –
  • bPerformZReduction (bool) –
Returns:

output (int) –

findMinimalLevelGaussianPyramidForGivenPrecision(self, pIBoundingBoxReferenceIm1: ORSModel.ors.Box, pIBoundingBoxSearchArea: ORSModel.ors.Box, minimalDistanceToStopOpticalFlow: float, minimalRotationToStopOpticalFlow: float, maximalNumberOfIterationsOpticalFlow: int, acceptableRelativeError: float) → int
Parameters:
  • pIBoundingBoxReferenceIm1 (ORSModel.ors.Box) –
  • pIBoundingBoxSearchArea (ORSModel.ors.Box) –
  • minimalDistanceToStopOpticalFlow (float) –
  • minimalRotationToStopOpticalFlow (float) –
  • maximalNumberOfIterationsOpticalFlow (int) –
  • acceptableRelativeError (float) –
Returns:

output (int) –

getChannelIm1(self) → Channel
Returns:output (ORSModel.ors.Channel) –
getChannelIm2(self) → Channel
Returns:output (ORSModel.ors.Channel) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFactorRegularizationSpeedCorrection(self) → float
Returns:output (float) –
getLastDisplacementRegistration2DTransformation(self, pAverageSpeedX: float, pAverageSpeedY: float, pAverageRotationAroundZ: float, pBarycenterX: float, pBarycenterY: float) → None
Parameters:
  • pAverageSpeedX (float) –
  • pAverageSpeedY (float) –
  • pAverageRotationAroundZ (float) –
  • pBarycenterX (float) –
  • pBarycenterY (float) –
getMaxLevelGaussianPyramid(self) → int
Returns:output (int) –
getMaximalConditionValueRegularizedAtransposeA(self) → float
Returns:output (float) –
getMinLevelGaussianPyramid(self) → int
Returns:output (int) –
getOriginPixelsAverageSpeedIm1(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
getOriginPixelsIm1(self, x: int, y: int, z: int, t: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
  • t (int) –
getOriginPixelsIm2(self, x: int, y: int, z: int, t: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
  • t (int) –
getPatchWindowHalfsize(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
getPerformZReduction(self) → bool
Returns:output (bool) –
getSizeImagesPixels(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
getSizePixelsAverageSpeed(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
getUpsampleSpeedToSameSizeAsBaseChannel(self) → bool
Returns:output (bool) –
getUseBrightnessCorrectionFactors(self, pValueLinearFactor: bool, pValueConstantFactor: bool) → None
Parameters:
  • pValueLinearFactor (bool) –
  • pValueConstantFactor (bool) –
getUseRotationAroundZ(self) → bool
Returns:output (bool) –
getUseTranslationX(self) → bool
Returns:output (bool) –
getUseTranslationY(self) → bool
Returns:output (bool) –
getXSpeed(self) → Channel
Returns:output (ORSModel.ors.Channel) –
getYSpeed(self) → Channel
Returns:output (ORSModel.ors.Channel) –
getZSpeed(self) → Channel
Returns:output (ORSModel.ors.Channel) –
none()

OpticalFlow.__init__() -> OpticalFlow

registration2DTransformation(self, pIBoundingBoxReferenceIm1: ORSModel.ors.Box, pIBoundingBoxSearchArea: ORSModel.ors.Box, minimalDistanceToStopOpticalFlow: float, minimalRotationToStopOpticalFlow: float, maximalNumberOfIterationsOpticalFlow: int, bApplyTransformation: bool, IProgress: ORSModel.ors.Progress) → Matrix4x4
Parameters:
  • pIBoundingBoxReferenceIm1 (ORSModel.ors.Box) –
  • pIBoundingBoxSearchArea (ORSModel.ors.Box) –
  • minimalDistanceToStopOpticalFlow (float) –
  • minimalRotationToStopOpticalFlow (float) –
  • maximalNumberOfIterationsOpticalFlow (int) –
  • bApplyTransformation (bool) –
  • IProgress (ORSModel.ors.Progress) –
Returns:

output (ORSModel.ors.Matrix4x4) –

setChannelIm1(self, pIInputChannel: ORSModel.ors.Channel) → None
Parameters:pIInputChannel (ORSModel.ors.Channel) –
setChannelIm2(self, pIInputChannel: ORSModel.ors.Channel) → None
Parameters:pIInputChannel (ORSModel.ors.Channel) –
setFactorRegularizationSpeedCorrection(self, value: float) → None
Parameters:value (float) –
setLevelsGaussianPyramid(self, minLevel: int, maxLevel: int) → None
Parameters:
  • minLevel (int) –
  • maxLevel (int) –
setMaximalConditionValueRegularizedAtransposeA(self, value: float) → None
Parameters:value (float) –
setOriginPixelsAverageSpeedIm1(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
setOriginPixelsIm1(self, x: int, y: int, z: int, t: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
  • t (int) –
setOriginPixelsIm2(self, x: int, y: int, z: int, t: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
  • t (int) –
setPatchWindowHalfsize(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
setPerformZReduction(self, bValue: bool) → None
Parameters:bValue (bool) –
setSizeImagesPixels(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
setSizePixelsAverageSpeed(self, x: int, y: int, z: int) → None
Parameters:
  • x (int) –
  • y (int) –
  • z (int) –
setUpsampleSpeedToSameSizeAsBaseChannel(self, bValue: bool) → None
Parameters:bValue (bool) –
setUseBrightnessCorrectionFactors(self, bValueLinearFactor: bool, bValueConstantFactor: bool) → None
Parameters:
  • bValueLinearFactor (bool) –
  • bValueConstantFactor (bool) –
setUseRotationAroundZ(self, bValue: bool) → None
Parameters:bValue (bool) –
setUseTranslationX(self, bValue: bool) → None
Parameters:bValue (bool) –
setUseTranslationY(self, bValue: bool) → None
Parameters:bValue (bool) –

OrderedCollection

class ORSModel.ors.OrderedCollection

Bases: ORSModel.ors.SequenceableCollection

brief_description: Abstraction class for ordered collections. author: Normand Mongeau. version: 1.0 Abstraction class for ordered collections. OCs keep the items added in their natural order, i.e. the order they were added in. OCs grow dynamically.

addAll(self, aSequenceableCollection: ORSModel.ors.SequenceableCollection) → None
Parameters:aSequenceableCollection (ORSModel.ors.SequenceableCollection) –
addAllFirst(self, aSequenceableCollection: ORSModel.ors.SequenceableCollection) → None
Parameters:aSequenceableCollection (ORSModel.ors.SequenceableCollection) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

OrderedCollection.__init__() -> OrderedCollection

OrderedCollectionChar

class ORSModel.ors.OrderedCollectionChar

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: int) → None
Parameters:pValue (int) –
addBeforeIndex(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
addFirst(self, pValue: int) → None
Parameters:pValue (int) –
at(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
atPut(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → int
Returns:output (int) –
getLast(self) → int
Returns:output (int) –
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
none()

OrderedCollectionChar.__init__() -> OrderedCollectionChar

removeAllOccurrencesOf(self, pValue: int) → None
Parameters:pValue (int) –

OrderedCollectionDouble

class ORSModel.ors.OrderedCollectionDouble

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: float) → None
Parameters:pValue (float) –
addBeforeIndex(self, index: int, pValue: float) → None
Parameters:
  • index (int) –
  • pValue (float) –
addFirst(self, pValue: float) → None
Parameters:pValue (float) –
at(self, index: int) → float
Parameters:index (int) –
Returns:output (float) –
atPut(self, index: int, pValue: float) → None
Parameters:
  • index (int) –
  • pValue (float) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → float
Returns:output (float) –
getLast(self) → float
Returns:output (float) –
getOccurrencesOf(self, pValue: float) → int
Parameters:pValue (float) –
Returns:output (int) –
insertAt(self, index: int, pValue: float) → None
Parameters:
  • index (int) –
  • pValue (float) –
none()

OrderedCollectionDouble.__init__() -> OrderedCollectionDouble

removeAllOccurrencesOf(self, pValue: float) → None
Parameters:pValue (float) –

OrderedCollectionFloat

class ORSModel.ors.OrderedCollectionFloat

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: float) → None
Parameters:pValue (float) –
addBeforeIndex(self, index: int, pValue: float) → None
Parameters:
  • index (int) –
  • pValue (float) –
addFirst(self, pValue: float) → None
Parameters:pValue (float) –
at(self, index: int) → float
Parameters:index (int) –
Returns:output (float) –
atPut(self, index: int, pValue: float) → None
Parameters:
  • index (int) –
  • pValue (float) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → float
Returns:output (float) –
getLast(self) → float
Returns:output (float) –
getOccurrencesOf(self, pValue: float) → int
Parameters:pValue (float) –
Returns:output (int) –
insertAt(self, index: int, pValue: float) → None
Parameters:
  • index (int) –
  • pValue (float) –
none()

OrderedCollectionFloat.__init__() -> OrderedCollectionFloat

removeAllOccurrencesOf(self, pValue: float) → None
Parameters:pValue (float) –

OrderedCollectionLONGLONG

class ORSModel.ors.OrderedCollectionLONGLONG

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: int) → None
Parameters:pValue (int) –
addBeforeIndex(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
addFirst(self, pValue: int) → None
Parameters:pValue (int) –
at(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
atPut(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → int
Returns:output (int) –
getLast(self) → int
Returns:output (int) –
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
none()

OrderedCollectionLONGLONG.__init__() -> OrderedCollectionLONGLONG

removeAllOccurrencesOf(self, pValue: int) → None
Parameters:pValue (int) –

OrderedCollectionLong

class ORSModel.ors.OrderedCollectionLong

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: int) → None
Parameters:pValue (int) –
addBeforeIndex(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
addFirst(self, pValue: int) → None
Parameters:pValue (int) –
at(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
atPut(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → int
Returns:output (int) –
getLast(self) → int
Returns:output (int) –
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
none()

OrderedCollectionLong.__init__() -> OrderedCollectionLong

removeAllOccurrencesOf(self, pValue: int) → None
Parameters:pValue (int) –

OrderedCollectionShort

class ORSModel.ors.OrderedCollectionShort

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: int) → None
Parameters:pValue (int) –
addBeforeIndex(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
addFirst(self, pValue: int) → None
Parameters:pValue (int) –
at(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
atPut(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → int
Returns:output (int) –
getLast(self) → int
Returns:output (int) –
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
none()

OrderedCollectionShort.__init__() -> OrderedCollectionShort

removeAllOccurrencesOf(self, pValue: int) → None
Parameters:pValue (int) –

OrderedCollectionUnsignedChar

class ORSModel.ors.OrderedCollectionUnsignedChar

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: int) → None
Parameters:pValue (int) –
addBeforeIndex(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
addFirst(self, pValue: int) → None
Parameters:pValue (int) –
at(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
atPut(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → int
Returns:output (int) –
getLast(self) → int
Returns:output (int) –
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
none()

OrderedCollectionUnsignedChar.__init__() -> OrderedCollectionUnsignedChar

removeAllOccurrencesOf(self, pValue: int) → None
Parameters:pValue (int) –

OrderedCollectionUnsignedLONGLONG

class ORSModel.ors.OrderedCollectionUnsignedLONGLONG

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: int) → None
Parameters:pValue (int) –
addBeforeIndex(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
addFirst(self, pValue: int) → None
Parameters:pValue (int) –
at(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
atPut(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → int
Returns:output (int) –
getLast(self) → int
Returns:output (int) –
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
none()

OrderedCollectionUnsignedLONGLONG.__init__() -> OrderedCollectionUnsignedLONGLONG

removeAllOccurrencesOf(self, pValue: int) → None
Parameters:pValue (int) –

OrderedCollectionUnsignedLong

class ORSModel.ors.OrderedCollectionUnsignedLong

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: int) → None
Parameters:pValue (int) –
addBeforeIndex(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
addFirst(self, pValue: int) → None
Parameters:pValue (int) –
at(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
atPut(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → int
Returns:output (int) –
getLast(self) → int
Returns:output (int) –
getOccurrencesOf(self, pValue: int) → int
Parameters:pValue (int) –
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
none()

OrderedCollectionUnsignedLong.__init__() -> OrderedCollectionUnsignedLong

removeAllOccurrencesOf(self, pValue: int) → None
Parameters:pValue (int) –

OrderedCollectionUnsignedShort

class ORSModel.ors.OrderedCollectionUnsignedShort

Bases: ORSModel.ors.OrderedCollection

add(self, pValue: int) → None
Parameters:pValue (int) –
addBeforeIndex(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
addFirst(self, pValue: int) → None
Parameters:pValue (int) –
at(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
atPut(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirst(self) → int
Returns:output (int) –
getLast(self) → int
Returns:output (int) –
insertAt(self, index: int, pValue: int) → None
Parameters:
  • index (int) –
  • pValue (int) –
none()

OrderedCollectionUnsignedShort.__init__() -> OrderedCollectionUnsignedShort

removeAllOccurrencesOf(self, pValue: int) → None
Parameters:pValue (int) –

OrientedPlane

class ORSModel.ors.OrientedPlane

Bases: ORSModel.ors.Shape2D

brief_description: Oriented plane manipulation services. author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: May 2010

copy(self) → OrientedPlane

Gets a copy of the receiver.

Returns:output (ORSModel.ors.OrientedPlane) – an oriented plane (an OrientedPlane)
createFromPythonRepresentation(aPythonRepresentation: str) → OrientedPlane

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.OrientedPlane) –
from3PointsAndUp(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3, point2: ORSModel.ors.Vector3, up: ORSModel.ors.Vector3) → None

Initializes the plane from 3 points and an up vector.

Note

The up vector must be perpendicular to the normal vector.

Parameters:
fromPointAndNormalAndUp(self, point: ORSModel.ors.Vector3, normal: ORSModel.ors.Vector3, up: ORSModel.ors.Vector3) → None

Initializes the receiver from an origin point, a normal vector and an up vector.

Note

The up vector must be perpendicular to the normal vector.

Parameters:
fromPythonRepresentation(self, aPythonRepresentation: str) → bool
Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getA(self) → float

Gets the A plane value.

Returns:output (float) – the A value (a double)
getB(self) → float

Gets the B plane value.

Returns:output (float) – the B value (a double)
getC(self) → float

Gets the C plane value.

Returns:output (float) – the C value (a double)
getCenter(self) → Vector3

Gets the center position.

Returns:output (ORSModel.ors.Vector3) – the center position (an Vector3)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getD(self) → float

Gets the D plane value.

Returns:output (float) – the D value (a double)
getDirection0(self) → Vector3

Gets the orientedPlane right direction.

Note

The direction0 vector is normalized.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection1(self) → Vector3

Gets the orientedPlane up direction.

Note

The direction0 vector is normalized.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection2(self) → Vector3

Gets the orientedPlane normal direction.

Note

The direction0 vector is normalized.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDistanceFromOrientedPlane(self, orientedPlane: ORSModel.ors.OrientedPlane) → float

Gets the distance from the provided plane to the receiver.

Parameters:orientedPlane (ORSModel.ors.OrientedPlane) –
Returns:output (float) – a distance (a double)
getDistanceFromPlane(self, plane: ORSModel.ors.Plane) → float

Returns the distance from the receiver to the provided plane.

Note

Returns 0 if the receiver is parallel with the provided plane.

Parameters:plane (ORSModel.ors.Plane) – the plane (an Plane)
Returns:output (float) – a distance (a double)
getDistanceFromPoint(self, point: ORSModel.ors.Vector3) → float

Returns the distance from the receiver to the provided point.

Parameters:point (ORSModel.ors.Vector3) – the point (an Vector3)
Returns:output (float) – a distance (a double)
getEulerAngles(self, yaw: float, pitch: float, roll: float) → None

Returns the yaw, pitch, roll of the plane.

Returns:
  • yaw (float) – yaw (a double)
  • pitch (float) – pitch (a double)
  • roll (float) – roll (a double)
getIntersectionWithLine(self, aLine: ORSModel.ors.Line) → Vector3

Returns the vector representing the intersection with the provided line.

Parameters:aLine (ORSModel.ors.Line) –
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if no intersection
getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) → Vector3

Returns the vector representing the intersection with the provided line segment.

Parameters:aLineSegment (ORSModel.ors.LineSegment) –
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if no intersection
getIntersectionWithPlanes(self, plane1: ORSModel.ors.Plane, plane2: ORSModel.ors.Plane) → Vector3

Returns the point of the intersection with the provided planes.

Parameters:
Returns:

output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if no intersection

getIsEqualTo(self, anOrientedPlane: ORSModel.ors.OrientedPlane) → bool
Parameters:anOrientedPlane (ORSModel.ors.OrientedPlane) –
Returns:output (bool) –
getIsParallelWithOrientedPlane(self, orientedPlane: ORSModel.ors.OrientedPlane) → bool

Checks if the receiver is parallel with the provided oriented plane.

Parameters:orientedPlane (ORSModel.ors.OrientedPlane) –
Returns:output (bool) – TRUE if parallel, FALSE otherwise
getIsParallelWithPlane(self, plane: ORSModel.ors.Plane) → bool

Checks if the receiver is parallel with the provided plane.

Parameters:plane (ORSModel.ors.Plane) – the plane (an Plane)
Returns:output (bool) – TRUE if parallel, FALSE otherwise
getNormal(self) → Vector3

Returns the normal of the plane.

Returns:output (ORSModel.ors.Vector3) – A vector (an Vector3)
getPlane(self) → Plane

Gets the plane represented by the receiver.

Returns:output (ORSModel.ors.Plane) – a plane (an Plane)
getPointOnOrientedPlaneClosestToOrigin(self) → Vector3

Returns the point on the receiver that is closest to the origin (0, 0, 0)

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getProjectionOnPlane(self, point: ORSModel.ors.Vector3) → Vector3

Returns the point provided projected on the receiver.

Parameters:point (ORSModel.ors.Vector3) – the point (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the projected point (an Vector3)
getPythonRepresentation(self) → str
Returns:output (str) –
getRight(self) → Vector3

Gets the cross product of the normal and up vectors.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → OrientedPlane
Parameters:
Returns:

output (ORSModel.ors.OrientedPlane) –

getTransformed(self, aTransformationMatrix: ORSModel.ors.Matrix4x4) → OrientedPlane
Parameters:aTransformationMatrix (ORSModel.ors.Matrix4x4) –
Returns:output (ORSModel.ors.OrientedPlane) –
getTranslatedToIncludePoint(self, point: ORSModel.ors.Vector3) → OrientedPlane
Parameters:point (ORSModel.ors.Vector3) –
Returns:output (ORSModel.ors.OrientedPlane) –
getUp(self) → Vector3

Gets the up vector.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
none()

OrientedPlane.__init__() -> OrientedPlane

rotate(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → None

Applies a rotation to the receiver.

Note

The box is a right handed bounded referential.

Parameters:
  • axisInWorld (ORSModel.ors.Vector3) – a rotation axis (an Vector3)
  • aroundPointInWorld (ORSModel.ors.Vector3) – a center of rotation (an Vector3)
  • angleInRadian (float) – an angle in radian (a double)
setA(self, a: float) → None

Sets the A plane value.

Parameters:a (float) – the A value (a double)
setB(self, b: float) → None

Sets the B plane value.

Parameters:b (float) – the B value (a double)
setC(self, c: float) → None

Sets the C plane value.

Parameters:c (float) – the C value (a double)
setCenter(self, pCenterVector: ORSModel.ors.Vector3) → None

Sets the center position.

Parameters:pCenterVector (ORSModel.ors.Vector3) – a vector (an Vector3)
setD(self, d: float) → None

Sets the D plane value.

Parameters:d (float) – the D value (a double)
setOrientedPlaneValue(self, a: float, b: float, c: float, d: float, upX: float, upY: float, upZ: float, centerX: float, centerY: float, centerZ: float) → None

Sets all the receiver value components.

Parameters:
  • a (float) – the A parameter (a double)
  • b (float) – the B parameter (a double)
  • c (float) – the C parameter (a double)
  • d (float) – the D parameter (a double)
  • upX (float) – the up X component (a double)
  • upY (float) – the up Y component (a double)
  • upZ (float) – the up Z component (a double)
  • centerX (float) – the center position X component (a double)
  • centerY (float) – the center position Y component (a double)
  • centerZ (float) – the center position Z component (a double)
setUp(self, upVector: ORSModel.ors.Vector3) → None

Sets the up vector.

Parameters:upVector (ORSModel.ors.Vector3) – a vector (an Vector3)
translateToIncludePoint(self, point: ORSModel.ors.Vector3) → None
Parameters:point (ORSModel.ors.Vector3) –

PartialSpaceDijkstra

class ORSModel.ors.PartialSpaceDijkstra

Bases: ORSModel.ors.Dijkstra

extractBoundaryFromROI(self, aVolROI: ORSModel.ors.ROI) → None
Parameters:aVolROI (ORSModel.ors.ROI) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

PartialSpaceDijkstra.__init__() -> PartialSpaceDijkstra

setRadiusOfInterest(self, radius: int) → None
Parameters:radius (int) –

PartialSpaceFastMarching

class ORSModel.ors.PartialSpaceFastMarching

Bases: ORSModel.ors.FastMarching

extractBoundaryFromROI(self, aVolROI: ORSModel.ors.ROI) → None
Parameters:aVolROI (ORSModel.ors.ROI) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

PartialSpaceFastMarching.__init__() -> PartialSpaceFastMarching

setRadiusOfInterest(self, radius: int) → None
Parameters:radius (int) –

PerimeterComputation

class ORSModel.ors.PerimeterComputation

Bases: ORSModel.ors.Unmanaged

computeTotalPerimeterFromOneSliceDataArray(self, sliceData: ORSModel.ors.ArrayUnsignedChar, iSizeX: int, iSizeY: int, dSpacingX: float, dSpacingY: float, occupiedvalue: int) → float
Parameters:
  • sliceData (ArrayUnsignedChar) –
  • iSizeX (int) –
  • iSizeY (int) –
  • dSpacingX (float) –
  • dSpacingY (float) –
  • occupiedvalue (int) –
Returns:

output (float) –

computeTotalROIPerimeterOnAPlane(self, plane: ORSModel.ors.Plane, iTIndex: int) → float
Parameters:
  • plane (Plane) –
  • iTIndex (int) –
Returns:

output (float) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
setROI(self, roi: ORSModel.ors.ROI) → None
Parameters:roi (ROI) –

Plane

class ORSModel.ors.Plane

Bases: ORSModel.ors.Shape2D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010

copy(self) → Plane

Copies a plane.

Note

The copied plane has the same equation as the source plane.

Returns:output (ORSModel.ors.Plane) – A new plane (an Plane)
createFromPythonRepresentation(aPythonRepresentation: str) → Plane

Create aPlane from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Plane) –
from3Points(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3, point2: ORSModel.ors.Vector3) → None

Initializes the plane from 3 points.

Parameters:
fromNPointsLeastMeanSquares(self, aPointCollection: ORSModel.ors.SequenceableCollection) → None

Gets the plane minimizing the sum of the squares distances from a set of (at least 3) points.

Parameters:aPointCollection (ORSModel.ors.SequenceableCollection) – A sequence of points coordinates.
fromPointAndNormal(self, point: ORSModel.ors.Vector3, normal: ORSModel.ors.Vector3) → None

Initializes the plane from an origin point and a normal vector.

Parameters:
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set aPlane from a python representation

Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getA(self) → float

Gets the a coefficient of the plane.

Note

The general plane equation is ax + by + cz + dw = 0.

Returns:output (float) – The a coefficient of the plane (a double)
getB(self) → float

Gets the b coefficient of the plane.

Note

The general plane equation is ax + by + cz + dw = 0.

Returns:output (float) – The b coefficient of the plane (a double)
getC(self) → float

Gets the c coefficient of the plane.

Note

The general plane equation is ax + by + cz + dw = 0.

Returns:output (float) – The c coefficient of the plane (a double)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getD(self) → float

Gets the d coefficient of the plane.

Note

The general plane equation is ax + by + cz + dw = 0.

Returns:output (float) – The d coefficient of the plane (a double)
getDistanceFromPlane(self, plane: ORSModel.ors.Plane) → float

Computes the distance from another plane.

Parameters:plane (ORSModel.ors.Plane) – A plane (an Plane)
Returns:output (float) – the distance (a double)
getDistanceFromPoint(self, point: ORSModel.ors.Vector3) → float

Computes the distance from a point.

Parameters:point (ORSModel.ors.Vector3) – A point (an Vector3)
Returns:output (float) – the distance (a double)
getIntersectionWithLine(self, aLine: ORSModel.ors.Line) → Vector3

Return the vector representing the intersection of the provided line and the receiver.

Parameters:aLine (ORSModel.ors.Line) –
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if not intersection
getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) → Vector3

Return the vector representing the intersection of the provided line segment and the receiver.

Parameters:aLineSegment (ORSModel.ors.LineSegment) –
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if not intersection
getIntersectionWithPlane(self, plane: ORSModel.ors.Plane) → Line
Parameters:plane (ORSModel.ors.Plane) –
Returns:output (ORSModel.ors.Line) –
getIntersectionWithPlanes(self, plane1: ORSModel.ors.Plane, plane2: ORSModel.ors.Plane) → Vector3

Return the point of the intersection of the provided planes and the receiver.

Parameters:
Returns:

output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if not intersection

getIsEqualTo(self, plane: ORSModel.ors.Plane) → bool

Verifies equality between the receiver and a given plane.

Parameters:plane (ORSModel.ors.Plane) –
Returns:output (bool) – TRUE if the argument plane is equal to the receiver, FALSE otherwise
getIsParallelWithPlane(self, plane: ORSModel.ors.Plane) → bool

Checks to see if a given plane is parallel to the received plane.

Parameters:plane (ORSModel.ors.Plane) – A plane (an Plnae)
Returns:output (bool) – TRUE if both planes are parallel, FALSE otherwise
getNormal(self) → Vector3

Returns the normal of the plane.

Returns:output (ORSModel.ors.Vector3) – A vector (an Vector3)
getPointOnPlaneClosestToOrigin(self) → Vector3

Returns the closest point to the origin of the plane.

Returns:output (ORSModel.ors.Vector3) – A point (an Vector3)
getProjectionOnPlane(self, point: ORSModel.ors.Vector3) → Vector3
Parameters:point (ORSModel.ors.Vector3) –
Returns:output (ORSModel.ors.Vector3) –
getPythonRepresentation(self) → str
Returns:output (str) –
getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → Plane
Parameters:
Returns:

output (ORSModel.ors.Plane) –

getTranslatedToIncludePoint(self, point: ORSModel.ors.Vector3) → Plane
Parameters:point (ORSModel.ors.Vector3) –
Returns:output (ORSModel.ors.Plane) –
none()

Plane.__init__() -> Plane

rotate(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → None

Applies a rotation to the receiver.

Note

The box is a right handed bounded referential.

Parameters:
  • axisInWorld (ORSModel.ors.Vector3) – a rotation axis (an Vector3)
  • aroundPointInWorld (ORSModel.ors.Vector3) – a center of rotation (an Vector3)
  • angleInRadian (float) – an angle in radian (a double)
setA(self, a: float) → None

Sets the a coefficient of the plane.

Note

The general plane equation is ax + by + cz + dw = 0.

Parameters:a (float) – The a coefficient of the plane (a double)
setB(self, b: float) → None

Sets the b coefficient of the plane.

Note

The general plane equation is ax + by + cz + dw = 0.

Parameters:b (float) – The b coefficient of the plane (a double)
setC(self, c: float) → None

Sets the c coefficient of the plane.

Note

The general plane equation is ax + by + cz + dw = 0.

Parameters:c (float) – The c coefficient of the plane (a double)
setD(self, d: float) → None

Sets the d coefficient of the plane.

Note

The general plane equation is ax + by + cz + dw = 0.

Parameters:d (float) – The d coefficient of the plane (a double)
translateToIncludePoint(self, point: ORSModel.ors.Vector3) → None
Parameters:point (ORSModel.ors.Vector3) –

PlaneCollection

class ORSModel.ors.PlaneCollection

Bases: ORSModel.ors.Visual

brief_description: Represents a collection of planes in the view. author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: Mai 2015 Represents a collection of planes in the view.

addPlane(self, aPlane: ORSModel.ors.Plane, tIndex: int) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getHighlightedPlaneCollection(self, tIndex: int) → OrderedCollectionUnsignedChar
Parameters:tIndex (int) –
Returns:output (ORSModel.ors.OrderedCollectionUnsignedChar) –
getHighlightedPlaneCount(self, tIndex: int) → int
Parameters:tIndex (int) –
Returns:output (int) –
getPlane(self, planeIndex: int, tIndex: int) → Plane
Parameters:
  • planeIndex (int) –
  • tIndex (int) –
Returns:

output (ORSModel.ors.Plane) –

getPlaneCount(self, tIndex: int) → int
Parameters:tIndex (int) –
Returns:output (int) –
getSelectedColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getSelectedPlaneCollection(self, tIndex: int) → OrderedCollectionUnsignedChar
Parameters:tIndex (int) –
Returns:output (ORSModel.ors.OrderedCollectionUnsignedChar) –
getSelectedPlaneCount(self, tIndex: int) → int
Parameters:tIndex (int) –
Returns:output (int) –
getThicknessIn2DView(self) → int
Returns:output (int) –
none()

PlaneCollection.__init__() -> PlaneCollection

removePlane(self, planeIndex: int, tIndex: int) → None
Parameters:
  • planeIndex (int) –
  • tIndex (int) –
setColor(self, color: ORSModel.ors.Color) → None
Parameters:color (ORSModel.ors.Color) –
setPlane(self, aPlane: ORSModel.ors.Plane, planeIndex: int, tIndex: int) → None
Parameters:
setSelectedColor(self, color: ORSModel.ors.Color) → None
Parameters:color (ORSModel.ors.Color) –
setThicknessIn2DView(self, tickness: int) → None
Parameters:tickness (int) –

Progress

class ORSModel.ors.Progress

Bases: ORSModel.ors.Managed

brief_description: An entity to control progress of lengthy processes. author: Normand All other members of ORS participated. version: 1.0 date: August 2014 An entity describing a progress controller.

closeProgress(self) → None

Closes the progress bar.

Note

This protocol is also called automatically when the interface gets deleted, so it is not necessary to call it.

decrementRangeBy(self, iVal: int) → None

Decrements the progress range.

Note

This protocol is only relevant when the progress is not a working progress.

Parameters:iVal (int) –
deleteObject(self) → None

Explicitly deletes the core object wrapped by this Interface object.

getCaption(self) → str

Gets the caption.

Returns:output (str) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCurrentProgress(self) → int

Gets the current progress position.

Note

This protocol should not be used with working progress bars, as they do not have a position.

Returns:output (int) – the current progress bar position (an uint32_t)
getExtraText(self) → str

Gets the extra text.

Returns:output (str) –
getID(self) → int

Gets the ID.

Note

This protocol is only relevant when the progress is started from an ID, not from a string caption.

Returns:output (int) – the progress ID (an short)
getIsCancellable(self) → bool

Gets if the progress is cancellable.

Returns:output (bool) – true if progress is cancellable, false otherwise
getIsCancelled(self) → bool

Checks if the progress was cancelled by the user.

Note

This protocol is only relevant when the progress is a cancellable progress.

Returns:output (bool) – true if progress was cancelled, false otherwise
getIsVisible(self) → bool

Gets if the progress is visible.

Returns:output (bool) – true if progress is visible, false otherwise
getIsWorkingBar(self) → bool

Gets if the progress is a working progress or not.

Returns:output (bool) – true if progress is a working progress, false otherwise
getRange(self) → int

Gets the progress range.

Note

This protocol is only relevant when the progress is not a working progress.

Returns:output (int) – the range (an uint32_t)
incrementRangeBy(self, iVal: int) → None

Increments the progress range.

Note

This protocol is only relevant when the progress is not a working progress.

Parameters:iVal (int) –
none()

Progress.__init__() -> Progress

resetCancelledState(self) → None

Resets the cancelled state.

setCancelButtonText(self, sText: str) → None

Sets the text of the cancel button.

Parameters:sText (str) –
setExtraText(self, text: str) → None

Sets the extra text.

Note

The extra text is displayed in the progress dialog.

Parameters:text (str) – some text (a string)
setIsCancellable(self, pValue: bool) → None

Sets if the progress is cancellable.

Parameters:pValue (bool) – true to make the progress cancellable, false otherwise
setIsCancelled(self, pValue: bool) → None

Sets the progress to be cancelled or not.

Note

This protocol is only relevant when the progress is a cancellable progress.

Parameters:pValue (bool) – true to cancel, false otherwise
setIsVisible(self, bVisible: bool) → None

Sets if the progress is visible.

Parameters:bVisible (bool) –
startProgressWithCaption(self, sCaption: str, iRange: int, bCancellable: bool) → None

Starts a normal progress bar.

Parameters:
  • sCaption (str) – the progress caption (a string)
  • iRange (int) – the range (an uint32_t)
  • bCancellable (bool) – true if the progress bar is to be cancellable, false otherwise
startProgressWithID(self, iID: int, iRange: int, bCancellable: bool) → None

Starts a normal progress bar.

Parameters:
  • iID (int) – the progress id (an unsigned short, see ORSProgressBars.h for supported IDs)
  • iRange (int) – the range (an uint32_t)
  • bCancellable (bool) – true if the progress bar is to be cancellable, false otherwise
startWorkingProgressWithCaption(self, sCaption: str, bCancellable: bool) → None

Starts a working progress bar.

Parameters:
  • sCaption (str) – the progress caption (a string)
  • bCancellable (bool) – true if the working bar is to be cancellable, false otherwise
startWorkingProgressWithID(self, iID: int, bCancellable: bool) → None

Starts a working progress bar.

Parameters:
  • iID (int) – the progress id (an unsigned short, see ORSProgressBars.h for supported IDs)
  • bCancellable (bool) – true if the working bar is to be cancellable, false otherwise
updateProgress(self, iPosition: int) → None

Updates the progress bar.

Note

This protocol should not be used with working progress bars, as they do not have a position.

Parameters:iPosition (int) – the new progress bar position (an uint32_t)

Quaternion

class ORSModel.ors.Quaternion

Bases: ORSModel.ors.Unmanaged

brief_description: A wrapper to a 3D vector. author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: august 2018

add(self, aVector: ORSModel.ors.Quaternion) → None

Adds a vector to the receiver.

Parameters:aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
copy(self) → Quaternion

Returns a new vector identical to the receiver (a copy).

Returns:output (ORSModel.ors.Quaternion) –
createFromPythonRepresentation(aPythonRepresentation: str) → Quaternion

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Quaternion) –
fromAxisAndAngle(self, axis: ORSModel.ors.Vector3, angle: float) → None
Parameters:
fromPythonRepresentation(self, aPythonRepresentation: str) → bool
Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
fromRotationMatrix(self, aRotationMatrix: ORSModel.ors.Matrix4x4) → None
Parameters:aRotationMatrix (ORSModel.ors.Matrix4x4) –
getAdditionWith(self, aVector: ORSModel.ors.Quaternion) → Quaternion

Gets the result of adding a vector to the receiver.

Note

The receiver is not modified.

Parameters:aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
Returns:output (ORSModel.ors.Quaternion) – the resulting vector (an Vector3)
getAngle(self) → float
Returns:output (float) –
getAsRotationMatrix(self) → Matrix4x4
Returns:output (ORSModel.ors.Matrix4x4) –
getAxis(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getConjugate(self) → Quaternion
Returns:output (ORSModel.ors.Quaternion) –
getDirection(self) → Vector3

get direction of theQuaternion

Returns:output (ORSModel.ors.Vector3) – Vector3
getDotProductWith(self, aQuaternion: ORSModel.ors.Quaternion) → float
Parameters:aQuaternion (ORSModel.ors.Quaternion) –
Returns:output (float) –
getIsEqualTo(self, aVector: ORSModel.ors.Quaternion) → bool
Parameters:aVector (ORSModel.ors.Quaternion) –
Returns:output (bool) –
getLength(self) → float

Gets the vector’s length.

Returns:output (float) – the length (a double)
getLinearInterpolationWith(self, point1: ORSModel.ors.Quaternion, normalizePosition: float) → Quaternion

Computes the lerp with another vector.

Parameters:
  • point1 (ORSModel.ors.Quaternion) – a vector (an Vector3)
  • normalizePosition (float) – a interpolation factor [0,1](a double)
Returns:

output (ORSModel.ors.Quaternion) – the lerp vector (an Vector3)

getMultiply(self, aQuaternion: ORSModel.ors.Quaternion) → Quaternion

multyply the receiver with the givenQuaternion.

Parameters:aQuaternion (ORSModel.ors.Quaternion) – a double value
Returns:output (ORSModel.ors.Quaternion) –
getNegated(self) → Quaternion

Gets the receiver negated in a new vector.

Note

The receiver is not modified.

Returns:output (ORSModel.ors.Quaternion) – the resulting vector (an Vector3)
getNormalized(self) → Quaternion
Returns:output (ORSModel.ors.Quaternion) –
getPythonRepresentation(self) → str
Returns:output (str) –
getScaledBy(self, scaleFactor: float) → Quaternion

Gets the result of sacling a vector to the receiver.

Note

The receiver is not modified.

Parameters:scaleFactor (float) – a scale a double
Returns:output (ORSModel.ors.Quaternion) – the resulting vector (an Vector3)
getSphericalInterpolationWith(self, point1: ORSModel.ors.Quaternion, normalizePosition: float) → Quaternion

Computes the slerp with another vector.

Parameters:
  • point1 (ORSModel.ors.Quaternion) – a vector (an Vector3)
  • normalizePosition (float) – a interpolation factor [0,1](a double)
Returns:

output (ORSModel.ors.Quaternion) – the lerp vector (an Vector3)

getSubtractionFrom(self, aVector: ORSModel.ors.Quaternion) → Quaternion

Gets the result of subtracting a vector from the receiver.

Note

The receiver is not modified.

Parameters:aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
Returns:output (ORSModel.ors.Quaternion) – the resulting vector (an Vector3)
getUp(self) → Vector3

get direction of theQuaternion

Returns:output (ORSModel.ors.Vector3) – Vectoupr3
getW(self) → float

Gets the W value from the vector.

Returns:output (float) – a double
getX(self) → float

Gets the X value from the vector.

Returns:output (float) – a double
getY(self) → float

Gets the Y value from the vector.

Returns:output (float) – a double
getZ(self) → float

Gets the Z value from the vector.

Returns:output (float) – a double
multiply(self, aQuaternion: ORSModel.ors.Quaternion) → None

multyply the receiver with the givenQuaternion.

Parameters:aQuaternion (ORSModel.ors.Quaternion) – a double value
none()

Quaternion.__init__() -> Quaternion

normalize(self) → None

Normalizes the vector.

Note

A normalized vector has norm (length) 1.

scale(self, scaleFactor: float) → None

Scales the vector.

Parameters:scaleFactor (float) – a scale factor (a double)
setW(self, value: float) → None

Sets the Y value of the vector.

Parameters:value (float) – a double value
setX(self, value: float) → None

Sets the X value of the vector.

Parameters:value (float) – a double value
setXYZ(self, x: float, y: float, z: float) → None

Sets the 3 vector component.

Note

W is set to zero

Parameters:
  • x (float) – the X component (a double)
  • y (float) – the Y component (a double)
  • z (float) – the Z component (a double)
setY(self, value: float) → None

Sets the Y value of the vector.

Parameters:value (float) – a double value
setZ(self, value: float) → None

Sets the Z value of the vector.

Parameters:value (float) – a double value
subtract(self, aVector: ORSModel.ors.Quaternion) → None

Subtracts a vector from the receiver.

Parameters:aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)

ROI

class ORSModel.ors.ROI

Bases: ORSModel.ors.StructuredGrid

brief_description: Represents a region of interest for a dataset. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: VisualChannel, MeshFacesROI Represents a VisualRegion of Interest (ROI) for a dataset. Can be used to highlight, subtract, extract, etc, portions of a dataset. Each ROI has its own color, opacity, visual state, etc. Only a limited amount of ROIs (255) can be visible simultaneously.

adaptToChannel(self, pChannel: ORSModel.ors.Channel, x: int, y: int, z: int, pTSourceOffset: int, pTRange: int) → None

Adapts aROI to a channel, according to the channel’s coordinates.

Note

The supplied X/Y/Z offset is the offset of the given channel relatively to the originating channel (the one the ROI is based upon), in voxels.

Parameters:
  • pChannel (ORSModel.ors.Channel) – a reference channel (an Channel)
  • x (int) – an X offset (an short)
  • y (int) – an Y offset (an short)
  • z (int) – a Z offset (an short)
  • pTSourceOffset (int) – the T start position of the ROI (a uint32_t)
  • pTRange (int) – the number of Ts to process (a uint32_t)
addCircleArea(self, posX: float, posY: float, posZ: float, normalX: float, normalY: float, normalZ: float, radius: float, tStep: int) → None

Add circle area toROI.

Parameters:
  • posX (float) –
  • posY (float) –
  • posZ (float) –
  • normalX (float) –
  • normalY (float) –
  • normalZ (float) –
  • radius (float) –
  • tStep (int) –
addCircularPath2D(self, path: ORSModel.ors.VisualPath, box: ORSModel.ors.Box, plane: ORSModel.ors.Plane, includeAllTouchingVoxel: bool, inverse: bool, bRemove: bool, IProgress: ORSModel.ors.Progress, tStep: int) → None

Add a 2D polygon from aVisualPath to the ROI.

Parameters:
addCircularPath3D(self, path: ORSModel.ors.VisualPath, box: ORSModel.ors.Box, plane: ORSModel.ors.Plane, includeAllTouchingVoxel: bool, inverse: bool, bRemove: bool, IProgress: ORSModel.ors.Progress, tStep: int) → None

Add a 3D polygon from aVisualPath to the ROI.

Parameters:
addEllipse2D(self, plane: ORSModel.ors.Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: ORSModel.ors.Progress, tStep: int) → None

Adds a 2D ellipse to theROI.

Parameters:
  • plane (ORSModel.ors.Rectangle) – the bounded plane on which the ellipse lies (an Rectangle)
  • includeAllTouchingVoxel (bool) – true to include all touching voxels, false to only include voxels where center is included
  • inverse (bool) – true to add the inverse of the polygon
  • remove (bool) – true to remove the polygon, false to add it
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
  • tStep (int) – time step for which to add the ellipse (a uint32_t)
addEllipse3D(self, plane: ORSModel.ors.Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: ORSModel.ors.Progress, tStep: int) → None

Adds a 2D ellipse to theROI.

Parameters:
  • plane (ORSModel.ors.Rectangle) – the bounded plane on which the ellipse lies (an Rectangle)
  • includeAllTouchingVoxel (bool) – true to include all touching voxels, false to only include voxels where center is included
  • inverse (bool) – true to add the inverse of the polygon
  • remove (bool) – true to remove the polygon, false to add it
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
  • tStep (int) – time step for which to add the ellipse (a uint32_t)
addLine(self, pLine: ORSModel.ors.Line, tStep: int) → None

Adds a line to theROI.

Note

Note that the range values are inclusive.

Parameters:
addLineIfInRange(self, pLine: ORSModel.ors.Line, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel) → None

Adds a line to theROI if the corresponding voxels in the channel are within the specified range.

Note

Note that the range values are inclusive.

Parameters:
  • pLine (ORSModel.ors.Line) – the line to add (an Line)
  • tStep (int) – the time step (a uint32_t)
  • lowerThreshold (float) – the lower range value (a double)
  • upperThreshold (float) – the upper range value (a double)
  • pChannel (ORSModel.ors.Channel) – a channel of the same shape as the receiver (an Channel)
addLineSegment(self, lineSegment: ORSModel.ors.LineSegment, tStep: int) → None

Adds a line segment to theROI.

Parameters:
addLineSegmentIfInRange(self, lineSegment: ORSModel.ors.LineSegment, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel) → None

Adds a line segment to theROI if the corresponding voxels in the channel are within the specified range.

Note

Note that the range values are inclusive.

Parameters:
  • lineSegment (ORSModel.ors.LineSegment) – the line segment to add (an LineSegment)
  • tStep (int) – the time step (a uint32_t)
  • lowerThreshold (float) – the lower range value (a double)
  • upperThreshold (float) – the upper range value (a double)
  • pChannel (ORSModel.ors.Channel) – a channel of the same shape as the receiver (an Channel)
addPathContour(self, aPath: ORSModel.ors.VisualPath, aBox: ORSModel.ors.Box, tStep: int) → None

Add aVisualPath contour to the ROI.

Parameters:
addPolygon2D(self, ptsList: float, ptsListSize: int, plane: ORSModel.ors.Plane, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: ORSModel.ors.Progress, tStep: int) → None

Add a 3D polygon to theROI.

Note

This method adds a 3D polygon, not a polyhedron. The points must lie on the same plane. The polygon is fill in the plane normal direction

Parameters:
  • ptsList (float) – the points list (a double array)
  • ptsListSize (int) – the size of the point list (an int)
  • plane (ORSModel.ors.Plane) – the plane on which the points lie (a Plane)
  • includeAllTouchingVoxel (bool) – true to include all touching voxels, false to only include voxels where center is included
  • inverse (bool) – true to add the inverse of the polygon
  • remove (bool) – true to remove the polygon, false to add it
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
  • tStep (int) – the T index (a uint32_t)
addPolygon3D(self, ptsList: float, ptsListSize: int, plane: ORSModel.ors.Plane, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: ORSModel.ors.Progress, tStep: int) → None

Add a 3D polygon to theROI.

Note

This method adds a 3D polygon, not a polyhedron. The points must lie on the same plane. The polygon is fill in the plane normal direction

Parameters:
  • ptsList (float) – the points list (a double array)
  • ptsListSize (int) – the size of the point list (an int)
  • plane (ORSModel.ors.Plane) – the plane on which the points lie (a Plane)
  • includeAllTouchingVoxel (bool) – true to include all touching voxels, false to only include voxels where center is included
  • inverse (bool) – true to add the inverse of the polygon
  • remove (bool) – true to remove the polygon, false to add it
  • IProgress (ORSModel.ors.Progress) – a progress object (a Progress)
  • tStep (int) – the T index (a uint32_t)
addROI(self, aROI: ORSModel.ors.ROI) → None

Adds aROI to the current ROI.

Note

The ROI to add will be projected correctly if it doesn’t share the same characteristics.

Parameters:aROI (ORSModel.ors.ROI) – the ROI to add (an ROI)
addROIAtTOffset(self, aROI: ORSModel.ors.ROI, pTOffset: int) → None

Adds aROI to the current ROI, but at a specific T offset.

Note

The ROI to add will be projected correctly if it doesn’t share the same characteristics.

Parameters:
addROIAtTimeStepAtTOffset(self, aROI: ORSModel.ors.ROI, timeIndex: int, pTOffset: int) → None

Adds aROI to the current ROI, but at a specific T offset.

Note

The ROI to add will be projected correctly if it doesn’t share the same characteristics.

Parameters:
  • aROI (ORSModel.ors.ROI) – the ROI to add (an ROI)
  • timeIndex (int) –
  • pTOffset (int) –
addRectangle2D(self, plane: ORSModel.ors.Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: ORSModel.ors.Progress, tStep: int) → None

Adds a 3D rectangle to theROI.

Note

This method adds a 3D rectangle. The points must lie on the same plane. The polygon is filled in the plane normal direction.

Parameters:
  • plane (ORSModel.ors.Rectangle) – the bounded plane on which the rectangle lies (an Rectangle)
  • includeAllTouchingVoxel (bool) – true to include all touching voxels, false to only include voxels where center is included
  • inverse (bool) – true to add the inverse of the polygon
  • remove (bool) – true to remove the polygon, false to add it
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
  • tStep (int) – time step for which to add the rectangle (a uint32_t)
addRectangle3D(self, plane: ORSModel.ors.Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: ORSModel.ors.Progress, tStep: int) → None

Adds a 3D rectangle to theROI.

Note

This method adds a 3D rectangle. The points must lie on the same plane. The polygon is filled in the plane normal direction.

Parameters:
  • plane (ORSModel.ors.Rectangle) – the bounded plane on which the rectangle lies (an Rectangle)
  • includeAllTouchingVoxel (bool) – true to include all touching voxels, false to only include voxels where center is included
  • inverse (bool) – true to add the inverse of the polygon
  • remove (bool) – true to remove the polygon, false to add it
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
  • tStep (int) – time step for which to add the rectangle (a uint32_t)
addToVolumeROIAtPosition(self, xmin: int, ymin: int, zmin: int, tmin: int, inputROI: ORSModel.ors.ROI) → ROI

Extracts a subset from indices.

Parameters:
  • xmin (int) – the minimal X indicies of the subset (a uint32_t)
  • ymin (int) – the maximal Y indicies of the subset (a uint32_t)
  • zmin (int) – the minimal Z indicies of the subset (a uint32_t)
  • tmin (int) – the time step start (a uint32_t)
  • inputROI (ORSModel.ors.ROI) – the subset ROI
Returns:

output (ORSModel.ors.ROI) –

addVoxel(self, index: int) → None

Adds a voxel.

Note

The index is linear within the channel data.

Note

Any changes to a Region of Interest need to be followed by a show() to refresh the screen.

Note

If many voxels need to be added, it is better to use the protocols that accept a list of voxels.

Parameters:index (int) – the index of the voxel (a int64_t)
addVoxelFromWorldCoordinates(self, pVect: ORSModel.ors.Vector3, timeIndex: int) → None

Adds point (supplied in the form of world vector) to theROI.

Parameters:
addVoxelIndicesToROIIfInRange(self, indices: int, indicesSize: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel) → None

Adds indices to theROI, checking against a range.

Note

Only those indicies having values within the supplied range are added to the ROI.

Parameters:
  • indices (int) – an array of indices (a int64_t*)
  • indicesSize (int) – the number of indices in the array (a int64_t)
  • lowerThreshold (float) – the lower range (a double)
  • upperThreshold (float) – the upper range (a double)
  • pChannel (ORSModel.ors.Channel) – the channel to check against (an Channel)
addVoxelIntersectingBoundedPlane(self, aPlane: ORSModel.ors.Rectangle, tStep: int) → None

Add voxel intersecting bounded plane.

Parameters:
addVoxelInterval(self, iStart: int, iEnd: int) → None

Adds a voxel interval of indicies.

Note

Every voxel within the interval will be added to the Region of Interest.

Note

The indicies are linear within the channel data.

Note

Any changes to a Region of Interest need to be followed by a show() to refresh the screen.

Parameters:
  • iStart (int) – the start value (inclusive) of the interval (a int64_t)
  • iEnd (int) – the end value (inclusive) of the interval (a int64_t)
addVoxelIntervals(self, pIntervalArray: int, pNumberOfIntervals: int) → None

Adds a list of voxel indicies intervals.

Note

Every voxel within the interval will be added to the Region of Interest.

Note

The indicies are linear within the channel data.

Note

Any changes to a Region of Interest need to be followed by a show() to refresh the screen.

Parameters:
  • pIntervalArray (int) – an array of interval begin and end (inclusive) values (a int64_t*)
  • pNumberOfIntervals (int) – the number of interval pairs in the array (a int32_t*)
addVoxels(self, indices: int, indicesSize: int) → None

Adds a list of voxels.

Note

The indicies are linear within the channel data.

Note

Any changes to a Region of Interest need to be followed by a show() to refresh the screen.

Note

If the array is sorted, addition will perform quicker.

Parameters:
  • indices (int) – an array of indicies (a int64_t*)
  • indicesSize (int) – the number of indicies in the array (a int64_t)
addVoxelsFromWorldCoordinates(self, worldPositionArray: ORSModel.ors.ArrayDouble, timeIndex: int) → None

Adds indices (supplied in the form of world coordinates) to theROI.

Parameters:
  • worldPositionArray (ORSModel.ors.ArrayDouble) – an array of world position triplets (an ArrayDouble)
  • timeIndex (int) – the T index (a uint32_t)
addVoxelsFromWorldCoordinatesIfInRange(self, worldPositionArray: ORSModel.ors.ArrayDouble, timeIndex: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel) → None

Adds indices (supplied in the form of world coordinates) to theROI, checking against a range.

Note

Very similar to addVoxelsFromWorldCoordinates(), but only those indicies having values within the supplied range are added to the ROI.

Parameters:
  • worldPositionArray (ORSModel.ors.ArrayDouble) – an array of world position triplets (an ArrayDouble)
  • timeIndex (int) – the T index (a uint32_t)
  • lowerThreshold (float) – the lower range (a double)
  • upperThreshold (float) – the upper range (a double)
  • pChannel (ORSModel.ors.Channel) – the channel to check against (an Channel)
clearROI(self) → None

Empties all voxel data from the region of interest.

clearTimeStepRange(self, pTimeStepStart: int, pTimeStepEnd: int) → None

Empties a time step range of the region of interest.

Parameters:
  • pTimeStepStart (int) – the time step start (a uint32_t)
  • pTimeStepEnd (int) – the time step end (a uint32_t)
closeHoles(threshold, progress)

Creates a ROI obtained from the closing operation of the input ROI

Parameters:
Returns:

closedROI (ORSModel.ors.ROI) – a new ROI

computeAnisotropyFromMIL(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, iTIndex: int, lengthToAnalyze: float, samplingDistance: float, countOrientations: int, minStarCount: int, maxStarCount: int, tolerance: float, IProgress: ORSModel.ors.Progress) → float

Computes the anisotropy of aROI using the Mean Intercept Length (MIL) in the specified region.

Parameters:
  • minX (int) – the minimum X range (a uint32_t)
  • minY (int) – the minimum Y range (a uint32_t)
  • minZ (int) – the minimum Z range (a uint32_t)
  • maxX (int) – the maximum X range (a uint32_t)
  • maxY (int) – the maximum Y range (a uint32_t)
  • maxZ (int) – the maximum Z range (a uint32_t)
  • iTIndex (int) – the T index (a uint32_t)
  • lengthToAnalyze (float) – the distance to analyze per orientation per star (a double)
  • samplingDistance (float) – the distance between each sample on the line of analysis (a double)
  • countOrientations (int) – the count of lines to analyze per star (a uint32_t)
  • minStarCount (int) – the minimal count of star to iterate on (a uint32_t)
  • maxStarCount (int) – the maximal count of star to iterate on (a uint32_t)
  • tolerance (float) – the smallest variance of anisotropy to reach before ending the iterations (a double)
  • IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
Returns:

output (float) – the anisotropy value (a double)

computeAnisotropyFromSVD(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, iTIndex: int, lengthToAnalyze: float, samplingDistance: float, countOrientations: int, minStarCount: int, maxStarCount: int, tolerance: float, IProgress: ORSModel.ors.Progress) → float

Computes the anisotropy of aROI using the Star Volume Distribution (SVD) in the specified region.

Parameters:
  • minX (int) – the minimum X range (a uint32_t)
  • minY (int) – the minimum Y range (a uint32_t)
  • minZ (int) – the minimum Z range (a uint32_t)
  • maxX (int) – the maximum X range (a uint32_t)
  • maxY (int) – the maximum Y range (a uint32_t)
  • maxZ (int) – the maximum Z range (a uint32_t)
  • iTIndex (int) – the T index (a uint32_t)
  • lengthToAnalyze (float) – the distance to analyze per orientation per star (a double)
  • samplingDistance (float) – the distance between each sample on the line of analysis (a double)
  • countOrientations (int) – the count of lines to analyze per star (a uint32_t)
  • minStarCount (int) – the minimal count of star to iterate on (a uint32_t)
  • maxStarCount (int) – the maximal count of star to iterate on (a uint32_t)
  • tolerance (float) – the smallest variance of anisotropy to reach before ending the iterations (a double)
  • IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
Returns:

output (float) – the anisotropy value (a double)

computeAnisotropyMappingFromMIL(self, iTIndex: int, channelToFill: ORSModel.ors.Channel, vectorFieldEigenvectorMax: ORSModel.ors.VectorField, lengthToAnalyze: float, samplingDistance: float, countOrientations: int, IProgress: ORSModel.ors.Progress) → None

Computes the anisotropy mapping of aROI at the specified locations using the mean intercept length (MIL)

Note

The vector field object will be cleared before being filled with the current information.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • channelToFill (ORSModel.ors.Channel) – the channel to fill at each voxel location (an Channel)
  • vectorFieldEigenvectorMax (ORSModel.ors.VectorField) – the vector field (eigenvector associated to the highest eigenvalue) to fill at each voxel location of the given channel (a VectorField)
  • lengthToAnalyze (float) – the distance to analyze per orientation per star (a double)
  • samplingDistance (float) – the distance between each sample on the line of analysis (a double)
  • countOrientations (int) – the count of lines to analyze per star (a uint32_t)
  • IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
computeAnisotropyMappingFromSurfaceNormals(self, iTIndex: int, channelToFill: ORSModel.ors.Channel, vectorFieldEigenvectorMax: ORSModel.ors.VectorField, channelToFillNormOfGradient: ORSModel.ors.Channel, channelToFillDivergence: ORSModel.ors.Channel, vectorFieldCurl: ORSModel.ors.VectorField, channelToFillNormOfCurl: ORSModel.ors.Channel, radiusOfInfluence: float, useProjectionBasedAnisotropy: bool, meshSmoothingRepetitions: int, IProgress: ORSModel.ors.Progress) → None

Computes the anisotropy mapping of aROI at the specified locations using the surface normals.

Note

The vector field object will be cleared before being filled with the current information.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • channelToFill (ORSModel.ors.Channel) – the channel (anisotropy) to fill at each voxel location (a Channel)
  • vectorFieldEigenvectorMax (ORSModel.ors.VectorField) – the vector field (eigenvector associated to the highest eigenvalue) to fill at each voxel location of the given channel (a VectorField)
  • channelToFillNormOfGradient (ORSModel.ors.Channel) – the channel (norm of the gradient of the orientation) to fill at each voxel location (a Channel)
  • channelToFillDivergence (ORSModel.ors.Channel) – the channel (divergence of the orientation) to fill at each voxel location (a Channel)
  • vectorFieldCurl (ORSModel.ors.VectorField) – the vector field (curl of the orientation) to fill at each voxel location of the given channel (a VectorField)
  • channelToFillNormOfCurl (ORSModel.ors.Channel) – the channel (norm of the curl of the orientation) to fill at each voxel location (a Channel)
  • radiusOfInfluence (float) – distance from the analysis point to the last considered anisotropy element (a double)
  • useProjectionBasedAnisotropy (bool) – anisotropy computation method. If true, the projection based method is used; if false, the eigenvalues from the tensor of inertia are taken (a bool)
  • meshSmoothingRepetitions (int) – the number of times the mesh obtained from the ROI should be smoothed before computing the anisotropy (an uint32_t)
  • IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
computeGraph(self, IProgress: ORSModel.ors.Progress) → Graph

Computes the graph of theROI’s connectivity.

Note

The receiver ROI should already be skeletonized.

Parameters:IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
Returns:output (ORSModel.ors.Graph) – graph of the ROI’s connectivity
computeVolumeFractionMapping(self, iTIndex: int, channelToFill: ORSModel.ors.Channel, radius: float, IProgress: ORSModel.ors.Progress) → None

Computes the volume fraction mapping of aROI at the specified locations.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • channelToFill (ORSModel.ors.Channel) – the channel to fill at each voxel location (an Channel)
  • radius (float) – distance from the analysis point to the last considered ROI element (a double)
  • IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
convertToChannel(value=255)

Helper for setting the attribute of the object following the preferences

Parameters:value (int) – value to put in the Channel (should be between 0 and 255)
Return:
Rtype:ORSModel.ors.Channel
copyInto(self, aROI: ORSModel.ors.ROI) → None

Copies the receiver into anotherROI.

Parameters:aROI (ORSModel.ors.ROI) – a destination ROI (an Volume)
dijkstra3DGrow(self, inputChannel: ORSModel.ors.Channel, volumeToGrowIn: ORSModel.ors.Box, volumeOfTheGrow: float, timeStep: int) → None
Parameters:
dilate(self, pNumberOfIterations: int, pTimeStep: int, progress: ORSModel.ors.Progress) → None

Dilates (grows) theROI.

Note

Every voxel of the channel that touches the ROI is added to it, for the given time step.

Parameters:
  • pNumberOfIterations (int) – the number of dilate iterations (a uint16_t)
  • pTimeStep (int) – the time step (a uint32_t)
  • progress (ORSModel.ors.Progress) – a progress object (a Progress)
duplicateTimeStepDataAcrossAllTimeSteps(self, pSourceTimeStep: int) → None

Duplicates data from one time step to all time steps.

Note

The data from the source time step is copied to all the time steps of the ROI.

Parameters:pSourceTimeStep (int) – the source time step (a uint32_t)
erode(self, pNumberOfIterations: int, pTimeStep: int, progress: ORSModel.ors.Progress) → None

Erodes (shrinks) theROI.

Note

Every voxel of the ROI that touches the channel is removed from the ROI, for the given time step.

Parameters:
  • pNumberOfIterations (int) – the number of erode iterations (a uint16_t)
  • pTimeStep (int) – the time step (a uint32_t)
  • progress (ORSModel.ors.Progress) – a progress object (a Progress)
exchangeInternalData(self, aROI: ORSModel.ors.ROI) → bool

Exchanges (swaps) internal data between the receiver and the argumentROI.

Note

Both ROIs must have same spatial characteristics.

Parameters:aROI (ORSModel.ors.ROI) – a ROI (an ROI)
Returns:output (bool) – true if swap was successful, false otherwise
extractCenterLinePaths(self, aSourceROI: ORSModel.ors.ROI, aTargetROI: ORSModel.ors.ROI) → List
Parameters:
Returns:

output (ORSModel.ors.List) –

extractMinimumLengthPaths(self, aSourceROI: ORSModel.ors.ROI, aTargetROI: ORSModel.ors.ROI) → List
Parameters:
Returns:

output (ORSModel.ors.List) –

extractSmoothPaths(self, aSourceROI: ORSModel.ors.ROI, aTargetROI: ORSModel.ors.ROI, fastMarchingGeometricBias: float, centered: bool) → List
Parameters:
Returns:

output (ORSModel.ors.List) –

fillAllInnerHoles2DAlongDirection(self, dirX: float, dirY: float, dirZ: float, considerDiagonal: bool) → None

Fills all inner holes of 2D slices along any direction.

Note

This method fills the interior of a ROI for each 2D slice along the supplied direction.

Note

This method fills 2D slices by looking for escape openings. Using 26 neighbors enforces more rigidity in the algorithm to determine if a neighboring voxel is an opening or not.

Parameters:
  • dirX (float) – the X component of the direction (a double)
  • dirY (float) – the Y component of the direction (a double)
  • dirZ (float) – the Z component of the direction (a double)
  • considerDiagonal (bool) – true to use 26 neighbors, false to use 6 neighbors (see note below)
fillAllInnerHoles2DAlongXAxis(self, iTIndex: int, considerDiagonal: bool) → None

Fills all X slices’ inner holes.

Note

This method fills the interior of a ROI for each 2D slice along the X axis.

Note

This method fills a ROI’s interior by looking for escape openings. Using 26 neighbors enforces more rigidity in the algorithm to determine if a neighboring voxel is an opening or not.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • considerDiagonal (bool) – true to use 26 neighbors, false to use 6 neighbors (see note below)
fillAllInnerHoles2DAlongYAxis(self, iTIndex: int, considerDiagonal: bool) → None

Fills all Y slices’ inner holes.

Note

This method fills the interior of a ROI for each 2D slice along the Y axis.

Note

This method fills a ROI’s interior by looking for escape openings. Using 26 neighbors enforces more rigidity in the algorithm to determine if a neighboring voxel is an opening or not.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • considerDiagonal (bool) – true to use 26 neighbors, false to use 6 neighbors (see note below)
fillAllInnerHoles2DAlongZAxis(self, iTIndex: int, considerDiagonal: bool) → None

Fills all Z slices’ inner holes.

Note

This method fills the interior of a ROI for each 2D slice along the Z axis.

Note

This method fills a ROI’s interior by looking for escape openings. Using 26 neighbors enforces more rigidity in the algorithm to determine if a neighboring voxel is an opening or not.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • considerDiagonal (bool) – true to use 26 neighbors, false to use 6 neighbors (see note below)
fillInnerHoles(self, iTIndex: int, considerDiagonal: bool) → None

Fills theROI’s interior.

Note

This method fills a ROI’s interior by looking for escape openings. Using 26 neighbors enforces more rigidity in the algorithm to determine if a neighboring voxel is an opening or not.

Note

When trying to close a 2D ROI (for example a circle), you need to work with a 2D ROI (i.e. Z size = 1).

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • considerDiagonal (bool) – true to use 26 neighbors, false to use 6 neighbors (see note below)
fillInnerHoles2D(self, pCenter: ORSModel.ors.Vector3, pDirection: ORSModel.ors.Vector3, considerDiagonal: bool) → None

Fills theROI’s interior in 2D.

Note

This method fills a ROI’s interior by looking for escape openings. Using 26 neighbors enforces more rigidity in the algorithm to determine if a neighboring voxel is an opening or not.

Note

This method fills the interior of a ROI on a single 2D plane.

Parameters:
  • pCenter (ORSModel.ors.Vector3) – a vector describing the 2D plane’s center point (an Vector3)
  • pDirection (ORSModel.ors.Vector3) – a vector describing the direction of the plane (an Vector3)
  • considerDiagonal (bool) – true to use 26 neighbors, false to use 6 neighbors (see note below)
fillIntervalArrays(self, pOutputLow: ORSModel.ors.ArrayUnsignedLong, pOutputHigh: ORSModel.ors.ArrayLONGLONG) → None

Extracts indicies in the form of intervals.

Returns:
generateAnalyzer(self, aTimeStep: int, inputChannel: ORSModel.ors.Channel, longestDistance: bool, longestSegment: bool, inertiaTensorPrincipalComponent: bool, surfaceArea: bool, centerOfMass: bool, IProgress: ORSModel.ors.Progress) → ROIAnalyzer
Parameters:
  • aTimeStep (int) –
  • inputChannel (ORSModel.ors.Channel) –
  • longestDistance (bool) –
  • longestSegment (bool) –
  • inertiaTensorPrincipalComponent (bool) –
  • surfaceArea (bool) –
  • centerOfMass (bool) –
  • IProgress (ORSModel.ors.Progress) –
Returns:

output (ORSModel.ors.ROIAnalyzer) –

getAllFeretDiameter(self, min: float, mean: float, max: float, iTIndex: int, iAngleSampling: int) → bool

Get Sorted feret diameter.

Parameters:
  • min (float) – the T index (a uint32_t)
  • mean (float) – the angle sampling, steps between each angle iteration (a uint16_t)
  • max (float) –
  • iTIndex (int) –
  • iAngleSampling (int) –
Returns:

output (bool) – true if worked, else false (bool)

getAsCubicMesh(self, bWorld: bool, IProgress: ORSModel.ors.Progress, IInMesh: ORSModel.ors.Mesh) → Mesh

Generates a cubic mesh model from theROI.

Note

If a target Mesh is supplied, data is written to it and returned, otherwise a new Mesh is created.

Parameters:
  • bWorld (bool) – true to have the resulting mesh model in world coordinates, false in local
  • IProgress (ORSModel.ors.Progress) – a progress object or NULL to show no progress (an Progress)
  • IInMesh (ORSModel.ors.Mesh) – an optional target mesh model (an Mesh)
Returns:

output (ORSModel.ors.Mesh) – the resulting mesh model (an Mesh)

getAsCubicMeshForTIndex(self, bWorld: bool, timeStep: int, IProgress: ORSModel.ors.Progress, IInMesh: ORSModel.ors.Mesh) → Mesh

Generates a cubic mesh model from theROI.

Note

If a target Mesh is supplied, data is written to it and returned, otherwise a new Mesh is created.

Parameters:
  • bWorld (bool) – true to have the resulting mesh model in world coordinates, false in local
  • timeStep (int) – the TimeStep to extract (a uint32_t)
  • IProgress (ORSModel.ors.Progress) – a progress object or NULL to show no progress (an Progress)
  • IInMesh (ORSModel.ors.Mesh) – an optional target mesh model (an Mesh)
Returns:

output (ORSModel.ors.Mesh) – the resulting mesh model (an Mesh)

getAsMarchingCubesMesh(self, isovalue: float, bSnapToContour: bool, flipNormal: bool, timeStep: int, xSample: int, ySample: int, zSample: int, pNearest: bool, pWorld: bool, IProgress: ORSModel.ors.Progress, pMesh: ORSModel.ors.Mesh) → Mesh

Creates a marching cube from theROI.

Note

The isovalue is used as a threshold, any value below it (inclusive) is not considered.

Note

If a mesh model is supplied as the last argument, the results are written to it, otherwise a new mesh model is created.

Note

Currently only nearest sampling is supported.

Parameters:
  • isovalue (float) – an isovalue (a float)
  • bSnapToContour (bool) – true to snap vertices to contour, false to interpolate
  • flipNormal (bool) – true flips normals, false doesn’t
  • timeStep (int) – the time step to use (a uint32_t)
  • xSample (int) – the X sampling (a uint16_t, 1 means no sampling)
  • ySample (int) – the Y sampling (a uint16_t, 1 means no sampling)
  • zSample (int) – the Z sampling (a uint16_t, 1 means no sampling)
  • pNearest (bool) – true to sample to nearest value, false to sample linearly (if sampling is 1 this flag is ignored)
  • pWorld (bool) – true to have the resulting mesh model in world coordinates, false in local
  • IProgress (ORSModel.ors.Progress) – a progress object, NULL for no progress (an Progress)
Returns:
getAsROIClipped(self, minX: int, minY: int, minZ: int, minT: int, maxX: int, maxY: int, maxZ: int, maxT: int, aROI: ORSModel.ors.ROI) → ROI

Clips theROI to the specified region.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
  • minX (int) – the X min dimension of the clip region (a uint32_t)
  • minY (int) – the Y min dimension of the clip region (a uint32_t)
  • minZ (int) – the Z min dimension of the clip region (a uint32_t)
  • minT (int) – the T min dimension of the clip region (a uint32_t)
  • maxX (int) – the X max dimension of the clip region (a uint32_t)
  • maxY (int) – the Y max dimension of the clip region (a uint32_t)
  • maxZ (int) – the Z max dimension of the clip region (a uint32_t)
  • maxT (int) – the T max dimension of the clip region (a uint32_t)
  • aROI (ORSModel.ors.ROI) – an optional target ROI (an ROI)
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIClosedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int) → ROI

Closes theROI according to a supplied 3D kernel.

Note

The 3D kernel needs not be symmetric, but each dimension must be odd, for the center always represents the current voxel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIDilatedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int, progress: ORSModel.ors.Progress) → ROI

Dilates (grows) theROI according to a supplied 3D kernel.

Note

The 3D kernel needs not be symmetric, but each dimension must be odd, for the center always represents the current voxel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIErodedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int, progress: ORSModel.ors.Progress) → ROI

Erodes (shrinks) theROI according to a supplied 3D kernel.

Note

The 3D kernel needs not be symmetric, but each dimension must be odd, for the center always represents the current voxel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIFromTimeStepsUnion(self, pTimeStep1: int, pTimeStep2: int, anOutputROI: ORSModel.ors.ROI) → ROI

Merges (union) 2 time steps of theROI.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Note

The output ROI will always have a T dimension of 1, and the same X/Y/Z sizes as the source ROI.

Note

Because of the previous note, the output ROI cannot be the same as the receiver ROI (i.e. cannot merge into itself).

Parameters:
  • pTimeStep1 (int) – source time step (a uint32_t)
  • pTimeStep2 (int) – time step to merge with (a uint32_t)
  • anOutputROI (ORSModel.ors.ROI) – the output ROI (an ROI), see note below
Returns:

output (ORSModel.ors.ROI) – the merged ROI

getAsROIMovedInChannel(self, pInputData: ORSModel.ors.Channel, xOffset: int, yOffset: int, zOffset: int, pTargetROI: ORSModel.ors.ROI) → ROI

Moves theROI by a given offset in a channel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
  • pInputData (ORSModel.ors.Channel) – the source channel (an Channel)
  • xOffset (int) – an X voxel offset (a uint32_t)
  • yOffset (int) – a Y voxel offset (a uint32_t)
  • zOffset (int) – a Z voxel offset (a uint32_t)
  • pTargetROI (ORSModel.ors.ROI) – an optional output ROI (an ROI)
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIOpenWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int) → ROI

Opens theROI according to a supplied 3D kernel.

Note

The 3D kernel needs not be symmetric, but each dimension must be odd, for the center always represents the current voxel.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getAsROIThinned(self, aROI: ORSModel.ors.ROI) → ROI
Parameters:aROI (ORSModel.ors.ROI) –
Returns:output (ORSModel.ors.ROI) –
getBoxGrownToContainVoxels(self, aBox: ORSModel.ors.Box, timeStep: int) → Box

Grow the given box so that it include all the voxels of the specified time step.

Parameters:
Returns:

output (ORSModel.ors.Box) – the resulting Box (a Box)

getCenterOfMass(self, pTimeStep: int) → Vector3

Computes theROI’s center of mass.

Parameters:pTimeStep (int) –
Returns:output (ORSModel.ors.Vector3) – the center of mass (an XYZ vector) (an Vector3)
getCircumferenceAreaAndMinMaxDiameter(self, pBoundedPlane: ORSModel.ors.Rectangle, pointInside: ORSModel.ors.Vector3, nTimeStep: int, area: float, circumference: float, meanDiameter: float, maxDiameterPoint0: ORSModel.ors.Vector3, maxDiameterPoint1: ORSModel.ors.Vector3, minDiameter0: ORSModel.ors.Vector3, minDiameter1: ORSModel.ors.Vector3) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClipBox(timestep=0, display=None)

Gets the clip box of the ROI or of the MultiROI

Parameters:
Returns:

aClipBox (ORSModel.ors.Box) – the clip box

getClipping(timestep=0, display=None)

Gets the origin and the opposite summit of the clip box of the ROI or MultiROI

Parameters:
Returns:
getConnectedComponent(self, iTIndex: int, considerDiagonal: bool, IProgress: ORSModel.ors.Progress, pInData: ORSModel.ors.MultiROI) → MultiROI

Connected connectivity analysis of theROI.

Note

This method labels areas of the ROI by finding adjacent voxels and labelling them with sequential numbering.

Note

If a multi ROI object is supplied as the last argument, the results are written to it, otherwise a new one is created.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • considerDiagonal (bool) – true to consider diagonals, false otherwise
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or NULL for no progress
  • pInData (ORSModel.ors.MultiROI) – an optional output object (an MultiROI)
Returns:

output (ORSModel.ors.MultiROI) – the resulting object (an MultiROI)

getContour(self, pPlane: ORSModel.ors.Plane, nTimeStep: int, pfPoints: ORSModel.ors.Array) → None
Parameters:
getContour2(self, pBoudedPlane: ORSModel.ors.Rectangle, nTimeStep: int, pfPoints: ORSModel.ors.Array) → None
Parameters:
getContourOrdered(self, pPlane: ORSModel.ors.Plane, nTimeStep: int, pfPoints: ORSModel.ors.Array, pnIndexes: ORSModel.ors.ArrayLong) → None

GetROI contours Sorts the labels on their sizes, in descending order.

Note

Many contours may be found. The indexes array contains the start index (in the point array) of the nth contour and the number of points it contains at the location 2*n and 2*n+1 respectively.

Parameters:
getContourOrdered2(self, pBoudedPlane: ORSModel.ors.Rectangle, nTimeStep: int, pfPoints: ORSModel.ors.Array, pnIndexes: ORSModel.ors.ArrayLong) → None

GetROI contours Sorts the labels on their sizes, in descending order.

Note

Many contours may be found. The indexes array contains the start index (in the point array) of the nth contour and the number of points it contains at the location 2*n and 2*n+1 respectively.

Parameters:
getEndPoints(self, aROI: ORSModel.ors.ROI) → ROI
Parameters:aROI (ORSModel.ors.ROI) –
Returns:output (ORSModel.ors.ROI) –
getFeretBox(self, iTIndex: int, iAngleSampling: int) → Box

Get Feret box ofROI.

Note

Default value for angle sampling is 5

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • iAngleSampling (int) – the angle sampling, steps between each angle iteration (a uint16_t)
Returns:

output (Box) –

getFromTimeStepRange(self, pTimeStepStart: int, pTimeStepEnd: int, anOutputROI: ORSModel.ors.ROI) → ROI

Extracts a T range from the region of interest, as a new region of interest.

Parameters:
  • pTimeStepStart (int) – the time step start (a uint32_t)
  • pTimeStepEnd (int) – the time step end (a uint32_t)
  • anOutputROI (ORSModel.ors.ROI) –
Returns:

output (ORSModel.ors.ROI) –

getHasDataWithinArea(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int) → bool

Queries theROI to know if it has data within a specific range of indicies.

Parameters:
  • xmin (int) – the minimal x coordinate (a uint32_t)
  • ymin (int) – the minimal y coordinate (a uint32_t)
  • zmin (int) – the minimal z coordinate (a uint32_t)
  • tmin (int) – the minimal t coordinate (a uint32_t)
  • xmax (int) – the maximal x coordinate (a uint32_t)
  • ymax (int) – the maximal y coordinate (a uint32_t)
  • zmax (int) – the maximal z coordinate (a uint32_t)
  • tmax (int) – the maximal t coordinate (a uint32_t)
Returns:

output (bool) – true if receiver has data within the range (inclusive), false otherwise

getHasDataWithinRange(self, startIndex: int, endIndex: int) → bool

Queries theROI to know if it has data within a specific range of indicies.

Parameters:
  • startIndex (int) – the starting index (a int64_t)
  • endIndex (int) – the ending index (a int64_t)
Returns:

output (bool) – true if receiver has data within the range (inclusive), false otherwise

getHasVoxelIndex(self, index: int) → bool

Verifies if the receiverROI contains a specified voxel index.

Parameters:index (int) – a voxel index (a int64_t)
Returns:output (bool) – true if the ROI contains the index, false otherwise
getHistogramData(self, pNumberOfBins: int, pTimeStep: int, IChannel: ORSModel.ors.Channel) → HistogramData

Gets a histogram of theROI’s underlying data (from its channel).

Parameters:
  • pNumberOfBins (int) – the number of desired bins (a uint32_t)
  • pTimeStep (int) – the T index (a uint32_t)
  • IChannel (ORSModel.ors.Channel) – the data channel (a Channel)
Returns:

output (ORSModel.ors.HistogramData) – a histogram (an HistogramData)

getInertiaAxis(self, first: ORSModel.ors.Vector3, second: ORSModel.ors.Vector3, third: ORSModel.ors.Vector3, pTimeStep: int) → None

Computes theROI’s inertia tensor eigen vector.

Note

The eigen vector are sorted by eigen value, first is the int32_t*ues .. The norm of the vectors are the eigen value

Parameters:
getInitialColor(self) → Color

Gets the initialROI color.

Note

The color is expressed in RGB fashion.

Returns:output (ORSModel.ors.Color) – a color (an Color)
getInterfacialSurface(self, pOtherROI: ORSModel.ors.ROI, timeStep: int, progressBar: ORSModel.ors.Progress) → float

Gets theROI’s surface interfacial area estimation of digital (weighted voxel estimation).

Note

The algorithm checks 8 vertices neighbors for each voxel to determine surfaces. If a neighbor is empty, it means that the voxel’s side is a surface. Then, a weight is given for each border voxel type. (Lindblad, J. (2005). Surface area estimation of digitized 3D objects using weighted local configurations. Image and Vision Computing, 23(2), 111-122.)

Parameters:
  • pOtherROI (ORSModel.ors.ROI) – the other ROI (a ROI)
  • timeStep (int) – time step for which we want the surface
  • progressBar (ORSModel.ors.Progress) – an optional progress object (a Progress)
Returns:

output (float) – the total surface area (a double)

getIntersectionWithROI(self, aROI: ORSModel.ors.ROI, anOutputROI: ORSModel.ors.ROI) → ROI

Intersects theROI with another ROI.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Note

The output ROI can be the same as the receiver ROI (i.e. can intersect with another ROI into itself).

Parameters:
Returns:

output (ORSModel.ors.ROI) – the intersected ROI

getIsClipped(timestep=0, display=None)

Gets to know if the clip box of the ROI or MultiROI is active

Parameters:
Returns:

isClipped (bool) – if True, the clip box of the ROI or MultiROI is visible; False otherwise.

getIsEmpty(self) → bool

Sees if theROI contains data.

Returns:output (bool) – true if ROI contains no data, false otherwise
getLabel(self) → int

Gets theROI label.

Note

A ROI label is a unsigned short value that can be associated to the ROI. Each ROI has one label.

Returns:output (int) – a label (a uint16_t)
getLabelization(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, iTIndex: int, considerDiagonal: bool, IProgress: ORSModel.ors.Progress, pInData: ORSModel.ors.MultiROI) → MultiROI

Connected connectivity analysis of theROI.

Note

This method labels areas of the ROI by finding adjacent voxels and labelling them with sequential numbering.

Note

If a multi ROI object is supplied as the last argument, the results are written to it, otherwise a new one is created.

Parameters:
  • minX (int) – the minimum X range (a uint32_t)
  • minY (int) – the minimum Y range (a uint32_t)
  • minZ (int) – the minimum Z range (a uint32_t)
  • maxX (int) – the maximum X range (a uint32_t)
  • maxY (int) – the maximum Y range (a uint32_t)
  • maxZ (int) – the maximum Z range (a uint32_t)
  • iTIndex (int) – the T index (a uint32_t)
  • considerDiagonal (bool) – true to consider diagonals, false otherwise
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or NULL for no progress
  • pInData (ORSModel.ors.MultiROI) – an optional output object (an MultiROI)
Returns:

output (ORSModel.ors.MultiROI) – the resulting object (an MultiROI)

getLocalBoundingBoxMax(self, timeStep: int) → Vector3

Gets the upper-right corner of the visual’s bounding box.

Parameters:timeStep (int) – timeStep (a uint32_t)
Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getLocalBoundingBoxMin(self, timeStep: int) → Vector3

Gets the lower-left corner of the visual’s bounding box.

Parameters:timeStep (int) – timeStep (uint32_t)
Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getMaxIndex(self) → int

Gets the largest index of theROI.

Returns:output (int) – a channel voxel index (a int64_t)
getMaxSourceDataValue(self, pTimeStep: int, pInputData: ORSModel.ors.Channel) → float

Gets the maximum source voxel value of theROI for a given channel.

Note

The value returned is in the same type as the source channel, but converted to a double.

Parameters:
  • pTimeStep (int) – the T index (a uint32_t)
  • pInputData (ORSModel.ors.Channel) – the source channel (an Channel)
Returns:

output (float) – a voxel value (a double)

getMeanSourceDataValue(self, pTimeStep: int, pInputData: ORSModel.ors.Channel) → float

Gets the mean source voxel value of theROI for a given channel.

Note

The value returned is in the same type as the source channel, but converted to a double.

Parameters:
  • pTimeStep (int) – the T index (a uint32_t)
  • pInputData (ORSModel.ors.Channel) – the source channel (an Channel)
Returns:

output (float) – a voxel value (a double)

getMinIndex(self) → int

Gets the smallest index of theROI.

Returns:output (int) – a channel voxel index (a int64_t)
getMinSourceDataValue(self, pTimeStep: int, pInputData: ORSModel.ors.Channel) → float

Gets the minimum source voxel value of theROI for a given channel.

Note

The value returned is in the same type as the source channel, but converted to a double.

Parameters:
  • pTimeStep (int) – the T index (a uint32_t)
  • pInputData (ORSModel.ors.Channel) – the source channel (an Channel)
Returns:

output (float) – a voxel value (a double)

getMinimalBox(self, iTIndex: int) → Box

Get mininal box ofROI (also know as Oriented Bounding Box in literature)

Parameters:iTIndex (int) – the T index (a uint32_t)
Returns:output (Box) –
getProjectionIn(self, pChannel: ORSModel.ors.Channel, sourceTimeOffset: int, pProgress: ORSModel.ors.Progress) → ROI

Projects theROI in a channel’s spatial box.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:
Returns:

output (ORSModel.ors.ROI) – the resulting ROI (an ROI)

getReversed(self, pTargetROI: ORSModel.ors.ROI) → ROI

Reverses theROI.

Note

A reversed ROI contains exactly the data not present in the receiver ROI.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Parameters:pTargetROI (ORSModel.ors.ROI) – an optional output ROI (an ROI)
Returns:output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
getShowContour(self) → bool
Returns:output (bool) –
getShowContourCubic(self) → bool
Returns:output (bool) –
getShowContourInterpolated(self) → bool
Returns:output (bool) –
getSimplePoints(self, aROI: ORSModel.ors.ROI) → ROI
Parameters:aROI (ORSModel.ors.ROI) –
Returns:output (ORSModel.ors.ROI) –
getSimplifiedGraphMesh(self, aROI: ORSModel.ors.ROI, aResultMesh: ORSModel.ors.Mesh, aSurfaceMesh: ORSModel.ors.Mesh) → ROI
Parameters:
Returns:

output (ORSModel.ors.ROI) –

getStandardDeviationSourceDataValue(self, pTimeStep: int, pInputData: ORSModel.ors.Channel) → float

Gets the standard deviation of the source voxels of theROI for a given channel.

Note

The value returned is in the same type as the source channel, but converted to a double.

Parameters:
  • pTimeStep (int) – the T index (a uint32_t)
  • pInputData (ORSModel.ors.Channel) – the source channel (an Channel)
Returns:

output (float) – a voxel value (a double)

getSubtractionFromROI(self, aROI: ORSModel.ors.ROI, pOutputROI: ORSModel.ors.ROI) → ROI

Subtracts anotherROI from the receiver ROI.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Note

The output ROI can be the same as the receiver ROI (i.e. can subtract another ROI into itself), but the output ROI cannot be the subtraction ROI.

Parameters:
Returns:

output (ORSModel.ors.ROI) – the subtracted ROI

getSurface(self, timeStep: int) → float

Gets theROI’s surface area.

Note

The algorithm checks 6 neighbors for each voxel to determine surfaces. If a neighbor is empty, it means that the voxel’s side is a surface.

Parameters:timeStep (int) – step for which we want the surface
Returns:output (float) – the total surface area (a double)
getSurfaceFromWeightedVoxelEstimation(self, timeStep: int, progressBar: ORSModel.ors.Progress) → float

Gets theROI’s surface area estimation of digital (weighted voxel estimation).

Note

The algorithm checks 8 vertices neighbors for each voxel to determine surfaces. If a neighbor is empty, it means that the voxel’s side is a surface. Then, a weight is given for each border voxel type. (Lindblad, J. (2005). Surface area estimation of digitized 3D objects using weighted local configurations. Image and Vision Computing, 23(2), 111-122.)

Parameters:
  • timeStep (int) – time step for which we want the surface
  • progressBar (ORSModel.ors.Progress) – an optional progress object (a Progress)
Returns:

output (float) – the total surface area (a double)

getTotalPerimeterOnPlane(self, cuttingPlane: ORSModel.ors.Plane, timeStep: int) → float

Gets theROI’s perimeter on a plane.

Parameters:
  • cuttingPlane (ORSModel.ors.Plane) – a cutting plane (an ORS plane)
  • timeStep (int) – time step (int)
Returns:

output (float) – the total ROI’s perimeter for the current plane (a double)

getTotalVoxelCount(self) → int

Gets the total number of voxels within theROI.

Returns:output (int) – the number of voxels in the ROI (a int64_t)
getUnionWithROI(self, aROI: ORSModel.ors.ROI, iTOffset: int, anOutputROI: ORSModel.ors.ROI) → ROI

Merges theROI with another ROI.

Note

If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Note

The output ROI can be the same as the receiver ROI (i.e. can merge with another ROI into itself).

Note

It is assumed that both ROIs share the same characteristics (i.e. size, orientation, etc).

Parameters:
Returns:

output (ORSModel.ors.ROI) – the merged ROI

getVolume(self, timeStep: int) → float

Returns thecomputed volume of the region of interest.

Note

The volume is in cubic units of the dimension unit of the underlying channel.

Parameters:timeStep (int) – the time step (a uint32_t)
Returns:output (float) – a double.
getVoxelCount(self, iTIndex: int) → int

Gets the number of voxels within theROI for a given T value.

Note

This method computes the number of indicies, so if you need the value several times try to cache its return value.

Parameters:iTIndex (int) –
Returns:output (int) – the number of voxels in the ROI (a int64_t)
getVoxelsNeighborCountGreaterThanOrEqualTo(self, neighborCount: int, pProgress: ORSModel.ors.Progress) → ROI

Gets aROI containing the voxels having a neighbor count greater than or equal to n.

Parameters:
  • neighborCount (int) – the minimal neighbor count
  • pProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
Returns:

output (ORSModel.ors.ROI) –

getWillBeDisplayed(self) → bool

Gets whether or not theROI is destined to be displayed.

Note

Regions of interest are to be displayed by default.

Note

Regions of interest that will not be displayed use less memory and have less overhead.

Returns:output (bool) – true if the ROI will be displayed, false otherwise
classmethod imread(files)

Loads a ROI from files

Parameters:files (file) [count=[0, None]] – fully qualified file name list
Returns:outROI (ORSModel.ors.ROI) – the resulting ROI
classmethod imreadDICOM(files)

Loads a ROI from files or folder contaning DICOM

Parameters:files (file) [count=[0, None]] – fully qualified file name list
Returns:outROI (ORSModel.ors.ROI) – the resulting ROI
classmethod imreadDICOMFolder(folder)

Loads a ROI from folder of DICOM files

Parameters:folder (folder) – fully qualified folder
Returns:outROI (ORSModel.ors.ROI) – the resulting ROI
classmethod imreadFolder(folder)

Loads a ROI from folder

Parameters:folder (folder) – fully qualified folder
Returns:outROI (ORSModel.ors.ROI) – the resulting ROI
imsave(fileName, extension='tif', value=255)

Save a ROI to file in the type specified by the extension

Parameters:
  • fileName (file saving) – fully qualified file name
  • extension (str) – image file format extension
  • value (int) – value to put in the image at the ROI painted locations (should be between 0 and 255)
imwrite(fileName, extension='tif', value=255)

Save a ROI to file in the type specified by the extension

Parameters:
  • fileName (file saving) – fully qualified file name
  • extension (str) – image file format extension
  • value (int) – value to put in the image at the ROI painted locations (should be between 0 and 255)
iterateIntervals(self, callbackFunction: int, userdata: int, bForceSingleThread: bool, bAlignMultiThreadingToZ: bool, createMultiThreadDataFunction: int) → None

Iterates through theROI indicies, calling a callback function with index intervals.

Note

The last two arguments are ignored if second argument is true.

Note

The callback function (argument 1) is called with an interval of indicies beginning and end, with the range being inclusive. A third argument supplied is the result of calling callback function in argument 2. In the case of single-threaded execution, that argument is NULL. The callback function should return true to continue iterating, but can return false to interrupt the iterating.

Note

The second callback function (argument 4) is called at the start of each thread. It is intended for the caller to create user data that is in turn supplied to the callback function at each invocation. The arguments it receives is (number of threads being started, threadNumber), with threadNumber being zero based.

Parameters:
  • callbackFunction (int) – a callback function (the address of a ORSVOLUMEROIITERATORLINEAR function)
  • userdata (bytes) – any user data to be supplied to the callback function
  • bForceSingleThread (bool) – true to force single threaded execution, false to have it multi-threaded
  • bAlignMultiThreadingToZ (bool) – true to align multi-thread execution to Z slices, false to align to nothing
  • createMultiThreadDataFunction (int) – a callback function to create multithread data (the address of a ORSVOLUMEROIITERATORCREATETHREADDATA function)
iterateXYZTIntervals(self, callbackFunction: int, userdata: int, bForceSingleThread: bool, bAlignMultiThreadingToZ: bool, createMultiThreadDataFunction: int) → None

Iterates through theROI indicies, calling a callback function with X/Y/Z/T intervals.

Note

The last two arguments are ignored if second argument is true.

Note

The callback function (argument 1) is called with an interval of indicies beginning and end, with the range being inclusive. A third argument supplied is the result of calling callback function in argument 2. In the case of single-threaded execution, that argument is NULL. The callback function should return true to continue iterating, but can return false to interrupt the iterating.

Note

The second callback function (argument 4) is called at the start of each thread. It is intended for the caller to create user data that is in turn supplied to the callback function at each invocation. The arguments it receives is (number of threads being started, threadNumber), with threadNumber being zero based.

Parameters:
  • callbackFunction (int) – a callback function (the address of a ORSVOLUMEROIITERATORXYZT function)
  • userdata (bytes) – any user data to be supplied to the callback function
  • bForceSingleThread (bool) – true to force single threaded execution, false to have it multi-threaded
  • bAlignMultiThreadingToZ (bool) – true to align multi-thread execution to Z slices, false to align to nothing
  • createMultiThreadDataFunction (int) – a callback function to create multithread data (the address of a ORSVOLUMEROIITERATORCREATETHREADDATA function)
makeROIForChannel(self, pChannel: ORSModel.ors.Channel, x: int, y: int, z: int) → ROI

Makes a newROI from the receiver, according to a given channel’s coordinates.

Note

The supplied offset is the offset of the given channel relatively to the originating channel (the one the ROI is based upon), in voxels.

Parameters:
  • pChannel (ORSModel.ors.Channel) – a reference channel (an Channel)
  • x (int) – an X offset (an short)
  • y (int) – an Y offset (an short)
  • z (int) – a Z offset (an short)
Returns:

output (ORSModel.ors.ROI) – a new ROI (an ROI)

none()

ROI.__init__() -> ROI

paintBoxIntersectingChannel(self, pBox: ORSModel.ors.Box, label: float, tStep: int, intersectingChannel: ORSModel.ors.Channel, levelingMinRange: float, levelingMaxRange: float, pLUT: ORSModel.ors.LookupTable, intersectingChannelClipBox: ORSModel.ors.Box) → None
Parameters:
paintBoxIntersectingMultiROI(self, pBox: ORSModel.ors.Box, label: float, tStep: int, intersectingMultiROI: ORSModel.ors.MultiROI, fHightlightOpacity: float, fHightlightOpacityOutRange: float, intersectingMultiROIClipBox: ORSModel.ors.Box) → None
Parameters:
paintBoxIntersectingROI(self, pBox: ORSModel.ors.Box, label: float, tStep: int, intersectingROI: ORSModel.ors.ROI, intersectingROIClipBox: ORSModel.ors.Box) → None
Parameters:
paintSphereIntersectingChannel(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int, intersectingChannel: ORSModel.ors.Channel, levelingMinRange: float, levelingMaxRange: float, pLUT: ORSModel.ors.LookupTable, intersectingChannelClipBox: ORSModel.ors.Box) → None
Parameters:
paintSphereIntersectingMultiROI(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int, intersectingMultiROI: ORSModel.ors.MultiROI, fHightlightOpacity: float, fHightlightOpacityOutRange: float, intersectingMultiROIClipBox: ORSModel.ors.Box) → None
Parameters:
paintSphereIntersectingROI(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int, intersectingROI: ORSModel.ors.ROI, intersectingROIClipBox: ORSModel.ors.Box) → None
Parameters:
removeAllVoxelsIfInRange(self, timeStep: int, minValue: float, maxValue: float, pChannel: ORSModel.ors.Channel) → None
Parameters:
removeAllVoxelsIfNotInRange(self, timeStep: int, minValue: float, maxValue: float, pChannel: ORSModel.ors.Channel) → None
Parameters:
removeCircleArea(self, posX: float, posY: float, posZ: float, normalX: float, normalY: float, normalZ: float, radius: float, tStep: int) → None

Remove circle area fromROI.

Parameters:
  • posX (float) –
  • posY (float) –
  • posZ (float) –
  • normalX (float) –
  • normalY (float) –
  • normalZ (float) –
  • radius (float) –
  • tStep (int) –
removeLine(self, pLine: ORSModel.ors.Line, tStep: int) → None

Removes a line from theROI.

Parameters:
  • pLine (ORSModel.ors.Line) – the line to remove (an Line)
  • tStep (int) – the time step (a uint32_t)
removeLineIfInRange(self, pLine: ORSModel.ors.Line, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel) → None

Removes a line from theROI if the corresponding voxels in the channel are within the specified range.

Note

Note that the range values are inclusive.

Parameters:
  • pLine (ORSModel.ors.Line) – the line to remove (an Line)
  • tStep (int) – the time step (a uint32_t)
  • lowerThreshold (float) – the lower range value (a double)
  • upperThreshold (float) – the upper range value (a double)
  • pChannel (ORSModel.ors.Channel) – a channel of the same shape as the receiver (an Channel)
removeLineSegment(self, lineSegment: ORSModel.ors.LineSegment, tStep: int) → None

Removes a line segment from theROI.

Parameters:
  • lineSegment (ORSModel.ors.LineSegment) – the line segment to remove (an Line)
  • tStep (int) – the time step (a uint32_t)
removeLineSegmentIfInRange(self, lineSegment: ORSModel.ors.LineSegment, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel) → None

Removes a line segment from theROI if the corresponding voxels in the channel are within the specified range.

Note

Note that the range values are inclusive.

Parameters:
  • lineSegment (ORSModel.ors.LineSegment) – the line segment to remove (an LineSegment)
  • tStep (int) – the time step (a uint32_t)
  • lowerThreshold (float) – the lower range value (a double)
  • upperThreshold (float) – the upper range value (a double)
  • pChannel (ORSModel.ors.Channel) – a channel of the same shape as the receiver (an Channel)
removeROI(self, aROI: ORSModel.ors.ROI) → None
Parameters:aROI (ORSModel.ors.ROI) –
removeSimplePointsWithDistanceMap(self, seedPointROI: ORSModel.ors.ROI, spaceChannel: ORSModel.ors.Channel, outputROI: ORSModel.ors.ROI) → ROI
Parameters:
Returns:

output (ORSModel.ors.ROI) –

removeVoxel(self, index: int) → None

Removes a voxel.

Note

The index is linear within the channel data.

Note

Any changes to a Region of Interest need to be followed by a show() to refresh the screen.

Parameters:index (int) – the index of the voxel (a int64_t)
removeVoxelIndicesFromROIIfInRange(self, indices: int, indicesSize: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel) → None

Removes indices from theROI, checking against a range.

Note

Only those indicies having values within the supplied range are removed from the ROI.

Parameters:
  • indices (int) – an array of indices (a int64_t*)
  • indicesSize (int) – the number of indices in the array (a int64_t)
  • lowerThreshold (float) – the lower range (a double)
  • upperThreshold (float) – the upper range (a double)
  • pChannel (ORSModel.ors.Channel) – the channel to check against (an Channel)
removeVoxelInterval(self, iStart: int, iEnd: int) → None

Removes a voxel interval of indicies.

Note

Every voxel within the interval will be removed from the Region of Interest.

Note

The indicies are linear within the channel data.

Note

Any changes to a Region of Interest need to be followed by a show() to refresh the screen.

Parameters:
  • iStart (int) – the start value (inclusive) of the interval (a int64_t)
  • iEnd (int) – the end value (inclusive) of the interval (a int64_t)
removeVoxelIntervals(self, pIntervalArray: int, pNumberOfIntervals: int) → None

Removes a list of voxel indicies intervals.

Note

Every voxel within the interval will be removed from the Region of Interest.

Note

The indicies are linear within the channel data.

Note

Any changes to a Region of Interest need to be followed by a show() to refresh the screen.

Parameters:
  • pIntervalArray (int) – an array of interval begin and end (inclusive) values (a int64_t*)
  • pNumberOfIntervals (int) – the number of interval pairs in the array (a int32_t*)
removeVoxels(self, indices: int, indicesSize: int) → None

Removes a list of voxels.

Note

The indicies are linear within the channel data.

Note

Any changes to a Region of Interest need to be followed by a show() to refresh the screen.

Parameters:
  • indices (int) – an array of indicies (a int64_t*)
  • indicesSize (int) – the number of indicies in the array (a int64_t)
removeVoxelsFromWorldCoordinates(self, worldPositionArray: ORSModel.ors.ArrayDouble, timeIndex: int) → None

Removes indices (supplied in the form of world coordinates) from theROI.

Parameters:
  • worldPositionArray (ORSModel.ors.ArrayDouble) – an array of world position triplets (an ArrayDouble)
  • timeIndex (int) – the T index (a uint32_t)
removeVoxelsFromWorldCoordinatesIfInRange(self, worldPositionArray: ORSModel.ors.ArrayDouble, timeIndex: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel) → None

Removes indices (supplied in the form of world coordinates) from theROI, checking against a range.

Note

Very similar to removeVoxelsFromWorldCoordinates(), but only those indicies having values within the supplied range are removed from the ROI.

Parameters:
  • worldPositionArray (ORSModel.ors.ArrayDouble) – an array of world position triplets (an ArrayDouble)
  • timeIndex (int) – the T index (a uint32_t)
  • lowerThreshold (float) – the lower range (a double)
  • upperThreshold (float) – the upper range (a double)
  • pChannel (ORSModel.ors.Channel) – the channel to check against (an Channel)
reverseTimeStepRange(self, pTimeStepStart: int, pTimeStepEnd: int) → None

Reverses a time step range of theROI.

Parameters:
  • pTimeStepStart (int) – the time step start (a uint32_t)
  • pTimeStepEnd (int) – the time step end (a uint32_t)
setInitialColor(self, IColor: ORSModel.ors.Color) → None

Sets the initialROI color.

Note

The color is expressed in RGB fashion.

Parameters:IColor (ORSModel.ors.Color) – a color (an Color)
setLabel(self, aLabel: int) → None

Sets theROI label.

Note

A ROI label is an unsigned short value that can be associated to the ROI. Each ROI has one label.

Parameters:aLabel (int) – a label (a uint16_t)
setShowContour(self, pFlag: bool) → None
Parameters:pFlag (bool) –
setShowContourCubic(self, pFlag: bool) → None
Parameters:pFlag (bool) –
setShowContourInterpolated(self, pFlag: bool) → None
Parameters:pFlag (bool) –
setWillBeDisplayed(self, value: bool) → None

Indicates whether or not theROI is destined to be displayed.

Note

Regions of interest are to be displayed by default.

Note

Regions of interest that will not be displayed use less memory and have less overhead.

Parameters:value (bool) – true if the ROI will be displayed, false otherwise
updateUndo()

ROIAnalyzer

class ORSModel.ors.ROIAnalyzer

Bases: ORSModel.ors.Unmanaged

brief_description: Analyzer for ROIs. author: Nicolas Piché. All other members of ORS participated. version: 1.0 date: May 2010

geVolumeWasComputed(self) → bool
Returns:output (bool) –
getCenterOfMass(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getCenterOfMassWasComputed(self) → bool
Returns:output (bool) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getInertiaTensorPrincipalComponent(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getInertiaTensorPrincipalComponentWasComputed(self) → bool
Returns:output (bool) –
getLongestDistance(self) → float
Returns:output (float) –
getLongestDistanceWasComputed(self) → bool
Returns:output (bool) –
getLongestLineSegment(self) → LineSegment
Returns:output (ORSModel.ors.LineSegment) –
getLongestSegmentWasComputed(self) → bool
Returns:output (bool) –
getMax(self) → float
Returns:output (float) –
getMaxInPhysicalUnits(self) → float
Returns:output (float) –
getMean(self) → float
Returns:output (float) –
getMeanInPhysicalUnits(self) → float
Returns:output (float) –
getMeanWasComputed(self) → bool
Returns:output (bool) –
getMin(self) → float
Returns:output (float) –
getMinInPhysicalUnits(self) → float
Returns:output (float) –
getMinMaxWasComputed(self) → bool
Returns:output (bool) –
getStandardDeviation(self) → float
Returns:output (float) –
getStandardDeviationInPhysicalUnits(self) → float
Returns:output (float) –
getStandardDeviationWasComputed(self) → bool
Returns:output (bool) –
getSurfaceArea(self) → float
Returns:output (float) –
getSurfaceAreaInPhysicalUnits(self) → float
Returns:output (float) –
getSurfaceAreaWasComputed(self) → bool
Returns:output (bool) –
getTimeStep(self) → int
Returns:output (int) –
getVoxelCount(self) → int
Returns:output (int) –
none()

ROIAnalyzer.__init__() -> ROIAnalyzer

Rectangle

class ORSModel.ors.Rectangle

Bases: ORSModel.ors.Shape2D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010

atomicLoad(self, aFilename: str) → None

Loads an object from a file.

Note

Objects are saved in XML format.

Note

The file should contain only one object. If it contains more than one object, use atomicLoadSpecificNode().

Parameters:aFilename (str) – a file path (a string)
atomicSave(self, aFilename: str) → int

Saves the object to a file.

Note

Objects are saved in XML format.

Note

The file will be overwritten if it exists.

Parameters:aFilename (str) – a file path (a string)
Returns:output (int) – a result code (an int32_t, 0 if successful otherwise an error code)
copy(self) → Rectangle

Gets a copy of the receiver.

Returns:output (ORSModel.ors.Rectangle) – a box (an Rectangle)
createFromPythonRepresentation(aPythonRepresentation: str) → Rectangle

Create aRectangle object from a Python string representation a static method.

Parameters:aPythonRepresentation (str) – a Python evaluable string representation (a str)
Returns:output (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

Create aRectangle object from a Python string representation.

Parameters:aPythonRepresentation (str) – a Python evaluable string representation (a str)
Returns:output (bool) – true if parsing worked, else false (a bool)
getArea(self) → float

Gets the area of the receiver.

Returns:output (float) – an area (a double)
getBoundedDoublePlaneInBoxReferential(self, inRefBox: ORSModel.ors.Box) → Rectangle

Gets a copy of the receiver in the argument referential.

Parameters:inRefBox (ORSModel.ors.Box) – a box, the destination referential (an Box)
Returns:output (ORSModel.ors.Rectangle) – a bounded plane, a copy of the receiver in the argument referential (an Rectangle)
getBox(self, direction2Size: float) → Box

Returns a box, with direction2 size provided by the argument, with the same origin as the receiver.

Parameters:direction2Size (float) –
Returns:output (ORSModel.ors.Box) – a box (an Box)
getCenter(self) → Vector3

Gets the geometrical middle of the bounded plane.

Returns:output (ORSModel.ors.Vector3) – a bounded plane center position (an Vector3)
getCenterHalfVoxel(self) → Vector3

Gets the middle of the voxel in the middle of the box.

Returns:output (ORSModel.ors.Vector3) – a box center position (an Vector3)
getCenteredBox(self, direction2Size: float) → Box

Returns a box, with direction2 size provided by the argument, with origin displaced as to have the receiver centered in the direction2 vector.

Parameters:direction2Size (float) –
Returns:output (ORSModel.ors.Box) – a centered box (an Box)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDirection(self, index: int) → Vector3

Gets a bounded plane direction.

Note

The direction2 vector is normalized and automaticaly generated using the cross product of direction0 vector and direction1 vector.

Parameters:index (int) – the side index (a uint16_t)
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection0(self) → Vector3

Gets the bounded plane direction0.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection0Size(self) → float

Gets the bounded plane direction0 vector length.

Note

This is the size in meters of the bounded plane side 0.

Returns:output (float) – the side 0 length (a double)
getDirection0SizeInVoxel(self) → float

Gets the direction0 size in voxels.

Returns:output (float) – the size in voxels (a double)
getDirection0Spacing(self) → float

Gets the receiver direction0 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Returns:output (float) – the side 0 spacing (a double)
getDirection1(self) → Vector3

Gets the bounded plane direction1.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirection1Size(self) → float

Gets the bounded plane direction1 vector length.

Note

This is the size in meters of the bounded plane side 1.

Returns:output (float) – the side 1 length (a double)
getDirection1SizeInVoxel(self) → float

Gets the direction1 size in voxels.

Returns:output (float) – the size in voxels (a double)
getDirection1Spacing(self) → float

Gets the receiver direction1 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Returns:output (float) – the side 1 spacing (a double)
getDirection2(self) → Vector3

Gets the bounded plane direction2.

Note

The direction2 vector is normalized and automaticaly generated using the cross product of direction0 vector and direction1 vector.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirectionSize(self, index: int) → float

Gets a bounded plane direction vector length.

Note

This is the size in meters of the bounded plane side.

Parameters:index (int) – the side index (a uint16_t)
Returns:output (float) – the side length (a double)
getDirectionSizeVector(self) → Vector3

Gets the direction size as a vector.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDirectionSpacing(self, index: int) → float

Gets a receiver spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:index (int) – the side index (a uint16_t)
Returns:output (float) – the side spacing (a double)
getDirectionSpacingVector(self) → Vector3

Gets the direction spacing as a vector.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getDistanceFromPoint(self, point: ORSModel.ors.Vector3) → float

Computes the distance from a point.

Parameters:point (ORSModel.ors.Vector3) – a point (an Vector3)
Returns:output (float) – the distance (a double)
getIndex(self) → float
Returns:output (float) –
getIntersectionWithPlane(self, pPlane: ORSModel.ors.Plane) → LineSegment

Returns the line segment representing the intersection of the provided plane and the receiver.

Note

Returns NULL if there is no intersection.

Parameters:pPlane (ORSModel.ors.Plane) – a plane (a Plane)
Returns:output (ORSModel.ors.LineSegment) – a line segment (an LineSegment)
getInvertedWorldTranformation(self) → Matrix4x4

The getWorldTransform matrix cannot be directly inverted. Use this call to retrieve the inverse transform.

Returns:output (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
getIsEqualTo(self, aBplane: ORSModel.ors.Rectangle) → bool
Parameters:aBplane (ORSModel.ors.Rectangle) –
Returns:output (bool) –
getLinearInterpolatedBoundedPlane(self, aPlane: ORSModel.ors.Rectangle, normalizedInterpolationFactor: float) → Rectangle

Returns a bounded plane which is the linear interpolation of the receiver and the provided bounded plane.

Parameters:
  • aPlane (ORSModel.ors.Rectangle) – a bounded plane (an Rectangle)
  • normalizedInterpolationFactor (float) – an interpolation factor [0.0 , 1.0] plane (a double)
Returns:

output (ORSModel.ors.Rectangle) – an interpolated bounded plane (an Rectangle)

getNormal(self) → Vector3

Returns the normal of theRectangle.

Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getOrigin(self) → Vector3

Gets the bounded plane origin position.

Note

The origin is in world coordinates.

Returns:output (ORSModel.ors.Vector3) – the origin (an Vector3)
getOriginOpposite(self) → Vector3

Gets the bounded plane origin opposite position.

Note

The origin opposite is in world coordinates.

Returns:output (ORSModel.ors.Vector3) – the origin opposite (an Vector3)
getPlane(self) → Plane

Returns the plane on which the bounded plane resides.

Returns:output (ORSModel.ors.Plane) – a plane (an Plane)
getProjectionOnPlane(self, aPoint: ORSModel.ors.Vector3) → Vector3

Returns a point which is the argument projected on the plane described by the receiver.

Parameters:aPoint (ORSModel.ors.Vector3) – a point to project (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the projected point (an Vector3)
getPythonRepresentation(self) → str
Returns:output (str) –
getSpacingInDirection(self, aDirection: ORSModel.ors.Vector3) → float

Gets the spacing in the specified direction.

Parameters:aDirection (ORSModel.ors.Vector3) – the direction vector (an Vector3)
Returns:output (float) – the spacing (a double)
getSummit(self, maxDirection0: bool, maxDirection1: bool) → Vector3

Gets the position of one of the summits of the bounded plane.

Parameters:
  • maxDirection0 (bool) – TRUE to get maxDirection0, FALSE to get minDirection0
  • maxDirection1 (bool) – TRUE to get maxDirection1, FALSE to get minDirection1
Returns:

output (ORSModel.ors.Vector3) – a summit position (an Vector3)

getTransformed(self, aMatrix: ORSModel.ors.Matrix4x4) → Rectangle
Parameters:aMatrix (ORSModel.ors.Matrix4x4) –
Returns:output (ORSModel.ors.Rectangle) –
getVoxelToWorldCoordinates(self, anIndex: ORSModel.ors.Vector3) → Vector3

Gets the position of a given voxel.

Note

Only useful if the spacing of the direction vectors have been defined.

Parameters:anIndex (ORSModel.ors.Vector3) – a voxel position (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the position in world coordinates (an Vector3)
getWorldToVoxelCoordinates(self, pPointInWorld: ORSModel.ors.Vector3) → Vector3

Gets the position of a given world coordinate.

Note

Only useful if the spacing of the direction vectors have been defined.

Parameters:pPointInWorld (ORSModel.ors.Vector3) – a world coordinate position point (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the position in local coordinates (an Vector3)
getWorldTranformation(self) → Matrix4x4
Returns:output (ORSModel.ors.Matrix4x4) –
growToIncludePoint(self, aPoint: ORSModel.ors.Vector3) → None

Grows the receiver as to include the provided point.

Note

The provided point is projected on the bounded plane.

Parameters:aPoint (ORSModel.ors.Vector3) –
none()

Rectangle.__init__() -> Rectangle

setDirection(self, index: int, pVect: ORSModel.ors.Vector3) → None

Sets a bounded plane direction.

Note

The direction vector will be normalized.

Parameters:
  • index (int) – the side index (a uint16_t)
  • pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirection0(self, pVect: ORSModel.ors.Vector3) → None

Sets the bounded plane direction0.

Note

The direction0 vector will be normalized.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirection0Size(self, aSize: float) → None

Sets the bounded plane direction0 vector length.

Note

This is the size in meters of the bounded plane side 0.

Parameters:aSize (float) – the side 0 length (a double)
setDirection0Spacing(self, aSpacing: float) → None

Sets the receiver direction0 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:aSpacing (float) – the side 0 spacing (a double)
setDirection1(self, pVect: ORSModel.ors.Vector3) → None

Sets the bounded plane direction1.

Note

The direction1 vector will be normalized.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirection1Size(self, aSize: float) → None

Sets the bounded plane direction1 vector length.

Note

This is the size in meters of the bounded plane side 1.

Parameters:aSize (float) – the side 1 length (a double)
setDirection1Spacing(self, aSpacing: float) → None

Sets the receiver direction1 spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:aSpacing (float) – the side 1 spacing (a double)
setDirectionSize(self, index: int, aSize: float) → None

Sets a bounded plane direction vector length.

Note

This is the size in meters of the bounded plane side.

Parameters:
  • index (int) – the side index (a uint16_t)
  • aSize (float) – the side length (a double)
setDirectionSizeVector(self, pVect: ORSModel.ors.Vector3) → None

Sets the direction size as a vector.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setDirectionSpacing(self, index: int, aSpacing: float) → None

Sets a receiver direction spacing.

Note

This value is used to compute transformations from world coordinate space to index space (in the channels).

Parameters:
  • index (int) – the side index (a uint16_t)
  • aSpacing (float) – the side spacing (a double)
setDirectionSpacingVector(self, pVect: ORSModel.ors.Vector3) → None

Sets the direction spacing as a vector.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
setOrigin(self, pVect: ORSModel.ors.Vector3) → None

Sets the receiver origin position.

Note

The origin should be in world coordinates.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)

ReferenceFrame

class ORSModel.ors.ReferenceFrame

Bases: ORSModel.ors.Node

brief_description: Used to represent a referential. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: Visual Used to represent different referentials (transformation matricies). A frame or any visual ORS object can be attached to a frame to be in a different referential. Visuals attached to a frame can be rotated, scaled, and/or translated. A referential is in reality a 4D transformation matrix that represents a scale, a rotation and a translation in the parent referential (or the world).

addLocalTranslation(self, pTranslation: ORSModel.ors.Vector3, pTimeStep: int) → None

Moves the frame by the specified offsets.

Parameters:
  • pTranslation (ORSModel.ors.Vector3) – a translation vector (an Vector3)
  • pTimeStep (int) – the time step (a uint32_t)
addLocalTranslationForAllTimeStep(self, pTranslation: ORSModel.ors.Vector3) → None

Moves the frame by the specified offsets.

Parameters:pTranslation (ORSModel.ors.Vector3) – a translation vector (an Vector3)
addRotation(self, pRotation: ORSModel.ors.Vector3, angle: float, pTimeStep: int) → None

Adds a rotation to the frame referential.

Note

The rotation is along the specified vector, in the parent referential.

Note

Rotations are cumulative.

Parameters:
  • pRotation (ORSModel.ors.Vector3) – the rotation vector (an Vector3)
  • angle (float) – angle (a float)
  • pTimeStep (int) – the time step (a uint32_t)
addRotationAroundPoint(self, fromNode: ORSModel.ors.Node, axis: ORSModel.ors.Vector3, centerOfRotation: ORSModel.ors.Vector3, angle: float, pTimeStep: int) → None
Parameters:
addRotationAroundPointForAllTimeStep(self, fromNode: ORSModel.ors.Node, axis: ORSModel.ors.Vector3, centerOfRotation: ORSModel.ors.Vector3, angle: float) → None
Parameters:
addRotationForAllTimeStep(self, pRotation: ORSModel.ors.Vector3, angle: float) → None
Parameters:
addScaling(self, pScale: ORSModel.ors.Vector3, pTimeStep: int) → None
Parameters:
addScalingAtPoint(self, pScale: ORSModel.ors.Vector3, pPoint: ORSModel.ors.Vector3, pTimeStep: int) → None
Parameters:
addScalingAtPointForAllTimeStep(self, pScale: ORSModel.ors.Vector3, pPoint: ORSModel.ors.Vector3) → None
Parameters:
addScalingForAllTimeStep(self, pScale: ORSModel.ors.Vector3) → None
Parameters:pScale (ORSModel.ors.Vector3) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getLocalPosition(self, pTimeStep: int) → Vector3

Gets the frame translation (a vector) from the local parent referential.

Note

The resulting translation is the frame position in the parent referential.

Parameters:pTimeStep (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.Vector3) – a vector (an Vector3)
getMatrix(self, pTimeStep: int) → Matrix4x4

Gets the frame matrix.

Parameters:pTimeStep (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.Matrix4x4) – a matrix (an Matrix4x4)
getParentFrame(self) → ReferenceFrame

Gets the first parent referential.

Returns:output (ORSModel.ors.ReferenceFrame) – a frame (an ReferenceFrame) if one exists, NULL otherwise
getPosition(self, aNode: ORSModel.ors.Node, pTimeStep: int) → Vector3

Gets the frame translation (a vector) directly from the world referential.

Note

The resulting translation is the frame position in the world referential.

Parameters:
Returns:

output (ORSModel.ors.Vector3) – a vector (an Vector3)

getTSize(self) → int
Returns:output (int) –
getTransformationFromNodeToThis(self, fromNode: ORSModel.ors.Node, inputOutMatrix: ORSModel.ors.Matrix4x4, pTimeStep: int) → Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getXScale(self, pTimeStep: int) → float

Gets the X scale of the frame in the parent referential.

Parameters:pTimeStep (int) – the time step (a uint32_t)
Returns:output (float) – a scale (a double)
getYScale(self, pTimeStep: int) → float

Gets the Y scale of the frame in the parent referential.

Parameters:pTimeStep (int) – the time step (a uint32_t)
Returns:output (float) – a scale (a double)
getZScale(self, pTimeStep: int) → float

Gets the Z scale of the frame in the parent referential.

Parameters:pTimeStep (int) – the time step (a uint32_t)
Returns:output (float) – a scale (a double)
none()

ReferenceFrame.__init__() -> ReferenceFrame

reset(self, pTimeStep: int) → None

Resets the frame.

Note

Resetting a frame moves it to 0,0,0, and resets its scale, rotation and tranlation.

Parameters:pTimeStep (int) – the time step (a uint32_t)
resetForAllTimeStep(self) → None

Resets the frame.

Note

Resetting a frame moves it to 0,0,0, and resets its scale, rotation and tranlation.

resetFromBox(self, anIBox: ORSModel.ors.Box, pTimeStep: int) → None

Resets the frame to a box’s referential.

Parameters:
  • anIBox (ORSModel.ors.Box) – a box (an Box)
  • pTimeStep (int) – the time step (a uint32_t)
resetFromBoxForAllTimeStep(self, anIBox: ORSModel.ors.Box) → None

Resets the frame to a box’s referential.

Parameters:anIBox (ORSModel.ors.Box) – a box (an Box)
setLocalPosition(self, aIVector: ORSModel.ors.Vector3, pTimeStep: int) → None

Sets the frame translation from a vector in the local parent referential.

Note

The resulting translation is the frame position in the parent referential.

Parameters:
  • aIVector (ORSModel.ors.Vector3) – a vector (an Vector3)
  • pTimeStep (int) – the time step (a uint32_t)
setLocalPositionForAllTimeStep(self, aIVector: ORSModel.ors.Vector3) → None

Sets the frame translation from a vector in the local parent referential.

Note

The resulting translation is the frame position in the parent referential.

Parameters:aIVector (ORSModel.ors.Vector3) – a vector (an Vector3)
setLocalRotationMatrix(self, pMatrix: ORSModel.ors.Matrix4x4, pTimeStep: int) → None
Parameters:
setMatrix(self, pMatrix: ORSModel.ors.Matrix4x4, pTimeStep: int) → None

Sets the frame matrix.

Parameters:
  • pMatrix (ORSModel.ors.Matrix4x4) – the matrix (an Matrix4x4)
  • pTimeStep (int) – the time step (a uint32_t)
setMatrixForAllTimeStep(self, pMatrix: ORSModel.ors.Matrix4x4) → None

Sets the frame matrix.

Parameters:pMatrix (ORSModel.ors.Matrix4x4) – the matrix (an Matrix4x4)
setOrientationCosine(self, fromNode: ORSModel.ors.Node, direction0Cosine: ORSModel.ors.Vector3, direction1Cosine: ORSModel.ors.Vector3, direction2Cosine: ORSModel.ors.Vector3, pTimeStep: int) → None
Parameters:
setOrientationCosineForAllTimeStep(self, fromNode: ORSModel.ors.Node, direction0Cosine: ORSModel.ors.Vector3, direction1Cosine: ORSModel.ors.Vector3, direction2Cosine: ORSModel.ors.Vector3) → None
Parameters:
setPosition(self, aNode: ORSModel.ors.Node, aIVector: ORSModel.ors.Vector3, pTimeStep: int) → None

Sets the frame translation from a vector directly in the world referential.

Note

The resulting translation of the frame takes into account all parent referentials.

Parameters:
setPositionForAllTimeStep(self, aNode: ORSModel.ors.Node, aIVector: ORSModel.ors.Vector3) → None

Sets the frame translation from a vector directly in the world referential.

Note

The resulting translation of the frame takes into account all parent referentials.

Parameters:
setTSize(self, pTSize: int) → None
Parameters:pTSize (int) –
setXScale(self, xScale: float, pTimeStep: int) → None

Sets the X scale of the frame in the parent referential.

Parameters:
  • xScale (float) – a scale (a double)
  • pTimeStep (int) – the time step (a uint32_t)
setXScaleForAllTimeStep(self, xScale: float) → None

Sets the X scale of the frame in the parent referential.

Parameters:xScale (float) – a scale (a double)
setYScale(self, yScale: float, pTimeStep: int) → None

Sets the Y scale of the frame in the parent referential.

Parameters:
  • yScale (float) – a scale (a double)
  • pTimeStep (int) – the time step (a uint32_t)
setYScaleForAllTimeStep(self, yScale: float) → None

Sets the Y scale of the frame in the parent referential.

Parameters:yScale (float) – a scale (a double)
setZScale(self, zScale: float, pTimeStep: int) → None

Sets the Z scale of the frame in the parent referential.

Parameters:
  • zScale (float) – a scale (a double)
  • pTimeStep (int) – the time step (a uint32_t)
setZScaleForAllTimeStep(self, zScale: float) → None

Sets the Z scale of the frame in the parent referential.

Parameters:zScale (float) – a scale (a double)

RenderingEffect

class ORSModel.ors.RenderingEffect

Bases: ORSModel.ors.Node

addApplicableClassName(self, sClassName: str) → None
Parameters:sClassName (str) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEffectIndex(self) → int
Returns:output (int) –
getID(self) → str
Returns:output (str) –
getIsApplicableToVisual(self, visual: ORSModel.ors.Visual) → bool
Parameters:visual (ORSModel.ors.Visual) –
Returns:output (bool) –
getIsEnabledForView(self, view: ORSModel.ors.View) → bool
Parameters:view (ORSModel.ors.View) –
Returns:output (bool) –
getIsGPUIntensive(self) → bool

Get if the effect is GPU intensive.

Returns:output (bool) –
getShaderCodeForView(self, aView: ORSModel.ors.View, raycastElementId: int, outputElementId: int) → str

get the evaluated shader code (in glsl)

Parameters:
  • aView (ORSModel.ors.View) – the view (a ors::view)
  • raycastElementId (int) – raycastElementId: the index of the raycasted element being rendered (volumeN_, volumestructN_, transferFuncN_, rayN)
  • outputElementId (int) – outputElementId: the index of colors[] output register (rgba)
Returns:

output (str) –

getShaderVariableCount(self) → int

Get the total variables count.

Returns:output (int) –
getShaderVariableDoubleCount(self) → int

Get the total double variables count.

Returns:output (int) –
getShaderVariableDoubleForAll(self, variableName: str) → float

Get the value of a double variable for all views.

Parameters:variableName (str) –
Returns:output (float) –
getShaderVariableDoubleForView(self, view: ORSModel.ors.View, variableName: str) → float

Get a shader variable of type double that applies to a specific view.

Parameters:
Returns:

output (float) –

getShaderVariableDoubleNameAtIndex(self, iIndex: int) → str
Parameters:iIndex (int) –
Returns:output (str) –
getShaderVariableLUTCount(self) → int

Get the total double variables count.

Returns:output (int) –
getShaderVariableLUTForAll(self, variableName: str) → LookupTable

Get the value of a LUT variable for all views.

Parameters:variableName (str) –
Returns:output (ORSModel.ors.LookupTable) –
getShaderVariableLUTForView(self, view: ORSModel.ors.View, variableName: str) → LookupTable

Gets a shader variable of type LUT that applies to a specific view.

Parameters:
Returns:

output (ORSModel.ors.LookupTable) –

getShaderVariableLUTNameAtIndex(self, iIndex: int) → str
Parameters:iIndex (int) –
Returns:output (str) –
none()

RenderingEffect.__init__() -> RenderingEffect

setEffectIndex(self, iValue: int) → None
Parameters:iValue (int) –
setID(self, sId: str) → None
Parameters:sId (str) –
setIsEnabledForView(self, view: ORSModel.ors.View, bState: bool) → None
Parameters:
setIsGPUIntensive(self, bValue: bool) → None

Set if the effect is GPU intensive.

Parameters:bValue (bool) –
setShaderCode(self, code: str) → None

setShaderCode

Parameters:code (str) –
setShaderVariableDoubleForAll(self, variableName: str, aValue: float) → None

Set a shader variable of type double that applies to all views.

Parameters:
  • variableName (str) –
  • aValue (float) –
setShaderVariableDoubleForView(self, view: ORSModel.ors.View, variableName: str, aValue: float) → None

Set a shader variable of type double that applies to a specific view.

Parameters:
setShaderVariableLUTForAll(self, variableName: str, aLUT: ORSModel.ors.LookupTable) → None

Set a shader variable of type LUT that applies to all views.

Parameters:
setShaderVariableLUTForView(self, view: ORSModel.ors.View, variableName: str, aLUT: ORSModel.ors.LookupTable) → None

Set a shader variable of type LUT that applies to a specific view.

Parameters:

Saver

class ORSModel.ors.Saver

Bases: ORSModel.ors.Managed

brief_description: Allows to save author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: Loader Allows to save ORS objects, for later retrieval. ORS objects are saved in XML format, so this loader uses internally the msxml framework (hence the frequent mention of DOM). Can also be used to create any XML (i.e. not just saving objects).

addAttributeToCurrentNode(self, attributName: str, attributeValue: str) → None

Adds a string attribute to the current node of an XML tree.

Parameters:
  • attributName (str) – the attribute name (a string)
  • attributeValue (str) – the attribute value (a string)
addBoolAttributeToCurrentNode(self, sAttributeName: str, bValue: bool) → None

Adds a boolean attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • bValue (bool) – the attribute value (a bool)
addDoubleAttributeToCurrentNode(self, sAttributeName: str, fValue: float) → None

Adds a double attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • fValue (float) – the attribute value (a double)
addFloatAttributeToCurrentNode(self, sAttributeName: str, fValue: float) → None

Adds a float attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • fValue (float) – the attribute value (a float)
addIntAttributeToCurrentNode(self, sAttributeName: str, lValue: int) → None

Adds an int attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • lValue (int) – the attribute value (an int)
addLONGLONGAttributeToCurrentNode(self, sAttributeName: str, lValue: int) → None

Adds a int64_t attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • lValue (int) – the attribute value (a int64_t)
addShortAttributeToCurrentNode(self, sAttributeName: str, lValue: int) → None

Adds a short attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • lValue (int) – the attribute value (a short)
addSimpleBoolElementToCurrentNode(self, sElementName: str, bElementValue: bool) → None

Adds a boolean element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • bElementValue (bool) – the element value (a bool)
addSimpleCDATAElementToCurrentNode(self, sElementName: str, sElementValue: str) → None

Adds a CDATA element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • sElementValue (str) – the element value (a string)
addSimpleDoubleElementToCurrentNode(self, sElementName: str, iElementValue: float) → None

Adds a double element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • iElementValue (float) – the element value (a double)
addSimpleElementToCurrentNode(self, elementName: str, elementValue: str) → None

Adds a string element to the current node of an XML tree.

Parameters:
  • elementName (str) – the element name (a string)
  • elementValue (str) – the element value (a string)
addSimpleFloatElementToCurrentNode(self, sElementName: str, iElementValue: float) → None

Adds a float element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • iElementValue (float) – the element value (a float)
addSimpleIntElementToCurrentNode(self, sElementName: str, lElementValue: int) → None

Adds an int element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • lElementValue (int) – the element value (an int)
addSimpleLONGLONGElementToCurrentNode(self, sElementName: str, lElementValue: int) → None

Adds a int64_t element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • lElementValue (int) – the element value (a int64_t)
addSimpleShortElementToCurrentNode(self, sElementName: str, lElementValue: int) → None

Adds a short element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • lElementValue (int) – the element value (a short)
addSimpleULONGLONGElementToCurrentNode(self, sElementName: str, iElementValue: int) → None

Adds an uint64_t element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • iElementValue (int) – the element value (an uint64_t)
addSimpleUnsignedIntElementToCurrentNode(self, sElementName: str, iElementValue: int) → None

Adds an unsigned int element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • iElementValue (int) – the element value (an unsigned int)
addSimpleUnsignedShortElementToCurrentNode(self, sElementName: str, iElementValue: int) → None

Adds an unsigned short element to the current node of an XML tree.

Parameters:
  • sElementName (str) – the element name (a string)
  • iElementValue (int) – the element value (an unsigned short)
addULONGLONGAttributeToCurrentNode(self, sAttributeName: str, iValue: int) → None

Adds an uint64_t attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • iValue (int) – the attribute value (an uint64_t)
addUnsignedIntAttributeToCurrentNode(self, sAttributeName: str, iValue: int) → None

Adds an unsigned int attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • iValue (int) – the attribute value (an unsigned int)
addUnsignedShortAttributeToCurrentNode(self, sAttributeName: str, iValue: int) → None

Adds an unsigned short attribute to the current node of an XML tree.

Parameters:
  • sAttributeName (str) – the attribute name (a string)
  • iValue (int) – the attribute value (an unsigned short)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getXML(self) → str
Returns:output (str) –
loadFromFile(self, anXMLFilename: str) → bool

Initializes the saver from an XML file.

Parameters:anXMLFilename (str) – the file name, including full path (a string)
Returns:output (bool) – true if file was successfully loaded, false otherwise
loadString(self, anXMLString: str) → bool

Initializes the saver from an XML string.

Parameters:anXMLString (str) – a valid XML (a string)
Returns:output (bool) – true if string was successfully loaded, false otherwise
none()

Saver.__init__() -> Saver

pop(self) → None

Goes up one level in an XML tree being created.

push(self, aXMLNodeName: str) → None

Creates a new node in an XML tree.

Note

Should eventually be matched by a call to pop() to go back one level.

Note

All ORS objects can save themselves to file, in an XML format.

Parameters:aXMLNodeName (str) – the node name (a string)
saveXMLToFile(self, pFilename: str) → int

Saves the contents of theSaver as XML format to a file.

Note

Note that the file is overwritten if it exists.

Parameters:pFilename (str) – the file name, including full path (a string)
Returns:output (int) – 0 if successful, an error code otherwise (an int)

SequenceableCollection

class ORSModel.ors.SequenceableCollection

Bases: ORSModel.ors.Collection

brief_description: Abstraction class for sequenceable collections. author: Normand Mongeau. version: 1.0 Abstraction class for sequenceable collections. Sequenceable collections are collections that have an innate ordering.

asArray(self) → Array
Returns:output (ORSModel.ors.Array) –
asOrderedCollection(self) → OrderedCollection
Returns:output (ORSModel.ors.OrderedCollection) –
atAsDouble(self, index: int) → float
Parameters:index (int) –
Returns:output (float) –
atPutAsDouble(self, index: int, pValue: float) → None
Parameters:
  • index (int) –
  • pValue (float) –
dtype
getAsNDArray()
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMaxValueAsDouble(self) → float
Returns:output (float) –
getMaxValueAsDoubleInRange(self, startIndex: int, endIndex: int) → float
Parameters:
  • startIndex (int) –
  • endIndex (int) –
Returns:

output (float) –

getMeanValueAsDouble(self) → float
Returns:output (float) –
getMeanValueAsDoubleInRange(self, startIndex: int, endIndex: int) → float
Parameters:
  • startIndex (int) –
  • endIndex (int) –
Returns:

output (float) –

getMinValueAsDouble(self) → float
Returns:output (float) –
getMinValueAsDoubleInRange(self, startIndex: int, endIndex: int) → float
Parameters:
  • startIndex (int) –
  • endIndex (int) –
Returns:

output (float) –

getStandardDeviationAsDouble(self) → float
Returns:output (float) –
getStandardDeviationAsDoubleInRange(self, startIndex: int, endIndex: int) → float
Parameters:
  • startIndex (int) –
  • endIndex (int) –
Returns:

output (float) –

none()

SequenceableCollection.__init__() -> SequenceableCollection

removeAt(self, index: int) → None
Parameters:index (int) –
removeFirst(self) → None
removeLast(self) → None
reverse(self) → None
setSize(self, iNewSize: int) → None

Sets the size of theSequenceableCollection.

Note

The size can be used to lengthen or shorten it. Data contents are preserved.

Note

Avoid calling this method frequently as it is costly, shuffling and allocating memory.

Parameters:iNewSize (int) –
shape
sortAscending(self, bSlave: ORSModel.ors.SequenceableCollection, cSlave: ORSModel.ors.SequenceableCollection, dSlave: ORSModel.ors.SequenceableCollection, eSlave: ORSModel.ors.SequenceableCollection) → None
Parameters:
sortDescending(self, bSlave: ORSModel.ors.SequenceableCollection, cSlave: ORSModel.ors.SequenceableCollection, dSlave: ORSModel.ors.SequenceableCollection, eSlave: ORSModel.ors.SequenceableCollection) → None
Parameters:
sortRangeAscending(self, index1: int, index2: int) → None
Parameters:
  • index1 (int) –
  • index2 (int) –
sortRangeDescending(self, index1: int, index2: int) → None
Parameters:
  • index1 (int) –
  • index2 (int) –
swap(self, index: int, index2: int) → None
Parameters:
  • index (int) –
  • index2 (int) –
transformCoordinate(self, aTransform: ORSModel.ors.Matrix4x4) → None

Apply the 3D coordinate transformation to the elements of the collection.

Parameters:aTransform (ORSModel.ors.Matrix4x4) –
transformVector(self, aTransform: ORSModel.ors.Matrix4x4) → None

Apply the 3D coordinate transformation to the elements of the collection.

Parameters:aTransform (ORSModel.ors.Matrix4x4) –

Shape

class ORSModel.ors.Shape

Bases: ORSModel.ors.Unmanaged

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2017

atomicLoad(self, aFilename: str) → None

Loads an object from a file.

Note

Objects are saved in XML format.

Note

The file should contain only one object. If it contains more than one object, use atomicLoadSpecificNode().

Parameters:aFilename (str) – a file path (a string)
atomicSave(self, aFilename: str) → int

Saves the object to a file.

Note

Objects are saved in XML format.

Note

The file will be overwritten if it exists.

Parameters:aFilename (str) – a file path (a string)
Returns:output (int) – a result code (0 if successful)
copy(self) → Unmanaged

Gets a copy of the receiver.

Returns:output (ORSModel.ors.Unmanaged) – a shape
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getPythonRepresentation(self) → str
Returns:output (str) –
getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → Shape
Parameters:
Returns:

output (ORSModel.ors.Shape) –

getTransformed(self, aMatrix: ORSModel.ors.Matrix4x4) → Shape
Parameters:aMatrix (ORSModel.ors.Matrix4x4) –
Returns:output (ORSModel.ors.Shape) –
none()

Shape.__init__() -> Shape

rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float) → None

Applies a rotation to the receiver.

Note

The box is a right handed bounded referential.

Parameters:
  • axisInWorld (ORSModel.ors.Vector3) – a rotation axis (an Vector3)
  • aroundPointInWorld (ORSModel.ors.Vector3) – a center of rotation (an Vector3)
  • angleInRadian (float) – an angle in radian (a double)
transform(self, transformationMatrix: ORSModel.ors.Matrix4x4) → None

Applies a transformation to the receiver.

Note

The transformation can include: translation, rotation and scaling.

Parameters:transformationMatrix (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)

Shape2D

class ORSModel.ors.Shape2D

Bases: ORSModel.ors.Shape

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

Shape2D.__init__() -> Shape2D

Shape3D

class ORSModel.ors.Shape3D

Bases: ORSModel.ors.Shape

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

Shape3D.__init__() -> Shape3D

Sphere

class ORSModel.ors.Sphere

Bases: ORSModel.ors.Shape3D

brief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2017

copy(self) → Sphere

Gets a copy of the receiver.

Returns:output (ORSModel.ors.Sphere) – a shape
createFromPythonRepresentation(aPythonRepresentation: str) → Sphere

Create aSphere from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Sphere) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool

set aSphere from a python representation

Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getCenter(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getIntersectionWithLine(self, aLine: ORSModel.ors.Line) → LineSegment

Return the vector representing the intersection of the provided line and the receiver.

Parameters:aLine (ORSModel.ors.Line) –
Returns:output (ORSModel.ors.LineSegment) – a vector (an Vector3) or none if not intersecting
getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) → LineSegment

Return the vector representing the intersection of the provided line segment and the receiver.

Parameters:aLineSegment (ORSModel.ors.LineSegment) –
Returns:output (ORSModel.ors.LineSegment) – a vector (an Vector3) or none if not intersecting
getIsEqualTo(self, Sphere: ORSModel.ors.Sphere) → bool

Verifies equality between the receiver and a givenSphere.

Parameters:Sphere (ORSModel.ors.Sphere) –
Returns:output (bool) – true if the argument Sphere is equal to the receiver, false otherwise
getPythonRepresentation(self) → str
Returns:output (str) –
getRadius(self) → float
Returns:output (float) –
getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → Sphere
Parameters:
Returns:

output (ORSModel.ors.Sphere) –

getSurface(self) → float

Gets the surface.

Returns:output (float) – a surface (a double)
getVolume(self) → float

Gets the volume.

Returns:output (float) – a volume (a double)
none()

Sphere.__init__() -> Sphere

rotate(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → None

Applies a rotation to the receiver.

Note

The box is a right handed bounded referential.

Parameters:
  • axisInWorld (ORSModel.ors.Vector3) – a rotation axis (an Vector3)
  • aroundPointInWorld (ORSModel.ors.Vector3) – a center of rotation (an Vector3)
  • angleInRadian (float) – an angle in radian (a double)
setCenter(self, center: ORSModel.ors.Vector3) → None
Parameters:center (ORSModel.ors.Vector3) –
setRadius(self, radius: float) → None
Parameters:radius (float) –
transform(self, transformationMatrix: ORSModel.ors.Matrix4x4) → None

Applies a transformation to the receiver.

Note

The transformation can include: translation, rotation and scaling.

Parameters:transformationMatrix (Matrix4x4) – a transformation matrix (an Matrix4x4)

StatisticalAnalyzer

class ORSModel.ors.StatisticalAnalyzer

Bases: ORSModel.ors.Unmanaged

analyze(self, momentsCount: int, median: bool, aCollection: ORSModel.ors.Collection) → None
Parameters:
analyzeSubset(self, momentsCount: int, median: bool, startIndex: int, endIndex: int, aCollection: ORSModel.ors.SequenceableCollection) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getMaximumValue(self) → float
Returns:output (float) –
getMedian(self) → float
Returns:output (float) –
getMinimumValue(self) → float
Returns:output (float) –
getMoment(self, momentIndex: int) → float
Parameters:momentIndex (int) –
Returns:output (float) –
none()

StatisticalAnalyzer.__init__() -> StatisticalAnalyzer

StructuredGrid

class ORSModel.ors.StructuredGrid

Bases: ORSModel.ors.Node

copyShapeFromBox(self, pBox: ORSModel.ors.Box, tSize: int) → None

Initializes the structured grid’s shape based on a box.

Parameters:
  • pBox (ORSModel.ors.Box) – a box (a Box)
  • tSize (int) – a T size (an uint32_t)
copyShapeFromRectangle(self, aRectangle: ORSModel.ors.Rectangle, zSpacing: float, tSize: int) → None

Initializes the structured grid’s shape based on a rectangle.

Parameters:
  • aRectangle (ORSModel.ors.Rectangle) – a rectangle (a Rectangle)
  • zSpacing (float) – the thickness of the output structured grid (a double)
  • tSize (int) – a T size (an uint32_t)
copyShapeFromStructuredGrid(self, pStructuredGrid: ORSModel.ors.StructuredGrid) → None

Initializes the structured grid’s shape based on another structured grid.

Note

Shape includes size, spacing, type, description, position and location.

Note

This method does not handle the structured grid’s data.

Parameters:pStructuredGrid (ORSModel.ors.StructuredGrid) – a source structured grid
getAsChannel(self, inOutStructuredGrid: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) → StructuredGrid

Convert a structured grid to a channel.

Note

If an output channel is supplied, data is written to it and returned, otherwise a new channel is created.

Note

If the source structured grid is a channel it returns a copy.

Note

If the source structured grid is a Volume ROI the channel output data type is UNSIGNED CHAR. A value of 1 is written where a label exist in the input Volume ROI, 0 otherwise.

Note

If the source structured grid is a MultiROI the output data type is determined by the total number of labels within:

Parameters:
Returns:

output (ORSModel.ors.StructuredGrid) – the resulting channel (an StructuredGrid)

getAsMultiROI(self, inOutStructuredGrid: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) → StructuredGrid

Convert a structured grid to aMultiROI.

Note

If an output MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.

Note

The MultiROI is cleared prior to adding.

Note

If the source structured grid is a channel the output MultiROI will contain a label for every non zero channel values.

Note

If the source structured grid is a Volume ROI it returns a MultiROI of 1 label.

Note

If the source structured grid is a MultiROI it returns a copy.

Parameters:
Returns:

output (ORSModel.ors.StructuredGrid) – the resulting MultiROI (an StructuredGrid)

getAsROI(self, inOutStructuredGrid: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) → StructuredGrid

Convert a structured grid to a VolumeROI.

Note

If an output ROI is supplied, data is written to it and returned, otherwise a new ROI is created.

Note

The ROI is cleared prior to adding.

Note

If the source structured grid is a channel the output Volume ROI will contain voxel for every non zero channel values.

Note

If the source structured grid is a Volume ROI it returns a copy.

Note

If the source structured grid is a MultiROI it extracts the labels and adds them all to a Volume ROI.

Parameters:
Returns:

output (ORSModel.ors.StructuredGrid) – the resulting Volume ROI (an StructuredGrid)

getBoundingBox(self, pTIndex: int) → Box
Parameters:pTIndex (int) –
Returns:output (ORSModel.ors.Box) –
getBox(self) → Box

Gets the box.

Returns:output (ORSModel.ors.Box) – the box (an Box)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDirtyBox(self, bResetDirtyBox: bool) → Box

Gets the dirty box.

Parameters:bResetDirtyBox (bool) – insicate that the dirty box should be resetted (a bool)
Returns:output (ORSModel.ors.Box) – the dirty box (a Box)
getHasSameShape(self, pStructuredGrid: ORSModel.ors.StructuredGrid) → bool

Verifies if the structured grid has same shape as another structured grid (see note below).

Note

Shape comparison includes axis sizes, spacing, position and orientation.

Parameters:pStructuredGrid (ORSModel.ors.StructuredGrid) – a comparison structured grid
Returns:output (bool) – true if the comparison structured grid has same shape as receiver structured grid, false otherwise
getIndexOfFirstIntersectingNonZeroElement(self, aLine: ORSModel.ors.Line, subBox: ORSModel.ors.Box, timestep: int) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getIsIdenticalTo(self, pStructuredGrid: ORSModel.ors.StructuredGrid) → bool

Verifies if the structured grid is identical to another structured grid (see note below).

Note

Comparison of shape and data.

Parameters:pStructuredGrid (ORSModel.ors.StructuredGrid) – a comparison structured grid (a StructuredGrid)
Returns:output (bool) – TRUE if the comparison structured grid has the same shape and data as receiver structured grid, FALSE otherwise
getLabelAtPosition(self, tIndex: int, worldPosition: ORSModel.ors.Vector3) → int
Parameters:
Returns:

output (int) –

getOrigin(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getOriginalBox(self) → Box
Returns:output (ORSModel.ors.Box) –
getPositionOfFirstIntersectingNonZeroElement(self, aLine: ORSModel.ors.Line, subBox: ORSModel.ors.Box, timestep: int) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getSliceAtIndex(self, zIndex: int, inStructuredGridSlice: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) → StructuredGrid
Parameters:
Returns:

output (ORSModel.ors.StructuredGrid) –

getSliceIntersectingBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle, inStructuredGridSlice: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) → StructuredGrid
Parameters:
Returns:

output (ORSModel.ors.StructuredGrid) –

getSpaceHasBeenTransformed(self) → bool
Returns:output (bool) –
getSpacingInDirection(self, pDirection: ORSModel.ors.Vector3) → float

Gets the spacing in the specified direction.

Note

A structured grid knows its X, Y and Z spacing but can compute the spacing in any direction with this method.

Parameters:pDirection (ORSModel.ors.Vector3) – the direction vector (an Vector3)
Returns:output (float) – The spacing (a double)
getSubset(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int, inChannelSubset: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) → StructuredGrid

Gets a subset of the the structuredGrid.

Note

To prevent creating extra StructuredGrid, the output StructuredGrid can be fed as the second to last argument to the method.

Note

If an output structured grid is not supplied, a StructuredGrid of the same base type will be created, otherwise the data will be fed directly into it.

Parameters:
  • xmin (int) – the X lower range (an uint32_t)
  • ymin (int) – the Y lower range (an uint32_t)
  • zmin (int) – the Z lower range (an uint32_t)
  • tmin (int) – the T lower range (an uint32_t)
  • xmax (int) – the X upper range (an uint32_t)
  • ymax (int) – the Y upper range (an uint32_t)
  • zmax (int) – the Z upper range (an uint32_t)
  • tmax (int) – the T upper range (an uint32_t)
  • inChannelSubset (ORSModel.ors.StructuredGrid) – the output structured grid (see notes)
  • IProgress (ORSModel.ors.Progress) – an optional progress object
Returns:

output (ORSModel.ors.StructuredGrid) – a StructuredGrid (see notes)

getTSize(self) → int

Gets the T size of the structured grid.

Note

The T size is expressed in units.

Returns:output (int) – the T size (an uint32_t)
getTSpacing(self) → float

Gets the structured grid’s T spacing.

Note

Spacing is used for structured grid visual representation.

Returns:output (float) – T spacing (a double)
getTransformationFromOriginalReferential(self) → Matrix4x4
Returns:output (ORSModel.ors.Matrix4x4) –
getVoxelToWorldCoordinates(self, anIndex: ORSModel.ors.Vector3) → Vector3

Gets a given voxel’s location in DICOM Reference Coordinates System.

Note

This method returns the world coordinates of any given voxel. The arguments supplied represent the voxel index, but can be offset by a value between 0 and 1, to discover the exact subvoxel location. For example, to find the exact middle location of the voxel at x30,y50,z65, use getVoxelToWorldCoordinates (30.5, 50.5, 65.5).

Parameters:anIndex (ORSModel.ors.Vector3) – the voxel coordinate as a Vector3
Returns:output (ORSModel.ors.Vector3) – the world coordinates (in a vector) of the voxel (an Vector3)
getWorldToVoxelCoordinates(self, pPointInWorld: ORSModel.ors.Vector3) → Vector3

Gets a given voxel’s index from DICOM Reference Coordinates System.

Parameters:pPointInWorld (ORSModel.ors.Vector3) – the voxel coordinate encoded in Vector3
Returns:output (ORSModel.ors.Vector3) – the voxel coordinates (in a vector) of the voxel (an Vector3)
getXSize(self) → int

Gets the X size of the structured grid.

Note

The size is expressed in pixels.

Returns:output (int) – the X size (an uint32_t)
getXSpacing(self) → float

Gets the structured grid’s X spacing.

Note

Spacing is used for structured grid visual representation.

Returns:output (float) – X spacing (a double)
getYSize(self) → int

Gets the Y size of the structured grid.

Note

The size is expressed in pixels.

Returns:output (int) – the Y size (an uint32_t)
getYSpacing(self) → float

Gets the structured grid’s Y spacing.

Note

Spacing is used for structured grid visual representation.

Returns:output (float) – Y spacing (a double)
getZSize(self) → int

Gets the Z size of the structured grid.

Note

The size is expressed in pixels.

Returns:output (int) – the Z size (an uint32_t)
getZSliceThickness(self) → float

Gets the structured grid’s Z slice thickness.

Note

Slice thickness is used for structured grid visual representation.

Returns:output (float) – Z slice thickness (a double)
getZSpacing(self) → float

Gets the structured grid’s Z spacing.

Note

Spacing is used for structured grid visual representation.

Returns:output (float) – Z spacing (a double)
none()

StructuredGrid.__init__() -> StructuredGrid

paintBox(self, pBox: ORSModel.ors.Box, label: float, tStep: int) → None
Parameters:
paintBoxIfInRange(self, pBox: ORSModel.ors.Box, label: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid) → None
Parameters:
paintCircleOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, label: float, timeIndex: int, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintCircleOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintEllipseOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, dir0Radius: float, dir1Radius: float, axisOrientation: float, label: float, timeIndex: int, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintEllipseOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, dir0Radius: float, dir1Radius: float, axisOrientation: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintPolygonOnPlane(self, pPlane: ORSModel.ors.Rectangle, polygonWorldPos: ORSModel.ors.ArrayDouble, label: float, timeIndex: int, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintPolygonOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, polygonWorldPos: ORSModel.ors.ArrayDouble, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintRectangleOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, dir0Length: float, dir1Length: float, label: float, timeIndex: int, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintRectangleOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, dir0Length: float, dir1Length: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintShape3D(self, aShape: ORSModel.ors.Shape3D, label: float, tStep: int) → None
Parameters:
paintShape3DIfInRange(self, aShape: ORSModel.ors.Shape3D, label: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid) → None
Parameters:
paintSphere(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int) → None
Parameters:
paintSphereIfInRange(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid) → None
Parameters:
paintSquareOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, label: float, timeIndex: int, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintSquareOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid, worldPositionArray: ORSModel.ors.ArrayDouble) → None
Parameters:
paintSubset(self, startX: int, startY: int, startZ: int, endX: int, endY: int, endZ: int, label: float, tStep: int) → None
Parameters:
  • startX (int) –
  • startY (int) –
  • startZ (int) –
  • endX (int) –
  • endY (int) –
  • endZ (int) –
  • label (float) –
  • tStep (int) –
paintSubsetIfInRange(self, startX: int, startY: int, startZ: int, endX: int, endY: int, endZ: int, label: float, tStep: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid) → None
Parameters:
  • startX (int) –
  • startY (int) –
  • startZ (int) –
  • endX (int) –
  • endY (int) –
  • endZ (int) –
  • label (float) –
  • tStep (int) –
  • lowerThreshold (float) –
  • upperThreshold (float) –
  • pRangeChannel (ORSModel.ors.StructuredGrid) –
paintVoxelsFromWorldCoordinates(self, worldPositionArray: ORSModel.ors.ArrayDouble, label: float, timeIndex: int) → None
Parameters:
paintVoxelsFromWorldCoordinatesIfInRange(self, worldPositionArray: ORSModel.ors.ArrayDouble, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid) → None
Parameters:
projectInto(self, aDestinationStructuredGrid: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) → None

Copies the receiver into the destination, keeping the destination shape.

Parameters:
setBox(self, IInBox: ORSModel.ors.Box) → None

Sets the box.

Parameters:IInBox (ORSModel.ors.Box) – the box (an Box)
setCurrentShapeAsOriginal(self) → None
setOrigin(self, origin: ORSModel.ors.Vector3) → None
Parameters:origin (ORSModel.ors.Vector3) –
setTSize(self, pTSize: int) → None

Sets the T size of the structured grid.

Note

The T size is expressed in units.

Parameters:pTSize (int) – T size (an uint32_t)
setTSpacing(self, pTSpacing: float) → None

Sets the structured grid’s T spacing.

Note

Spacing is used for structured grid visual representation.

Parameters:pTSpacing (float) – T spacing (a double)
setXSize(self, pXSize: int) → None

Sets the X size of the structured grid.

Note

The size is expressed in pixels.

Parameters:pXSize (int) – X size (an uint32_t)
setXSpacing(self, pXSpacing: float) → None

Sets the structured grid’s X spacing.

Note

Spacing is used for structured grid visual representation.

Parameters:pXSpacing (float) – X spacing (a double)
setXYZTSize(self, pXSize: int, pYSize: int, pZSize: int, pTSize: int) → None

Sets the X,Y,Z,T sizes of the structured grid.

Note

The size is expressed in pixels.

Parameters:
  • pXSize (int) – X size (an uint32_t)
  • pYSize (int) – Y size (an uint32_t)
  • pZSize (int) – Z size (an uint32_t)
  • pTSize (int) – T size (an uint32_t)
setYSize(self, pYSize: int) → None

Sets the Y size of the structured grid.

Note

The size is expressed in pixels.

Parameters:pYSize (int) – Y size (an uint32_t)
setYSpacing(self, pYSpacing: float) → None

Sets the structured grid’s Y spacing.

Note

Spacing is used for structured grid visual representation.

Parameters:pYSpacing (float) – Y spacing (a double)
setZSize(self, pZSize: int) → None

Sets the Z size of the structured grid.

Note

The size is expressed in pixels.

Parameters:pZSize (int) – Z size (an uint32_t)
setZSliceThickness(self, pZThickness: float) → None

Sets the structured grid’s Z slice thickness.

Note

Slice thickness is used for structured grid visual representation.

Parameters:pZThickness (float) – Z slice thickness (a double)
setZSpacing(self, pZSpacing: float) → None

Sets the structured grid’s Z spacing.

Note

Spacing is used for structured grid visual representation.

Parameters:pZSpacing (float) – Z spacing (a double)
shape
sliceIteratorFromBox(viewBox, mask=None, usePositiveMask=True, computeMask=False)
sliceIteratorFromDirection(dir0, dir1, mask=None, positiveMask=True, computeMask=False)
sliceIteratorFromView(view, mask=None, positiveMask=True, computeMask=False)

TraceBackChannelAnalyzer

class ORSModel.ors.TraceBackChannelAnalyzer

Bases: ORSModel.ors.Unmanaged

findAllLeaves(self, aChannel: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI) → ROI
Parameters:
Returns:

output (ORSModel.ors.ROI) –

forwardSelectionFromRoi(self, linputChannelTraceForward: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI) → None
Parameters:
forwardSelectionFromRoiToDistance(self, linputChannelTraceForward: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI, distance: int) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

TraceBackChannelAnalyzer.__init__() -> TraceBackChannelAnalyzer

selectPointFurtherOrNearerThanMinDistance(self, linputChannelTraceBack: ORSModel.ors.Channel, indices: int, indicesSize: int, minDistance: int, outputROI: ORSModel.ors.ROI, further: bool) → None
Parameters:
traceBackTotraceForward(self, linputChannelTraceBack: ORSModel.ors.Channel, loutputChannelTraceForward: ORSModel.ors.Channel) → None
Parameters:
tracebackCPU(self, linputChannelTraceBack: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI, outputVoteChannel: ORSModel.ors.Channel, gatherAlgo: bool) → ROI
Parameters:
Returns:

output (ORSModel.ors.ROI) –

tracebackPath(self, linputChannelTraceBack: ORSModel.ors.Channel, worldPosition: ORSModel.ors.Vector3, aPath: ORSModel.ors.VisualPath, pathWorldMatrix: ORSModel.ors.Matrix4x4, gatherAlgo: bool) → None
Parameters:

Unmanaged

class ORSModel.ors.Unmanaged

Bases: ORSModel.ors.ORSBaseClass

brief_description: Abstract class for objects that are not managed by the core library. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

atomicLoad(sFilename: str) → Unmanaged

Creates an object from a file where an object was saved.

Parameters:sFilename (str) – path of the file to load
Returns:output (Unmanaged) – a managed object, or none() if the load fails
atomicSave(self, aFilename: str) → int

Saves the object to a file.

Parameters:aFilename (str) – path of the file to save
Returns:output (int) – 0 if successful, otherwise an error code
createFromPythonRepresentation(aPythonRepresentation: str) → Unmanaged

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Unmanaged) –
classmethod getAllSubclasses(outputCollection=None)
classmethod getClassDenomination()
static getClassFromProgId(progId)
getClassName(self) → str

Retrieves the class name of the core object wrapped by this Interface object.

Returns:output (str) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getIsInstanceOf(self, pProgId: str) → bool

Queries the object to know if it is an instance of a certain class.

Parameters:pProgId (str) –
Returns:output (bool) –
classmethod getIsSubclassOf(parentClass)
isNone(self) → bool

Checks if the receiver is none.

Returns:output (bool) –
isNotNone(self) → bool

Checks if the receiver is not none.

Returns:output (bool) –
none()

Unmanaged.__init__() -> Unmanaged

UnstructuredGrid

class ORSModel.ors.UnstructuredGrid

Bases: ORSModel.ors.Node

getAllFeretDiameter(self, dMin: float, dMean: float, dMax: float, iTIndex: int, iAngleSampling: int) → bool

Get Sorted feret diameter.

Parameters:
  • dMin (float) – the T index (a uint32_t)
  • dMean (float) – the angle sampling, steps between each angle iteration (a uint16_t)
  • dMax (float) –
  • iTIndex (int) –
  • iAngleSampling (int) –
Returns:

output (bool) – true if worked, else false (bool)

getBoundingBox(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Box
Parameters:
Returns:

output (ORSModel.ors.Box) –

getBoundingBoxPlusEpsilon(timestep, worldMatrix, epsilon=0.01)
getCenterOfMass(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClipBox(timestep=0, display=None)

Gets the clip box of the channel

Parameters:
Returns:

aClipBox (ORSModel.ors.Box) – the clip box

getClosestVertexIndexToPoint(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4, pPoint: ORSModel.ors.Vector3) → int

Gets the index of the closest vertex to a given point.

Note

Return value is -1 if an error occurs of if mesh is empty.

Parameters:
  • iTIndex (int) – a view in which to test (a View)
  • aWorldTransform (ORSModel.ors.Matrix4x4) – the point (an Vector3)
  • pPoint (ORSModel.ors.Vector3) – true if coordinate is supplied in local coordinates, false if in world coordinates
Returns:

output (int) – a vertex index (a int32_t)

getCurrentVertexScalarValuesSlot(self) → int

gets the current vertex scalar.

Note

The scalar index is zero-based, and thus should be less than getVertexScalarValuesSlotCount().

Returns:output (int) – the scalar slot index (an uint32_t)
getDefaultVertexAlphaColor(self) → float

Queries the unstructured grid to get its default alpha color.

Returns:output (float) – Default alpha color used for the unstructured grid (a double)
getDefaultVertexColor(self) → Color

Gets the vertex default color of the unstructured grid.

Note

Each color value goes between 0 (none) and 1 (full).

Returns:output (Color) – a color (an Color)
getFeretBox(self, iTIndex: int, iAngleSampling: int) → Box

Get Feret box.

Note

Default value for angle sampling is 5

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • iAngleSampling (int) – the angle sampling, steps between each angle iteration (a uint16_t)
Returns:

output (Box) –

getHideOutOfRangeVertexScalarValues(self) → bool

Indicate if out of range values should be hiden.

Returns:output (bool) – (a bool)
getMinMaxVertexScalarValue(self, scalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
  • fMinValue (float) –
  • fMaxValue (float) –
getMinimalBox(self, iTIndex: int) → Box

Get miminal box (also know as Oriented BoundingBox in litterature)

Parameters:iTIndex (int) – the T index (a uint32_t)
Returns:output (Box) –
getMinimumBoundingBox(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Box
Parameters:
Returns:

output (ORSModel.ors.Box) –

getMomentOfInertia(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getTSize(self) → int

Gets the number of time steps for the mesh.

Returns:output (int) – a number (a uint32_t)
getUseDefaultVertexAlphaColor(self) → bool

Queries the unstructured grid to see if it uses its default alpha color.

Returns:output (bool) – TRUE if a default alpha color is used for the unstructured grid, FALSE otherwise
getUseDefaultVertexColor(self) → bool

Queries the unstructured grid to see if it uses its default color.

Returns:output (bool) – TRUE if the unstructured grid uses its default color, FALSE otherwise
getUseVertexScalarValues(self) → bool

Sets the mesh to have vertex scalar values or not.

Returns:output (bool) – true to use scalar values, false otherwise
getVertexAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float) → None

Gets a specific vertex.

Parameters:
  • iTIndex (int) – the time step (a uint32_t)
  • vertexIndex (int) – the vertex index (an uint64_t )
  • x (float) – the X value (a double*)
  • y (float) – the Y value (a double*)
  • z (float) – the Z value (a double*)
getVertexCount(self, iTIndex: int) → int

Returns the number of vertices.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (int) – an uint64_t
getVertexDatatype(self) → int
Returns:output (int) –
getVertexScalarValue(self, scalarValueSlotIndex: int, scalarValueVertexIndex: int, iTIndex: int) → float

Gets the value of a vertex scalar.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • scalarValueVertexIndex (int) – the vertex index (an uint32_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the value of a vertex scalar (a float)

getVertexScalarValueDescription(self, scalarValueSlotIndex: int, iTIndex: int) → str
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (str) –

getVertexScalarValueMax(self, scalarValueSlotIndex: int, iTIndex: int) → float

method getVertexScalarValueMax

Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getVertexScalarValueMaxs(self, iTIndex: int) → ArrayDouble

method getVertexScalarValueMaxs

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getVertexScalarValueMin(self, scalarValueSlotIndex: int, iTIndex: int) → float

method getVertexScalarValueMin

Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getVertexScalarValueMins(self, iTIndex: int) → ArrayDouble

method getVertexScalarValueMins

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getVertexScalarValueOffset(self, scalarValueSlotIndex: int, iTIndex: int) → float

Gets a vertex scalar offset value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar offset value (a float)

getVertexScalarValueOffsets(self, iTIndex: int) → ArrayDouble

Get the vertex scalar offset values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar offset value (a float)
getVertexScalarValueSlope(self, scalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar slope value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar slope value (a float)

getVertexScalarValueSlopes(self, iTIndex: int) → ArrayDouble

Get the vertex scalar slope values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar slope value (a float)
getVertexScalarValueSlotLookUpTable(self, nScalarValueSlotIndex: int, iTIndex: int) → dict
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (dict) –

getVertexScalarValueUnit(self, scalarValueSlotIndex: int, iTIndex: int) → int
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (int) –

getVertexScalarValues(self, iSlotIndex: int, iTIndex: int) → Array

Gets the values of a vertex scalar.

Note

The array of values is of length getVertexCount() * getVertexScalarValuesSlotCount().

Note

The scalar value in the slot s of the vertex v is located at the index (getVertexScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • iSlotIndex (int) – the time step (a uint32_t)
  • iTIndex (int) –
Returns:

output (ORSModel.ors.Array) – an array of values (an ArrayFloat)

getVertexScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int) → int
Parameters:
  • iSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (int) –

getVertexScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getVertexScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getVertexScalarValuesRangeMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getVertexScalarValuesRangeMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getVertexScalarValuesSlotCount(self) → int

Gets the number of slots for vertex scalar values.

Returns:output (int) – the number of slots (an uint32_t)
getVertexScalarValuesWindowMax(self, scalarValueSlotIndex: int, iTIndex: int) → float
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getVertexScalarValuesWindowMaxs(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getVertexScalarValuesWindowMin(self, scalarValueSlotIndex: int, iTIndex: int) → float
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getVertexScalarValuesWindowMins(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getVertices(self, iTIndex: int) → Array

Gets the vertices.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.Array) – an array of float (an ArrayFloat)
mapScalarValuesFromAMultiROI(self, referenceMultiROI: ORSModel.ors.MultiROI, multiROIScalarValueSlotIndex: int, sourceScalarValuesSlotIndex: int, multiROITIndex: int, sourceTIndex: int, aDefaultScalarValue: float) → None

Map a scalar values slot from aMultiROI to a unstructured grid.

Parameters:
  • referenceMultiROI (ORSModel.ors.MultiROI) – the multiROI modele (an MultiROI)
  • multiROIScalarValueSlotIndex (int) – the index of the MultiROI scalar values slot to map (a uint16_t)
  • sourceScalarValuesSlotIndex (int) – the index of the destination scalar values lot (a uint16_t)
  • multiROITIndex (int) – the multiROI time step (a uint32_t)
  • sourceTIndex (int) – the unstructured grid time step (a uint32_t)
  • aDefaultScalarValue (float) – a default scalar value in case that no match is possible for a vertex between the structured grid and the MultiROI (a double)
none()

UnstructuredGrid.__init__() -> UnstructuredGrid

offsetVertices(self, x: float, y: float, z: float) → None

Offsets the mesh vertices.

Note

Each vertice is offset by the given relative coordinates.

Parameters:
  • x (float) – an X offset value (a double)
  • y (float) – a Y offset value (a double)
  • z (float) – a Z offset value (a double)
removeAVertexScalarValuesSlot(self, nScalarValueSlotIndex: int, iTIndex: int) → None

Remove a scalar slot from the vertex scalars values slot.

Parameters:
  • nScalarValueSlotIndex (int) – the index of the slot to be removed (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
setCurrentVertexScalarValuesSlot(self, nCurrentScalarValueSlotIndex: int) → None

Sets the current vertex scalar.

Note

The scalar index is zero-based, and thus should be less than getVertexScalarValuesSlotCount().

Parameters:nCurrentScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
setDefaultVertexAlphaColor(self, value: float) → None

Sets the unstructured grid its default alpha color.

Parameters:value (float) – Alpha color (double)
setDefaultVertexColor(self, color: ORSModel.ors.Color) → None

Sets the vertex default color of the unstructured grid.

Note

Each color value goes between 0 (none) and 1 (full).

Note

You need to call getUseDefaultVertexColor(true) for the default color to be used.

Note

You need to call initializeVisual after color changes for them to be visible on the screen.

Parameters:color (Color) – a color (an Color)
setHideOutOfRangeVertexScalarValues(self, value: bool) → None

Indicate if out of range values should be hiden.

Parameters:value (bool) –
setOutOfRangeScalarValue(self, value: float) → None

Sets a scalar out or range value.

Parameters:value (float) – the value (a float)
setTSize(self, tSize: int) → None

Sets the number of time steps for the mesh.

Parameters:tSize (int) – a number (a uint32_t)
setUseDefaultVertexAlphaColor(self, value: bool) → None

Sets the unstructured grid to use its default alpha color.

Parameters:value (bool) – TRUE for using a default alpha color for the unstructured grid, FALSE otherwise (bool)
setUseDefaultVertexColor(self, value: bool) → None

Sets the unstructured grid to use its vertex default color.

Parameters:value (bool) – TRUE to use the default color, FALSE otherwise
setUseVertexScalarValues(self, value: bool) → None

Gets the status of vertex scalar values usage.

Parameters:value (bool) –
setVertexAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float) → None

Sets a specific vertex.

Parameters:
  • iTIndex (int) – the time step (a uint32_t)
  • vertexIndex (int) – the vertex index (an uint64_t)
  • x (float) – the X value (a double)
  • y (float) – the Y value (a double)
  • z (float) – the Z value (a double)
setVertexDatatype(self, nVertexDatatype: int) → None
Parameters:nVertexDatatype (int) –
setVertexScalarValue(self, scalarValueSlotIndex: int, scalarValueVertexIndex: int, aValue: float, iTIndex: int) → None

Sets the value of a vertex scalar.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • scalarValueVertexIndex (int) – the vertex index (an uint32_t)
  • aValue (float) – the value of a vertex scalar to set (a float)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValueDescription(self, scalarValueSlotIndex: int, value: str, iTIndex: int) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • value (str) –
  • iTIndex (int) –
setVertexScalarValueMax(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setVertexScalarValueMax

Parameters:
  • scalarValueSlotIndex (int) –
  • value (float) –
  • iTIndex (int) –
setVertexScalarValueMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setVertexScalarValueMaxs

Parameters:
setVertexScalarValueMin(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setVertexScalarValueMin

Parameters:
  • scalarValueSlotIndex (int) –
  • value (float) –
  • iTIndex (int) –
setVertexScalarValueMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setVertexScalarValueMins

Parameters:
setVertexScalarValueOffset(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a vertex scalar offset value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • value (float) – the scalar offset value (a float)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValueOffsets(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the vertex scalar offset values.

Parameters:
setVertexScalarValueSlope(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar slope value.

Parameters:
  • scalarValueSlotIndex (int) – scalar slot index (an uint32_t)
  • value (float) – scalar slope value (a float)
  • iTIndex (int) – time step (a uint32_t)
setVertexScalarValueSlopes(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the vertex scalar slope values.

Parameters:
setVertexScalarValueSlotLookUpTable(self, lookUpTable: dict, nScalarValueSlotIndex: int, iTIndex: int) → None
Parameters:
  • lookUpTable (dict) –
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
setVertexScalarValueUnit(self, scalarValueSlotIndex: int, value: int, iTIndex: int) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • value (int) –
  • iTIndex (int) –
setVertexScalarValues(self, pScalarValues: ORSModel.ors.Array, iSlotIndex: int, iTIndex: int) → None

Sets the values of a vertex scalar.

Note

The array of values is of length getVertexCount() * getVertexScalarValuesSlotCount().

Note

The scalar value in the slot s of the vertex v is located at the index (getVertexScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • pScalarValues (ORSModel.ors.Array) – an array of values (an ArrayFloat)
  • iSlotIndex (int) – the the time step (a uint32_t)
  • iTIndex (int) –
setVertexScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int, nVertexScalarValuesDatatype: int) → None
Parameters:
  • iSlotIndex (int) –
  • iTIndex (int) –
  • nVertexScalarValuesDatatype (int) –
setVertexScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValuesRangeMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValuesRangeMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValuesSlotCount(self, value: int) → None

Sets the number of slots for vertex scalar values.

Parameters:value (int) – the number of slots (an uint32_t)
setVertexScalarValuesWindowMax(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • value (float) –
  • iTIndex (int) –
setVertexScalarValuesWindowMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setVertexScalarValuesWindowMin(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • value (float) –
  • iTIndex (int) –
setVertexScalarValuesWindowMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setVertices(self, pVertices: ORSModel.ors.Array, iTIndex: int) → None

Sets the vertices.

Parameters:
  • pVertices (ORSModel.ors.Array) – the vertices(an ArrayFloat)
  • iTIndex (int) – the time step (a uint32_t)
toWorld(iTIndex, setDataDirty=True)

Vector3

class ORSModel.ors.Vector3

Bases: ORSModel.ors.Unmanaged

brief_description: A wrapper to a 3D vector. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

add(self, aVector: ORSModel.ors.Vector3) → None

Adds a vector to the receiver.

Parameters:aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
copy(self) → Vector3

Returns a new vector identical to the receiver (a copy).

Returns:output (ORSModel.ors.Vector3) –
createFromPythonRepresentation(aPythonRepresentation: str) → Vector3

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Vector3) –
fromPythonRepresentation(self, aPythonRepresentation: str) → bool
Parameters:aPythonRepresentation (str) –
Returns:output (bool) –
getAPerpendicular(self) → Vector3

Computes a perpendicular from the vector.

Returns:output (ORSModel.ors.Vector3) – a perpendicular vector (an Vector3)
getAdditionWith(self, aVector: ORSModel.ors.Vector3) → Vector3

Gets the result of adding a vector to the receiver.

Note

The receiver is not modified.

Parameters:aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the resulting vector (an Vector3)
getAngleWith(self, pVect: ORSModel.ors.Vector3) → float

Computes the angle with another vector.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
Returns:output (float) – the angle (a double)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCrossProductWith(self, pVect: ORSModel.ors.Vector3) → Vector3

Computes the cross product with another vector.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the cross product (a double)
getDistanceFrom(self, pVect: ORSModel.ors.Vector3) → float

Computes the distance to another vector.

Parameters:pVect (ORSModel.ors.Vector3) – another vector (an Vector3)
Returns:output (float) – the distance (a double)
getDotProductWith(self, pVect: ORSModel.ors.Vector3) → float

Computes the dot product with another vector.

Parameters:pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
Returns:output (float) – the dot product (a double)
getIsEqualTo(self, aVector: ORSModel.ors.Vector3) → bool
Parameters:aVector (ORSModel.ors.Vector3) –
Returns:output (bool) –
getLargestComponent(self) → float
Returns:output (float) – the biggest component of the vector
getLength(self) → float

Gets the vector’s length.

Returns:output (float) – the length (a double)
getLinearInterpolationWith(self, point1: ORSModel.ors.Vector3, normalizePosition: float) → Vector3

Computes the lerp with another vector.

Parameters:
  • point1 (ORSModel.ors.Vector3) – a vector (an Vector3)
  • normalizePosition (float) – a interpolation factor [0,1](a double)
Returns:

output (ORSModel.ors.Vector3) – the lerp vector (an Vector3)

getNegated(self) → Vector3

Gets the receiver negated in a new vector.

Note

The receiver is not modified.

Returns:output (ORSModel.ors.Vector3) – the resulting vector (an Vector3)
getNormalized(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getPhi(self) → float

Gets the angle from the positive x axis of the current vector projected on the xy plane.

Note

Equivalent to atan(y/x), where the provided result is in the range [0, 2*pi[.

Note

The vector should be normalized.

Returns:output (float) – the angle in radians (a double)
getPythonRepresentation(self) → str
Returns:output (str) –
getRotatedAroundAxis(self, anAxis: ORSModel.ors.Vector3, centerOfRotation: ORSModel.ors.Vector3, angleInRadian: float) → Vector3

Return the receiver rotated around the provided axis for the provided amount of radian.

Parameters:
  • anAxis (ORSModel.ors.Vector3) – an axis vector (an Vector3)
  • centerOfRotation (ORSModel.ors.Vector3) – an centerOfRotation vector (an Vector3)
  • angleInRadian (float) – an angle in radian (a double)
Returns:

output (ORSModel.ors.Vector3) – the product of the rotation (an Vector3)

getScaledBy(self, scaleFactor: float) → Vector3

Gets the result of sacling a vector to the receiver.

Note

The receiver is not modified.

Parameters:scaleFactor (float) – a scale a double
Returns:output (ORSModel.ors.Vector3) – the resulting vector (an Vector3)
getSmallestComponent(self) → float
Returns:output (float) – the smallest component of the vector
getSubtractionFrom(self, aVector: ORSModel.ors.Vector3) → Vector3

Gets the result of subtracting a vector from the receiver.

Note

The receiver is not modified.

Parameters:aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
Returns:output (ORSModel.ors.Vector3) – the resulting vector (an Vector3)
getTheta(self) → float

Gets the angle from the positive z axis.

Note

Equivalent to acos(z), where the provided result is in the range [0, pi].

Note

The vector should be normalized.

Returns:output (float) – the angle in radians (a double)
getX(self) → float

Gets the X value from the vector.

Returns:output (float) – a double
getY(self) → float

Gets the Y value from the vector.

Returns:output (float) – a double
getZ(self) → float

Gets the Z value from the vector.

Returns:output (float) – a double
is_(another)
is_not(another)
negate(self) → None

Negates the vector.

none()

Vector3.__init__() -> Vector3

normalize(self) → None

Normalizes the vector.

Note

A normalized vector has norm (length) 1.

scale(self, scaleFactor: float) → None

Scales the vector.

Parameters:scaleFactor (float) – a scale factor (a double)
setX(self, value: float) → None

Sets the X value of the vector.

Parameters:value (float) – a double value
setXYZ(self, x: float, y: float, z: float) → None

Sets the 3 vector component.

Note

W is set to zero

Parameters:
  • x (float) – the X component (a double)
  • y (float) – the Y component (a double)
  • z (float) – the Z component (a double)
setY(self, value: float) → None

Sets the Y value of the vector.

Parameters:value (float) – a double value
setZ(self, value: float) → None

Sets the Z value of the vector.

Parameters:value (float) – a double value
subtract(self, aVector: ORSModel.ors.Vector3) → None

Subtracts a vector from the receiver.

Parameters:aVector (ORSModel.ors.Vector3) – a vector (an Vector3)

VectorField

class ORSModel.ors.VectorField

Bases: ORSModel.ors.UnstructuredGrid

copyInto(self, aDestinationUnstructuredGrid: ORSModel.ors.Node) → None

Copies the receiver unstructured grid into another unstructured grid.

Parameters:aDestinationUnstructuredGrid (ORSModel.ors.Node) – a destination unstructured grid
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getUnstructuredGridHelperClass()
getVectorAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float) → None

Gets a specific vector.

Parameters:
  • iTIndex (int) – the time step (a uint32_t)
  • vertexIndex (int) – the vertex index (an uint64_t )
  • x (float) – the X value (a double*)
  • y (float) – the Y value (a double*)
  • z (float) – the Z value (a double*)
getVectors(self, iTIndex: int) → ArrayDouble

Gets the vectors.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – an array of double (an ArrayDouble)
none() → VectorField

Returns a none object, equivalent to a non-existent object (or null).

Returns:output (VectorField) –
setVectorAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float) → None

Sets a specific vector.

Parameters:
  • iTIndex (int) – the time step (a uint32_t)
  • vertexIndex (int) – the vertex index (an uint64_t)
  • x (float) – the X value of the vector (a double)
  • y (float) – the Y value of the vector (a double)
  • z (float) – the Z value of the vector(a double)
setVectors(self, pVectors: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Sets the vectors.

Parameters:

View

class ORSModel.ors.View

Bases: ORSModel.ors.Node

brief_description: Represents a host window where the renderer is displayed. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 Represents a host window where the renderer is displayed.

compile(self) → None
decrementTimeStep(self) → None

Decrements the view’s time step counter.

Note

When looking at 4D data (3D plus a time dimension), one can cycle through the time dimension in this fashion.

draw(self) → None

Forces an immediate draw of the view.

drawOnCurrentGLContext(self, bCapture: bool) → None
Parameters:bCapture (bool) –
exportSnapshotCustomSized(self, iWidth: int, iHeight: int, pOutputImage: ORSModel.ors.Image) → Image

Exports a snapshot of the view to an image, sized to specification.

Note

This method saves a snapshot sized to specifications. The resulting image is always full resolution, no matter what size is given.

Note

If an output image is support, the resulting snapshot is written to that output image. That same output image will be the return value.

Parameters:
  • iWidth (int) – the width of the image to be saved (a uint16_t)
  • iHeight (int) – the height of the image to be saved (a uint16_t)
  • pOutputImage (ORSModel.ors.Image) – (optional) an output image (an Image)
Returns:

output (ORSModel.ors.Image) – an image (an Image)

fitBoundedPlaneInView(self, IBoundedPlane: ORSModel.ors.Rectangle) → None
Parameters:IBoundedPlane (ORSModel.ors.Rectangle) –
fitBoundedPlaneInViewLogged(rectangle, logging=True)
fitBoxInView(self, aBox: ORSModel.ors.Box) → None
Parameters:aBox (ORSModel.ors.Box) –
fitBoxInViewLogged(box, logging=True)
gatherTimeStepMaxFromAll(self) → None

Queries all visible models to know how many timesteps there are.

get2DBackgroundColor(self) → Color

Gets the view’s 3D first background color.

Returns:output (ORSModel.ors.Color) – a color (an Color)
get3DBackgroundColor1(self) → Color

Gets the view’s 3D first background color.

Returns:output (ORSModel.ors.Color) – a color (an Color)
get3DBackgroundColor2(self) → Color

Gets the view’s 3D first background color.

Returns:output (ORSModel.ors.Color) – a color (a Color)
get3DBackgroundColorMode(self) → int

Gets the view’s 3D background color mode.

Note

The color mode has 3 different meanings: -2 says the color is uniform (i.e. the second color is ignored), -1 says the color is gradient radial (the two colors are used), any value between 0 and 359 says the color is gradient linear (the two colors are used), and that value indicates the angle of the gradient.

Returns:output (int) – color mode (a short, see note below)
getAllChildrenOfClassesVisibleAndHighlightable(self, classes: ORSModel.ors.typing.List[str]) → List

Returns a flattened list of all the child nodes, of the given class, that are renderable and highlightable.

Note

The list contains only Managed objects (they will need to be typecast to the appropriate class).

Parameters:classes (typing.List[str]) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of all child nodes that can be rendered (an List)
getAllVisibleChildrenOfClass(self, pProgId: str) → List

Returns a flattened list of all the child nodes, of the given class, that are visible.

Note

The list contains only Managed objects (they will need to be typecast to the appropriate class).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of all child nodes that are visible (an List)
getAmbientLightColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getAngleDimensionUnit(self) → DimensionUnit
Returns:output (ORSModel.ors.DimensionUnit) –
getAutoFocus(self) → bool
Returns:output (bool) –
getBorderColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getBorderWidth(self) → float
Returns:output (float) –
getBoundedPlaneOfFirstSliceOfBox(self, aBox: ORSModel.ors.Box) → Rectangle
Parameters:aBox (ORSModel.ors.Box) –
Returns:output (ORSModel.ors.Rectangle) –
getBoundedPlaneOfLastSliceOfBox(self, aBox: ORSModel.ors.Box) → Rectangle
Parameters:aBox (ORSModel.ors.Box) –
Returns:output (ORSModel.ors.Rectangle) –
getBoundedPlaneOfSliceOfBox(self, aBox: ORSModel.ors.Box, sliceIndex: int) → Rectangle
Parameters:
Returns:

output (ORSModel.ors.Rectangle) –

getBoxAbleToContainAllEnabledVisualReachableByRender(self, inbox: ORSModel.ors.Box) → Box
Parameters:inbox (ORSModel.ors.Box) –
Returns:output (ORSModel.ors.Box) –
getCamera(self) → Camera

Gets the picked Overlay in a view.

Returns:output (ORSModel.ors.Camera) – the GUID of the overlay if successful, should be a VisualOVerlay but this idl doesn’t allow it
getCameraSpaceLightPos(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getCineMode(self) → int
Returns:output (int) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getContext()
getCurrentTimeStep(self) → int

Gets the view’s current time step.

Returns:output (int) –
getDiffuseFactor(self) → float
Returns:output (float) –
getDiffuseLightColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getDimensionUnit(self, dimensionType: int) → DimensionUnit

Gets the view’s dimension unit.

Note

See the ORS_def.h file for enum CxvUniverse_Dimension_type values.

Parameters:dimensionType (int) – the unit type (a CxvUniverse_Dimension_type)
Returns:output (ORSModel.ors.DimensionUnit) – the current dimension unit (DimensionUnit)
getDimensionUnitID(self, dimensionType: int) → int

Gets the view’s dimension unit.

Note

To obtain the object, call DimensionUnit::getUnitFor().

Note

See the ORS_def.h file for enum CxvUniverse_Dimension and CxvUniverse_Dimension_type values.

Parameters:dimensionType (int) – the unit type (a CxvUniverse_Dimension_type)
Returns:output (int) – the current CxvUniverse_Dimension unit (a int32_t)
getDisplayedAxis(self, aBox: ORSModel.ors.Box) → int

Gets the axis direction of the view.

Note

The axis value is 0 for Sagittal, 1 for Coronal or 2 for Axial.

Parameters:aBox (ORSModel.ors.Box) –
Returns:output (int) – the axis (a uint16_t)
getDrawFocusRect(self) → bool
Returns:output (bool) –
getEnableFocus(self) → bool
Returns:output (bool) –
getFitToViewBorder(self) → int

Gets the number of pixels allocated to the border around the view.

Returns:output (int) – the number of pixels (a int32_t)
getFocalDistance(self) → float
Returns:output (float) –
getFocusSigma(self) → float
Returns:output (float) –
getHWND(self) → int

Gets the view handle.

Returns:output (int) – the handle of the window (a ORS_COM_ARG)
getImageNumberingAscending(self) → bool
Returns:output (bool) –
getIntersliceDistance(self, box: ORSModel.ors.Box) → float
Parameters:box (ORSModel.ors.Box) –
Returns:output (float) –
getIsBorderEnabled(self) → bool
Returns:output (bool) –
getIsChildReachableByRenderer(self, INode: ORSModel.ors.Node) → bool

Verifies if a child node is renderable.

Parameters:INode (ORSModel.ors.Node) – a node in the child hierarchy of the view (a Node)
Returns:output (bool) – true if the node is renderable, false otherwise
getIsEnabled(self) → bool

Queries the view to know if it is enabled.

Note

Disabled views are “inert”, they react to very few events and display nothing.

Returns:output (bool) – true if the view is enabled, false otherwise
getIsIn2DViewMode(self) → bool
Returns:output (bool) –
getIsIn3DViewMode(self) → bool
Returns:output (bool) –
getIsInAcquisitionPlaneOf(self, aChannel: ORSModel.ors.Channel) → bool
Parameters:aChannel (ORSModel.ors.Channel) –
Returns:output (bool) –
getIsInNoViewMode(self) → bool
Returns:output (bool) –
getIsInThinMIPViewMode(self) → bool
Returns:output (bool) –
getIsOrientationAndPositionLocked(self) → bool

Gets the view’s position and orientation lock status.

Note

When a view position is locked, one cannot set its oblique info.

Returns:output (bool) – true if the view position and orientation is locked, false otherwise
getIsOrientationLocked(self) → bool

Gets the view’s orientation lock status.

Note

When a view orientation is locked, one cannot set its oblique info.

Returns:output (bool) – true if the view orientation is locked, false otherwise
getIsOrthoProjection(self) → bool
Returns:output (bool) –
getIsPositionLocked(self) → bool

Gets the view’s position lock status.

Note

When a view position is locked, one cannot set its oblique info.

Returns:output (bool) – true if the view position is locked, false otherwise
getIsRenderingTiled(self) → bool
Returns:output (bool) –
getIsShadowEnabled(self) → bool
Returns:output (bool) –
getIsTrackingLight(self) → bool

Queries if the view is in tracking light mode or not.

Returns:output (bool) – true if the view is in tracking light mode, false otherwise
getLODEnabled(self) → bool
Returns:output (bool) –
getLODMode(self) → int

Gets the view LOD mode.

Note

LOD stands for Level Of Detail. It defines how much detail is displayed when moving the visual artifacts in the view. The lower the level, the faster the visual will move.

Note

See the ORS_def.h file, it contains defines (in the form CXV_DISPLAY_LOD_XXX) for valid values.

Returns:output (int) – an LOD mode (a int32_t)
getLayoutGenealogicalName()

Gets the genealogical name of the view

Returns:aName (str) – the genealogical name of the view
getLengthAsPixelCount(self, aLength: float) → float

Gets the number of pixels on the screen that represent a world length.

Parameters:aLength (float) – the world length (a double)
Returns:output (float) – the number of pixels that match the length (a double)
getLengthDimensionUnit(self) → DimensionUnit
Returns:output (ORSModel.ors.DimensionUnit) –
getLightFollowCamera(self) → bool
Returns:output (bool) –
getLightMaxDistance(self) → float
Returns:output (float) –
getLightPosition(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getLocalPositionArrayTransformedToXY(self, pVisual: ORSModel.ors.Visual, pLocalPositions: ORSModel.ors.SequenceableCollection, nPtsCount: int, pTimeStep: int, pOutputXYPositions: ORSModel.ors.SequenceableCollection) → SequenceableCollection
Parameters:
Returns:

output (ORSModel.ors.SequenceableCollection) –

getLocalPositionFromVisualLocalPosition(self, pVisual: ORSModel.ors.Visual, anotherVisual: ORSModel.ors.Visual, pAlocalPositionInAnotherVisual: ORSModel.ors.Vector3, pTimeStep: int) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getLocalPositionFromWorldPosition(self, pVisual: ORSModel.ors.Visual, pWorldPosition: ORSModel.ors.Vector3, pTimeStep: int) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getLocalPositionTransformedToXY(self, IVisual: ORSModel.ors.Visual, pCoord: ORSModel.ors.Vector3, pTimeStep: int, oX: float, oY: float) → bool

Transforms a local coordinate in 2D coordinates.

Note

The values are returned in the last two parameters supplied.

Parameters:
Returns:
  • output (bool) – true if the local Z coordinate is currently visible, false otherwise
  • pTimeStep (int) – the X 2D coordinate (a double*)
  • oX (float) – the Y 2D coordinate (a double*)
getMaxTimeStep(self) → int
Returns:output (int) –
getMillisecondsElapsedSinceLastDraw(self) → int

Returns the time elapsed since the last draw, in milliseconds.

Returns:output (int) – the elapsed time, in milliseconds (a uint32_t)
getNeedRefresh(self) → bool
Returns:output (bool) –
getNextSliceDirectionOfBox(self, aBox: ORSModel.ors.Box) → Vector3
Parameters:aBox (ORSModel.ors.Box) –
Returns:output (ORSModel.ors.Vector3) –
getOrthoZoomFactor(self) → float
Returns:output (float) –
getPickData(self, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → Intersection

Gets the object being picked in the view.

Note

Returns an intersection describing what is currently under the mouse cursor in the view.

Parameters:
  • pixelXPositionInDisplay (int) –
  • pixelYPositionInDisplay (int) –
Returns:

output (ORSModel.ors.Intersection) – an intersection (an Intersection)

getPickVisualData(self, aIVisual: ORSModel.ors.Visual, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → Intersection

Gets the pick region from a visual in the view.

Note

Returns an intersection describing what is currently being picked in the visual supplied. If the given visual is not being picked, getHit() on the intersection will return FALSE.

Parameters:
  • aIVisual (ORSModel.ors.Visual) – a visual (an Visual)
  • pixelXPositionInDisplay (int) –
  • pixelYPositionInDisplay (int) –
Returns:

output (ORSModel.ors.Intersection) – an intersection (an Intersection)

getProjectionMatrix(self) → Matrix4x4
Returns:output (ORSModel.ors.Matrix4x4) –
getProjectionMode2D(self) → int

Gets the 2D projection mode of the view.

Note

See CxvVolumeProjection_Mode in ORS_def.h for supported volume projection modes.

Returns:output (int) – the current 2D projection mode (an int)
getRectangle()

Get the rectangle in the space defined by the View

Returns:rectangle (ORSModel.ors.Rectangle) – a Rectangle
getRenderCount(self) → int

Returns the number of times theView was rendered (draw)

Returns:output (int) – the rendereing count (unint32)
getRenderMode(self) → int

Gets the view render mode.

Returns:output (int) – a render mode (a uint16_t, see ors_def.h)
getRestTime(self) → int

Gets the rendering idle time.

Note

The rendering idle time is the period of time between cycles. Increasing this value makes the renderer less responsive.

Note

Default value is 22 ms.

Returns:output (int) – a number of milliseconds (a LONG)
getScreenLengthTransformedToWorldLength(self, inLength: float) → float
Parameters:inLength (float) –
Returns:output (float) –
getShadowMapSize(self) → int
Returns:output (int) –
getShadowOpacity(self) → float
Returns:output (float) –
getShadowPrecision(self) → float
Returns:output (float) –
getShadowStrength(self) → float
Returns:output (float) –
getShininess(self) → float
Returns:output (float) –
getShowOrientationIndicators(self) → bool

Gets the visibility of the orientation indicators.

Returns:output (bool) – true if the orientation indicators are visible, false otherwise
getShowViewFPS(self) → bool
Returns:output (bool) –
getSlabThickness(self) → float

Gets the view’s slab thickness.

Note

Note that this value represents the half slab thickness, in microns.

Returns:output (float) – the slab thickness, in microns (a double)
getSliceCountOfBox(self, aBox: ORSModel.ors.Box) → int

Gets the number of slices of a given box.

Parameters:aBox (ORSModel.ors.Box) – the visual box (a Box)
Returns:output (int) – the number of slices in the box, in the current camera direction (a uint32_t)
getSliceIndexOfBox(self, aBox: ORSModel.ors.Box) → float

Gets the current slice position of a given box.

Parameters:aBox (ORSModel.ors.Box) – the visual box (an Box)
Returns:output (float) – the current slice position in the box
getSpecularFactor(self) → float
Returns:output (float) –
getSpecularLightColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getSpotlightFactor(self) → float
Returns:output (float) –
getSurfaceDimensionUnit(self) → DimensionUnit

Gets the view’s surface dimension unit.

Returns:output (ORSModel.ors.DimensionUnit) –
getUseSuperSampling(self) → bool
Returns:output (bool) –
getValueInCurrentUnitConvertedToMeter(self, pValue: float) → float

Converts a value expressed in the view’s current dimension unit to meters.

Note

This method is the reverse of getValueInMeterConvertedToCurrentUnit().

Note

The value to be converted is assumed to be expressed in the view’s current dimension unit. For example, if the view’s current unit is cm, getValueInCurrentUnitConvertedToMeter(1.0) will return 0.01 (1 meter -> 100 cm).

Parameters:pValue (float) – the value to be converted (a double)
Returns:output (float) – the value converted to meters (a double)
getValueInMeterConvertedToCurrentUnit(self, pValue: float) → float

Converts a value against the view’s current dimension unit.

Note

The value to be converted is always assumed to be expressed in meters, the reference internal unit. For example, if the view’s current unit is cm, getValueInMeterConvertedToCurrentUnit(1.0) will return 100 (1 meter -> 100 cm).

Note

This method is the reverse of getValueInCurrentUnitConvertedToMeter().

Parameters:pValue (float) – the value (in meters) to be converted (a double)
Returns:output (float) – the value converted (a double)
getViewAlignedBoxThatContainsAllEnabledVisualsReachableByRenderer(self) → Box
Returns:output (ORSModel.ors.Box) –
getViewBoundedPlaneInWorldCoordinates(self) → Rectangle

Returns a plane bounded to the view, in world coordinates.

Returns:output (ORSModel.ors.Rectangle) – a plane (an Rectangle)
getViewCenter(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getViewMatrix(self) → Matrix4x4
Returns:output (ORSModel.ors.Matrix4x4) –
getViewMode(self) → int

Gets the view’s volume mode.

Note

See the ORS_def.h file for valid values.

Returns:output (int) – a CxvView_Mode (a int32_t)
getViewNormal(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getViewOrientedBoxThatContainsBox(self, aBox: ORSModel.ors.Box) → Box
Parameters:aBox (ORSModel.ors.Box) –
Returns:output (ORSModel.ors.Box) –
getViewOrientedPlane(self) → OrientedPlane
Returns:output (ORSModel.ors.OrientedPlane) –
getViewPlane(self) → Plane
Returns:output (ORSModel.ors.Plane) –
getViewRepresentationColor(self) → Color

Gets the view’s representation color.

Note

This call is used to query the color that represents the view.

Returns:output (ORSModel.ors.Color) – a color (a Color)
getVolumeDimensionUnit(self) → DimensionUnit
Returns:output (ORSModel.ors.DimensionUnit) –
getWorldLengthTransformedToScreenLength(self, inLength: float) → float
Parameters:inLength (float) –
Returns:output (float) –
getWorldPositionArrayTransformedToXY(self, pWorldPositions: ORSModel.ors.SequenceableCollection, nPtsCount: int, pOutputXYPositions: ORSModel.ors.SequenceableCollection) → SequenceableCollection
Parameters:
Returns:

output (ORSModel.ors.SequenceableCollection) –

getWorldPositionFromLocalPosition(self, pVisual: ORSModel.ors.Visual, pLocalPosition: ORSModel.ors.Vector3, pTimeStep: int) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getWorldPositionTransformedToXY(self, pPosition: ORSModel.ors.Vector3, oX: float, oY: float) → bool

Transforms a world coordinate in 2D coordinates.

Note

The values are returned in the last two parameters supplied.

Parameters:

pPosition (ORSModel.ors.Vector3) – a position (an Vector3)

Returns:
  • output (bool) – true if the world Z coordinate is currently visible, false otherwise
  • oX (float) – the X 2D coordinate (a double*)
  • oY (float) – the Y 2D coordinate (a double*)
getXSize(self) → int

Gets the view X size.

Returns:output (int) – the X size, in pixels (a uint16_t)
getXYArrayTransformedToLocalPosition(self, pVisual: ORSModel.ors.Visual, pXYPositions: ORSModel.ors.SequenceableCollection, nPtsCount: int, pTimeStep: int, pOutputLocalPositions: ORSModel.ors.SequenceableCollection) → SequenceableCollection
Parameters:
Returns:

output (ORSModel.ors.SequenceableCollection) –

getXYArrayTransformedToWorldPosition(self, pXYPositions: ORSModel.ors.SequenceableCollection, nPtsCount: int, pOutputWorldPositions: ORSModel.ors.SequenceableCollection) → SequenceableCollection
Parameters:
Returns:

output (ORSModel.ors.SequenceableCollection) –

getXYTransformedToWorldPosition(self, x: float, y: float) → Vector3

Transforms a 2D coordinates to world coordinate.

Note

The world coordinate is projected on the current view bounded plane.

Parameters:
  • x (float) – the X 2D coordinate (a double)
  • y (float) – the Y 2D coordinate (a double)
Returns:

output (ORSModel.ors.Vector3) – a position in world coordinate(an Vector3)

getYSize(self) → int

Gets the view Y size.

Returns:output (int) – the Y size, in pixels (a uint16_t)
getZoomFactor(self) → float

Gets the current zoom factor.

Returns:output (float) – zoom factor (a double)
imshow(node, lut=None)

With a view, show the node (such as a Channel, ROI, Mesh) in this view with an optional Lookup Table

Parameters:
incrementTimeStep(self) → None

Increments the view’s time step counter.

Note

When looking at 4D data (3D plus a time dimension), one can cycle through the time dimension in this fashion.

none()

View.__init__() -> View

refresh(self) → None

Refreshes the view.

Note

The view is not immediately refreshed, it will be so when the next timer fires up.

refreshAndWait()

Force a refresh of the view and wait for the refresh to be finnished before return

resetNeedRefresh(self) → None
saveScreenshot(filename, scale=1.0)

Save a screenshot

Parameters:
  • filename (file saving) – path to save
  • scale (float) – scaling factor
set2DBackgroundColor(self, IColor: ORSModel.ors.Color) → None

Sets the view’s 2D background color.

Note

The color should be expressed as RGB (the alpha is not used here).

Parameters:IColor (ORSModel.ors.Color) – a color (an Color)
set3DBackgroundColor(self, iMode: int, IColor1: ORSModel.ors.Color, IColor2: ORSModel.ors.Color) → None

Sets the view’s 3D background color.

Note

The colors should be expressed as RGB (the alpha is not used here).

Parameters:
setAmbientLightColor(self, IColor: ORSModel.ors.Color) → None
Parameters:IColor (ORSModel.ors.Color) –
setAutoFocus(self, aValue: bool) → None
Parameters:aValue (bool) –
setBorderColor(self, IColor: ORSModel.ors.Color) → None
Parameters:IColor (ORSModel.ors.Color) –
setBorderWidth(self, aValue: float) → None
Parameters:aValue (float) –
setCamera(self, aCamera: ORSModel.ors.Camera) → None
Parameters:aCamera (ORSModel.ors.Camera) –
setCameraLogged(camera, logging=True)
setCameraSpaceLightPos(self, pPosition: ORSModel.ors.Vector3) → None
Parameters:pPosition (ORSModel.ors.Vector3) –
setCaptionTextFontName(self, sFontName: str) → None
Parameters:sFontName (str) –
setCineMode(self, mode: int) → None
Parameters:mode (int) –
setCurrentTimeStep(self, value: int) → None
Parameters:value (int) –
setDiffuseFactor(self, aValue: float) → None
Parameters:aValue (float) –
setDiffuseLightColor(self, IColor: ORSModel.ors.Color) → None
Parameters:IColor (ORSModel.ors.Color) –
setDimensionUnitID(self, dimensionType: int, pUnit: int) → None

Sets the view’s dimension unit.

Note

See the ORS_def.h file for enum CxvUniverse_Dimension and CxvUniverse_Dimension_type values.

Parameters:
  • dimensionType (int) – the unit type (a CxvUniverse_Dimension_type)
  • pUnit (int) – a CxvUniverse_Dimension unit (a int32_t*)
setDrawFocusRect(self, value: bool) → None
Parameters:value (bool) –
setEnableFocus(self, aValue: bool) → None
Parameters:aValue (bool) –
setFitToViewBorder(self, value: int) → None

Sets the number of pixels allocated to the border around the view.

Parameters:value (int) – the number of pixels (a int32_t*)
setFocalDistance(self, aValue: float) → None
Parameters:aValue (float) –
setFocusSigma(self, aValue: float) → None
Parameters:aValue (float) –
setImageNumberingAscending(self, value: bool) → None
Parameters:value (bool) –
setIsBorderEnabled(self, aValue: bool) → None

Enables or disables the view border.

Parameters:aValue (bool) – true to enable the border, false to disable it.
setIsEnabled(self, pEnabled: bool) → None

Enables or disables the view.

Note

Disabled views are “inert”, they react to very few events and display nothing.

Parameters:pEnabled (bool) – true to enable the view, false to disable it
setIsOrientationAndPositionLocked(self, value: bool) → None

Sets the view’s position lock status.

Note

When a view position is locked, one cannot set its oblique info.

Parameters:value (bool) – true to lock the view position, false otherwise
setIsOrientationLocked(self, value: bool) → None

Sets the view’s orientation lock status.

Note

When a view orientation is locked, one cannot set its oblique info.

Parameters:value (bool) – true to lock the view orientation, false otherwise
setIsOrthoProjection(self, value: bool) → None
Parameters:value (bool) –
setIsPositionLocked(self, value: bool) → None

Sets the view’s position lock status.

Note

When a view position is locked, one cannot set its oblique info.

Parameters:value (bool) – true to lock the view position, false otherwise
setIsShadowEnabled(self, aValue: bool) → None
Parameters:aValue (bool) –
setIsTrackingLight(self, value: bool) → None

Sets the view to be in tracking light mode or not.

Parameters:value (bool) – true to be in tracking light mode, false otherwise
setLODEnabled(self, aValue: bool) → None
Parameters:aValue (bool) –
setLODMode(self, dwMode: int) → None

Sets the view LOD mode.

Note

LOD stands for Level Of Detail. It defines how much detail is displayed when moving the visual artifacts in the view. The lower the level, the faster the visual will move.

Note

See the ORS_def.h file, it contains defines (in the form CXV_DISPLAY_LOD_XXX) for valid values.

Parameters:dwMode (int) – an LOD mode (a int32_t*)
setLightFollowCamera(self, aValue: bool) → None
Parameters:aValue (bool) –
setLightMaxDistance(self, aValue: float) → None
Parameters:aValue (float) –
setLightPosition(self, aLightPosition: ORSModel.ors.Vector3) → None
Parameters:aLightPosition (ORSModel.ors.Vector3) –
setOrientationIndicators(self, left: str, right: str, up: str, down: str, top: str, bottom: str) → None

Sets the orientation indicators.

Parameters:
  • left (str) – 6 string, one for each orientation indicator
  • right (str) –
  • up (str) –
  • down (str) –
  • top (str) –
  • bottom (str) –
setOrientedPlaneWithBox(self, anOrientedPlane: ORSModel.ors.OrientedPlane, aBox: ORSModel.ors.Box) → None
Parameters:
setOrientedPlaneWithBoxLogged(orientedPlane, box, logging=True)
setOrthoZoomFactor(self, value: float) → None
Parameters:value (float) –
setOrthoZoomFactorLogged(zoomFactor, logging=True)
setProjectionMode2D(self, iMode: int) → None

Sets the 2D projection mode of the view.

Note

See CxvVolumeProjection_Mode in ORS_def.h for supported volume projection modes.

Parameters:iMode (int) – a 2D projection mode (an int)
setProjectionMode2DLogged(projectionMode, logging=True)
setRenderMode(self, mode: int) → None

Sets the view render mode.

Parameters:mode (int) – an OrsRenderMode (a uint16_t, see ors_def.h)
setRestTime(self, value: int) → None
Parameters:value (int) –
setShadowMapSize(self, value: int) → None
Parameters:value (int) –
setShadowOpacity(self, aValue: float) → None
Parameters:aValue (float) –
setShadowPrecision(self, aValue: float) → None
Parameters:aValue (float) –
setShadowStrength(self, aValue: float) → None
Parameters:aValue (float) –
setShininess(self, aValue: float) → None
Parameters:aValue (float) –
setShowOrientationIndicators(self, pFlag: bool) → None

Sets the visibility of the orientation indicators.

Parameters:pFlag (bool) – true to show the orientation indicators, false to hide them
setShowViewFPS(self, bShow: bool) → None
Parameters:bShow (bool) –
setSize(self, xSize: int, ySize: int) → None

Sets the view size.

Parameters:
  • xSize (int) – the X size, in pixels (a uint16_t)
  • ySize (int) – the Y size, in pixels (a uint16_t)
setSlabThickness(self, value: float) → None

Sets the view’s slab thickness.

Note

Note that this value should represent the half slab thickness, in microns.

Parameters:value (float) – the slab thickness, in microns (a double)
setSlabThicknessLogged(thickness, logging=True)
setSliceIndexOfBox(self, aBox: ORSModel.ors.Box, sliceIndex: float) → None

Sets the current slice position for a given box.

Parameters:
  • aBox (ORSModel.ors.Box) – the visual box (an Box)
  • sliceIndex (float) – the slice position in the box to set
setSliceIndexOfBoxLogged(box, sliceIndex, logging=True)
setSpecularFactor(self, aValue: float) → None
Parameters:aValue (float) –
setSpecularLightColor(self, IColor: ORSModel.ors.Color) → None
Parameters:IColor (ORSModel.ors.Color) –
setSpotlightFactor(self, aValue: float) → None
Parameters:aValue (float) –
setUseOrthographicProjectionIn3D(ortho)

Use or not orthographic projection in 3D

Parameters:ortho (bool) – use orthographic projection
setUseSuperSampling(self, aValue: bool) → None
Parameters:aValue (bool) –
setViewMode(self, viewMode: int) → None

Sets the view’s volume mode.

Note

See the ORS_def.h file for valid values.

Parameters:viewMode (int) – a CxvView_Mode (a int32_t*)
setViewModeLogged(viewMode, logging=True)
setViewOrientedPlane(self, anOrientedPlane: ORSModel.ors.OrientedPlane, aSlabThickness: float) → None
Parameters:
setViewOrientedPlaneLogged(orientedPlane, thickness, logging=True)
setViewPlanePosition(self, worldPosition: ORSModel.ors.Vector3, centerView: bool) → None
Parameters:
setViewPlanePositionLogged(point, center, logging=True)
setViewRepresentationColor(self, IColor: ORSModel.ors.Color) → None

Sets the view’s representation color.

Note

This call is used to specify the color that represents the view

Parameters:IColor (ORSModel.ors.Color) – a color (an Color)
setXSize(self, xSize: int) → None

Sets the view X size.

Parameters:xSize (int) – the X size, in pixels (a uint16_t)
setYSize(self, ySize: int) → None

Sets the view Y size.

Parameters:ySize (int) – the Y size, in pixels (a uint16_t)
setZoomFactor(self, value: float) → None
Parameters:value (float) –

Visual

class ORSModel.ors.Visual

Bases: ORSModel.ors.Node

brief_description: An abstract class that handles all services pertaining to visualizing objects. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

getAction(self) → str
Returns:output (str) –
getAllParentViewsWhereVisualIsVisible(self) → List

Gets a list of views where the visual appears.

Returns:output (ORSModel.ors.List) – a list of views (an List)
getAssociatedState(self) → str
Returns:output (str) –
getBoundingBox(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → Box
Parameters:
Returns:

output (ORSModel.ors.Box) –

getBoundingBoxInView(self, aView: ORSModel.ors.View) → Box

Gets the bounding box of the visual in the orientation of the view.

Parameters:aView (ORSModel.ors.View) – the view (a View)
Returns:output (ORSModel.ors.Box) – the bounding box (a Box) or NULL if no view is provided
getBoundingRectangleInView(self, aView: ORSModel.ors.View) → Rectangle

Gets the bounding rectangle of the visual in the orientation of the view.

Parameters:aView (ORSModel.ors.View) – the view (a View)
Returns:output (ORSModel.ors.Rectangle) – the bounding Rectangle (a Rectangle) or NULL if no view is provided
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClipBox(timestep=0, display=None)

Gets the clip box of the visual

Parameters:
Returns:

aClipBox (ORSModel.ors.Box) – the clip box

getFirstFrameTowardsNode(self, anINode: ORSModel.ors.Node) → ReferenceFrame

Gets the first frame found going up the hierarchy towards a given object.

Parameters:anINode (ORSModel.ors.Node) – the target node (an Node)
Returns:output (ORSModel.ors.ReferenceFrame) – a frame (an ReferenceFrame) or NULL if no frame is found
getFrameTransformationFromNode(self, towardNode: ORSModel.ors.Node, pTimeStep: int) → Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getHighlightColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getIsHighlightable(self) → bool
Returns:output (bool) –
getIsHighlightedInView(self, aView: ORSModel.ors.View) → bool
Parameters:aView (ORSModel.ors.View) –
Returns:output (bool) –
getIsPickable(self) → bool

Gets the visual’s pickable state.

Returns:output (bool) – true if the visual is pickable, false otherwise
getIsSelected(self) → bool
Returns:output (bool) –
getIsShadowEnabled(self) → bool
Returns:output (bool) –
getIsVisibleForAllViews(self) → bool

Gets the visibility of the receiver in all views.

Returns:output (bool) – true if the receiver is visible is all views, false otherwise
getIsVisibleForView(self, IView: ORSModel.ors.View) → bool

Gets the visibility of the receiver in a given view.

Parameters:IView (ORSModel.ors.View) – the view (a View)
Returns:output (bool) – true if the receiver is visible, false otherwise
getMaterial(self) → Material

Gets the visual’s material.

Returns:output (ORSModel.ors.Material) – a material (an Material) or NULL is none exists
getPickTolerance(self) → float

Gets the pick tolerance.

Note

The pick tolerance is the radius, around any visual portion, where the mouse cursor can grab the visual. It’s expressed in pixels.

Returns:output (float) – a number of pixels (a double between 0 and 1)
getShowIn2D(self) → bool

Gets the visual visibility mode in 2D views.

Returns:output (bool) – true if the visual is visible in 2D views, false otherwise
getShowIn3D(self) → bool

Gets the visual visibility mode in 2D views.

Returns:output (bool) – true if the visual is visible in 2D views, false otherwise
getTSize(self) → int

Gets the T size.

Returns:output (int) – T size (a uint32_t)
getZEnabled(self) → bool

Gets the visual’s Z buffer state.

Note

Default value is true.

Note

Z buffering means that the renderer records pixel depth to hide geometry that is behind other geometry. When Z buffer is disabled, the visual is displayed above all geometry ALREADY RENDERED (this statement is important), even if it should not.

Returns:output (bool) – true if Z buffer is enabled, false otherwise
initializeVisual(self) → bool

Initializes the visual.

Returns:output (bool) –
none()

Visual.__init__() -> Visual

resetVisibility(self) → None
setAction(self, anAction: str) → None
Parameters:anAction (str) –
setAssociatedState(self, aGlobalState: str) → None
Parameters:aGlobalState (str) –
setHighlightColor(self, color: ORSModel.ors.Color) → None
Parameters:color (ORSModel.ors.Color) –
setIsHighlightable(self, value: bool) → None
Parameters:value (bool) –
setIsHighlightedInView(self, aView: ORSModel.ors.View, aFlag: bool) → None
Parameters:
setIsPickable(self, value: bool) → None

Sets the visual to be pickable or not.

Parameters:value (bool) – TRUE to make the visual pickable, false otherwise
setIsSelected(self, aBool: bool) → None
Parameters:aBool (bool) –
setIsShadowEnabled(self, value: bool) → None
Parameters:value (bool) –
setIsVisibleForAllViews(self, bValue: bool) → None

Sets the visibility of the receiver in all views.

Note

This API overrides all prior calls to setIsVisibleForViews(), or in other words, any view specific setting is erased.

Parameters:bValue (bool) – true to make the receiver visible in all views, false to hide it
setIsVisibleForView(self, IView: ORSModel.ors.View, bValue: bool) → None

Sets the visibility of the receiver in a given view.

Note

This API overrides a prior call to setIsVisibleForAllViews(), for a given view.

Parameters:
  • IView (ORSModel.ors.View) – the view (n View)
  • bValue (bool) – true to make the receiver visible, false to hide it
setMaterial(self, aIMaterial: ORSModel.ors.Material) → None

Sets the visual’s material.

Parameters:aIMaterial (ORSModel.ors.Material) – a material (an Material)
setPickTolerance(self, pValue: float) → None

Sets the pick tolerance.

Note

The pick tolerance is the radius, around any visual portion, where the mouse cursor can grab the visual. It’s expressed in pixels.

Parameters:pValue (float) – a number of pixels (a double between 0 and 1)
setShowIn2D(self, show: bool) → None

Sets the visual to be visible or not in 2D views.

Parameters:show (bool) – true to have the visual be visible in 2D views, false otherwise
setShowIn3D(self, show: bool) → None

Sets the visual to be visible or not in 3D views.

Parameters:show (bool) – true to have the visual be visible in 3D views, false otherwise
setTSize(self, pTSize: int) → None

Sets the T size.

Parameters:pTSize (int) – T size (a uint32_t)
setZEnabled(self, value: bool) → None

Sets the visual’s Z buffer state.

Note

Default value is true.

Note

Z buffering means that the renderer records pixel depth to hide geometry that is behind other geometry. When Z buffer is disabled, the visual is displayed above all geometry ALREADY RENDERED (this statement is important), even if it should not.

Parameters:value (bool) – true to enable the Z buffer, false to disable it
stackVisualState(self) → None

Saves the receiver’s visual state on a stack.

unstackVisualState(self) → None

Restores a visual state from a stack.

VisualAngle

class ORSModel.ors.VisualAngle

Bases: ORSModel.ors.Annotation

brief_description: Represents an angle and its measurement. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Aug 2006

fitFromPoints(self, count: int, points: float, iTIndex: int) → None

Gets the primitive to fit itself to a list of points.

Note

Points should be supplied in triplets, for respectively the X, Y and Z position.

Parameters:
  • count (int) – the number of triplets supplied (an uint32_t) (see note below)
  • points (float) – an array of points to fit to (a double*)
  • iTIndex (int) –
getAngleValue(self, iTIndex: int) → float

Gets the value of the angle.

Note

The angle value is always in radian.

Parameters:iTIndex (int) –
Returns:output (float) – the angle value (a float)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getIsSplitted(self, iTIndex: int) → bool

Queries the angle to see if it is splitted or not.

Note

A splitted angle is not joined at the center, it is the angle between two vectors.

Parameters:iTIndex (int) –
Returns:output (bool) – TRUE if the angle is splitted, FALSE otherwise (see note)
none()

VisualAngle.__init__() -> VisualAngle

setIsSplitted(self, value: bool, iTIndex: int) → None

Sets the angle to be splitted or not.

Note

A splitted angle is not joined at the center, it is the angle between two vectors.

Parameters:
  • value (bool) – TRUE to split the angle, FALSE otherwise (see note)
  • iTIndex (int) –

VisualArrow

class ORSModel.ors.VisualArrow

Bases: ORSModel.ors.Annotation

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFixedDirection(self) → float

Return the arrow’s fixed direction (in 3D only).

Returns:output (float) –
getFixedLength(self) → float

Return the arrow’s fixed length (in 3D only).

Returns:output (float) – the arrow length (a double), a normalized value between 0 and 1, representing the proportion of the arrow.
getIsFixedDirection(self) → bool

Queries the arrow to know if it has a fixed direction or not (in 3D only).

Returns:output (bool) – true if arrow has a fixed direction, false otherwise
getIsFixedLength(self) → bool

Queries the arrow to know if it has a fixed length or not (in 3D only).

Returns:output (bool) – true if arrow has a fixed length, false otherwise
getPositionOnVisual(self, iTIndex: int) → Vector3
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.Vector3) –
none()

VisualArrow.__init__() -> VisualArrow

setFixedDirection(self, dir: float) → None

Sets the arrow’s fixed direction (in 3D only).

Parameters:dir (float) – the arrow direction (a double), a value between 0 and 359, representing the rotation of the arrow.
setFixedLength(self, fLength: float) → None

Sets the arrow’s fixed length (in 3D only).

Parameters:fLength (float) – the arrow length (a double), a normalized value between 0 and 1, representing the proportion of the arrow.
setIsFixedDirection(self, bfixed: bool) → None

Sets the arrow to have a fixed direction or not (in 3D only).

Parameters:bfixed (bool) – true to have a fixed direction, false otherwise
setIsFixedLength(self, bfixed: bool) → None

Sets the arrow to have a fixed length or not (in 3D only).

Parameters:bfixed (bool) – true to have a fixed length, false otherwise
setIsPickingVisual(self, value: bool, iTIndex: int) → None
Parameters:
  • value (bool) –
  • iTIndex (int) –
setPositionOnVisual(self, x: float, y: float, z: float, iTIndex: int) → None
Parameters:
  • x (float) –
  • y (float) –
  • z (float) –
  • iTIndex (int) –
setPositionOnVisualForAllTimeStep(self, x: float, y: float, z: float) → None
Parameters:
  • x (float) –
  • y (float) –
  • z (float) –

VisualBox

class ORSModel.ors.VisualBox

Bases: ORSModel.ors.VisualShape3D

getBox(self, iTIndex: int) → Box
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.Box) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getGridRectangleSize(self) → float
Returns:output (float) –
getHighlightedBoxFace(self, faceIndex: int, iTIndex: int) → bool
Parameters:
  • faceIndex (int) –
  • iTIndex (int) –
Returns:

output (bool) –

getHighlightedBoxFaceCount(self, iTIndex: int) → int
Parameters:iTIndex (int) –
Returns:output (int) –
getIsMiddleAnchorHighlited(self, iTIndex: int) → bool
Parameters:iTIndex (int) –
Returns:output (bool) –
getPickedFace(self, iTIndex: int) → int
Parameters:iTIndex (int) –
Returns:output (int) –
getRangeMode(self, iTIndex: int) → bool
Parameters:iTIndex (int) –
Returns:output (bool) –
getSelectedBoxFace(self, faceIndex: int, iTIndex: int) → bool
Parameters:
  • faceIndex (int) –
  • iTIndex (int) –
Returns:

output (bool) –

getSelectedBoxFaceCount(self, iTIndex: int) → int
Parameters:iTIndex (int) –
Returns:output (int) –
getShowFaceAnchors(self) → bool
Returns:output (bool) –
getShowGrid(self) → bool
Returns:output (bool) –
none()

VisualBox.__init__() -> VisualBox

pickBoxFace(self, pDisplay: ORSModel.ors.View, xPixelPositionInDisplay: int, yPixelPositionInDisplay: int) → int
Parameters:
  • pDisplay (ORSModel.ors.View) –
  • xPixelPositionInDisplay (int) –
  • yPixelPositionInDisplay (int) –
Returns:

output (int) –

pickBoxMiddleAnchor(self, pDisplay: ORSModel.ors.View, xPixelPositionInDisplay: int, yPixelPositionInDisplay: int) → bool
Parameters:
  • pDisplay (ORSModel.ors.View) –
  • xPixelPositionInDisplay (int) –
  • yPixelPositionInDisplay (int) –
Returns:

output (bool) –

pickSpecificBoxFace(self, pDisplay: ORSModel.ors.View, faceIndex: int, xPixelPositionInDisplay: int, yPixelPositionInDisplay: int) → bool
Parameters:
  • pDisplay (ORSModel.ors.View) –
  • faceIndex (int) –
  • xPixelPositionInDisplay (int) –
  • yPixelPositionInDisplay (int) –
Returns:

output (bool) –

setBox(self, aBox: ORSModel.ors.Box, iTIndex: int) → None
Parameters:
setGridRectangleSize(self, aSize: float) → None
Parameters:aSize (float) –
setHighlightedBoxFace(self, faceIndex: int, iTIndex: int) → None
Parameters:
  • faceIndex (int) –
  • iTIndex (int) –
setIsMiddleAnchorHighlited(self, aValue: bool, iTIndex: int) → None
Parameters:
  • aValue (bool) –
  • iTIndex (int) –
setPickedFace(self, faceIndex: int, iTIndex: int) → None
Parameters:
  • faceIndex (int) –
  • iTIndex (int) –
setRangeMode(self, aFlag: bool, iTIndex: int) → None
Parameters:
  • aFlag (bool) –
  • iTIndex (int) –
setSelectedBoxFace(self, faceIndex: int, iTIndex: int) → None
Parameters:
  • faceIndex (int) –
  • iTIndex (int) –
setShowFaceAnchors(self, showFaceAnchors: bool) → None
Parameters:showFaceAnchors (bool) –
setShowGrid(self, flag: bool) → None
Parameters:flag (bool) –
unHighlightAllBoxFace(self, iTIndex: int) → None
Parameters:iTIndex (int) –
unSelectAllBoxFace(self, iTIndex: int) → None
Parameters:iTIndex (int) –

VisualCapsule

class ORSModel.ors.VisualCapsule

Bases: ORSModel.ors.VisualShape3D

getCapsule(self, iTIndex: int) → Capsule
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.Capsule) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

VisualCapsule.__init__() -> VisualCapsule

setCapsule(self, aCapsule: ORSModel.ors.Capsule, iTIndex: int) → None
Parameters:

VisualChannel

class ORSModel.ors.VisualChannel

Bases: ORSModel.ors.DatasetPresenter

brief_description: Represents a high quality visual volume in the view. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: Channel, VisualChannel, CxvChannel_Data_Type A visual object that represents a high quality volume. A high quality volume uses a volumetric texture instead of three stacks of 2D textures. Volume objects accept only channels of same size, spacing and type. The first channel connected to a volume will determine the size, spacing, and type of the volume. The volume supports up to 4 channels (rgba) ordered from the first parent (red) to the last (alpha). Missing channels are considered empty. Before it can be displayed, a volume must build its texture from the channels. This texture must be rebuilt every time the channels become dirty.

attachChannels(self, aChannel1: ORSModel.ors.Channel, aChannel2: ORSModel.ors.Channel, aChannel3: ORSModel.ors.Channel, aChannel4: ORSModel.ors.Channel) → bool

Attaches between 1 and 4 channels to the volume.

Note

A standard attachChild() with the channel is also performed by this method.

Note

The number of channels attached dictates the type of volume created: 1 channel results in a gray-scaled volume, 3 channels results in an RGB volume and 4 channels in an RGBA volume.

Parameters:
Returns:

output (bool) – true if attach operation succeeded, false otherwise

copyShapeFromChannel(self, pISourceChannel: ORSModel.ors.Channel) → None
Parameters:pISourceChannel (ORSModel.ors.Channel) –
detachChannel(self, anIChannel: ORSModel.ors.Channel) → bool

Detaches a child channel from the volume.

Note

A standard detachChild() from the channel is also performed by this method.

Parameters:anIChannel (ORSModel.ors.Channel) – a channel (a Channel)
Returns:output (bool) – true if detach was successful, false otherwise
eraseWindowLevelDataForView(self, aView: ORSModel.ors.View) → None

Erases the window level data specific to a given view.

Parameters:aView (ORSModel.ors.View) –
get2DLODEnabled(self) → bool
Returns:output (bool) –
get2DLODSlabEnabled(self) → bool
Returns:output (bool) –
get2DOpacityFactorForAllViews(self) → float

Gets the opacity of the volume for all views.

Note

An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque.

Returns:output (float) – the opacity value (a double, between 0 and 1)
get2DOpacityFactorForView(self, aView: ORSModel.ors.View) → float

Gets the opacity of the volume for a given view.

Note

An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque.

Parameters:aView (ORSModel.ors.View) – the view (a View)
Returns:output (float) – the opacity value (a double, between 0 and 1)
get2DWindowLevel2ValuesNormalized(self, pWindowWidth: float, pWindowCenter: float) → None

Gets the current second 2D window level values (width and center) normalized between 0 and 1.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Note

Return values are written to the supplied arguments.

Parameters:
  • pWindowWidth (float) –
  • pWindowCenter (float) –
get2DWindowLevelValuesNormalizedForAllViews(self, pWindowWidth: float, pWindowCenter: float) → None

Gets the current 3D window level values (width and center) normalized between 0 and 1, for all views.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Note

Return values are written to the supplied arguments.

Parameters:
  • pWindowWidth (float) –
  • pWindowCenter (float) –
get2DWindowLevelValuesNormalizedForView(self, aView: ORSModel.ors.View, pWindowWidth: float, pWindowCenter: float) → None

Gets the current 2D window level values (width and center) normalized between 0 and 1, for a given view.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Note

Return values are written to the supplied arguments.

Parameters:
  • aView (ORSModel.ors.View) – the view (a View)
  • pWindowWidth (float) –
  • pWindowCenter (float) –
get3DClassificationMode(self) → int
Returns:output (int) –
get3DOpacityFactorForAllViews(self) → float

Gets the opacity of the volume for all views.

Note

An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque.

Returns:output (float) – the opacity value (a double, between 0 and 1)
get3DOpacityFactorForView(self, aView: ORSModel.ors.View) → float

Gets the opacity of the volume for a given view.

Note

An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque.

Parameters:aView (ORSModel.ors.View) – the view (a View)
Returns:output (float) – the opacity value (a double, between 0 and 1)
get3DShadingModeForView(self, aView: ORSModel.ors.View) → int
Parameters:aView (ORSModel.ors.View) –
Returns:output (int) –
get3DWindowLevelValuesNormalizedForAllViews(self, pWindowWidth: float, pWindowCenter: float) → None

Gets the current 3D window level values (width and center) normalized between 0 and 1, for all views.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Note

Return values are written to the supplied arguments.

Parameters:
  • pWindowWidth (float) –
  • pWindowCenter (float) –
get3DWindowLevelValuesNormalizedForView(self, aView: ORSModel.ors.View, pWindowWidth: float, pWindowCenter: float) → None

Gets the current 2D window level values (width and center) normalized between 0 and 1, for a given view.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Note

Return values are written to the supplied arguments.

Parameters:
  • aView (ORSModel.ors.View) – the view (a View)
  • pWindowWidth (float) –
  • pWindowCenter (float) –
getBox(self) → Box
Returns:output (ORSModel.ors.Box) –
getCanCreateVolume(self, anIChannel: ORSModel.ors.Channel, nNbChannels: int) → bool

Returns true if a volume can be created with the given values.

Note

Some channels must be connected and channels type must be supported to create a volume.

Note

The second argument implies that all channels will be shaped similarly to the channel argument.

Note

supported channel types:

Parameters:
  • anIChannel (ORSModel.ors.Channel) – a channel (a Channel)
  • nNbChannels (int) – total number of channels (an unsigned char)
Returns:

output (bool) – true if a volume can be created, false otherwise

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEdgeContrastForAllViews(self) → bool
Returns:output (bool) –
getEdgeContrastForView(self, aView: ORSModel.ors.View) → bool
Parameters:aView (ORSModel.ors.View) –
Returns:output (bool) –
getFilteringMode(self) → int

Gets the current filtering mode.

Note

See CxvFiltering_Mode in ORS_def.h for supported filtering modes.

Returns:output (int) – the current filtering mode (a int32_t)
getGradientModeForAllViews(self) → int
Returns:output (int) –
getGradientModeForView(self, aView: ORSModel.ors.View) → int
Parameters:aView (ORSModel.ors.View) –
Returns:output (int) –
getHasSourceDataSameShapeAsChannel(self, pChannel: ORSModel.ors.Channel) → bool

Verifies if the visual’s source data has the same shape as another channel (see note below).

Note

Shape comparison includes axis sizes, spacing, type, position and orientation.

Parameters:pChannel (ORSModel.ors.Channel) – a comparison channel (a Channel)
Returns:output (bool) – true if the comparison channel has same shape as receiver visual, false otherwise
getInverseSegmentationLighting(self) → bool
Returns:output (bool) –
getIs2DRangeSelectionEnabled(self) → bool
Returns:output (bool) –
getIsoValueForAllViews(self) → float

Gets the IsoValue of the volume for all views.

Returns:output (float) – the iso value (a double, between 0 and 1)
getIsoValueForView(self, aView: ORSModel.ors.View) → float

Gets the IsoValue of the volume for a given view.

Parameters:aView (ORSModel.ors.View) – the view (a View)
Returns:output (float) – the iso value (a double, between 0 and 1)
getPixelIntensity(self, aView: ORSModel.ors.View, pXPos: int, pYPos: int, pIntensity: float) → bool

Gets the pixel intensity at any given screen coordinate, for a given view.

Parameters:
  • aView (ORSModel.ors.View) – a view (a View)
  • pXPos (int) – the X coordinate (a uint32_t)
  • pYPos (int) – the Y coordinate (a uint32_t)
  • pIntensity (float) –
Returns:

output (bool) –

getProjectionMode(self) → int

Gets the projection mode.

Note

See CxvVolumeProjection_Mode in ORS_def.h for supported volume projection modes.

Returns:output (int) – the projection mode (an int)
getSourceDataPosition(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getSourceDataXSize(self) → int

Gets the visual’s total X size.

Returns:output (int) – the X size (a uint32_t)
getSourceDataXSpacing(self) → float

Gets the visual’s X spacing.

Returns:output (float) – the X spacing (a double)
getSourceDataYSize(self) → int

Gets the visual’s total Y size.

Returns:output (int) – the Y size (a uint32_t)
getSourceDataYSpacing(self) → float

Gets the visual’s Y spacing.

Returns:output (float) – the Y spacing (a double)
getSourceDataZSize(self) → int

Gets the visual’s total Z size.

Returns:output (int) – the Z size (a uint32_t)
getSourceDataZSpacing(self) → float

Gets the visual’s Z spacing.

Returns:output (float) – the Z spacing (a double)
getSurfacenessThresholdForAllViews(self) → float
Returns:output (float) –
getSurfacenessThresholdForView(self, aView: ORSModel.ors.View) → float
Parameters:aView (ORSModel.ors.View) –
Returns:output (float) –
getUseHighQualityIn3D(self) → bool
Returns:output (bool) –
getUseTriCubicFilteringIn2D(self) → bool
Returns:output (bool) –
getUseTriCubicFilteringIn3D(self) → bool
Returns:output (bool) –
getWLGammaFactorForView(self, pDisplay: ORSModel.ors.View) → float

Gets the window leveling gamma factor of a specific view.

Parameters:pDisplay (ORSModel.ors.View) – the view (a View)
Returns:output (float) –
none()

VisualChannel.__init__() -> VisualChannel

reset2DWindowLevelForAllViews(self) → None

Resets the 3D window level for all views.

Note

If the volume’s channel has a suggested leveling value, it will be used, otherwise the leveling will be set to show the full range of data.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

reset2DWindowLevelForView(self, aView: ORSModel.ors.View) → None

Resets the 2D window level for a given view.

Note

If the volume’s channel has a suggested leveling value, it will be used, otherwise the leveling will be set to show the full range of data.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Parameters:aView (ORSModel.ors.View) – the view (a View)
reset3DWindowLevelForAllViews(self) → None

Resets the 3D window level for all views.

Note

If the volume’s channel has a suggested leveling value, it will be used, otherwise the leveling will be set to show the full range of data.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

reset3DWindowLevelForView(self, aView: ORSModel.ors.View) → None

Resets the 2D window level for a given view.

Note

If the volume’s channel has a suggested leveling value, it will be used, otherwise the leveling will be set to show the full range of data.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Parameters:aView (ORSModel.ors.View) – the view (a View)
set2DLODEnabled(self, value: bool) → None
Parameters:value (bool) –
set2DLODSlabEnabled(self, value: bool) → None
Parameters:value (bool) –
set2DOpacityFactorForAllViews(self, value: float) → None

Sets the opacity of the volume for all views.

Note

An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque.

Parameters:value (float) – the opacity value (a double, between 0 and 1)
set2DOpacityFactorForView(self, aView: ORSModel.ors.View, value: float) → None

Sets the opacity of the volume for a given view.

Note

An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque.

Parameters:
  • aView (ORSModel.ors.View) – the view (a View)
  • value (float) – the opacity value (a double, between 0 and 1)
set2DWindowLevel2ToShowFullRange(self) → None

Sets the second 2D window level to show the full range of data.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

set2DWindowLevelToShowFullRangeForAllViews(self) → None

Sets the 3D window level to show the full range of data, for all views.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

set2DWindowLevelToShowFullRangeForView(self, aView: ORSModel.ors.View) → None

Sets the 3D window level to show the full range of data, for a given view.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Parameters:aView (ORSModel.ors.View) – the view (a View)
set3DClassificationMode(self, aMode: int) → None
Parameters:aMode (int) –
set3DOpacityFactorForAllViews(self, value: float) → None

Sets the opacity of the volume for all views.

Note

An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque.

Parameters:value (float) – the opacity value (a double, between 0 and 1)
set3DOpacityFactorForView(self, aView: ORSModel.ors.View, value: float) → None

Sets the opacity of the volume for a given view.

Note

An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque.

Parameters:
  • aView (ORSModel.ors.View) – the view (a View)
  • value (float) – the opacity value (a double, between 0 and 1)
set3DShadingModeForView(self, aView: ORSModel.ors.View, aMode: int) → None
Parameters:
set3DWindowLevelToShowFullRangeForAllViews(self) → None

Sets the 3D window level to show the full range of data, for all views.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

set3DWindowLevelToShowFullRangeForView(self, aView: ORSModel.ors.View) → None

Sets the 3D window level to show the full range of data, for a given view.

Note

Volumes support two leveling modes, one for 3D views and the other for 2D views.

Parameters:aView (ORSModel.ors.View) – the view (a View)
setEdgeContrastForAllViews(self, value: bool) → None
Parameters:value (bool) –
setEdgeContrastForView(self, aView: ORSModel.ors.View, value: bool) → None
Parameters:
setFilteringMode(self, iMode: int) → None

Sets the current filtering mode.

Note

See CxvFiltering_Mode in ORS_def.h for supported filtering modes.

Parameters:iMode (int) – a filtering mode (a int32_t*)
setGradientModeForAllViews(self, aValue: int) → None
Parameters:aValue (int) –
setGradientModeForView(self, aView: ORSModel.ors.View, aValue: int) → None
Parameters:
setInverseSegmentationLighting(self, bInverse: bool) → None
Parameters:bInverse (bool) –
setIs2DRangeSelectionEnabled(self, pFlag: bool) → None
Parameters:pFlag (bool) –
setIsoValueForAllViews(self, value: float) → None

Sets the IsoValue of the volume for all views.

Parameters:value (float) – the iso value (a double, between 0 and 1)
setIsoValueForView(self, aView: ORSModel.ors.View, value: float) → None

Sets the IsoValue of the volume for a given view.

Parameters:
  • aView (ORSModel.ors.View) – the view (a View)
  • value (float) – the iso value (a double, between 0 and 1)
setPlaneChannelForView(self, pView: ORSModel.ors.View, pChannel: ORSModel.ors.Channel) → None
Parameters:
setProjectionMode(self, iMode: int) → None

Sets the projection mode.

Note

See CxvVolumeProjection_Mode in ORS_def.h for supported volume projection modes.

Parameters:iMode (int) – a projection mode (an int)
setRenderingEffect(self, effect: ORSModel.ors.RenderingEffect) → None

Sets the rendering effect to modify the 2d shader.

Parameters:effect (ORSModel.ors.RenderingEffect) – the effect (a RenderingEffect)
setSurfacenessThresholdForAllViews(self, value: float) → None
Parameters:value (float) –
setSurfacenessThresholdForView(self, aView: ORSModel.ors.View, value: float) → None
Parameters:
setUseHighQualityIn3D(self, value: bool) → None
Parameters:value (bool) –
setUseTriCubicFilteringIn2D(self, value: bool) → None
Parameters:value (bool) –
setUseTriCubicFilteringIn3D(self, value: bool) → None
Parameters:value (bool) –
setWLGammaFactorForView(self, pDisplay: ORSModel.ors.View, dVal: float) → None

Sets the window leveling gamma factor for a specific view.

Parameters:
  • pDisplay (ORSModel.ors.View) – the view (a View)
  • dVal (float) – the gamma value (a double)
shape

VisualColorBar

class ORSModel.ors.VisualColorBar

Bases: ORSModel.ors.Visual

brief_description: Used to present a ColorBar on the renderer. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2006 see: LookupTable Used to present a color bar on the renderer.

getAllViewsUsingLookupTable(self, aLUT: ORSModel.ors.LookupTable) → List
Parameters:aLUT (ORSModel.ors.LookupTable) –
Returns:output (ORSModel.ors.List) –
getBold(self) → bool

Gets the bold status of the color bar.

Returns:output (bool) – true if color bar is in bold, false otherwise
getBorder(self) → bool

Gets the border status of the color bar.

Returns:output (bool) – true if color bar has a border, false otherwise
getCanBeVisibleForAllViews(self) → bool

Gets whether or not the color bar can be visible.

Returns:output (bool) – true if color bar can be make visible, false otherwise
getCanBeVisibleForView(self, pView: ORSModel.ors.View) → bool

Gets whether or not the color bar can be visible.

Parameters:pView (ORSModel.ors.View) –
Returns:output (bool) – true if color bar can be make visible, false otherwise
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDecimalPrecision(self) → int

Gets the decimal precision of the color bar.

Returns:output (int) – the number of decimal places (an short)
getDrawTextShadow(self) → bool

Gets if the scale bar is showing text shadow.

Returns:output (bool) – TRUE if text shadows are visible, FALSE otherwise
getHeightAsViewFractionForAllViews(self) → float
Returns:output (float) –
getHeightAsViewFractionForView(self, pView: ORSModel.ors.View) → float
Parameters:pView (ORSModel.ors.View) –
Returns:output (float) –
getIsEnabledForAllViews(self) → bool
Returns:output (bool) –
getIsEnabledForView(self, pView: ORSModel.ors.View) → bool
Parameters:pView (ORSModel.ors.View) –
Returns:output (bool) –
getIsHorizontal(self) → bool
Returns:output (bool) –
getIsVertical(self) → bool
Returns:output (bool) –
getItalic(self) → bool

Gets the italic status of the color bar.

Returns:output (bool) – true if color bar is italic, false otherwise
getLineThickness(self) → float
Returns:output (float) –
getLookupTableForAllViews(self) → LookupTable
Returns:output (ORSModel.ors.LookupTable) –
getLookupTableForView(self, pView: ORSModel.ors.View) → LookupTable
Parameters:pView (ORSModel.ors.View) –
Returns:output (ORSModel.ors.LookupTable) –
getMaxAnchorHighlighted(self) → bool
Returns:output (bool) –
getMinAnchorHighlighted(self) → bool
Returns:output (bool) –
getOffset(self) → float

Gets the color bar offset.

Returns:output (float) – the offset (a float)
getPositionForAllViews(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getPositionForView(self, pView: ORSModel.ors.View) → Vector3
Parameters:pView (ORSModel.ors.View) –
Returns:output (ORSModel.ors.Vector3) –
getRangeDimensionUnitForAllViews(self) → int
Returns:output (int) –
getRangeDimensionUnitForView(self, pView: ORSModel.ors.View) → int
Parameters:pView (ORSModel.ors.View) –
Returns:output (int) –
getRangeMaxForAllViews(self) → float
Returns:output (float) –
getRangeMaxForView(self, pView: ORSModel.ors.View) → float
Parameters:pView (ORSModel.ors.View) –
Returns:output (float) –
getRangeMinForAllViews(self) → float
Returns:output (float) –
getRangeMinForView(self, pView: ORSModel.ors.View) → float
Parameters:pView (ORSModel.ors.View) –
Returns:output (float) –
getSlope(self) → float

Gets the color bar slope.

Returns:output (float) – the slope (a float)
getTextColor(self) → Color

Gets the text color of the color bar.

Returns:output (ORSModel.ors.Color) – a color object (an Color)
getTextFontName(self) → str
Returns:output (str) –
getTextFontSize(self) → float

Gets the text font size, in screen one thousandths.

Returns:output (float) – the font size (a double between 0 and 1)
getTextMinimumFontSize(self) → int

Gets the minimum text font size, in font points.

Returns:output (int) – the font size
getTextShadowColor(self) → Color

Gets the text shadow color of the color bar.

Returns:output (ORSModel.ors.Color) – a color object (an Color)
getTickCount(self) → int

Gets the number of visible ticks on the color bar.

Returns:output (int) – the number of ticks (an short)
getTransparent(self) → bool

Gets the transparency status of the color bar.

Returns:output (bool) – true if color bar is transparent, false otherwise
getWidthAsViewFractionForAllViews(self) → float
Returns:output (float) –
getWidthAsViewFractionForView(self, pView: ORSModel.ors.View) → float
Parameters:pView (ORSModel.ors.View) –
Returns:output (float) –
none()

VisualColorBar.__init__() -> VisualColorBar

pickAnchor(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) → int
Parameters:
  • pView (ORSModel.ors.View) –
  • xPixelPositionInView (int) –
  • yPixelPositionInView (int) –
Returns:

output (int) –

setBold(self, value: bool) → None

Sets the color bar to be bold or not.

Parameters:value (bool) – TRUE to be in bold, FALSE otherwise
setBorder(self, value: bool) → None

Sets the color bar to have a border or not.

Parameters:value (bool) – true to have a border, false otherwise
setCanBeVisibleForAllViews(self, aValue: bool) → None

Sets whether or not the color bar can be visible.

Parameters:aValue (bool) – true if color bar can be make visible, false otherwise
setCanBeVisibleForView(self, pView: ORSModel.ors.View, aValue: bool) → None

Sets whether or not the color bar can be visible.

Parameters:
  • pView (ORSModel.ors.View) – true if color bar can be make visible, false otherwise
  • aValue (bool) –
setCanBeVisibleForViewLogged(view, flag, logging=True)
setDecimalPrecision(self, value: int) → None

Sets the decimal precision of the color bar.

Parameters:value (int) – the number of decimal places (an unsigned short)
setDefaultPosition(self, x: float, y: float) → None

Sets the default position of the color bar.

Parameters:
  • x (float) – the X coordinate (a double)
  • y (float) – the Y coordinate (a double)
setDrawTextShadow(self, bFlag: bool) → None

Toggles displaying shadows for the text.

Parameters:bFlag (bool) – true to show text shadows, false otherwise
setHeightAsViewFractionForAllViews(self, aValue: float) → None
Parameters:aValue (float) –
setHeightAsViewFractionForView(self, pView: ORSModel.ors.View, aValue: float) → None
Parameters:
setIsEnabledForAllViews(self, aValue: bool) → None
Parameters:aValue (bool) –
setIsEnabledForView(self, pView: ORSModel.ors.View, aValue: bool) → None
Parameters:
setIsHorizontal(self, bHorizontal: bool) → None
Parameters:bHorizontal (bool) –
setItalic(self, value: bool) → None

Sets the color bar to be italic or not.

Parameters:value (bool) – true to be italic, false otherwise
setLineThickness(self, value: float) → None
Parameters:value (float) –
setLookupTableForAllViews(self, aLUT: ORSModel.ors.LookupTable) → None
Parameters:aLUT (ORSModel.ors.LookupTable) –
setLookupTableForView(self, pView: ORSModel.ors.View, aLUT: ORSModel.ors.LookupTable) → None
Parameters:
setLookupTableForViewLogged(view, lut, logging=True)
setMaxAnchorHighlighted(self, aFlag: bool) → None
Parameters:aFlag (bool) –
setMinAnchorHighlighted(self, aFlag: bool) → None
Parameters:aFlag (bool) –
setOffset(self, anOffset: float) → None

Sets the color bar offset.

Parameters:anOffset (float) – the offset (a float)
setOrientationToHorizontalForAllViews(self) → None
setOrientationToHorizontalForView(self, pView: ORSModel.ors.View) → None
Parameters:pView (ORSModel.ors.View) –
setOrientationToVerticalForAllViews(self) → None
setOrientationToVerticalForView(self, pView: ORSModel.ors.View) → None
Parameters:pView (ORSModel.ors.View) –
setPositionForAllViews(self, aPoint: ORSModel.ors.Vector3) → None
Parameters:aPoint (ORSModel.ors.Vector3) –
setPositionForView(self, pView: ORSModel.ors.View, aPoint: ORSModel.ors.Vector3) → None

Set the color bar position in view.

Parameters:
setPositionVerticalForAllViews(self, aPoint: ORSModel.ors.Vector3) → None
Parameters:aPoint (ORSModel.ors.Vector3) –
setRangeDimensionUnitForAllViews(self, value: int) → None
Parameters:value (int) –
setRangeDimensionUnitForView(self, pView: ORSModel.ors.View, value: int) → None
Parameters:
setRangeForAllViews(self, min: float, max: float, unit: int) → None
Parameters:
  • min (float) –
  • max (float) –
  • unit (int) –
setRangeForView(self, pView: ORSModel.ors.View, min: float, max: float, unit: int) → None
Parameters:
setSlope(self, aSlope: float) → None

Sets the color bar slope.

Parameters:aSlope (float) – the slope (a float)
setTextColor(self, IColor: ORSModel.ors.Color) → None

Sets the text color of the color bar.

Parameters:IColor (ORSModel.ors.Color) – a color object (an Color) its item color.
setTextFontName(self, sFontName: str) → None

Sets the text font name.

Parameters:sFontName (str) – the font name (a string)
setTextFontSize(self, fontSize: float) → None

Sets the text font size, in screen one thousandths.

Parameters:fontSize (float) – the font size (a double between 0 and 1)
setTextMinimumFontSize(self, fontSize: int) → None

Sets the minimum font size, in font points.

Parameters:fontSize (int) – the font size
setTextShadowColor(self, IColor: ORSModel.ors.Color) → None

Sets the text shadow color of the color bar.

Parameters:IColor (ORSModel.ors.Color) – a color object (an Color)
setTickCount(self, value: int) → None

Sets the number of visible ticks on the color bar.

Parameters:value (int) – the number of ticks (an unsigned short)
setTransparent(self, value: bool) → None

Sets the color bar to be transparent or not.

Parameters:value (bool) – true to be transparent, false otherwise
setWidthAsViewFractionForAllViews(self, aValue: float) → None
Parameters:aValue (float) –
setWidthAsViewFractionForView(self, pView: ORSModel.ors.View, aValue: float) → None
Parameters:
updateRampForAllViews(self) → None
updateRampForView(self, pView: ORSModel.ors.View) → None
Parameters:pView (ORSModel.ors.View) –

VisualCylinder

class ORSModel.ors.VisualCylinder

Bases: ORSModel.ors.VisualShape3D

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCylinder(self, iTIndex: int) → Cylinder
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.Cylinder) –
none()

VisualCylinder.__init__() -> VisualCylinder

setCylinder(self, aCylinder: ORSModel.ors.Cylinder, iTIndex: int) → None
Parameters:

VisualGraph

class ORSModel.ors.VisualGraph

Bases: ORSModel.ors.Visual

brief_description: A visual that represents a author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: Dec 2017 A visual that represents a VisualGraph.

getBoundingBoxPlusEpsilon(timestep, worldMatrix, epsilon=0.01)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCurrentAlphaFuncValue(self) → int

Sets the transparency of the graph.

Returns:output (int) – a value from 0 to 255
getCurrentEdgeScalarValueMapping(self) → str

Gets the current scalar values mapping type for edge.

Note

Graph vertex support “LUT” and “Radius” mapping

Returns:output (str) – the current scalar values edge mapping type
getCurrentEdgeScalarValuesSlotForRadius(self) → int
Returns:output (int) –
getCurrentVertexScalarValueMapping(self) → str

Gets the current scalar values mapping type for vertex.

Note

Graph vertex support “LUT” and “Radius” mapping

Returns:output (str) – the current scalar values vertex mapping type
getCurrentVertexScalarValuesSlotForRadius(self) → int
Returns:output (int) –
getEdgesVisibleMax(self) → float
Returns:output (float) –
getEdgesVisibleMin(self) → float
Returns:output (float) –
getEdgesWidth(self) → float
Returns:output (float) –
getOpacity(self) → float

Gets the opacity of the graph.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The graph does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getOpacityInRange(self) → float

Gets the opacity for selected area of the graph.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The graph does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getOpacityOutRange(self) → float

Gets the opacity for unselected area of the graph.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The graph does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getUseEdgeScalarRealScaleForRadius(self) → bool

Gets if current scalar values are used as real edge radius size when rendering it.

Returns:output (bool) – true if it use scalar value for the real scale of edge radius
getUseLighting(self) → bool

Gets the graph lighting mode.

Returns:output (bool) – true if lighting is on, false otherwise
getUseVertexScalarRealScaleForRadius(self) → bool

Gets if current scalar values are used as real vertex radius size when rendering it.

Returns:output (bool) – true if it use scalar value for the real scale of vertex radius
getVertexSizeFactor(self) → float
Returns:output (float) –
getVertexVisibleMax(self) → float
Returns:output (float) –
getVertexVisibleMin(self) → float
Returns:output (float) –
none()

VisualGraph.__init__() -> VisualGraph

setCurrentEdgeScalarValueMapping(self, sMappingType: str) → None

Sets the current scalar values mapping type for edge.

Note

Graph vertex support “LUT” and “Radius” mapping

Parameters:sMappingType (str) – string with the mapping value type
setCurrentEdgeScalarValuesSlotForRadius(self, slotIndex: int) → None
Parameters:slotIndex (int) –
setCurrentVertexScalarValueMapping(self, sMappingType: str) → None

Sets the current scalar values mapping type for vertex.

Note

Graph vertex support “LUT” and “Radius” mapping

Parameters:sMappingType (str) – string with the mapping value type
setCurrentVertexScalarValuesSlotForRadius(self, slotIndex: int) → None
Parameters:slotIndex (int) –
setEdgesVisibleMax(self, pValue: float) → None
Parameters:pValue (float) –
setEdgesVisibleMin(self, pValue: float) → None
Parameters:pValue (float) –
setEdgesWidth(self, width: float) → None
Parameters:width (float) –
setOpacity(self, value: float) → None

Sets the opacity for unselected range of the graph.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The graph does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setOpacityInRange(self, value: float) → None

Sets the opacity of the graph.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The graph does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setOpacityOutRange(self, value: float) → None

Sets the opacity of the graph.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The graph does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setShowIn2DDuringMotion(bShow)
setUseEdgeScalarRealScaleForRadius(self, useRealScale: bool) → None

Sets current scalar values as real edge radius size when rendering it.

Parameters:useRealScale (bool) – true to use scalar value for the real scale of edge radius
setUseLighting(self, useLighting: bool) → None

Sets the graph lighting mode.

Parameters:useLighting (bool) – true to use lighting, false otherwise
setUseVertexScalarRealScaleForRadius(self, useRealScale: bool) → None

Sets current scalar values as real vextex radius size when rendering it.

Parameters:useRealScale (bool) – true to use scalar value for the real scale of vertex radius
setVertexSizeFactor(self, factor: float) → None
Parameters:factor (float) –
setVertexVisibleMax(self, pValue: float) → None
Parameters:pValue (float) –
setVertexVisibleMin(self, pValue: float) → None
Parameters:pValue (float) –

VisualGrid

class ORSModel.ors.VisualGrid

Bases: ORSModel.ors.Visual

brief_description: Represents a grid in a display. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: View Represents a grid in the display.

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

VisualGrid.__init__() -> VisualGrid

VisualLabel

class ORSModel.ors.VisualLabel

Bases: ORSModel.ors.Annotation

brief_description: Represents a label, which is used to associate text to other objects. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Aug 2006

getBindedNode(self) → Node

Gets the node associated to the label.

Note

A label can thus be associated to any node.

Returns:output (ORSModel.ors.Node) – a node (an Node)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getIsCollapsed(self, iTIndex: int) → bool

Gets the label’s collapsed status.

Parameters:iTIndex (int) –
Returns:output (bool) – TRUE if label is collapsed, FALSE if it’s expanded
getLabelSortMode(self) → int

Gets the label sort mode (see note).

Note

3 modes are currently supported:

Returns:output (int) – the sort mode (an short)
getLabelTextFontName(self) → str
Returns:output (str) –
getLabelTextFontSize(self) → int

Gets the font size.

Returns:output (int) – the font size (a short)
getPickPlusMinus(self, iTIndex: int) → bool

Queries the label to know if the plus/minus sign is picked.

Parameters:iTIndex (int) – TRUE if mouse is over the plus/minus sign, FALSE otherwise
Returns:output (bool) –
getShowLines(self) → bool

Gets the label lines visibility.

Note

This represents the line between the label and the object it points to.

Returns:output (bool) – TRUE if lines are shown, FALSE otherwise
moveLabelToCursorPositionInDisplay(self, pDisplay: ORSModel.ors.View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → None

Moves the label to the current cursor position in a given display.

Parameters:
  • pDisplay (ORSModel.ors.View) –
  • pixelXPositionInDisplay (int) –
  • pixelYPositionInDisplay (int) –
none()

VisualLabel.__init__() -> VisualLabel

setForBWRendering(self) → None

Sets the Label to be rendered in Black & White.

setForNormalRendering(self) → None

Sets the Label to be rendered normally.

setHasBindedNode(self, bValue: bool) → None

Sets the label as being associated to its parent node.

Note

A label can thus be associated to any node.

Parameters:bValue (bool) – TRUE to be associated, FALSE otherwise
setIsCollapsed(self, bValue: bool, iTIndex: int) → None

Sets the label to be collapsed or expanded.

Parameters:
  • bValue (bool) – TRUE to collapse the label, FALSE to expand it
  • iTIndex (int) –
setLabelSortMode(self, iMode: int) → None

Sets the label sort mode (see note).

Note

3 modes are currently supported:

Parameters:iMode (int) – the sort mode (an unsigned short)
setLabelTextFontName(self, sName: str) → None

Sets the text font name of the label.

Parameters:sName (str) – the font name (a string)
setLabelTextFontSize(self, pValue: int) → None

Sets the font size.

Parameters:pValue (int) – the font size (a short)
setPositionInDisplay(self, IDisplay: ORSModel.ors.View, xPos: float, yPos: float) → None

Sets the position of the receiver in a given display.

Parameters:
  • IDisplay (ORSModel.ors.View) – a display (an View)
  • xPos (float) – the X position (a double)
  • yPos (float) – the Y position (a double)
setShowLines(self, value: bool) → None

Sets the label lines visibility.

Note

This controls the line between the label and the object it points to.

Parameters:value (bool) – TRUE to show the line, FALSE to hide them

VisualLegend

class ORSModel.ors.VisualLegend

Bases: ORSModel.ors.VisualColorBar

brief_description: Used to present a legend on the renderer. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2006 see: LookupTable Used to present a legend on the renderer.

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getLabelAtIndex(self, index: int) → str
Parameters:index (int) –
Returns:output (str) –
getLabelCount(self) → int
Returns:output (int) –
getViewOrderAtIndex(self, index: int) → int
Parameters:index (int) –
Returns:output (int) –
getViewOrderSize(self) → int
Returns:output (int) –
none()

VisualLegend.__init__() -> VisualLegend

setLabelAtIndex(self, index: int, label: str) → None
Parameters:
  • index (int) –
  • label (str) –
setLabelCount(self, labelCount: int) → None
Parameters:labelCount (int) –
setViewOrderAtIndex(self, index: int, viewOrder: int) → None
Parameters:
  • index (int) –
  • viewOrder (int) –
setViewOrderSize(self, iNewSize: int) → None
Parameters:iNewSize (int) –

VisualMesh

class ORSModel.ors.VisualMesh

Bases: ORSModel.ors.Visual

getBoundingBoxPlusEpsilon(timestep, worldMatrix, epsilon=0.01)
getBuildOctree(self) → bool
Returns:output (bool) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCullMode(self) → int

Gets the culling mode of the mesh.

Note

See the enum CxvMeshCull_Mode in ORS_def.h for valid values.

Returns:output (int) – the mode (a int32_t)
getCurrentAlphaFuncValue(self) → int

Sets the transparency of the mesh.

Returns:output (int) – a value from 0 to 255
getFillModeForAllViews(self) → int

Gets the mesh fill mode.

Note

See the enum CxvMeshFill_Mode in ORS_def.h for valid values.

Returns:output (int) – the fill mode (a int32_t)
getFillModeForView(self, pView: ORSModel.ors.View) → int

Gets the mesh fill mode.

Note

See the enum CxvMeshFill_Mode in ORS_def.h for valid values.

Parameters:pView (ORSModel.ors.View) – a view (a View)
Returns:output (int) – the fill mode (a int32_t)
getIsFillModePoint(self, pView: ORSModel.ors.View) → bool

Queries the mesh to know if it is in point mode.

Parameters:pView (ORSModel.ors.View) – a view (a View)
Returns:output (bool) – true if in point mode, false otherwise
getIsFillModeSolid(self, pView: ORSModel.ors.View) → bool

Queries the mesh to know if it is in solid mode.

Parameters:pView (ORSModel.ors.View) – a view (a View)
Returns:output (bool) – true if in solid mode, false otherwise
getIsFillModeWireFrame(self, pView: ORSModel.ors.View) → bool

Queries the mesh to know if it is in wire frame mode.

Parameters:pView (ORSModel.ors.View) –
Returns:output (bool) – true if wire frame, false otherwise
getIsPerVertexTransparent(self) → bool

Gets the status of transparency.

Note

If this setting is used, make sure that each vertex has a color defined as RGBA.

Returns:output (bool) – true if the transparency is being read from the RGBA color, false otherwise
getIsTransparent(self) → bool

Gets the transparency state of the mesh.

Returns:output (bool) – true if mesh is transparent, false otherwise
getOpacity(self) → float

Gets the opacity of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getOpacityInRange(self) → float

Gets the opacity for selected area of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getOpacityOutRange(self) → float

Gets the opacity for unselected area of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getShowColorIn2D(self) → bool
Returns:output (bool) –
getShowIn2DDuringMotion(self) → bool

Gets the visibility of the mesh in 2D views during mouse motion.

Returns:output (bool) – true if the mesh is visible in 2D views during mouse movement, false otherwise
getThickness(self) → float

Gets the thickness of lines in 2D mode.

Returns:output (float) – the thickness, in pixel units (an double)
getUseLighting(self) → bool

Gets the mesh lighting mode.

Returns:output (bool) – true if lighting is on, false otherwise
getWorldTransform(timestep=0)

Get the Matrix4x4 for transforming from local to world coordinates

Parameters:timestep (int) –
Return:
Rtype:ORSModel.ors.Matrix4x4
none()

VisualMesh.__init__() -> VisualMesh

setBuildOctree(self, value: bool) → None
Parameters:value (bool) –
setCullMode(self, iMode: int) → None

Sets the culling mode for the mesh.

Note

See the enum CxvMeshCull_Mode in ORS_def.h for valid values.

Parameters:iMode (int) – a mode (a int32_t*)
setCurrentAlphaFuncValue(self, value: int) → None
Parameters:value (int) –
setFillModeForAllViews(self, pFillMode: int) → None

Sets the mesh fill mode.

Note

See the enum CxvMeshFill_Mode in ORS_def.h for valid values.

Parameters:pFillMode (int) – the fill mode (a int32_t*)
setFillModeForView(self, pView: ORSModel.ors.View, pFillMode: int) → None

Sets the mesh fill mode.

Note

See the enum CxvMeshFill_Mode in ORS_def.h for valid values.

Parameters:
  • pView (ORSModel.ors.View) – a view (a View)
  • pFillMode (int) – the fill mode (a int32_t*)
setIsPerVertexTransparent(self, value: bool) → None

Sets the transparency to be read from the RGBA vertex color.

Note

If this setting is used, make sure that each vertex has a color defined as RGBA.

Parameters:value (bool) – true to use the transparency from the RGBA color, false to use the global transparency
setIsTransparent(self, value: bool) → None

Sets the transparency of the mesh.

Parameters:value (bool) – true to make it transparent, false otherwise
setOpacity(self, value: float) → None

Sets the opacity for unselected range of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setOpacityInRange(self, value: float) → None

Sets the opacity of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setOpacityOutRange(self, value: float) → None

Sets the opacity of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setShowColorIn2D(self, value: bool) → None
Parameters:value (bool) –
setShowIn2DDuringMotion(self, pValue: bool) → None

Sets the mesh to be visible or not in 2D views, during mouse motion.

Parameters:pValue (bool) – true to have the mesh be visible in 2D views during mouse movement, false otherwise
setThickness(self, value: float) → None

Sets the thickness of lines in 2D mode.

Parameters:value (float) – the thickness, in pixel units (an double)
setUseLighting(self, useLighting: bool) → None

Sets the mesh lighting mode.

Parameters:useLighting (bool) – true to use lighting, false otherwise

VisualOverlay

class ORSModel.ors.VisualOverlay

Bases: ORSModel.ors.Visual

brief_description: Represents a 2D image as a visual in the 3D space. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: VisualText Represents a 2D image as a visual in the 3D space. Textures can come from resources or files. Supported file formats are: bmp, dds, dib, hdr, jpg, pfm, png, ppm and tga.

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getExtent(self) → Vector3

Gets the extent of the overlay.

Returns:output (ORSModel.ors.Vector3) – an extent (an Vector3)
getExtentInBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle) → Vector3
Parameters:aBoundedPlane (ORSModel.ors.Rectangle) –
Returns:output (ORSModel.ors.Vector3) –
getHighlightedAnchor(self, anchorIndex: int) → bool
Parameters:anchorIndex (int) –
Returns:output (bool) –
getHighlightedAnchorCount(self) → int
Returns:output (int) –
getHighlightedBorder(self, borderIndex: int) → bool
Parameters:borderIndex (int) –
Returns:output (bool) –
getHighlightedBorderCount(self) → int
Returns:output (int) –
getIsSelectedAndShapeAndPositionEditionEnabled(self) → bool
Returns:output (bool) –
getIsShapeAndPositionEditable(self) → bool
Returns:output (bool) –
getIsShapeAndPositionEditionEnabled(self) → bool
Returns:output (bool) –
getKeepAspectRatio(self) → bool
Returns:output (bool) –
getMaximumPixelSize(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getMinimumPixelSize(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getOpacity(self) → float

Gets the opacity of the overlay.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Returns:output (float) – the opacity (a float)
getOverlayMode(self) → int
Returns:output (int) –
getPosition(self) → Vector3

Gets the position of the overlay.

Returns:output (ORSModel.ors.Vector3) – a position (an Vector3)
getPositionInBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle) → Vector3
Parameters:aBoundedPlane (ORSModel.ors.Rectangle) –
Returns:output (ORSModel.ors.Vector3) –
getPreserveGeometry(self) → bool
Returns:output (bool) –
getRenderingRectangle(self, aView: ORSModel.ors.View) → Rectangle
Parameters:aView (ORSModel.ors.View) –
Returns:output (ORSModel.ors.Rectangle) –
getSelectedColor(self) → Color

Gets the selected color of the overlay.

Returns:output (ORSModel.ors.Color) – the color (a Color)
getShapeAndPositionEditionAssociatedState(self) → str
Returns:output (str) –
none()

VisualOverlay.__init__() -> VisualOverlay

pickAnchor(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) → int
Parameters:
  • pView (ORSModel.ors.View) –
  • xPixelPositionInView (int) –
  • yPixelPositionInView (int) –
Returns:

output (int) –

pickBorder(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) → int
Parameters:
  • pView (ORSModel.ors.View) –
  • xPixelPositionInView (int) –
  • yPixelPositionInView (int) –
Returns:

output (int) –

setExtent(self, aVect: ORSModel.ors.Vector3) → None

Sets the extent of the overlay.

Parameters:aVect (ORSModel.ors.Vector3) – an extent (an Vector3)
setHighlightedAnchor(self, anchorIndex: int) → None
Parameters:anchorIndex (int) –
setHighlightedBorder(self, borderIndex: int) → None
Parameters:borderIndex (int) –
setIsShapeAndPositionEditable(self, value: bool) → None
Parameters:value (bool) –
setIsShapeAndPositionEditionEnabled(self, value: bool) → None
Parameters:value (bool) –
setKeepAspectRatio(self, aValue: bool) → None
Parameters:aValue (bool) –
setMaximumPixelSize(self, aVect: ORSModel.ors.Vector3) → None
Parameters:aVect (ORSModel.ors.Vector3) –
setMinimumPixelSize(self, aVect: ORSModel.ors.Vector3) → None
Parameters:aVect (ORSModel.ors.Vector3) –
setOpacity(self, value: float) → None

Sets the opacity of the overlay.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Parameters:value (float) – an opacity value (a float)
setOverlayMode(self, aMode: int) → None
Parameters:aMode (int) –
setPosition(self, pPosition: ORSModel.ors.Vector3) → None

Sets the position of the overlay.

Parameters:pPosition (ORSModel.ors.Vector3) – a position (an Vector3)
setPreserveGeometry(self, aValue: bool) → None
Parameters:aValue (bool) –
setSelectedColor(self, IColor: ORSModel.ors.Color) → None

Sets the selected color of the overlay.

Parameters:IColor (ORSModel.ors.Color) – the color (a Color)
setShapeAndPositionEditionAssociatedState(self, aState: str) → None
Parameters:aState (str) –
unHighlightAllAnchor(self) → None
unHighlightAllBorder(self) → None

VisualPath

class ORSModel.ors.VisualPath

Bases: ORSModel.ors.Annotation

brief_description: Represents a path. A path is composed of a series of points. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Aug 2006

addPathMarker(self, parameter: float, iTIndex: int) → None
Parameters:
  • parameter (float) –
  • iTIndex (int) –
addPoint(self, pPoint: ORSModel.ors.Vector3, iTIndex: int) → None

Adds a point.

Note

Points are manual, while control points are automatic, i.e. the control points will end up generating individual points (on the Bezier curve).

Note

Any change to a primitive should be followed by update() to reflect the changes visually.

Parameters:
addPointForAllTimeStep(self, pPoint: ORSModel.ors.Vector3) → None
Parameters:pPoint (ORSModel.ors.Vector3) –
addPointForControlPoint(self, controlPointIndex: int, iTIndex: int, aPoint: ORSModel.ors.Vector3) → None
Parameters:
applyConvolution(self, aKernel: ORSModel.ors.ConvolutionKernel, timeStep: int) → None

Apply the kernel to the path position.

Parameters:
clearAll(self, iTIndex: int) → None

Clears all points and control points.

Note

Any change to a primitive should be followed by update() to reflect the changes visually.

Parameters:iTIndex (int) –
clearAllForAllTimeStep(self) → None
closestPointOnPathInCurvedOnScreen(self, pView: ORSModel.ors.View, pixelXPositionInView: int, pixelYPositionInView: int) → int
Parameters:
  • pView (ORSModel.ors.View) –
  • pixelXPositionInView (int) –
  • pixelYPositionInView (int) –
Returns:

output (int) –

getAllCurvedViewsOfPath(self) → List
Returns:output (ORSModel.ors.List) –
getAllShortAxialViewsOfPath(self) → List
Returns:output (ORSModel.ors.List) –
getArea(self, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4) → float

Returns the area of the path.

Note

If the path is not closed, this method returns 0

Parameters:
Returns:

output (float) – the area of the path (a double)

getBezierSamplingLength(self) → float
Returns:output (float) –
getBuildOctree(self) → bool
Returns:output (bool) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getControlPointIndexFromPointIndex(self, id: int, iTIndex: int) → int
Parameters:
  • id (int) –
  • iTIndex (int) –
Returns:

output (int) –

getControlPointPositionsList(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pIndicesArray: ORSModel.ors.ArrayLong) → ArrayDouble

Batch gets of given control point’s coordinates by indices.

Note

Points are manual, while control points are automatic, i.e. the control points will end up generating individual points (on the Bezier curve).

Note

Control point indicies are zero based.

Note

If indices array is NULL, this method assumes an array of all indices.

Parameters:
Returns:

output (ORSModel.ors.ArrayDouble) – safearray of triplet of the X Y Z position of the point ( double )

getControlPointRadiusAtIndex(self, index: int, iTIndex: int) → float
Parameters:
  • index (int) –
  • iTIndex (int) –
Returns:

output (float) –

getCurrentPointIndex(self) → int
Returns:output (int) –
getDistanceAlongPathBetweenPosition(self, s0: float, s1: float, iTIndex: int) → float
Parameters:
  • s0 (float) –
  • s1 (float) –
  • iTIndex (int) –
Returns:

output (float) –

getDistanceBetweenPosition(self, s0: float, s1: float, iTIndex: int, pMatrix: ORSModel.ors.Matrix4x4) → float
Parameters:
Returns:

output (float) –

getHideLine(self) → bool
Returns:output (bool) –
getHightlightedPathMarkerIndex(self) → int
Returns:output (int) –
getIndexOfClosestPoint(self, aTransformationMatrix: ORSModel.ors.Matrix4x4, pointToCompareTo: ORSModel.ors.Vector3, iTIndex: int) → int
Parameters:
Returns:

output (int) –

getIndexOfFarthestPoint(self, aTransformationMatrix: ORSModel.ors.Matrix4x4, pointToCompareTo: ORSModel.ors.Vector3, iTIndex: int) → int
Parameters:
Returns:

output (int) –

getIndexOfPathMarkerWithCaption(self, aCaption: str, iTIndex: int) → int
Parameters:
  • aCaption (str) –
  • iTIndex (int) –
Returns:

output (int) –

getIntersectionPointsOfContourForBoundedPlane(self, aBP: ORSModel.ors.Rectangle, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pfOutputPoints: ORSModel.ors.OrderedCollectionDouble) → OrderedCollectionDouble
Parameters:
Returns:

output (ORSModel.ors.OrderedCollectionDouble) –

getIsBezier(self) → bool

Gets the path’s Bezier curve status.

Returns:output (bool) – TRUE if path follows a Bezier curve, FALSE otherwise
getIsClosed(self) → bool

Gets if the path is closed.

Returns:output (bool) – TRUE if the path is closed, FALSE otherwise
getIsNormalsInward(self) → bool

Gets if the path has his normals directed inward.

Returns:output (bool) – TRUE if the path his normals directed inward, FALSE otherwise
getIsToBeShownInCurvedView(self) → bool
Returns:output (bool) –
getLength(self, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4) → float

Returns the total length of the path.

Parameters:
Returns:

output (float) – the length of the path (a double)

getParameterAtControlPointIndex(self, index: int, iTIndex: int) → float

Gets the position of a given control point on the path.

Note

This method returns the normalized position (between 0 and 1) of a given control point on the path.

Note

Control point indicies are zero based.

Parameters:
  • index (int) – the index of the control point (an uint32_t)
  • iTIndex (int) –
Returns:

output (float) – the position of the given control point (a double, see below)

getParameterAtPointIndex(self, index: int, iTIndex: int) → float

Gets the position of a given point on the path.

Note

This method returns the normalized position (between 0 and 1) of a given point on the path.

Note

Point indicies are zero based.

Parameters:
  • index (int) – the index of the point (an uint32_t)
  • iTIndex (int) –
Returns:

output (float) – the position of the given point (a float, see below)

getPathMarkerCaption(self, index: int, iTIndex: int) → str
Parameters:
  • index (int) –
  • iTIndex (int) –
Returns:

output (str) –

getPathMarkerColor(self, index: int, iTIndex: int) → Color
Parameters:
  • index (int) –
  • iTIndex (int) –
Returns:

output (ORSModel.ors.Color) –

getPathMarkerCount(self, iTIndex: int) → int
Parameters:iTIndex (int) –
Returns:output (int) –
getPathMarkerPosition(self, index: int, iTIndex: int) → float
Parameters:
  • index (int) –
  • iTIndex (int) –
Returns:

output (float) –

getPathMarkerReferenceLineIsHightlighted(self) → bool
Returns:output (bool) –
getPathMarkerReferenceLineOffsetForView(self, pView: ORSModel.ors.View) → int
Parameters:pView (ORSModel.ors.View) –
Returns:output (int) –
getPathMarkerRegionID(self, index: int, iTIndex: int) → int
Parameters:
  • index (int) –
  • iTIndex (int) –
Returns:

output (int) –

getPathMarkerRegionMode(self, index: int, iTIndex: int) → int
Parameters:
  • index (int) –
  • iTIndex (int) –
Returns:

output (int) –

getPathMarkerScalar(self, index: int, scalarIndex: int, iTIndex: int) → float
Parameters:
  • index (int) –
  • scalarIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getPathMarkerScalarCount(self) → int
Returns:output (int) –
getPathMarkerVisible(self, index: int, iTIndex: int) → bool
Parameters:
  • index (int) –
  • iTIndex (int) –
Returns:

output (bool) –

getPathPointCenterOfMass(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getPathPointGlobalOrientation(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getPathPoints(self, iTIndex: int) → OrderedCollectionDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.OrderedCollectionDouble) –
getPickPathMarker(self, pDisp: ORSModel.ors.View, pixelXPositionInView: int, pixelYPositionInView: int) → int
Parameters:
  • pDisp (ORSModel.ors.View) –
  • pixelXPositionInView (int) –
  • pixelYPositionInView (int) –
Returns:

output (int) –

getPointAtIndex(self, index: int, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → Vector3

Gets a given point’s coordinates.

Note

Points are manual, while control points are automatic, i.e. the control points will end up generating individual points (on the Bezier curve).

Note

Point indicies are zero based.

Parameters:
  • index (int) – the index of the point (an uint32_t)
  • iTIndex (int) – a transformation matrix (an Matrix4x4)
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) –
Returns:

output (ORSModel.ors.Vector3) – a point (an Vector3)

getPointCount(self, iTIndex: int) → int

Gets the number of points.

Parameters:iTIndex (int) –
Returns:output (int) – the number of points (an uint32_t)
getPointPositionsList(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pnIndexes: ORSModel.ors.ArrayLong) → ArrayDouble
Parameters:
Returns:

output (ORSModel.ors.ArrayDouble) –

getPositionOnPath(self, parameter: float, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getPositionOnPathNearestTo(self, aLocation: ORSModel.ors.Vector3, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → float
Parameters:
Returns:

output (float) –

getPositionOnViewForCurvedChannel(self, pNormalizedPositionOnPath: float, aView: ORSModel.ors.View, aCurvedChannel: ORSModel.ors.Channel) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getPositionOnViewOfControlPointForCurvedChannel(self, controlPointIndex: int, aView: ORSModel.ors.View, aCurvedChannel: ORSModel.ors.Channel) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getPositionTangentAndNormalOnPath(self, parameter: float, position: ORSModel.ors.Vector3, up: ORSModel.ors.Vector3, right: ORSModel.ors.Vector3, tangent: ORSModel.ors.Vector3, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) → None

Gets the positional, tangent and normal vectors at a given position on the path.

Note

Results are written to the vector arguments.

Note

The first argument should be between 0.0f and 1.0f, with desired level of granulariy.

Note

This method allows one to find the exact location and direction at any given portion of the path.

Parameters:
  • parameter (float) – a relative position on the path (a float)
  • iTIndex (int) – TRUE to get results in world values, FALSE otherwise
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) –
Returns:
getPositionsOnPath(self, pPositions: ORSModel.ors.ArrayDouble, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pfOutputPoints: ORSModel.ors.ArrayDouble) → ArrayDouble
Parameters:
Returns:

output (ORSModel.ors.ArrayDouble) –

getShowAllIn2D(self) → bool

Gets the Show All status of the path.

Note

If the path is set to “ShowAll”, it will be fully visible in 2D but its color will fade towards black as it gets further from the current slice.

Returns:output (bool) – TRUE if the path is shown fully, FALSE otherwise
getShowPathMarkerReferenceLine(self) → bool
Returns:output (bool) –
getTubularMeshFromControlPoints(self, nbPtsCircle: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, offset: float, iTIndex: int, inoutMesh: ORSModel.ors.Mesh) → Mesh

Returns a tubular mesh with variable radius, built from the control points.

Parameters:
  • nbPtsCircle (int) – the number of point on the circumference of the tube
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – create a mesh in local or world coordinate
  • offset (float) – an offset to add at the end and beginning of the tube
  • iTIndex (int) – Pointer to the mesh
  • inoutMesh (ORSModel.ors.Mesh) –
Returns:

output (ORSModel.ors.Mesh) –

getTubularMeshFromPoints(self, nbPtsCircle: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pointSpacing: float, offset: float, iTIndex: int, inoutMesh: ORSModel.ors.Mesh) → Mesh

Returns a tubular mesh built from path points.

Parameters:
  • nbPtsCircle (int) – the number of point on the circumference of the tube
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – create a mesh in local or world coordinate
  • pointSpacing (float) – the physical spacing between two points
  • offset (float) – an offset to add at the end and beginning of the tube
  • iTIndex (int) – Pointer to the mesh
  • inoutMesh (ORSModel.ors.Mesh) –
Returns:

output (ORSModel.ors.Mesh) –

getTubularMeshWithFixedRadiusFromControlPoints(self, radius: float, nbPtsCircle: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, offset: float, iTIndex: int, inoutMesh: ORSModel.ors.Mesh) → Mesh

Returns a tubular mesh built from the control points.

Parameters:
  • radius (float) – the radius of the mesh double radius (a double)
  • nbPtsCircle (int) – the number of points on the circumference of the tube (an unsigned short)
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – a transformation matrix
  • offset (float) – an offset to add at the end and beginning of the tube (a double)
  • iTIndex (int) – T index
  • inoutMesh (ORSModel.ors.Mesh) – Pointer to the mesh
Returns:

output (ORSModel.ors.Mesh) – Resulting mesh

getTubularMeshWithFixedRadiusFromPoints(self, radius: float, nbPtsCircle: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pointSpacing: float, offset: float, iTIndex: int, inoutMesh: ORSModel.ors.Mesh) → Mesh

Returns a tubular mesh built from path points.

Parameters:
  • radius (float) – the radius of the mesh double radius
  • nbPtsCircle (int) – the number of point on the circumference of the tube
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – create a mesh in local or world coordinate
  • pointSpacing (float) – the physical spacing between two points
  • offset (float) – an offset to add at the end and beginning of the tube
  • iTIndex (int) – Pointer to the mesh
  • inoutMesh (ORSModel.ors.Mesh) –
Returns:

output (ORSModel.ors.Mesh) –

insertControlPointForAllTimeStep(self, index: int, pPoint: ORSModel.ors.Vector3) → None
Parameters:
insertPathMarker(self, index: int, iTIndex: int, parameter: float, canPassOver: bool) → None
Parameters:
  • index (int) –
  • iTIndex (int) –
  • parameter (float) –
  • canPassOver (bool) –
movePathMarker(self, pDisp: ORSModel.ors.View, index: int, pixelXPositionInView: int, pixelYPositionInView: int, canPassOver: bool) → None
Parameters:
  • pDisp (ORSModel.ors.View) –
  • index (int) –
  • pixelXPositionInView (int) –
  • pixelYPositionInView (int) –
  • canPassOver (bool) –
none()

VisualPath.__init__() -> VisualPath

rebuildBezier(self, iTIndex: int) → None

Rebuilds the Bezier curve.

Parameters:iTIndex (int) –
rebuildBezierForAllTimeStep(self) → None
rebuildNonBezier(self, iTIndex: int) → None
Parameters:iTIndex (int) –
rebuildNonBezierForAllTimeStep(self) → None
removeAllPathMarkers(self, iTIndex: int) → None
Parameters:iTIndex (int) –
removeAllPointsBetweenControlPoint(self, controlPointIndex1: int, controlPointIndex2: int, iTIndex: int) → None
Parameters:
  • controlPointIndex1 (int) –
  • controlPointIndex2 (int) –
  • iTIndex (int) –
removePathMarker(self, index: int, iTIndex: int) → None
Parameters:
  • index (int) –
  • iTIndex (int) –
reorderPathPointsForWinding(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, bCounterClockWise: bool) → None

Reorder the points of the path accordingly to the desired winding, for the given orientation.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • aTransformationMatrix (ORSModel.ors.Matrix4x4) – the transformation matrix to apply to the points before performing the analysis in the xy plane
  • bCounterClockWise (bool) – if true, the points will be reordered to have a counter-clockwise winding; if false, the windinw will be clockwise.
resamplePath(self, numberOfTime: int, newPointsCount: int, iTIndex: int) → None
Parameters:
  • numberOfTime (int) –
  • newPointsCount (int) –
  • iTIndex (int) –
setBezierSamplingLength(self, value: float) → None
Parameters:value (float) –
setBuildOctree(self, value: bool) → None
Parameters:value (bool) –
setControlPointCount(self, aSize: int, iTIndex: int) → None

Sets the number of control points.

Parameters:
  • aSize (int) – the control points count (an uint32_t)
  • iTIndex (int) – the T index (a uint32_t)
setControlPointCountForAllTimeStep(self, aSize: int) → None
Parameters:aSize (int) –
setControlPointPositionsList(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pIndicesArray: ORSModel.ors.ArrayLong, pfPoints: ORSModel.ors.ArrayDouble) → None

Batch sets of given control point’s coordinates by indices.

Note

Points are manual, while control points are automatic, i.e. the control points will end up generating individual points (on the Bezier curve).

Note

Control point indicies are zero based.

Note

If indices array is NULL, this method assumes an array of all indices.

Note

Any change to a primitive should be followed by update() to reflect the changes visually.

Parameters:
setControlPointRadiusAtIndex(self, index: int, iTIndex: int, radius: float) → None
Parameters:
  • index (int) –
  • iTIndex (int) –
  • radius (float) –
setControlPointRadiusAtIndexForAllTimeStep(self, index: int, radius: float) → None
Parameters:
  • index (int) –
  • radius (float) –
setFirstUpVector(self, anIVector: ORSModel.ors.Vector3, iTIndex: int) → None
Parameters:
setHideLine(self, value: bool) → None
Parameters:value (bool) –
setIsBezier(self, value: bool) → None

Sets the path to follow a Bezier curve.

Note

Any change to a primitive should be followed by update() to reflect the changes visually.

Parameters:value (bool) – TRUE to make it follow a Bezier curve, FALSE otherwise
setIsClosed(self, value: bool) → None

Sets the path to be closed or not.

Parameters:value (bool) – TRUE to close the path, FALSE otherwise
setIsNormalsInward(self, value: bool) → None

Sets the path to have his normals directed inward.

Parameters:value (bool) – TRUE to direct the path normals inward, FALSE to direct them outward
setIsToBeShownInCurvedView(self, flag: bool) → None
Parameters:flag (bool) –
setPathMarkerCaption(self, index: int, iTIndex: int, caption: str) → None
Parameters:
  • index (int) –
  • iTIndex (int) –
  • caption (str) –
setPathMarkerColor(self, index: int, iTIndex: int, IColor: ORSModel.ors.Color) → None
Parameters:
setPathMarkerPosition(self, index: int, iTIndex: int, parameter: float, canPassOver: bool) → None
Parameters:
  • index (int) –
  • iTIndex (int) –
  • parameter (float) –
  • canPassOver (bool) –
setPathMarkerReferenceLineIsHightlighted(self, value: bool) → None
Parameters:value (bool) –
setPathMarkerReferenceLineOffsetForView(self, pView: ORSModel.ors.View, value: int) → None
Parameters:
setPathMarkerRegionID(self, index: int, iTIndex: int, regionID: int) → None
Parameters:
  • index (int) –
  • iTIndex (int) –
  • regionID (int) –
setPathMarkerRegionMode(self, index: int, iTIndex: int, regionMode: int) → None
Parameters:
  • index (int) –
  • iTIndex (int) –
  • regionMode (int) –
setPathMarkerScalar(self, index: int, scalarIndex: int, iTIndex: int, s: float) → None
Parameters:
  • index (int) –
  • scalarIndex (int) –
  • iTIndex (int) –
  • s (float) –
setPathMarkerScalarCount(self, s: int) → None
Parameters:s (int) –
setPathMarkerVisible(self, index: int, iTIndex: int, s: bool) → None
Parameters:
  • index (int) –
  • iTIndex (int) –
  • s (bool) –
setPointAtIndex(self, index: int, iTIndex: int, pPoint: ORSModel.ors.Vector3) → None

Sets a given point’s coordinates.

Note

Points are manual, while control points are automatic, i.e. the control points will end up generating individual points (on the Bezier curve).

Note

Point indicies are zero based.

Note

Any change to a primitive should be followed by update() to reflect the changes visually.

Parameters:
  • index (int) – the index of the point (an uint32_t)
  • iTIndex (int) – a point (an Vector3)
  • pPoint (ORSModel.ors.Vector3) –
setPointAtIndexForAllTimeStep(self, index: int, pPoint: ORSModel.ors.Vector3) → None
Parameters:
setPointPositionsList(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pnIndexes: ORSModel.ors.ArrayLong, pfPoints: ORSModel.ors.ArrayDouble) → None
Parameters:
setShowAllIn2D(self, value: bool) → None

Sets the Show All status of the path.

Note

If the path is set to “ShowAll”, it will be fully visible in 2D but its color will fade towards black as it gets further from the current slice.

Parameters:value (bool) – TRUE to set the path to be shown fully, FALSE otherwise
setShowPathMarkerReferenceLine(self, value: bool) → None
Parameters:value (bool) –

VisualPlane

class ORSModel.ors.VisualPlane

Bases: ORSModel.ors.VisualShape2D

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getEnabled(self) → bool
Returns:output (bool) –
getIsClipping(self) → bool
Returns:output (bool) –
getIsEditable(self) → bool
Returns:output (bool) –
getOrientedPlane(self, iTIndex: int) → OrientedPlane
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.OrientedPlane) –
getShowBorder(self) → bool
Returns:output (bool) –
none()

VisualPlane.__init__() -> VisualPlane

setEnabled(self, pFlag: bool) → None
Parameters:pFlag (bool) –
setIsClipping(self, pFlag: bool) → None
Parameters:pFlag (bool) –
setIsEditable(self, pFlag: bool) → None
Parameters:pFlag (bool) –
setOrientedPlane(self, aPlane: ORSModel.ors.OrientedPlane, iTIndex: int) → None
Parameters:
setShowBorder(self, pFlag: bool) → None
Parameters:pFlag (bool) –

VisualPoints

class ORSModel.ors.VisualPoints

Bases: ORSModel.ors.Annotation

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

VisualPoints.__init__() -> VisualPoints

VisualROI

class ORSModel.ors.VisualROI

Bases: ORSModel.ors.Visual

fillLookupTableWithLabelColors(self, IStructuredGrid: ORSModel.ors.MultiROI, IView: ORSModel.ors.View, pLUT: ORSModel.ors.LookupTable, labelOffset: int) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getColorForAllViews(self) → Color
Returns:output (ORSModel.ors.Color) –
getColorForView(self, IView: ORSModel.ors.View) → Color
Parameters:IView (ORSModel.ors.View) –
Returns:output (ORSModel.ors.Color) –
getHighlightOpacityForAllViews(self) → float
Returns:output (float) –
getHighlightOpacityForView(self, IView: ORSModel.ors.View) → float
Parameters:IView (ORSModel.ors.View) –
Returns:output (float) –
getHighlightOpacityInRangeForAllViews(self) → float
Returns:output (float) –
getHighlightOpacityInRangeForView(self, IView: ORSModel.ors.View) → float
Parameters:IView (ORSModel.ors.View) –
Returns:output (float) –
getHighlightOpacityOutRangeForAllViews(self) → float
Returns:output (float) –
getHighlightOpacityOutRangeForView(self, IView: ORSModel.ors.View) → float
Parameters:IView (ORSModel.ors.View) –
Returns:output (float) –
getIsVisibleIn2DForAllViews(self) → bool
Returns:output (bool) –
getIsVisibleIn2DForView(self, IView: ORSModel.ors.View) → bool
Parameters:IView (ORSModel.ors.View) –
Returns:output (bool) –
getIsVisibleIn3DForAllViews(self) → bool
Returns:output (bool) –
getIsVisibleIn3DForView(self, IView: ORSModel.ors.View) → bool
Parameters:IView (ORSModel.ors.View) –
Returns:output (bool) –
getLabelColor(self, IStructuredGrid: ORSModel.ors.MultiROI, IView: ORSModel.ors.View, label: int) → Color
Parameters:
Returns:

output (ORSModel.ors.Color) –

getPlaneChannelForGUID(self, aGUID: str, createIfAbsent: bool) → Channel
Parameters:
  • aGUID (str) –
  • createIfAbsent (bool) –
Returns:

output (ORSModel.ors.Channel) –

getROIOpacityForAllViews(self) → float
Returns:output (float) –
getROIOpacityForView(self, IView: ORSModel.ors.View) → float
Parameters:IView (ORSModel.ors.View) –
Returns:output (float) –
getROIOpacityInRangeForAllViews(self) → float
Returns:output (float) –
getROIOpacityInRangeForView(self, IView: ORSModel.ors.View) → float
Parameters:IView (ORSModel.ors.View) –
Returns:output (float) –
getROIOpacityOutRangeForAllViews(self) → float
Returns:output (float) –
getROIOpacityOutRangeForView(self, IView: ORSModel.ors.View) → float
Parameters:IView (ORSModel.ors.View) –
Returns:output (float) –
getShowContourForAllViews(self) → bool
Returns:output (bool) –
getShowContourForView(self, IView: ORSModel.ors.View) → bool
Parameters:IView (ORSModel.ors.View) –
Returns:output (bool) –
getVolumeOpacityForAllViews(self) → float
Returns:output (float) –
getVolumeOpacityForView(self, IView: ORSModel.ors.View) → float
Parameters:IView (ORSModel.ors.View) –
Returns:output (float) –
none()

VisualROI.__init__() -> VisualROI

presentInChannel(self, aChannel: ORSModel.ors.Channel, aView: ORSModel.ors.View) → None
Parameters:
presentInImage(self, anImage: ORSModel.ors.Image, aView: ORSModel.ors.View) → bool
Parameters:
Returns:

output (bool) –

setColorForAllViews(self, color: ORSModel.ors.Color) → None
Parameters:color (ORSModel.ors.Color) –
setColorForView(self, IView: ORSModel.ors.View, color: ORSModel.ors.Color) → None
Parameters:
setHighlightOpacityForAllViews(self, opacity: float) → None
Parameters:opacity (float) –
setHighlightOpacityForView(self, IView: ORSModel.ors.View, opacity: float) → None
Parameters:
setHighlightOpacityInRangeForAllViews(self, opacity: float) → None
Parameters:opacity (float) –
setHighlightOpacityInRangeForView(self, IView: ORSModel.ors.View, opacity: float) → None
Parameters:
setHighlightOpacityOutRangeForAllViews(self, opacity: float) → None
Parameters:opacity (float) –
setHighlightOpacityOutRangeForView(self, IView: ORSModel.ors.View, opacity: float) → None
Parameters:
setIsVisibleIn2DForAllViews(self, bValue: bool) → None
Parameters:bValue (bool) –
setIsVisibleIn2DForView(self, IView: ORSModel.ors.View, bValue: bool) → None
Parameters:
setIsVisibleIn3DForAllViews(self, bValue: bool) → None
Parameters:bValue (bool) –
setIsVisibleIn3DForView(self, IView: ORSModel.ors.View, bValue: bool) → None
Parameters:
setROIOpacityForAllViews(self, opacity: float) → None
Parameters:opacity (float) –
setROIOpacityForView(self, IView: ORSModel.ors.View, opacity: float) → None
Parameters:
setROIOpacityInRangeForAllViews(self, opacity: float) → None
Parameters:opacity (float) –
setROIOpacityInRangeForView(self, IView: ORSModel.ors.View, opacity: float) → None
Parameters:
setROIOpacityOutRangeForAllViews(self, opacity: float) → None
Parameters:opacity (float) –
setROIOpacityOutRangeForView(self, IView: ORSModel.ors.View, opacity: float) → None
Parameters:
setShowContourForAllViews(self, bValue: bool) → None
Parameters:bValue (bool) –
setShowContourForView(self, IView: ORSModel.ors.View, bValue: bool) → None
Parameters:
setVolumeOpacityForAllViews(self, opacity: float) → None
Parameters:opacity (float) –
setVolumeOpacityForView(self, IView: ORSModel.ors.View, opacity: float) → None
Parameters:
updateChannel(self, aChannel: ORSModel.ors.Channel, aContourLabelChannel: ORSModel.ors.Channel, aContourChannel: ORSModel.ors.Channel, IView: ORSModel.ors.View, haveToDoAll: bool) → bool
Parameters:
Returns:

output (bool) –

updateChannel2DForGUIDFromPlane(self, aGUID: str, aBplane: ORSModel.ors.Rectangle, currentTimeStep: int, haveToDoAll: bool) → bool
Parameters:
Returns:

output (bool) –

VisualRegion

class ORSModel.ors.VisualRegion

Bases: ORSModel.ors.Annotation

brief_description: Represents a user-selected 2D region of a view. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2006 see: View Represents a user-selected 2D region of a view.

addRegionIn3DOrthoProjectionToROIIntersectingChannel(self, pCamera: ORSModel.ors.Camera, inside: bool, outputROI: ORSModel.ors.ROI, currentTimeStep: int, intersectingChannel: ORSModel.ors.Channel, levelingMinRange: float, levelingMaxRange: float, ILUT: ORSModel.ors.LookupTable, clipBox: ORSModel.ors.Box) → None
Parameters:
addRegionIn3DOrthoProjectionToROIIntersectingLabeldMultiROI(self, pCamera: ORSModel.ors.Camera, inside: bool, outputROI: ORSModel.ors.ROI, currentTimeStep: int, intersectingMultiROI: ORSModel.ors.MultiROI, fHightlightOpacity: float, fHightlightOpacityOutRange: float, clipBox: ORSModel.ors.Box) → None
Parameters:
addRegionIn3DOrthoProjectionToROIIntersectingROI(self, pCamera: ORSModel.ors.Camera, inside: bool, outputROI: ORSModel.ors.ROI, currentTimeStep: int, intersectingROI: ORSModel.ors.ROI, clipBox: ORSModel.ors.Box) → None
Parameters:
addRegionIn3DPerspectiveProjectionToROIIntersectingChannel(self, pCamera: ORSModel.ors.Camera, inside: bool, outputROI: ORSModel.ors.ROI, currentTimeStep: int, intersectingChannel: ORSModel.ors.Channel, levelingMinRange: float, levelingMaxRange: float, ILUT: ORSModel.ors.LookupTable, clipBox: ORSModel.ors.Box) → None
Parameters:
addRegionIn3DPerspectiveProjectionToROIIntersectingLabeldMultiROI(self, pCamera: ORSModel.ors.Camera, inside: bool, outputROI: ORSModel.ors.ROI, currentTimeStep: int, intersectingMultiROI: ORSModel.ors.MultiROI, fHightlightOpacity: float, fHightlightOpacityOutRange: float, clipBox: ORSModel.ors.Box) → None
Parameters:
addRegionIn3DPerspectiveProjectionToROIIntersectingROI(self, pCamera: ORSModel.ors.Camera, inside: bool, outputROI: ORSModel.ors.ROI, currentTimeStep: int, intersectingROI: ORSModel.ors.ROI, clipBox: ORSModel.ors.Box) → None
Parameters:
fitFromPoints(self, count: int, points: float, iTIndex: int) → None

Gets the primitive to fit itself to a list of points.

Note

Points should be supplied in triplets, for respectively the X, Y and Z position.

Parameters:
  • count (int) – the number of triplets supplied (an uint32_t) (see note below)
  • points (float) – an array of points to fit to (a float*)
  • iTIndex (int) –
getArea(self, timeStep: int, worldTransform: ORSModel.ors.Matrix4x4) → float
Parameters:
Returns:

output (float) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getHistogramData(self, aChannel: ORSModel.ors.Channel, currentTimeStep: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4, inside: bool, numberOfBins: int) → HistogramData

Gets a histogram of the region’s data.

Parameters:
  • aChannel (ORSModel.ors.Channel) – the channel to use for the data (a Channel)
  • currentTimeStep (int) – the time step (an unsigned int)
  • aWorldTransformMatrix (ORSModel.ors.Matrix4x4) – a transformation matrix (a Matrix4x4)
  • inside (bool) – true to use the inside of the region, false to use the outside
  • numberOfBins (int) – the number of desired bins (an unsigned short)
Returns:

output (ORSModel.ors.HistogramData) – a histogram (an HistogramData)

getIsOn3DView(self) → bool
Returns:output (bool) –
getPerimeter(self, timeStep: int, worldTransform: ORSModel.ors.Matrix4x4) → float
Parameters:
Returns:

output (float) –

getShape(self) → int

Gets the shape of the region.

Note

See the ORS_def.h file for valid CxvRegion_Shape values.

Returns:output (int) – an CxvRegion_Shape value (an int)
insertControlPointForAllTimeStep(self, pPoint: ORSModel.ors.Vector3) → None
Parameters:pPoint (ORSModel.ors.Vector3) –
none()

VisualRegion.__init__() -> VisualRegion

setControlPoints(self, pfPoints: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Sets the points of the region.

Note

The array should consist of triplets of X, Y and Z positions.

Note

The array is not managed by the underlying object, i.e. you are responsible for releasing it.

Note

Any change to a primitive should be followed by update() to reflect the changes visually.

Parameters:
  • pfPoints (ORSModel.ors.ArrayDouble) – the number of triplets in the array (a int32_t*)
  • iTIndex (int) – an array of point triplets (a float*)
setIsOn3DView(self, value: bool) → None

Insert a point to the region between the two nearest existing points.

Note

Any change to a primitive should be followed by update() to reflect the changes visually.

Parameters:value (bool) – the point (an Vector3)
setPlane(self, a: float, b: float, c: float, d: float, iTIndex: int) → None

Sets the plane coefficient.

Note

Planes are expressed by the general equation ax + by + cz + dw = 0.

Parameters:
  • a (float) – the a member (a float)
  • b (float) – the b member (a float)
  • c (float) – the c member (a float)
  • d (float) – the d member (a float)
  • iTIndex (int) –
setShape(self, shape: int) → None

Sets the shape of the region.

Note

See the ORS_def.h file for valid CxvRegion_Shape values.

Note

Any change to a primitive should be followed by update() to reflect the changes visually.

Parameters:shape (int) – an CxvRegion_Shape value (an int)

VisualRuler

class ORSModel.ors.VisualRuler

Bases: ORSModel.ors.Annotation

brief_description: Represents a ruler, used to take measures. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Aug 2006

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getLength(self, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4) → float

Gets the length value of the ruler.

Note

The length of the ruler is always returned in meters. You can use a view to convert to other units.

Parameters:
Returns:

output (float) – the length of the ruler (a double)

getShowTicks(self) → bool

Gets the display status of the ruler’s ticks.

Returns:output (bool) – true if ticks are shown, false otherwise
getTickCount(self) → int

Gets the number of visible ticks on the ruler.

Returns:output (int) – the number of ticks (an uint32_t)
none()

VisualRuler.__init__() -> VisualRuler

setShowTicks(self, value: bool) → None

Sets the display of the ruler’s ticks.

Parameters:value (bool) – true to show the ruler’s ticks, false to hide them
setTickCount(self, value: int) → None

Sets the number of visible ticks on the ruler.

Parameters:value (int) – the number of ticks (an uint32_t)

VisualScaleBar

class ORSModel.ors.VisualScaleBar

Bases: ORSModel.ors.Visual

getAutoAdjustFloatingLength(self) → bool

Gets if the scalebar auto-adjusts or not.

Returns:output (bool) – TRUE if scale bar auto-adjusts, FALSE otherwise
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getColor(self) → Color

Gets the scale bar color.

Returns:output (ORSModel.ors.Color) – a color object (a Color)
getDrawTextShadow(self) → bool

Gets if the scale bar is showing text shadow.

Returns:output (bool) – TRUE if text shadows are visible, FALSE otherwise
getFloatingLength(self) → float

Gets the scalebar’s length when floating.

Note

The length is always expressed in meters.

Returns:output (float) – the scale bar length (a double)
getIsFloating(self) → bool

Gets if the scalebar is floating.

Returns:output (bool) – TRUE if the scale bar is floating, FALSE otherwise
getPrecision(self) → int

Gets the length precision.

Note

The precision is only used during displaying values, internally full precision is preserved.

Returns:output (int) – a number of decimals (an char)
getScaleBarPositionInView(self, pView: ORSModel.ors.View) → Vector3
Parameters:pView (ORSModel.ors.View) –
Returns:output (ORSModel.ors.Vector3) –
getTextColor(self) → Color

Gets the text color of the scale bar.

Note

The text color is used for the length.

Returns:output (ORSModel.ors.Color) – a color object (an Color)
getTextFontName(self) → str
Returns:output (str) –
getTextFontSize(self) → float

Gets the font size, in screen one thousandths.

Returns:output (float) – the font size (a double between 0 and 1)
getTextMinimumFontSize(self) → int

Gets the minimum text font size, in font points.

Returns:output (int) – the font size
getTextShadowColor(self) → Color

Gets the text shadow color of the scale bar.

Returns:output (ORSModel.ors.Color) – a color object (an Color)
none()

VisualScaleBar.__init__() -> VisualScaleBar

setAutoAdjustFloatingLength(self, value: bool) → None

Sets if the scalebar auto-adjusts or not.

Parameters:value (bool) – TRUE to have the scale bar auto-adjust, FALSE otherwise
setColor(self, IColor: ORSModel.ors.Color) → None

Sets the scale bar color.

Parameters:IColor (ORSModel.ors.Color) – a color object (a Color)
setDrawTextShadow(self, bFlag: bool) → None

Toggles displaying shadows for the text.

Parameters:bFlag (bool) – TRUE to show text shadows, FALSE otherwise
setFloatingLength(self, floatLength: float) → None

Sets the scalebar’s length when floating.

Note

The length is always expressed in meters.

Parameters:floatLength (float) – the scale bar length (a double)
setIsFloating(self, value: bool) → None

Sets the scalebar to be floating or not.

Parameters:value (bool) – TRUE so set the scale bar to be floating, FALSE to be normal
setPrecision(self, iPrecision: int) → None

Sets the length precision.

Note

The precision is only used during displaying values of a floating scale bar, internally full precision is preserved.

Parameters:iPrecision (int) – the number of decimals (an unsigned char)
setScaleBarPositionInView(self, pView: ORSModel.ors.View, aPoint: ORSModel.ors.Vector3) → None
Parameters:
setTextColor(self, IColor: ORSModel.ors.Color) → None

Sets the text color of the scale bar.

Note

The text color is used for the caption.

Parameters:IColor (ORSModel.ors.Color) – a color object (an Color)
setTextFontName(self, sFontName: str) → None

Sets the font name.

Parameters:sFontName (str) – the font name (a string)
setTextFontSize(self, fontSize: float) → None

Sets the font size, in screen one thousandths.

Parameters:fontSize (float) – the font size (a double between 0 and 1)
setTextMinimumFontSize(self, fontSize: int) → None

Sets the minimum font size, in font points.

Parameters:fontSize (int) – the font size
setTextShadowColor(self, IColor: ORSModel.ors.Color) → None

Sets the text shadow color of the scale bar.

Parameters:IColor (ORSModel.ors.Color) – a color object (an Color)

VisualShape

class ORSModel.ors.VisualShape

Bases: ORSModel.ors.Visual

addAffectedVisual(self, pObject: ORSModel.ors.Managed) → None
Parameters:pObject (ORSModel.ors.Managed) –
getAffectedVisualsGUID(self) → str
Returns:output (str) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getHighlightedAnchor(self, anchorIndex: int, iTIndex: int) → bool
Parameters:
  • anchorIndex (int) –
  • iTIndex (int) –
Returns:

output (bool) –

getHighlightedAnchorCount(self, iTIndex: int) → int
Parameters:iTIndex (int) –
Returns:output (int) –
getHighlightedBorder(self, borderIndex: int, iTIndex: int) → bool
Parameters:
  • borderIndex (int) –
  • iTIndex (int) –
Returns:

output (bool) –

getHighlightedBorderCount(self, iTIndex: int) → int
Parameters:iTIndex (int) –
Returns:output (int) –
getIsInverted(self) → bool
Returns:output (bool) –
getSelectedColor(self) → Color

Gets the selected color of the shape.

Returns:output (ORSModel.ors.Color) – the color (a Color)
getShaderCode(self, aView: ORSModel.ors.View, raycastElementId: int, outputElementId: int) → str

get the evaluated shader code (in glsl)

Parameters:
  • aView (ORSModel.ors.View) – the view (a ors::view)
  • raycastElementId (int) – raycastElementId: the index of the raycasted element being rendered (int)
  • outputElementId (int) – outputElementId: the index of colors[] output register (int)
Returns:

output (str) –

getShape(self, timestep: int) → Shape
Parameters:timestep (int) –
Returns:output (ORSModel.ors.Shape) –
getShapeAffectsVisual(self, pObject: ORSModel.ors.Managed) → bool
Parameters:pObject (ORSModel.ors.Managed) –
Returns:output (bool) –
getShapeIndex(self) → int
Returns:output (int) –
none()

VisualShape.__init__() -> VisualShape

pickAnchor(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) → int
Parameters:
  • pView (ORSModel.ors.View) –
  • xPixelPositionInView (int) –
  • yPixelPositionInView (int) –
Returns:

output (int) –

pickBorder(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) → int
Parameters:
  • pView (ORSModel.ors.View) –
  • xPixelPositionInView (int) –
  • yPixelPositionInView (int) –
Returns:

output (int) –

pickSpecificBorder(self, pView: ORSModel.ors.View, borderIndex: int, xPixelPositionInView: int, yPixelPositionInView: int) → bool
Parameters:
  • pView (ORSModel.ors.View) –
  • borderIndex (int) –
  • xPixelPositionInView (int) –
  • yPixelPositionInView (int) –
Returns:

output (bool) –

removeAffectedVisual(self, pObject: ORSModel.ors.Managed) → None
Parameters:pObject (ORSModel.ors.Managed) –
setAffectedVisualsGUID(self, guids: str) → None
Parameters:guids (str) –
setColor(self, color: ORSModel.ors.Color) → None
Parameters:color (ORSModel.ors.Color) –
setHighlightedAnchor(self, anchorIndex: int, iTIndex: int) → None
Parameters:
  • anchorIndex (int) –
  • iTIndex (int) –
setHighlightedBorder(self, borderIndex: int, iTIndex: int) → None
Parameters:
  • borderIndex (int) –
  • iTIndex (int) –
setIsInverted(self, bIsInverted: bool) → None
Parameters:bIsInverted (bool) –
setSelectedColor(self, IColor: ORSModel.ors.Color) → None

Sets the selected color of the shape.

Parameters:IColor (ORSModel.ors.Color) – the color (a Color)
setShape(self, aShape: ORSModel.ors.Shape, timestep: int) → None
Parameters:
setShapeIndex(self, iIndex: int) → None
Parameters:iIndex (int) –
unHighlightAllAnchor(self, iTIndex: int) → None
Parameters:iTIndex (int) –
unHighlightAllBorder(self, iTIndex: int) → None
Parameters:iTIndex (int) –

VisualShape2D

class ORSModel.ors.VisualShape2D

Bases: ORSModel.ors.VisualShape

brief_description: None author: Mathieu Gendron. All other members of ORS participated. version: 1.0 date: November 2017

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

VisualShape2D.__init__() -> VisualShape2D

VisualShape3D

class ORSModel.ors.VisualShape3D

Bases: ORSModel.ors.VisualShape

brief_description: None author: Mathieu Gendron. All other members of ORS participated. version: 1.0 date: November 2017

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

VisualShape3D.__init__() -> VisualShape3D

VisualSphere

class ORSModel.ors.VisualSphere

Bases: ORSModel.ors.VisualShape3D

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getSphere(self, iTIndex: int) → Sphere
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.Sphere) –
none()

VisualSphere.__init__() -> VisualSphere

setSphere(self, aSphere: ORSModel.ors.Sphere, iTIndex: int) → None
Parameters:

VisualText

class ORSModel.ors.VisualText

Bases: ORSModel.ors.Visual

brief_description: To display text on the renderer. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getDrawShadow(self) → bool
Returns:output (bool) –
getHorizontalAlignment(self) → int

Gets the horizontal alignment of the item.

Note

Default value is left-aligned.

Returns:output (int) – 0 for left-aligned, 1 for center-aligned or 2 for right-aligned
getIsOriginAtTop(self) → bool

Gets whether or not the text is top-aligned.

Note

If not top-aligned, the text is bottom-aligned.

Returns:output (bool) – TRUE if the text is top-aligned, FALSE otherwise
getText(self) → str
Returns:output (str) –
getTextColor(self) → Color

Gets the text color of the item.

Returns:output (ORSModel.ors.Color) – a color object (an Color)
getTextFontName(self) → str
Returns:output (str) –
getTextFontSize(self) → float

Gets the text font size, in screen one thousandths.

Returns:output (float) – the size (a double between 0 and 1)
getTextMinimumFontSize(self) → int

Gets the minimum text font size, in font points.

Returns:output (int) – the font size
getTextShadowColor(self) → Color
Returns:output (ORSModel.ors.Color) –
getType(self) → str
Returns:output (str) –
getU(self) → float

Gets the U coordinate of the item.

Note

The U coordinate is same as X coordinate. In this case the coordinate is relative.

Note

Range goes from 0.0 (left) to 1.0 (right).

Note

For left-aligned items, the U coordinates designates the left side. For right-aligned items, it designates the right side. For center-aligned items, it designates the center.

Returns:output (float) – a coordinate (a float)
getV(self) → float

Gets the V coordinate of the item.

Note

The V coordinate is same as Y coordinate. In this case the coordinate is relative.

Note

Range goes from 0.0 (top) to 1.0 (bottom).

Note

The YPosition is computed to the horizontal center of the text. Hence values of 0.0 or 1.0 are likely to position the text outside of the renderer window (not appearing).

Returns:output (float) – a coordinate (a float)
none()

VisualText.__init__() -> VisualText

setDrawShadow(self, bFlag: bool) → None
Parameters:bFlag (bool) –
setHorizontalAlignment(self, pValue: int) → None

Sets the horizontal item alignment.

Note

Default is left-aligned.

Parameters:pValue (int) – 0 if the text is to be left-aligned, 1 for center-aligned or 2 for right-aligned
setIsOriginAtTop(self, pValue: bool) → None

Sets whether or not the text is top-aligned.

Note

If not top-aligned, the text is bottom-aligned.

Parameters:pValue (bool) – TRUE if the text is to be top-aligned, FALSE otherwise
setText(self, sText: str) → None

Sets the text of the item.

Parameters:sText (str) – some text (a string)
setTextColor(self, IColor: ORSModel.ors.Color) → None

Sets the text color of the item.

Note

If the instance created by an ORSTextPresenter, it will supply its item color.

Parameters:IColor (ORSModel.ors.Color) – a color object (an Color)
setTextFontName(self, sName: str) → None

Sets the text font name of the item.

Parameters:sName (str) – the font name (a string)
setTextFontSize(self, iValue: float) → None

Sets the text font size, in screen one thousandths.

Parameters:iValue (float) – the size (a double between 0 and 1)
setTextMinimumFontSize(self, fontSize: int) → None

Sets the minimum font size, in font points.

Parameters:fontSize (int) – the font size
setTextShadowColor(self, IColor: ORSModel.ors.Color) → None
Parameters:IColor (ORSModel.ors.Color) –
setType(self, aType: str) → None
Parameters:aType (str) –
setU(self, fValue: float) → None

Sets the U coordinate of the item.

Note

The U coordinate is same as X coordinate. In this case the coordinate is relative.

Note

Range goes from 0.0 (left) to 1.0 (right).

Note

For left-aligned items, the U coordinates designates the left side. For right-aligned items, it designates the right side. For center-aligned items, it designates the center.

Parameters:fValue (float) – a coordinate (a float)
setV(self, fValue: float) → None

Sets the V coordinate of the item.

Note

The V coordinate is same as Y coordinate. In this case the coordinate is relative.

Note

Range goes from 0.0 (top) to 1.0 (bottom).

Note

The YPosition is computed to the horizontal center of the text. Hence values of 0.0 or 1.0 are likely to position the text outside of the renderer window (not appearing).

Parameters:fValue (float) – a coordinate (a float)

VisualVectorField

class ORSModel.ors.VisualVectorField

Bases: ORSModel.ors.Visual

brief_description: A visual that represents a author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: Dec 2017 A visual that represents a VisualVectorField.

getBoundingBoxPlusEpsilon(timestep, worldMatrix, epsilon=0.01)
getBuildOctree(self) → bool
Returns:output (bool) –
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCurrentAlphaFuncValue(self) → int

Sets the transparency of the mesh.

Returns:output (int) – a value from 0 to 255
getMaxVectorMagnitude(self) → float
Returns:output (float) –
getOpacity(self) → float

Gets the opacity of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getOpacityInRange(self) → float

Gets the opacity for selected area of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getOpacityOutRange(self) → float

Gets the opacity for unselected area of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Returns:output (float) – the opacity (a float)
getRenderingColor(self) → Color

Gets the rendering color of the vector field.

Returns:output (ORSModel.ors.Color) – the color as an Color object
getShowArrowHead(self) → bool
Returns:output (bool) –
getShowIn2DDuringMotion(self) → bool

Gets the visibility of the mesh in 2D views during mouse motion.

Returns:output (bool) – true if the mesh is visible in 2D views during mouse movement, false otherwise
getThickness(self) → float

Gets the thickness of lines in 2D mode.

Returns:output (float) – the thickness, in pixel units (an double)
getUseDirectionAsColor(self) → bool
Returns:output (bool) –
getUseLighting(self) → bool

Gets the mesh lighting mode.

Returns:output (bool) – true if lighting is on, false otherwise
getVectorLength(self) → float

Gets the visual length of the vectors.

Returns:output (float) – a double value
getVectorTransform(self) → Matrix4x4
Returns:output (ORSModel.ors.Matrix4x4) –
getVectorVisibleMax(self) → float

Gets the maximum modulus that will be visible in the field the value is a double.

Returns:output (float) –
getVectorVisibleMin(self) → float

Gets the minimum modulus that will be visible in the field the value is a double.

Returns:output (float) –
none()

VisualVectorField.__init__() -> VisualVectorField

setBuildOctree(self, value: bool) → None
Parameters:value (bool) –
setOpacity(self, value: float) → None

Sets the opacity for unselected range of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setOpacityInRange(self, value: float) → None

Sets the opacity of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setOpacityOutRange(self, value: float) → None

Sets the opacity of the mesh.

Note

Ranges from 0.0f (no opacity) to 1.0f (100% opacity).

Note

The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).

Parameters:value (float) – an opacity value (a float)
setRenderingColor(self, aColor: ORSModel.ors.Color) → None

set rendering color

Parameters:aColor (ORSModel.ors.Color) –
setShowArrowHead(self, bShow: bool) → None
Parameters:bShow (bool) –
setShowColorIn2D(self, value: bool) → None
Parameters:value (bool) –
setShowIn2DDuringMotion(bShow)
setThickness(self, value: float) → None

Sets the thickness of lines in 2D mode.

Parameters:value (float) – the thickness, in pixel units (an double)
setUseDirectionAsColor(self, bUse: bool) → None
Parameters:bUse (bool) –
setUseLighting(self, useLighting: bool) → None

Sets the mesh lighting mode.

Parameters:useLighting (bool) – true to use lighting, false otherwise
setVectorLength(self, pSize: float) → None

Sets the visual length of the vectors the value is a double.

Parameters:pSize (float) –
setVectorTransform(self, aMatrix: ORSModel.ors.Matrix4x4) → None
Parameters:aMatrix (ORSModel.ors.Matrix4x4) –
setVectorVisibleMax(self, pValue: float) → None

Sets the maximum modulus that will be visible in the field the value is a double.

Parameters:pValue (float) –
setVectorVisibleMin(self, pValue: float) → None

Sets the minimum modulus that will be visible in the field the value is a double.

Parameters:pValue (float) –

Watershed

class ORSModel.ors.Watershed

Bases: ORSModel.ors.Unmanaged

compute(self, watershedDistance: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel) → None

Creates a distance map starting from all the providedROI sources.

Parameters:
  • watershedDistance (ORSModel.ors.Channel) – the distance map generated by the Dijkstra algorithm (an Channel)
  • lOutputChannelLabel (ORSModel.ors.Channel) – a label channel, can be NULL (an Channel)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getNeighborCount(self) → int

Gets the number of neighbors used by theDijkstra algorithm (the connectivity).

Note

Can be 6, 18 or 26

Returns:output (int) – the number of neighbors (an char)
getROICount(self) → int

Returns the number of ROIs that have been set as sources.

Note

A maximum of 10 ROI can be provided.

Returns:output (int) – the number of ROIs that have been provided (an char)
getVolumeROI(self, index: int) → ROI

Retrieves a particularROI from the index specified slot.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:index (int) – the slot index (an unsigned char)
Returns:output (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
none()

Watershed.__init__() -> Watershed

resetVolumeROIs(self) → None

Empties all the sourceROI slots.

setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None

Sets the channel that will be used by theDijkstra algorithm to calculate distance.

Note

The min and max boundaries must not describe a space bigger than the input channel.

Parameters:
  • inputChannel (ORSModel.ors.Channel) – the input channel (an Channel)
  • minX (int) – the minimum X index in the input channel (a uint32_t)
  • minY (int) – the minimum Y index in the input channel (a uint32_t)
  • minZ (int) – the minimum Z index in the input channel (a uint32_t)
  • maxX (int) – the maximum X index in the input channel (a uint32_t)
  • maxY (int) – the maximum Y index in the input channel (a uint32_t)
  • maxZ (int) – the maximum Z index in the input channel (a uint32_t)
  • currentT (int) –
setInputLabelsChannel(self, aInputLabelsChannel: ORSModel.ors.Channel) → None
Parameters:aInputLabelsChannel (ORSModel.ors.Channel) –
setInputMultiROI(self, anInputMultiROI: ORSModel.ors.MultiROI) → None
Parameters:anInputMultiROI (ORSModel.ors.MultiROI) –
setMaskROI(self, IMaskROI: ORSModel.ors.ROI) → None
Parameters:IMaskROI (ORSModel.ors.ROI) –
setNeighborCountTo18(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).

setNeighborCountTo26(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).

setNeighborCountTo6(self) → None

Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).

setProgressObject(self, IProgress: ORSModel.ors.Progress) → None
Parameters:IProgress (ORSModel.ors.Progress) –
setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI) → None

Fills a particularROI slot to be used as a source for the Dijkstra algorithm.

Note

A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.

Parameters:
  • index (int) – the slot index (an unsigned short)
  • aVolROI (ORSModel.ors.ROI) – the ROI associated with this slot index (an ROI)

WatershedOnGrid

class ORSModel.ors.WatershedOnGrid

Bases: ORSModel.ors.Watershed

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
none()

WatershedOnGrid.__init__() -> WatershedOnGrid

setGridSize(self, xSize: int, ySize: int, zSize: int) → None
Parameters:
  • xSize (int) –
  • ySize (int) –
  • zSize (int) –

Alternative constructors

Subclasses of Unmanaged

ORSModel.__init__.orsColor(r=0, g=0, b=0, a=0)
ORSModel.__init__.orsVect(x=0, y=0, z=0)
ORSModel.__init__.orsRect(origin, dir0, dir0Length, dir0Spacing, dir1, dir1Length, dir1Spacing)
ORSModel.__init__.orsKernel(sizeX, sizeY, sizeZ, *arg)
ORSModel.__init__.orsBox(origin, dir0, dir0Length, dir0Spacing, dir1, dir1Length, dir1Spacing, dir2, dir2Length, dir2Spacing)
ORSModel.__init__.orsPlane(a, b, c, d)
ORSModel.__init__.orsMatrix(v00, v01, v02, v03, v10, v11, v12, v13, v20, v21, v22, v23, v30, v31, v32, v33)
ORSModel.__init__.orsCamera(dir, pos, up, pivot, vHeight, vWidth, vTopLefX, vTopLeftY, vNear, vFar, useOrtho, orthoZoom, focalLength, depthOfField, angleOfView, normalizationTranslationMatix, normalizationRotationMatix, normalizationScaleMatix)
ORSModel.__init__.orsOrientedPlane(a, b, c, d, center, up)
ORSModel.__init__.orsLine(origin, orientation)
ORSModel.__init__.orsLineSegment(start, end)

orsObj

ORSModel.__init__.orsObj(guid)