ORSModel¶
Inheritance diagram¶

Classes¶
Annotation¶
- class ORSModel.ors.Annotation(*args, **kwargs)
Bases:
VisualRepresents image annotations.
- addControlPoint(self, pPoint: ORSModel.ors.Vector3, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4)
Note
Any change to a annotation should be followed by update() to reflect the changes visually.
- Parameters:
pPoint (ORSModel.ors.Vector3) –
iTIndex (int) –
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) –
- addControlPointForAllTimeSteps(self, pPoint: ORSModel.ors.Vector3, aWorldTransformMatrix: ORSModel.ors.Matrix4x4)
Adds a control point to every T.
- Parameters:
pPoint (ORSModel.ors.Vector3) – the control point position (a Vector3)
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none())
- addControlPointToHighlighted(self, controlPointIndex: int, iTIndex: int)
- Parameters:
controlPointIndex (int) –
iTIndex (int) –
- addControlPointToSelection(self, controlPointIndex: int, iTIndex: int)
- Parameters:
controlPointIndex (int) –
iTIndex (int) –
- addControlPointToSnapped(self, controlPointIndex: int, iTIndex: int)
- Parameters:
controlPointIndex (int) –
iTIndex (int) –
- applyTransformation(self, aTransformationMatrix: ORSModel.ors.Matrix4x4, iTIndex: int)
method applyTransformation
- Parameters:
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
iTIndex (int) –
- applyTransformationOnAllTimeStep(self, aTransformationMatrix: ORSModel.ors.Matrix4x4)
method applyTransformationOnAllTimeStep
- Parameters:
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- copyControlPointFrom(self, aControlPointCollection: ORSModel.ors.OrderedCollectionDouble, iTIndex: int)
Adds one or more control points, taken from a collection of positions.
- Parameters:
aControlPointCollection (ORSModel.ors.OrderedCollectionDouble) – a collection of position triplets (an OrderedCollectionDouble)
iTIndex (int) – the T index where to copy to (a uint32_t)
- deselectAllControlPoints(self, iTIndex: int)
Deselect all control points.
Dirty flags: OrsPropertyDirty
- Parameters:
iTIndex (int) – the t index (a uint32_t)
- duplicateTimeStepDataAcrossAllTimeSteps(self, iTIndex: int)
Duplicate Time Step Data Across All Time Steps.
- Parameters:
iTIndex (int) – the T index (a 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)
Makes a Region of Interest from the annotation.
- Parameters:
iTIndex (int) – the T index (a 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)
- getAsROIForAllTimeSteps(self, worldTransform: ORSModel.ors.Matrix4x4, pOutputROI: ORSModel.ors.ROI)
- Parameters:
worldTransform (ORSModel.ors.Matrix4x4) –
pOutputROI (ORSModel.ors.ROI) –
- getBackgroundBorderColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getBackgroundColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getBackgroundOpacity(self) float
- Returns:
output (float) –
- getBorderPadding(self) float
- Returns:
output (float) –
- getCaption(self, aView: ORSModel.ors.View, aTransformationMatrix: ORSModel.ors.Matrix4x4) str
Gets the current caption of the annotation, according to the current caption mode.
- Parameters:
aView (ORSModel.ors.View) – a view (a View)
aTransformationMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none)
- Returns:
output (str) – the current caption (a string)
- getCaptionMode(self) int
Gets the current caption mode of the annotation.
Note
See CxvAnnotationCaption_Mode in ORS_def.h for all possible caption modes.
- Returns:
output (int) – a caption mode (an int32_t)
- getCaptionTextFontName(self) str
Returns the font name of the annotation caption.
- Returns:
output (str) – the font name (a string)
- 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) ORSModel.ors.Vector3
Gets the World centroid of the annotation.
- Parameters:
iTIndex (int) – T index (a uint32_t)
worldTransform (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x43 or None)
- 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 (a uint32_t)
iTIndex (int) – the control point index (a 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 (a uint32_t)
- getControlPointPositionAtIndex(self, index: int, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) ORSModel.ors.Vector3
Gets a control point’s position.
- Parameters:
index (int) – The control point index (a uint32_t)
iTIndex (int) – The T index (a uint32_t)
aTransformationMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x43 or None)
- Returns:
output (ORSModel.ors.Vector3) – the control point position (a Vector3)
- getControlPointSize(self) float
Gets the size of control points.
- Returns:
output (float) – a size, in screen percentage (a double)
- getControlPoints(self, iTIndex: int) ORSModel.ors.OrderedCollectionDouble
Returns all the control points for a given T index.
- Parameters:
iTIndex (int) – the T index (a uint32_t)
- Returns:
output (ORSModel.ors.OrderedCollectionDouble) – A list of position triplets (x/y/z) (an OrderedCollectionDouble)
- getCreationOrientedPlane(self) ORSModel.ors.OrientedPlane
Retrieves 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, aDisplay: ORSModel.ors.View) ORSModel.ors.OrientedPlane
-
- Parameters:
aDisplay (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.OrientedPlane) – an Oriented Plane (an OrientedPlane)
- getCustomCaption(self) str
Gets the custom caption of the annotation.
See also
ORSModel.ors.Annotation.setCustomCaption(),ORSModel.ors.Annotation.getCaptionMode(),ORSModel.ors.Annotation.getCaption()- Returns:
output (str) – the custom caption (a string)
- getDefaultCaptionMode(self) int
Gets the default caption mode of the annotation.
Note
See CxvAnnotationCaption_Mode in ORS_def.h for all possible caption modes.
- Returns:
output (int) – a caption mode (an int32_t)
- 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:
aStartPoint (ORSModel.ors.Vector3) – the start and end points (Vector3)
aEndPoint (ORSModel.ors.Vector3) – the t index (a uint32_t)
iTIndex (int) – an optional transformation matrix (a Matrix4x43 or None)
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- 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 (a 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:
aPoint (ORSModel.ors.Vector3) – a point (a Vector3)
iTIndex (int) – the T index (a uint32_t)
aTransformationMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4)
- Returns:
output (float) – the distance (a double)
- getDrawDropShadow(self) bool
- Returns:
output (bool) –
- getDrawTextShadow(self) bool
Gets the view text shadows status.
- Returns:
output (bool) – true if text shadows are visible, false otherwise
- getEndType(self) int
- Returns:
output (int) –
- getFloatingCaptionMode(self) bool
Returns if the annotation is using the floating caption mode.
- Returns:
output (bool) –
- getFloatingCaptionPosition(self, pView: ORSModel.ors.View) ORSModel.ors.Vector3
Gets the floating caption position. (anVector3)
- Parameters:
pView (ORSModel.ors.View) – the view in which to check (a View)
- Returns:
output (ORSModel.ors.Vector3) –
- getHighlightControlPointColor(self) ORSModel.ors.Color
Gets the highlighted color of control points.
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- getHighlightedControlPointsArray(self, iTIndex: int) ORSModel.ors.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 point indicies (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)
- getHorizontalJustify(self) int
- Returns:
output (int) –
- getIsEditable(self) bool
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
- getIsFloatingCaptionHighlighted(self) bool
Gets if the floation caption of the annotation is highlighted. (a bool)
- Returns:
output (bool) –
- 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 (a 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
- getIsProjected(self) bool
- Returns:
output (bool) –
- getIsSnapping() bool
Gets the global snapping state.
- Returns:
output (bool) – true if snapping is enabled, false otherwise
- getLineStyle(self) int
- Returns:
output (int) –
- getNormalColor(self) ORSModel.ors.Color
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().
See also
ORSModel.ors.Annotation.getSelectedColor(), setToNormalColor(), setToSelectedColor()- Returns:
output (ORSModel.ors.Color) –
- getPickControlPoint(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) int
- Parameters:
pView (ORSModel.ors.View) –
xPixelPositionInView (int) –
yPixelPositionInView (int) –
- Returns:
output (int) –
- getProjectedNormalizedOffset(self) float
- Returns:
output (float) –
- getProjectedOffset(self) float
- Returns:
output (float) –
- getProjectionDirection(self) int
- Returns:
output (int) –
- getProjectionIn(self, worldTransform: ORSModel.ors.Matrix4x4) ORSModel.ors.Annotation
- Parameters:
worldTransform (ORSModel.ors.Matrix4x4) –
the transformation matrix with which to project (a Matrix4x4)
- Returns:
output (ORSModel.ors.Annotation) – a new annotation (an Annotation)
- getProjectionIsHighlighted(self) bool
- Returns:
output (bool) –
- getProjectionPlaneInWorldCoordinates(self) ORSModel.ors.Rectangle
Returns a plane bounded to the view, in world coordinates.
- Returns:
output (ORSModel.ors.Rectangle) – a plane (an Rectangle)
- getSelectedColor(self) ORSModel.ors.Color
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().
See also
ORSModel.ors.Annotation.getNormalColor(), setToNormalColor(), setToSelectedColor()- Returns:
output (ORSModel.ors.Color) –
- getSelectedControlPointArray(self, iTIndex: int) ORSModel.ors.OrderedCollectionUnsignedLong
Gets the list of selected control points.
- Parameters:
iTIndex (int) – the T index (a uint32_t)
- Returns:
output (ORSModel.ors.OrderedCollectionUnsignedLong) – a collection of point indicies (an OrderedCollectionUnsignedLong)
- getSelectedControlPointColor(self) ORSModel.ors.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 (a uint32_t)
- Returns:
output (int) – the count (a uint32_t)
- getShowBackground(self) bool
- Returns:
output (bool) –
- getShowBorder(self) bool
- 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
- getSnappedControlPointAppearance(self) int
Gets the snapped control point appearance.
- Returns:
output (int) – The appearance (an int) 0:Circle 1:Square 2:Triangle 3:+ 4:x
- getSnappeddControlPointsArray(self, iTIndex: int) ORSModel.ors.OrderedCollectionUnsignedLong
Gets the list of snapped control points.
- Parameters:
iTIndex (int) – the T index (a uint32_t)
- Returns:
output (ORSModel.ors.OrderedCollectionUnsignedLong) – a collection of point indicies (an OrderedCollectionUnsignedLong)
- getSupportsCaptionMode(self, iMode: int) bool
Gets if a caption mode is supported by the annotation.
Note
See CxvAnnotationCaption_Mode in ORS_def.h for all possible caption modes.
- Parameters:
iMode (int) – a caption mode (an int32_t)
- Returns:
output (bool) –
- getTextColor(self) ORSModel.ors.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) ORSModel.ors.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)
- getVerticalJustify(self) int
- Returns:
output (int) –
- insertControlPoint(self, index: int, pPoint: ORSModel.ors.Vector3, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4)
Note
Any change to a annotation should be followed by update() to reflect the changes visually.
- Parameters:
index (int) – the control point insertion index (a uint32_t)
pPoint (ORSModel.ors.Vector3) – a point (a Vector3)
iTIndex (int) – the T index (a uint32_t)
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none)
- none() Annotation
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Annotation) –
- pickFloatingCaption(self, pView: ORSModel.ors.View, xPixelPositionInView: int, yPixelPositionInView: int) bool
Picks the floating caption of the annotation.
- Parameters:
pView (ORSModel.ors.View) – the view in which to check (a View)
xPixelPositionInView (int) – the X position in the view (an int32_t)
yPixelPositionInView (int) – the Y position in the view (an int32_t)
- Returns:
output (bool) – a bool, true if the floating caption is picked, false if not
- removeAllControlPoints(self, iTIndex: int)
Removes all control points.
- Parameters:
iTIndex (int) – the T index (a uint32_t)
- removeAllControlPointsForAllTimeSteps(self)
Removes all control points.
- removeControlPoint(self, index: int, iTIndex: int)
Removes a single control point.
Note
Control point indicies are zero based.
- Parameters:
index (int) – the control point index (a uint32_t)
iTIndex (int) – the T index (a uint32_t)
- removeControlPointForAllTimeSteps(self, index: int)
Removes a single control point.
- Parameters:
index (int) – the index of the control point (a uint32_t)
- removeControlPointFromHighlighted(self, controlPointIndex: int, iTIndex: int)
- Parameters:
controlPointIndex (int) –
iTIndex (int) –
- removeControlPointFromSelection(self, controlPointIndex: int, iTIndex: int)
method removeControlPointFromSelection
- Parameters:
controlPointIndex (int) –
iTIndex (int) –
- removeControlPointFromSnapped(self, controlPointIndex: int, iTIndex: int)
- Parameters:
controlPointIndex (int) –
iTIndex (int) –
- set3DThickness(self, value: float)
Sets the thickness of lines in 3D mode.
Dirty flags: OrsPropertyDirty
- Parameters:
value (float) – the thickness, in pixel units (a double between 0 and 1)
- setBackgroundBorderColor(self, IColor: ORSModel.ors.Color)
Sets the background border color of the annotation.
Dirty flags: OrsPropertyDirty
- Parameters:
IColor (ORSModel.ors.Color) – The background border color (a Color)
- setBackgroundColor(self, IColor: ORSModel.ors.Color)
Sets the background color of the annotation.
Dirty flags: OrsPropertyDirty
- Parameters:
IColor (ORSModel.ors.Color) – The background color (a Color)
- setBackgroundOpacity(self, value: float)
Sets the background opacity of the annotation.
Dirty flags: OrsPropertyDirty
- Parameters:
value (float) – The background opacity factor (a double between 0 and 1)
- setBorderPadding(self, value: float)
Sets the padding of the background.
Dirty flags: OrsPropertyDirty
- Parameters:
value (float) – the padding value (a double)
- setCaptionMode(self, iMode: int)
Sets the current caption mode of the annotation.
Note
See CxvAnnotationCaption_Mode in ORS_def.h for all possible caption modes.
- Parameters:
iMode (int) – a caption mode (an int32_t)
- setCaptionTextFontName(self, sFontName: str)
Sets the font name of text captions.
Dirty flags: OrsPropertyDirty
- Parameters:
sFontName (str) – the font name (a string)
- setCaptionTextFontSize(self, fontSize: float)
Sets the font size of text captions, in screen one thousandths.
Dirty flags: OrsPropertyDirty
- Parameters:
fontSize (float) – the font size (a double between 0 and 1)
- setCaptionTextMinimumFontSize(self, iVal: int)
Sets the minimum font size of text captions, in font points.
- Parameters:
iVal (int) – the font size
- setControlPointAppearance(self, nValue: int)
Sets the control point appearance.
Dirty flags: OrsPropertyDirty
- Parameters:
nValue (int) – The appearance (an int) 0:Circle 1:Square 2:Triangle 3:+ 4:x
- setControlPointCaptionAtIndex(self, index: int, iTIndex: int, sCaption: str)
Sets the caption of a given control point.
- Parameters:
index (int) – the control point index (a uint32_t)
iTIndex (int) – the T index (a uint32_t)
sCaption (str) – the caption
- setControlPointPositionAtIndex(self, index: int, iTIndex: int, anIVector: ORSModel.ors.Vector3, aTransformationMatrix: ORSModel.ors.Matrix4x4)
Sets the position of a given control point.
- Parameters:
index (int) – the control point index (a uint32_t)
iTIndex (int) – the T index (a uint32_t)
anIVector (ORSModel.ors.Vector3) – the position (a Vector3)
aTransformationMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x4 or none)
- setControlPointPositionAtIndexForAllTimeSteps(self, index: int, anIVector: ORSModel.ors.Vector3, aTransformationMatrix: ORSModel.ors.Matrix4x4)
Changes the position of a control point for all Ts.
- Parameters:
index (int) – T index (a uint32_t)
anIVector (ORSModel.ors.Vector3) – new position (a Vector3)
aTransformationMatrix (ORSModel.ors.Matrix4x4) – an optional transformation matrix (a Matrix4x43 or None)
- setControlPointSize(self, value: float)
Sets the size of control points.
- Parameters:
value (float) – a size, in screen percentage (a double)
- setCreationOrientedPlane(self, anOrientedPlane: ORSModel.ors.OrientedPlane)
Sets the oriented plane on which the annotation is created.
- Parameters:
anOrientedPlane (ORSModel.ors.OrientedPlane) – an Oriented Plane (an OrientedPlane)
- setCreationOrientedPlaneFromView(self, aDisplay: ORSModel.ors.View)
Copies the oriented plane from the given view.
- Parameters:
aDisplay (ORSModel.ors.View) – a view (a View)
- setCustomCaption(self, text: str)
Note
Any modification to annotation properties must be followed by an update() to be shown on the view.
- Parameters:
text (str) –
- setDrawDropShadow(self, bDraw: bool)
Sets if the annotation has a drop shadow.
Dirty flags: OrsPropertyDirty
- Parameters:
bDraw (bool) – true to enable the drop shadow, false to disable it
- setDrawTextShadow(self, bFlag: bool)
Toggles displaying shadows for the text.
- Parameters:
bFlag (bool) – true to show text shadows, false otherwise
- setEndType(self, value: int)
Sets the end style of the annotation.
Dirty flags: OrsPropertyDirty
- Parameters:
value (int) – The end type (a uint16_t, see enum cxvArrowHeadStyle in ORS_df.h)
- setFloatingCaptionMode(self, bFloating: bool)
Sets if the annotation is using the floating caption mode.
Dirty flags: OrsPropertyDirty
- Parameters:
bFloating (bool) – true to enable floating caption mode, false to disable it
- setFloatingCaptionPosition(self, pView: ORSModel.ors.View, anIVector: ORSModel.ors.Vector3)
Sets the floating caption position.
Dirty flags: OrsPropertyDirty
- Parameters:
pView (ORSModel.ors.View) – the view in which to check (a View)
anIVector (ORSModel.ors.Vector3) – the X, Y, Z position in the view (an Vector3)
- setHighlightControlPointColor(self, IColor: ORSModel.ors.Color)
Set the color of highlighted control points.
- Parameters:
IColor (ORSModel.ors.Color) – the color (a Color)
- setHorizontalJustify(self, value: int)
Sets the scalebar horizontal justification.
Dirty flags: OrsPropertyDirty
- Parameters:
value (int) – The justification (a uint16_t, see enum cxvHorizontalJustificationType in ORS_df.h)
- setIsEditable(self, pFlag: bool)
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
- setIsFloatingCaptionHighlighted(self, bHighlight: bool)
Sets if the floation caption of the annotation is highlighted.
Dirty flags: OrsPropertyDirty
- Parameters:
bHighlight (bool) – true to set the floating caption as highlighted, false otherwise
- setIsProjected(self, projected: bool)
Sets if the annotation is projected on the bounding box in 3D.
Dirty flags: OrsPropertyDirty
- Parameters:
projected (bool) – true to project, false otherwise
- setIsSnapping(isSnapping: bool)
Sets the global snapping state.
Dirty flags: OrsPropertyDirty
- Parameters:
isSnapping (bool) – true to enable snapping, false to disable it
- setLineStyle(self, value: int)
Sets the line style of the annotation.
Dirty flags: OrsPropertyDirty
- Parameters:
value (int) – The line style (a uint16_t, see enum cxvLineStyle in ORS_df.h)
- setNormalColor(self, IColor: ORSModel.ors.Color)
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().
See also
ORSModel.ors.Annotation.setSelectedColor(), setToNormalColor(), setToSelectedColor()- Parameters:
IColor (ORSModel.ors.Color) –
- setProjectedNormalizedOffset(self, value: float)
Sets the normalized offset value of the projection (between -1.0 and 1.0)
Dirty flags: OrsPropertyDirty
- Parameters:
value (float) –
- setProjectedOffset(self, value: float)
- Parameters:
value (float) –
- setProjectionAtPosition(self, iTIndex: int, anIVector: ORSModel.ors.Vector3, aTransformationMatrix: ORSModel.ors.Matrix4x4)
- Parameters:
iTIndex (int) –
anIVector (ORSModel.ors.Vector3) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- setProjectionDirection(self, value: int)
Sets the annotation’s projection direction.
Dirty flags: OrsPropertyDirty
- Parameters:
value (int) –
- setSelectedColor(self, IColor: ORSModel.ors.Color)
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().
See also
ORSModel.ors.Annotation.setNormalColor(), setToNormalColor(), setToSelectedColor()- Parameters:
IColor (ORSModel.ors.Color) –
- setSelectedControlPointColor(self, IColor: ORSModel.ors.Color)
Sets the control point selected color of the annotation.
- Parameters:
IColor (ORSModel.ors.Color) – the color (a Color)
- setShowBackground(self, showBG: bool)
Sets if the annotation shows a background.
Dirty flags: OrsPropertyDirty
- Parameters:
showBG (bool) – true to show the background, false to hide it.
- setShowBorder(self, showBorder: bool)
Sets if the annotation shows a border.
Dirty flags: OrsPropertyDirty
- Parameters:
showBorder (bool) – true to show the border, false to hide it.
- setShowCaption(self, bShow: bool)
Dirty flags: OrsPropertyDirty
- Parameters:
bShow (bool) –
- setShowControlPoints(self, value: bool)
- Parameters:
value (bool) –
- setSnappedControlPointAppearance(self, nValue: int)
Sets the snapped control point appearance.
Dirty flags: OrsPropertyDirty
- Parameters:
nValue (int) – The appearance (an int) 0:Circle 1:Square 2:Triangle 3:+ 4:x
- setTextColor(self, IColor: ORSModel.ors.Color)
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)
Sets the text shadow color of the annotation.
- Parameters:
IColor (ORSModel.ors.Color) – the color (a Color)
- setThickness(self, value: float)
Sets the thickness of lines in 2D mode.
- Parameters:
value (float) – the thickness, in pixel units (a double between 0 and 1)
- setVerticalJustify(self, value: int)
Sets the scalebar vertical justification.
Dirty flags: OrsPropertyDirty
- Parameters:
value (int) – The justification (a uint16_t, see enum cxvVerticalalJustificationType in ORS_df.h)
- unHighlightAllControlPoints(self)
- unsnapAllControlPoints(self)
- update(self)
Updates all visual aspects of the annotation.
Array¶
- class ORSModel.ors.Array(*args, **kwargs)
Bases:
SequenceableCollectionArray abstraction class.
- copyFromMemory(self, pSource: bytes, iByteCount: int, iInsertionIndex: int)
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)
- copyIntoMemory(self, pOutput: bytes, iStartIndex: int, iNbElementsToCopy: int)
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)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() Array
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Array) –
- notFound() int
- Returns:
output (int) –
- removeAt(self, index: int)
Removes the element at a given index.
- Parameters:
index (int) – the index (a uint64_t)
ArrayBool¶
- class ORSModel.ors.ArrayBool(*args, **kwargs)
Bases:
ArrayArray for values of type bool.
- at(self, index: int) bool
Retrieves a single value from the array.
- Parameters:
index (int) – the index of the item to retrieve (an uint64_t, zero based)
- Returns:
output (bool) – the value (a bool)
- atPut(self, index: int, pValue: bool)
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 (bool) – the value to put (a bool)
- copyInto(self, anArray: ORSModel.ors.ArrayBool, iInsertionIndex: int, iStartIndex: int, iEndIndex: int)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayBool) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- findFirst(self, pValue: bool) int
Searches the array for a given value, starting at index 0.
- Parameters:
pValue (bool) – the value to search for (a bool)
- Returns:
output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
- findLast(self, pValue: bool) int
- Parameters:
pValue (bool) – the value to search for (a bool)
- 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) –
- getOccurrencesOf(self, pValue: bool) int
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (bool) – the value to look for (a bool)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: bool) bool
Verifies if the array includes a given value.
- Parameters:
pValue (bool) – the value to look for (a bool)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: bool)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (bool) –
- none() ArrayBool
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayBool) –
- privateGetData(self)
- remove(self, pvalue: bool) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (bool) –
- Returns:
output (bool) –
- setAll(self, iValue: bool)
Sets all elements of the array to the same value.
- Parameters:
iValue (bool) – the value to set (a bool)
ArrayChar¶
- class ORSModel.ors.ArrayChar(*args, **kwargs)
Bases:
ArrayArray 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)
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)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayChar) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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
- 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)
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
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (int) – the value to look for (an int8_t)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: int) bool
Verifies if the array includes a given value.
- Parameters:
pValue (int) – the value to look for (an int8_t)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: int)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (int) –
- none() ArrayChar
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayChar) –
- privateGetData(self)
- remove(self, pvalue: int) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (int) –
- Returns:
output (bool) –
- setAll(self, iValue: int)
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(*args, **kwargs)
Bases:
ArrayArray 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)
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)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayDouble) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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
- 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)
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
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (float) – the value to look for (a double)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: float) bool
Verifies if the array includes a given value.
- Parameters:
pValue (float) – the value to look for (a double)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: float)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (float) –
- none() ArrayDouble
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayDouble) –
- privateGetData(self)
- remove(self, pvalue: float) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (float) –
- Returns:
output (bool) –
- setAll(self, iValue: float)
Sets all elements of the array to the same value.
- Parameters:
iValue (float) – the value to set (a double)
ArrayFloat¶
- class ORSModel.ors.ArrayFloat(*args, **kwargs)
Bases:
ArrayArray 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)
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)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayFloat) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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
- 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)
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
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (float) – the value to look for (a float)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: float) bool
Verifies if the array includes a given value.
- Parameters:
pValue (float) – the value to look for (a float)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: float)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (float) –
- none() ArrayFloat
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayFloat) –
- privateGetData(self)
- remove(self, pvalue: float) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (float) –
- Returns:
output (bool) –
- setAll(self, iValue: float)
Sets all elements of the array to the same value.
- Parameters:
iValue (float) – the value to set (a float)
ArrayLONGLONG¶
- class ORSModel.ors.ArrayLONGLONG(*args, **kwargs)
Bases:
ArrayArray 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)
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)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayLONGLONG) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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
- 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)
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
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (int) – the value to look for (an int64_t)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: int) bool
Verifies if the array includes a given value.
- Parameters:
pValue (int) – the value to look for (an int64_t)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: int)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (int) –
- none() ArrayLONGLONG
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayLONGLONG) –
- privateGetData(self)
- remove(self, pvalue: int) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (int) –
- Returns:
output (bool) –
- setAll(self, iValue: int)
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(*args, **kwargs)
Bases:
ArrayArray 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)
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)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayLong) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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
- 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)
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
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (int) – the value to look for (an int32_t)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: int) bool
Verifies if the array includes a given value.
- Parameters:
pValue (int) – the value to look for (an int32_t)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: int)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (int) –
- none() ArrayLong
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayLong) –
- privateGetData(self)
- remove(self, pvalue: int) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (int) –
- Returns:
output (bool) –
- setAll(self, iValue: int)
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(*args, **kwargs)
Bases:
ArrayArray 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)
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)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayShort) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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
- 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)
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
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (int) – the value to look for (an int16_t)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: int) bool
Verifies if the array includes a given value.
- Parameters:
pValue (int) – the value to look for (an int16_t)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: int)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (int) –
- none() ArrayShort
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayShort) –
- privateGetData(self)
- remove(self, pvalue: int) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (int) –
- Returns:
output (bool) –
- setAll(self, iValue: int)
Sets all elements of the array to the same value.
- Parameters:
iValue (int) – the value to set (a short)
ArrayString¶
- class ORSModel.ors.ArrayString(*args, **kwargs)
Bases:
ArrayArray for values of type string.
- at(self, index: int) str
Retrieves a single value from the array.
- Parameters:
index (int) – the index of the item to retrieve (an uint64_t, zero based)
- Returns:
output (str) – the value (a wstring)
- atPut(self, index: int, pValue: str)
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 (str) – the value to put (a wstring)
- copyInto(self, anArray: ORSModel.ors.ArrayString, iInsertionIndex: int, iStartIndex: int, iEndIndex: int)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayString) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- findFirst(self, pValue: str) int
Searches the array for a given value, starting at index 0.
- Parameters:
pValue (str) – the value to search for (a wstring)
- Returns:
output (int) – the index of the value (an uint64_t, zero based), or ULLONG_MAX if not found
- findLast(self, pValue: str) int
- Parameters:
pValue (str) – the value to search for (a wstring)
- 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) –
- getOccurrencesOf(self, pValue: str) int
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (str) – the value to look for (a string)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: str) bool
Verifies if the array includes a given value.
- Parameters:
pValue (str) – the value to look for (a string)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: str)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (str) –
- none() ArrayString
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayString) –
- remove(self, pvalue: str) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (str) –
- Returns:
output (bool) –
ArrayUnsignedChar¶
- class ORSModel.ors.ArrayUnsignedChar(*args, **kwargs)
Bases:
ArrayArray 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 uint8_t)
- atPut(self, index: int, pValue: int)
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 uint8_t)
- copyInto(self, anArray: ORSModel.ors.ArrayUnsignedChar, iInsertionIndex: int, iStartIndex: int, iEndIndex: int)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayUnsignedChar) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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 uint8_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
- Parameters:
pValue (int) – the value to search for (a uint8_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 uint8_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 uint8_t)
- getMinMax(self, startIndex: int, endIndex: int)
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 uint8_t*)
max (int) – the largest value found (a uint8_t*)
- getOccurrencesOf(self, pValue: int) int
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (int) – the value to look for (a uint8_t)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: int) bool
Verifies if the array includes a given value.
- Parameters:
pValue (int) – the value to look for (a uint8_t)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: int)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (int) –
- none() ArrayUnsignedChar
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayUnsignedChar) –
- privateGetData(self)
- remove(self, pvalue: int) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (int) –
- Returns:
output (bool) –
- setAll(self, iValue: int)
Sets all elements of the array to the same value.
- Parameters:
iValue (int) – the value to set (a uint8_t)
ArrayUnsignedLONGLONG¶
- class ORSModel.ors.ArrayUnsignedLONGLONG(*args, **kwargs)
Bases:
ArrayArray 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)
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)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayUnsignedLONGLONG) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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
- 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)
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
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (int) – the value to look for (a uint64_t)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: int) bool
Verifies if the array includes a given value.
- Parameters:
pValue (int) – the value to look for (a uint64_t)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: int)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (int) –
- none() ArrayUnsignedLONGLONG
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayUnsignedLONGLONG) –
- privateGetData(self)
- remove(self, pvalue: int) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (int) –
- Returns:
output (bool) –
- setAll(self, iValue: int)
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(*args, **kwargs)
Bases:
ArrayArray 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)
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)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayUnsignedLong) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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
- 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)
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
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (int) – the value to look for (a uint32_t)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: int) bool
Verifies if the array includes a given value.
- Parameters:
pValue (int) – the value to look for (a uint32_t)
- Returns:
output (bool) – true i value is in the array, false otherwise
- insertAt(self, index: int, pValue: int)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (int) –
- none() ArrayUnsignedLong
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayUnsignedLong) –
- privateGetData(self)
- remove(self, pvalue: int) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (int) –
- Returns:
output (bool) –
- setAll(self, iValue: int)
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(*args, **kwargs)
Bases:
ArrayArray for numeric values of type uint16_t (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 uint16_t)
- atPut(self, index: int, pValue: int)
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 uint16_t)
- copyInto(self, anArray: ORSModel.ors.ArrayUnsignedShort, iInsertionIndex: int, iStartIndex: int, iEndIndex: int)
Note
The destination array will grow to accommodate the copied data, if required.
- Parameters:
anArray (ORSModel.ors.ArrayUnsignedShort) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- 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 uint16_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
- Parameters:
pValue (int) – the value to search for (a uint16_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 uint16_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 uint16_t)
- getMinMax(self, startIndex: int, endIndex: int)
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 uint16_t*)
max (int) – the largest value found (a uint16_t*)
- getOccurrencesOf(self, pValue: int) int
Counts the number of times a given value appears in the receiver.
- Parameters:
pValue (int) – the value to look for (a uint16_t)
- Returns:
output (int) – the number of times it was found in the array (a uint64_t)
- includes(self, pValue: int) bool
Verifies if the array includes a given value.
- Parameters:
pValue (int) – the value to look for (a uint16_t)
- Returns:
output (bool) – true if value is in the array, false otherwise
- insertAt(self, index: int, pValue: int)
Note
All items after the insertion index are shifted down. The last element of the array is thus lost.
- Parameters:
index (int) –
pValue (int) –
- none() ArrayUnsignedShort
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ArrayUnsignedShort) –
- privateGetData(self)
- remove(self, pvalue: int) bool
Note
All items after the insertion index are shifted up. The array’s size doesn’t change.
- Parameters:
pvalue (int) –
- Returns:
output (bool) –
- setAll(self, iValue: int)
Sets all elements of the array to the same value.
- Parameters:
iValue (int) – the value to set (a uint16_t)
BezierPatch¶
- class ORSModel.ors.BezierPatch
Bases:
SurfaceControlPointsBezierPatch manipulation services.
- copy(self) ORSModel.ors.BezierPatch
Copies aBezierPatch.
Note
The copied BezierPatch has the same equation as the source BezierPatch.
- Returns:
output (ORSModel.ors.BezierPatch) – A new BezierPatch (an BezierPatch)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.BezierPatch
Create aBezierPatch from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.BezierPatch) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getIsEqualTo(self, BezierPatch: ORSModel.ors.BezierPatch) bool
Verifies equality between the receiver and a givenBezierPatch.
- Parameters:
BezierPatch (ORSModel.ors.BezierPatch) –
- Returns:
output (bool) – TRUE if the argument BezierPatch is equal to the receiver, FALSE otherwise
- none() BezierPatch
- Returns:
output (BezierPatch) –
- transform(self, transformationMatrix: ORSModel.ors.Matrix4x4)
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)
Box¶
- class ORSModel.ors.Box
Bases:
Shape3DBox manipulation services.
- clip(self, pBox: ORSModel.ors.Box)
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) ORSModel.ors.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)
- getBoundedPlaneOfSlice(self, sliceIndex: int) ORSModel.ors.Rectangle
Gets the bounded plane for a given direction2 index.
- Parameters:
sliceIndex (int) – the index in the direction2 of the box (a uint32_t)
- Returns:
output (ORSModel.ors.Rectangle) – the bounded plane (a Rectangle)
- getBoxInBoxReferential(self, inRefBox: ORSModel.ors.Box) ORSModel.ors.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, inVect: ORSModel.ors.Vector3) ORSModel.ors.Vector3
Transforms the given point (which is expressed in the box referential) in the world 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)
- getCenterHalfVoxel(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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 (a 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) ORSModel.ors.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 (a 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) ORSModel.ors.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 (a 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) ORSModel.ors.Vector3
Get the direction of the maximal size.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getDirectionMid(self) ORSModel.ors.Vector3
Get the direction of the middle size.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getDirectionMin(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Box
Makes the box containing the receiver, oriented with the provided directions.
- Parameters:
dir0 (ORSModel.ors.Vector3) – direction0 of the new box (a Vector3)
dir1 (ORSModel.ors.Vector3) – direction1 of the new box (a Vector3)
- Returns:
output (ORSModel.ors.Box) – the box containing the receiver (a Box)
- getFace(self, faceIndex: int) ORSModel.ors.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)
- getFaceOutwardNormal(self, faceIndex: int) ORSModel.ors.Rectangle
Gets the bounded plane of a face with normal pointing outside of box.
- 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) ORSModel.ors.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)
- getIntersectionWithLineProvidingOutput(self, aLine: ORSModel.ors.Line, aLineSegmentOutput: ORSModel.ors.LineSegment)
Gets the intersection of the receiver with the given line.
- Parameters:
aLine (ORSModel.ors.Line) – a line (a Line)
aLineSegmentOutput (ORSModel.ors.LineSegment) – the output line segment (a LineSegment)
- getIntersectionWithLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) ORSModel.ors.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)
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – true if the receiver intersects the shape, false otherwise (a bool)
- getIsIsotropic(self) bool
Checks is box is isotrope.
- Returns:
output (bool) – true if the all direction spacings are equal, 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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Vector3
Gets the box origin position.
Note
The origin is in world coordinates.
- Returns:
output (ORSModel.ors.Vector3) – the origin (an Vector3)
- getOriginOpposite(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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)
- getRectangleOfIntersection(self, cutPlane: ORSModel.ors.Plane, upVector: ORSModel.ors.Vector3) ORSModel.ors.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:
cutPlane (ORSModel.ors.Plane) – a plane (an Plane)
upVector (ORSModel.ors.Vector3) – an up vector (an Vector3)
- Returns:
output (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)
- getRectangleOfIntersectionClipped(self, aClipingRectangle: ORSModel.ors.Rectangle) ORSModel.ors.Rectangle
Computes the bounded plane (with the same direction vector and spacing has the clipingRectangle ) of the intersection of the receiver with a plane, clipped to the extent of the clipingRectangle.
Note
The rectangle will have an area of zero if the plane does not intersect the box.
- Parameters:
aClipingRectangle (ORSModel.ors.Rectangle) – a rectangle (an Rectangle)
- Returns:
output (ORSModel.ors.Rectangle) – a rectangle plane (a Rectangle)
- getRotationMatrix(self) ORSModel.ors.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.
See also
ORSModel.ors.Box.getDirection0Spacing(),ORSModel.ors.Box.getDirection1Spacing(),ORSModel.ors.Box.getDirection2Spacing()- 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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Vector3
Gets the (minDirection0, minDirection1, minDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitmmp(self) ORSModel.ors.Vector3
Gets the (minDirection0, minDirection1, maxDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitmpm(self) ORSModel.ors.Vector3
Gets the (minDirection0, maxDirection1, minDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitmpp(self) ORSModel.ors.Vector3
Gets the (minDirection0, maxDirection1, maxDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitpmm(self) ORSModel.ors.Vector3
Gets the (maxDirection0, minDirection1, minDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitpmp(self) ORSModel.ors.Vector3
Gets the (maxDirection0, minDirection1, maxDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitppm(self) ORSModel.ors.Vector3
Gets the (maxDirection0, maxDirection1, minDirection2) summit position.
- Returns:
output (ORSModel.ors.Vector3) – a summit position (a Vector3)
- getSummitppp(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Matrix4x4
Gets the transformation from the unit box to the receiver.
- Returns:
output (ORSModel.ors.Matrix4x4) –
- grow(self, growSize: ORSModel.ors.Vector3)
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, aShape: ORSModel.ors.Shape3D)
Grows to include a given box.
Note
The receiver will grow to contain the provided box, but it will never shrink.
- Parameters:
aShape (ORSModel.ors.Shape3D) – a box (a Box)
- growToIncludePoint(self, aPoint: ORSModel.ors.Vector3)
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, aShape: ORSModel.ors.Shape3D)
Makes the box able to contain a givenShape3D.
Note
The receiver will grow or shrink to fit on the provided box.
- Parameters:
aShape (ORSModel.ors.Shape3D) – a Shape 3d (an Shape3D)
- moveFaceSoThatPlaneIncludesPoint(self, faceIndex: int, pVect: ORSModel.ors.Vector3)
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)
- orthonormalizeDirections(self)
Orthonormalizes the directions of the box.
- setCenter(self, newCenter: ORSModel.ors.Vector3)
Set the center of the box.
- Parameters:
newCenter (ORSModel.ors.Vector3) – a vector that specify the center of the box
- setDirection(self, index: int, pVect: ORSModel.ors.Vector3)
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)
Sets the box direction0.
Note
The direction0 vector will be normalized.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirection0Size(self, aSize: float)
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)
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)
Sets the box direction1.
Note
The direction1 vector will be normalized.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirection1Size(self, aSize: float)
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)
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)
Sets the box direction2.
Note
The direction2 vector will be normalized.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirection2Size(self, aSize: float)
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)
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)
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)
Sets the direction size as a vector.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirectionSpacing(self, index: int, aSpacing: float)
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)
Sets the direction spacing as a vector.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setOrigin(self, pVect: ORSModel.ors.Vector3)
Sets the box origin position.
Note
The origin should be in world coordinates.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
Camera¶
- class ORSModel.ors.Camera
Bases:
UnmanagedThe camera object, i.e. the view point from which we look at objects.
- copy(self) ORSModel.ors.Camera
Gets a copy.
- Returns:
output (ORSModel.ors.Camera) –
- copyFrom(self, aCamera: ORSModel.ors.Camera)
Copy the parameters of a given camera.
- Parameters:
aCamera (ORSModel.ors.Camera) –
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Camera
Create aCamera from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Camera) –
- getAngleOfView(self) float
Gets angle of view.
- Returns:
output (float) –
- getCameraDirection(self) ORSModel.ors.Vector3
Gets the look at direction.
- Returns:
output (ORSModel.ors.Vector3) –
- getCameraLeft(self) ORSModel.ors.Vector3
Gets the left direction.
- Returns:
output (ORSModel.ors.Vector3) –
- getCameraPivot(self) ORSModel.ors.Vector3
Gets the pivot position.
- Returns:
output (ORSModel.ors.Vector3) –
- getCameraPosition(self) ORSModel.ors.Vector3
Gets the location.
- Returns:
output (ORSModel.ors.Vector3) –
- getCameraRight(self) ORSModel.ors.Vector3
Gets the right direction.
- Returns:
output (ORSModel.ors.Vector3) –
- getCameraUp(self) ORSModel.ors.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) ORSModel.ors.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) –
- getIsPointInFrontOfCamera(self, aPoint: ORSModel.ors.Vector3) bool
Use to know if a point is behind the camera.
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- Returns:
output (bool) –
- getLineOfSight(self, positionOnView: ORSModel.ors.Vector3) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Rectangle
Get camera near plane.
- Returns:
output (ORSModel.ors.Rectangle) – the near plane (a Rectangle)
- getOrthoZoomFactor(self) float
method getOrthoZoomFactor
- Returns:
output (float) –
- getRectangle(self, fDistance: float) ORSModel.ors.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) ORSModel.ors.Camera
Gets a new camera rotated around an axis around a specified location by an angle.
- Parameters:
rotationAxis (ORSModel.ors.Vector3) –
rotationPivot (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.Camera) –
- getSceneNormalizationMatrix(self) ORSModel.ors.Matrix4x4
Get scene normalization matrix.
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getSceneNormalizationRotationMatrix(self) ORSModel.ors.Matrix4x4
Get scene normalization matrix.
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getSceneNormalizationScaleMatrix(self) ORSModel.ors.Matrix4x4
Get scene normalization matrix.
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getSceneNormalizationTranslationMatrix(self) ORSModel.ors.Matrix4x4
Get scene normalization matrix.
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getScreenToWorldCoordinate(self, xCoordinate: float, yCoordinate: float) ORSModel.ors.Vector3
Gets screen to world coordinate.
- Parameters:
xCoordinate (float) –
yCoordinate (float) –
- Returns:
output (ORSModel.ors.Vector3) –
- getScreenToWorldDirection(self, xCoordinate: float, yCoordinate: float) ORSModel.ors.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) ORSModel.ors.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) –
- rotateAroundAxis(self, rotationAxis: ORSModel.ors.Vector3, rotationPivot: ORSModel.ors.Vector3, angle: float)
Rotates the camera around an axis around a specified location by an angle.
- Parameters:
rotationAxis (ORSModel.ors.Vector3) –
rotationPivot (ORSModel.ors.Vector3) –
angle (float) –
- setAngleOfView(self, aValue: float)
Sets angle of view.
- Parameters:
aValue (float) –
- setCameraDirection(self, inputVector: ORSModel.ors.Vector3)
Sets the look at direction.
- Parameters:
inputVector (ORSModel.ors.Vector3) –
- setCameraPivot(self, inputVector: ORSModel.ors.Vector3)
Sets the pivot position.
- Parameters:
inputVector (ORSModel.ors.Vector3) –
- setCameraPosition(self, inputVector: ORSModel.ors.Vector3)
Sets the location.
- Parameters:
inputVector (ORSModel.ors.Vector3) –
- setCameraUp(self, inputVector: ORSModel.ors.Vector3)
Sets the up direction.
- Parameters:
inputVector (ORSModel.ors.Vector3) –
- setDepthOfField(self, aValue: float)
Sets depth of field.
- Parameters:
aValue (float) –
- setFocalLength(self, aValue: float)
Sets focal length.
- Parameters:
aValue (float) –
- setFromViewMatrix(self, aMatrix: ORSModel.ors.Matrix4x4)
Sets the parameters from a left-handed view matrix.
- Parameters:
aMatrix (ORSModel.ors.Matrix4x4) –
- setOrthoZoomFactor(self, zoomFactor: float)
method setOrthoZoomFactor
- Parameters:
zoomFactor (float) –
- setSceneNormalizationRotationMatrix(self, aMatrix: ORSModel.ors.Matrix4x4)
Set scene normalization matrix.
- Parameters:
aMatrix (ORSModel.ors.Matrix4x4) –
- setSceneNormalizationScaleMatrix(self, aMatrix: ORSModel.ors.Matrix4x4)
Set scene normalization matrix.
- Parameters:
aMatrix (ORSModel.ors.Matrix4x4) –
- setSceneNormalizationTranslationMatrix(self, aMatrix: ORSModel.ors.Matrix4x4)
Set scene normalization matrix.
- Parameters:
aMatrix (ORSModel.ors.Matrix4x4) –
- setUse3DOrthoApproximationProjection(self, aValue: bool)
Sets 3D ortho approximationprojection.
- Parameters:
aValue (bool) –
- setUseOrthoProjection(self, aValue: bool)
Sets ortho projection.
- Parameters:
aValue (bool) –
- setViewPortFar(self, aValue: float)
Sets viewport far.
- Parameters:
aValue (float) –
- setViewPortHeight(self, aValue: int)
Sets viewport height.
- Parameters:
aValue (int) –
- setViewPortNear(self, aValue: float)
Sets viewport near.
- Parameters:
aValue (float) –
- setViewPortTopLeftX(self, aValue: int)
Sets viewport top left x.
- Parameters:
aValue (int) –
- setViewPortTopLeftY(self, aValue: int)
Sets viewport top left y.
- Parameters:
aValue (int) –
- setViewPortWidth(self, aValue: int)
Sets viewport width.
- Parameters:
aValue (int) –
Capsule¶
- class ORSModel.ors.Capsule
Bases:
Shape3DCapsule manipulation services.
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Capsule
Create aCapsule from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Capsule) –
- getAxis(self) ORSModel.ors.Vector3
Returns the normal of theCapsule.
- Returns:
output (ORSModel.ors.Vector3) – A vector (an Vector3)
- getCap1Center(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getCap2Center(self) ORSModel.ors.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) ORSModel.ors.LineSegment
- Parameters:
aLine (ORSModel.ors.Line) –
- Returns:
output (ORSModel.ors.LineSegment) –
- getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) ORSModel.ors.LineSegment
- 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
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- 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)
- setCap1Center(self, aPoint: ORSModel.ors.Vector3)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setCap2Center(self, aPoint: ORSModel.ors.Vector3)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setCenter(self, aPoint: ORSModel.ors.Vector3)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setRadius(self, aRadius: float)
- Parameters:
aRadius (float) –
- transform(self, transformationMatrix: ORSModel.ors.Matrix4x4)
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)
Channel¶
- class ORSModel.ors.Channel(*args, **kwargs)
Bases:
StructuredGridA 4D data container with configurable dimensions and type specifications.
Channel serves as a four-dimensional (XYZT) data container with the following key features:
Configurable depth based on channel type
Customizable data description
Adjustable spacing for data representation
Dynamic memory management for data storage
Set XYZT dimensions
Define channel type
Initialize channel data structure
Populate data array
See also
CxvChannel_Description
See also
CxvChannel_Data_Type
- 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)
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.
See also
- Parameters:
pSliceData (ORSModel.ors.Array) – the slice data (an Array), see note below
- addSuggestedWindowLevelValues(self, pWidth: float, pCenter: float)
Note
The window width should be >= 1.
Note
The suggested leveling values are only used to present suitable values to end users.
See also
ORSModel.ors.Channel.getSuggestedWindowLevelWidthAt(), getSuggestedWIndowLevelCenterAt(),ORSModel.ors.Channel.getNumberOfSuggestedWindowLevelValues()- Parameters:
pWidth (float) – a window width (a double)
pCenter (float) – a window center (a double)
- apply2DAffinePixelWise(self, offsetX: float, offsetY: float, xx: float, xy: float, yx: float, yy: float, mode: int, outputChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
Copies a slice to another.
Note
If any index is invalid no copy occurs.
- Parameters:
offsetX (float) – T source index (an uint32_t)
offsetY (float) – Z source index (an uint32_t)
xx (float) – T target index (an uint32_t)
xy (float) – Z target index (an uint32_t)
yx (float) –
yy (float) –
mode (int) –
outputChannel (ORSModel.ors.Channel) –
- Returns:
output (ORSModel.ors.Channel) –
- apply2DFlip(self, flipX: bool, flipY: bool, outputChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
- Parameters:
flipX (bool) –
flipY (bool) –
outputChannel (ORSModel.ors.Channel) –
- Returns:
output (ORSModel.ors.Channel) –
- applyLevelingAndGammaTransformationToData(self, minValue: float, maxValue: float, gamma: float)
- Parameters:
minValue (float) –
maxValue (float) –
gamma (float) –
- applyLevelingTransformationToData(self, minValue: float, maxValue: float)
- Parameters:
minValue (float) –
maxValue (float) –
- applyLinearTransformationToData(self, slope: float, offset: float)
- Parameters:
slope (float) –
offset (float) –
- convertToType(self, datatype: int, bNormalize: bool, iLowNormalizationRange: float, iHighNormalizationRange: float, bFilter: bool, iLowFilterRange: float, iHighFilterRange: float, iReplacementLowerValue: float, iReplacementUpperValue: float, outputChannel: ORSModel.ors.Channel, IProgress: ORSModel.ors.Progress) ORSModel.ors.Channel
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)
iReplacementLowerValue (float) – replacement lower value for the filter (a double)
iReplacementUpperValue (float) – replacement upper 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)
Copies the DICOM attributes from another channel.
See also
ORSModel.ors.Channel.setDICOMAttribute(),ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.getDICOMAttributeFromSequence()- 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)
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 = True)
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)
- copyDataFromCommonRegionWithThicknessAverage(self, inputChannelToFill: ORSModel.ors.Channel, tOffset: int, IProgress: ORSModel.ors.Progress)
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:
inputChannelToFill (ORSModel.ors.Channel) – the companion channel (a Channel)
tOffset (int) – the time step to use in the channel (a uint32_t)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
- copyDataFromCommonRegionWithThicknessMaxIntensityProjection(self, inputChannelToFill: ORSModel.ors.Channel, tOffset: int, IProgress: ORSModel.ors.Progress)
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:
inputChannelToFill (ORSModel.ors.Channel) – the companion channel (a Channel)
tOffset (int) – the time step to use in the channel (a uint32_t)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
- copyDataFromCommonRegionWithThicknessMinIntensityProjection(self, inputChannelToFill: ORSModel.ors.Channel, tOffset: int, IProgress: ORSModel.ors.Progress)
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:
inputChannelToFill (ORSModel.ors.Channel) – the companion channel (a Channel)
tOffset (int) – the time step to use in the channel (a uint32_t)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
- copyInto(self, aDestinationChannel: ORSModel.ors.Channel)
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)
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)
- copySliceData(self, iTSource: int, iZSource: int, iTTarget: int, iZTarget: int)
Copies a slice to another.
Note
If any index is invalid no copy 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)
- emptySuggestedWindowLevelValues(self)
Cleans the suggested window leveling values.
- executeGPGPUCommand(self, outputChannel: ORSModel.ors.Channel, shaderFilename: str, Slabsize: int, iNbIteration: int, numericArguments: dict, iKernelSize: int) ORSModel.ors.Channel
Compute given compute shader program on an channel.
- Parameters:
outputChannel (ORSModel.ors.Channel) – the result channel (an ORS::Channel)
shaderFilename (str) – filename of the compute shader program (a string)
Slabsize (int) – the number of images in the input slab (an uint32_t)
iNbIteration (int) – number of iteration to run the program (an uint32_t)
numericArguments (dict) – a dictionnary of numeric arguments (an std::map)
iKernelSize (int) – size of the kernel (an uint32_t)
- Returns:
output (ORSModel.ors.Channel) –
- extractPhiThetaOrientationFromXYZVectorField(chanX: ORSModel.ors.Channel, chanY: ORSModel.ors.Channel, chanZ: ORSModel.ors.Channel, chanPhi: ORSModel.ors.Channel, chanTheta: ORSModel.ors.Channel) bool
- Parameters:
chanX (ORSModel.ors.Channel) – chanX (ORS::Channel)
chanY (ORSModel.ors.Channel) – chanY (ORS::Channel)
chanZ (ORSModel.ors.Channel) – chanZ (ORS::Channel)
chanPhi (ORSModel.ors.Channel) – chanPhi (ORS::Channel)
chanTheta (ORSModel.ors.Channel) – chanTheta (ORS::Channel)
- Returns:
output (bool) – true if successfull
- fillValueWithAssociatedScalarValue(self, sourcePosition: ORSModel.ors.Vector3, mesh: ORSModel.ors.Mesh, vertexScalarSlotId: int, iTIndex: int)
Note
The current channel represents the detector. Then, the origin and world coordinate position of the current structured grid matted for the computation.
- Parameters:
sourcePosition (ORSModel.ors.Vector3) – source position in world coordinate (an ORS::Vector3)
mesh (ORSModel.ors.Mesh) – mesh (an ORS::Mesh)
vertexScalarSlotId (int) – the selected vertex Scalar Slot Id
iTIndex (int) – T index (an uint32_t)
- fillValueWithCrossingMeshValue(self, sourcePosition: ORSModel.ors.Vector3, mesh: ORSModel.ors.Mesh, iTIndex: int)
(Context of a radiography) Compute the number of intersection of the mesh from a source, and store the value to the detector
Note
The current channel represents the detector. Then, the origin and world coordinate position of the current structured grid matted for the computation.
- Parameters:
sourcePosition (ORSModel.ors.Vector3) – source position in world coordinate (an ORS::Vector3)
mesh (ORSModel.ors.Mesh) – mesh (an ORS::Mesh)
iTIndex (int) – T index (an uint32_t)
- fillValueWithOpticalPath(self, sourcePosition: ORSModel.ors.Vector3, mesh: ORSModel.ors.Mesh, iTIndex: int)
(Context of a radiography) Compute the optical path of the mesh from a source, and store the value to the detector
Note
The current channel represents the detector. Then, the origin and world coordinate position of the current structured grid matted for the computation
- Parameters:
sourcePosition (ORSModel.ors.Vector3) – source position in world coordinate (an ORS::Vector3)
mesh (ORSModel.ors.Mesh) – mesh (an ORS::Mesh)
iTIndex (int) – T index (an uint32_t)
- getAllSliceIntersectionLength(self, arrayOfIntersectionLengthPerSlice: float, timeStep: int) float
- Parameters:
arrayOfIntersectionLengthPerSlice (float) –
timeStep (int) –
- Returns:
output (float) –
- getAllSlicesHaveSameOrientation(self, pTIndex: int) bool
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.
See also
ORSModel.ors.Channel.setIsData3D(), getOrientationComparisonEpsilon()- Parameters:
pTIndex (int) –
- Returns:
output (bool) – true if all slices have identical orientations, false otherwise
- getAreAllZSlicesDataAvailable(self) bool
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)
Note
The provided channel serves as the reference grid and the receiver is linearly interpolated.
- Parameters:
pCompareChannel (ORSModel.ors.Channel) – the channel to compare with (a Channel)
pOutputChannel (ORSModel.ors.Channel) – the output channel (a Channel)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
- getAsChannelClosedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
See also
ORSModel.ors.Channel.getAsChannelDilatedWithKernel(),ORSModel.ors.Channel.getAsChannelErodedWithKernel()- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the closing kernel made of 0 or 1 (a ConvolutionKernel)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or NULL for no progress
pOutChannel (ORSModel.ors.Channel) – channel to put the result in (can be the receiver) (a Channel)
- 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) ORSModel.ors.Channel
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) ORSModel.ors.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) ORSModel.ors.Channel
- Parameters:
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) –
- 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) ORSModel.ors.Channel
- Parameters:
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) –
- 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) ORSModel.ors.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) ORSModel.ors.Channel
- Parameters:
normal (ORSModel.ors.Vector3) –
timeStep (int) –
outXSizeInworld (float) –
nearest (bool) –
inputChannel (ORSModel.ors.Channel) –
- 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) ORSModel.ors.Channel
- Parameters:
InputPath (ORSModel.ors.VisualPath) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
normal (ORSModel.ors.Vector3) –
timeStep (int) –
outXSizeInworld (float) –
nearest (bool) –
inputChannel (ORSModel.ors.Channel) –
- Returns:
output (ORSModel.ors.Channel) –
- getAsChannelDilatedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
Note
the simple tone of gray dilatation is a convolution operation selecting the maximum value in the kernel
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the dilatation kernel made of 0 or 1 (an ConvolutionKernel)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or NULL for no progress
pOutChannel (ORSModel.ors.Channel) – channel to put the result in (can be the receiver) (a Channel)
- 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) ORSModel.ors.Channel
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) ORSModel.ors.Channel
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) ORSModel.ors.Channel
Note
the simple tone of grey erosion is a convolution operation selecting the minimum value in the kernel
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the erosion kernel made of 0 or 1 (an ConvolutionKernel)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or none for no progress
pOutChannel (ORSModel.ors.Channel) – channel to put the result in (can be the receiver) (a Channel)
- 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) ORSModel.ors.Channel
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) ORSModel.ors.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) – an optional output channel (an ORSChannelPtr)
pOutChannel (ORSModel.ors.Channel) –
- Returns:
output (ORSModel.ors.Channel) – the result channel (an ORSChannelPtr)
- getAsChannelFromROI(self, pInputROI: ORSModel.ors.ROI) ORSModel.ors.Channel
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:
output (ORSModel.ors.Channel) – a result channel (a Channel)
pOutChannel (ORSModel.ors.Channel) – an optional output channel (a Channel)
- getAsChannelGaussianSmoothed(self, kernelSize: int, pOutChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
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) – an optional output channel (an ORSChannelPtr)
pOutChannel (ORSModel.ors.Channel) –
- 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) ORSModel.ors.Channel
- Parameters:
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) –
- 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) ORSModel.ors.Channel
- Parameters:
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) –
- 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) ORSModel.ors.Channel
- Parameters:
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) –
- 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) ORSModel.ors.Channel
- Parameters:
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) –
- Returns:
output (ORSModel.ors.Channel) –
- getAsChannelOpenWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
See also
ORSModel.ors.Channel.getAsChannelDilatedWithKernel(),ORSModel.ors.Channel.getAsChannelErodedWithKernel()- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the opening kernel made of 0 or 1 (an ConvolutionKernel)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress), or none for no progress
pOutChannel (ORSModel.ors.Channel) – the channel to put the result in (can be the receiver) (a Channel)
- Returns:
output (ORSModel.ors.Channel) – a result channel (a Channel)
- getAsChannelPadded(self, xPadd: int, yPadd: int, zPadd: int, pValue: float, pOutChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
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 padding value, normalized (a double)
yPadd (int) – an optional output channel (an ORSChannelPtr)
zPadd (int) –
pValue (float) –
pOutChannel (ORSModel.ors.Channel) –
- 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) ORSModel.ors.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.
See also
ORSModel.ors.Channel.getAsChannelSampledInterpolatedFromPlane(),ORSModel.ors.Channel.getAsChannelCrossSection(),ORSModel.ors.Channel.getAsChannelSampledInterpolatedFromPlane(),ORSModel.ors.Channel.getAsChannelCrossSection()- 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) ORSModel.ors.Channel
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.
See also
ORSModel.ors.Channel.getAsChannelSampledInterpolatedFromPlane(),ORSModel.ors.Channel.getAsChannelCrossSection()- 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) ORSModel.ors.Channel
Samples the channel data along a specified plane, interpolating the voxel values.
Note
The general plane equation used for sampling is ax + by + cz + d = 0.
Note
The up-vector (upX, upY, upZ) helps determine the plane’s orientation.
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 coefficient of the x-term in the plane equation.
b (float) –
The coefficient of the y-term in the plane equation.
c (float) –
The coefficient of the z-term in the plane equation.
d (float) –
The constant term in the plane equation (ax + by + cz + d = 0).
upX (float) –
The x-component of the up-vector used to define the orientation of the plane.
upY (float) –
The y-component of the up-vector used to define the orientation of the plane.
upZ (float) –
The z-component of the up-vector used to define the orientation of the plane.
timeStep (int) –
The time step at which to sample the channel.
pInChannel (ORSModel.ors.Channel) –
The input channel containing the voxel data to be sampled.
- Returns:
output (ORSModel.ors.Channel) – A new channel containing the interpolated voxel values from the specified plane.
- getAsChannelSampledInterpolatedFromPlane2(self, aBoundedPlane: ORSModel.ors.Rectangle, nearest: bool, timeStep: int, pInChannel: ORSModel.ors.Channel) ORSModel.ors.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.
See also
ORSModel.ors.Channel.getAsChannelCrossSection(),ORSModel.ors.Channel.getAsChannelSampledInterpolatedFromPlane()- 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) –
timestep
pInChannel (ORSModel.ors.Channel) – an optional output channel (a Channel)
- Returns:
output (ORSModel.ors.Channel) – a result channel (a Channel)
- getAsChannelSampledViaSpacing(self, samplingMethod: int, newXSpacing: float, newYSpacing: float, newZSpacing: float, IProgress: ORSModel.ors.Progress, pOutChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
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.
See also
ORSModel.ors.Channel.getAsChannelSampledInterpolatedFromPlane(),ORSModel.ors.Channel.getAsChannelCrossSection()- Parameters:
samplingMethod (int) – a CxvSamplingMethod (a uint16_t)
newXSpacing (float) – the new X spacing (a double)
newYSpacing (float) – the new Y spacing (a double)
newZSpacing (float) – the new Z spacing (a double)
IProgress (ORSModel.ors.Progress) – progress object (None() for no progress bar)
pOutChannel (ORSModel.ors.Channel) – a target channel (a Channel)
- Returns:
output (ORSModel.ors.Channel) – the resulting channel (a Channel)
- getAsChannelWithEqualizedHistogram(self, anHistogram: ORSModel.ors.HistogramData, normalizeData: bool, zmin: int, zmax: int, zOffsetInputToOutput: int, pIOutputChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
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) ORSModel.ors.Channel
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:
output (ORSModel.ors.Channel) – a result channel (a Channel)
pIInputChannel (ORSModel.ors.Channel) – an optional output channel (a Channel)
- getAsMarchingCubeMesh(self, isovalue: float, bSnapToContour: bool, flipNormal: bool, timeStep: int, xSample: int, ySample: int, zSample: int, pNearest: bool, pWorld: bool, pMesh: ORSModel.ors.Mesh) ORSModel.ors.Mesh
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) – true to snap vertices to contour, false to interpolate
bSnapToContour (bool) – true flips normals, false doesn’t
flipNormal (bool) – the time step to use in the channel (an uint32_t)
timeStep (int) – the X sampling (a uint16_t, 1 means no sampling)
xSample (int) – the Y sampling (a uint16_t, 1 means no sampling)
ySample (int) – the Z sampling (a uint16_t, 1 means no sampling)
zSample (int) – true to sample to nearest value, false to sample linearly (if sampling is 1 this flag is ignored)
pNearest (bool) – true to have the resulting mesh in world coordinates, false in local
pWorld (bool) – a progress object (an ORSProgressPtr) to show a progress bar, NULL doesn’t show one
pMesh (ORSModel.ors.Mesh) –
- Returns:
output (ORSModel.ors.Mesh) – the resulting mesh model (an ORSMeshPtr)
pProgress (ORSModel.ors.Progress) – an optional output mesh model (an ORSMeshPtr)
- getAsMultiROIInArea(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, IProgress: ORSModel.ors.Progress, pInputMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
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) ORSModel.ors.ROI
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) ORSModel.ors.ROI
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) ORSModel.ors.ROI
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) ORSModel.ors.ROI
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) ORSModel.ors.ROI
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) –
- getCalibrationKey1(self) str
Gets the channel first calibration key.
- Returns:
output (str) – the first calibration key (a string)
- getCalibrationKey2(self) str
Gets the channel second calibration key.
- Returns:
output (str) – the second calibration key (a string)
- getCalibrationRawValue1(self) float
Gets the channel raw value associated to the first calibration key.
- Returns:
output (float) – the raw value associated to the first calibration key (a double)
- getCalibrationRawValue2(self) float
Gets the channel raw value associated to the second calibration key.
- Returns:
output (float) – the raw value associated to the second calibration key (a double)
- getChannelLocalMaxAsROI(self, pKernel: ORSModel.ors.ConvolutionKernel, fMinValue: float, fMaxValue: float, pOutROI: ORSModel.ors.ROI) ORSModel.ors.ROI
Find the local maximum of a dataset and returns it into a volumeROI.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the computation kernel made of 0 or 1 (an ConvolutionKernel)
fMinValue (float) – a minimum thresholdValue under which the localMax found are ignored (double)
fMaxValue (float) – a maximum thresholdValue over which the localMax found are ignored (double)
pOutROI (ORSModel.ors.ROI) – an output ROI
- Returns:
output (ORSModel.ors.ROI) –
- getChannelLocalMinAsROI(self, pKernel: ORSModel.ors.ConvolutionKernel, fMinValue: float, fMaxValue: float, pOutROI: ORSModel.ors.ROI) ORSModel.ors.ROI
Find the local minimum of a dataset and returns it into a volumeROI.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the computation kernel made of 0 or 1 (an ConvolutionKernel)
fMinValue (float) – a minimum thresholdValue under which the localMin found are ignored (double)
fMaxValue (float) – a maximum thresholdValue over which the localMin found are ignored (double)
pOutROI (ORSModel.ors.ROI) – an output ROI
- Returns:
output (ORSModel.ors.ROI) –
- 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:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- 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:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- Returns:
clipOriginSummit (ORSModel.ors.Vector3) – the origin summit of the clip box
clipOppositeSummit (ORSModel.ors.Vector3) – the origin opposite summit of the clip box
- 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
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().
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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().
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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().
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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().
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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().
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes(),ORSModel.ors.Channel.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.
See also
CxvChannel_Description,
ORSModel.ors.Channel.setDataDescription()- Returns:
output (int) – a description index (a int32_t*)
- getDataRange(self) float
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).
See also
- 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.
See also
CxvChannel_Data_Type,
ORSModel.ors.Channel.setDataType(),ORSModel.ors.Channel.getBitCount(),ORSModel.ors.Channel.getTypeDescription()- Returns:
output (int) – a type (a int32_t*)
- getDataUnit(self) str
- Returns:
output (str) –
- getDimensionUnit(self) ORSModel.ors.DimensionUnit
Gets the channel’s dimension unit.
- Returns:
output (ORSModel.ors.DimensionUnit) –
- 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
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) ORSModel.ors.Array
- Parameters:
pLineSegment (ORSModel.ors.LineSegment) –
nTIndex (int) –
fSpacing (float) –
nInterpolationMethod (int) –
values (ORSModel.ors.Array) –
- Returns:
output (ORSModel.ors.Array) –
- getInterpolatedPositionOnSlice(self, pTIndex: int, pZSlice: float, xPos: float, yPos: float) ORSModel.ors.Vector3
Note
The X and Y positions can be outside the channel.
See also
setChannelOrientation(), getChannelOrientation(),
ORSModel.ors.Channel.setSliceOrientation(),ORSModel.ors.Channel.setSlicePosition(),ORSModel.ors.Channel.getSlicePosition()- 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) ORSModel.ors.ArrayDouble
- Parameters:
aWorldCoordinate (ORSModel.ors.ArrayDouble) –
tIndex (int) –
nInterpolationMethod (int) –
bConvertToPhysicalUnits (bool) –
values (ORSModel.ors.ArrayDouble) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getIsClipped(timestep=0, display=None)
Gets to know if there is a clip box attached to the channel
- Parameters:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- Returns:
isClipped (bool) – if True, the clip box of the channel is visible; False otherwise.
- getIsData3D(self) bool
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.
See also
- 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
- getIsDataTypeFloat(self) bool
- Returns:
output (bool) –
- getIsDataTypeUnsignedBYTE(self) bool
- Returns:
output (bool) –
- getIsDataTypeUnsignedInt(self) bool
- Returns:
output (bool) –
- getIsDataTypeUnsignedShort(self) bool
- Returns:
output (bool) –
- getIsLossy(self) bool
Verifies if the channel is lossy or not.
Note
A channel can be lossy for two different reasons:
See also
- 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
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().
See also
ORSModel.ors.Channel.getAreAllZSlicesDataAvailable(),ORSModel.ors.Channel.setIsZSliceDataAvailable()- 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, perSlice: bool, IProgress: ORSModel.ors.Progress, pInVolumeROI: ORSModel.ors.ROI, pOutData: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
This method labels areas of the channel by finding adjacent voxels and labelling them with sequential numbering.
Note
The perSlice parameter is useful when loading a time series of 2d images as a 3d volume.
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
perSlice (bool) – a progress object (an Progress), or NULL for no progress
IProgress (ORSModel.ors.Progress) – if True, labelling will only apply within an xy slice.
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) ORSModel.ors.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
-
- Returns:
output (float) –
- getMaximumValueInPhysicalUnits(self) float
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
-
- Returns:
output (float) –
- getMicroscopySurfaceCorrection(self, depthMap: ORSModel.ors.Channel, zSpacing: float, iTIndex: int) ORSModel.ors.Channel
(Context of microscopy) Compute a surface correction (2.5D image) from depth map
- Parameters:
depthMap (ORSModel.ors.Channel) – the depth image (an ORS::Channel)
zSpacing (float) – the z spacing of the corrected image output (a float)
iTIndex (int) – T index (an uint32_t)
- Returns:
output (ORSModel.ors.Channel) –
- getMinMaxMeanAlongAnnotationWithDiskOrSquare(self, annotation: ORSModel.ors.Annotation, radius: float, nbPoint: int, timestep: int, min: ORSModel.ors.ArrayDouble, max: ORSModel.ors.ArrayDouble, mean: ORSModel.ors.ArrayDouble, samplingPointsX: ORSModel.ors.ArrayDouble, samplingPointsY: ORSModel.ors.ArrayDouble, samplingPointsZ: ORSModel.ors.ArrayDouble, isDisk: bool, useLinearInterpolation: bool) bool
- Parameters:
annotation (ORSModel.ors.Annotation) – the annotation along which to compute the arrays
radius (float) – the radius (diagonal in case of the square) of the shape around the annotation where used for the computation (a double)
nbPoint (int) – the number of points taken along the annotation (a uint32_t)
timestep (int) – if true, the points will be reordered to have a counter-clockwise winding; if false, the windinw will be clockwise.
min (ORSModel.ors.ArrayDouble) – the array where the computed min values are stored
max (ORSModel.ors.ArrayDouble) – the array where the computed max values are stored
mean (ORSModel.ors.ArrayDouble) – the array where the computed mean values are stored
samplingPointsX (ORSModel.ors.ArrayDouble) – the array where the x position of the points taken along the annotation are stored
samplingPointsY (ORSModel.ors.ArrayDouble) – the array where the y position of the points taken along the annotation are stored
samplingPointsZ (ORSModel.ors.ArrayDouble) – the array where the z position of the points taken along the annotation are stored
isDisk (bool) – if true, the shape constructed for the computation will be a disk
useLinearInterpolation (bool) – if true, the channel values will be interpolated by linear interpolation
- Returns:
output (bool) –
- getMinMaxSubsetAsVector(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int) ORSModel.ors.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
-
- Returns:
output (float) –
- getMinimumValueInPhysicalUnits(self) float
Note
Min, max and mean are kept statically and are recomputed when the channel data changes.
- Returns:
output (float) – the minimum value (a double)
- 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
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
See also
ORSModel.ors.Channel.addSuggestedWindowLevelValues(),ORSModel.ors.Channel.getSuggestedWindowLevelWidthAt(),ORSModel.ors.Channel.getSuggestedWindowLevelCenterAt()- Returns:
output (int) – the number of pairs (a uint16_t)
- getOffset(self) float
Gets the channel offset.
See also
ORSModel.ors.Channel.setOffset(),ORSModel.ors.Channel.setSlope(),ORSModel.ors.Channel.getSlope()- Returns:
output (float) – the offset (a double)
- getOrientationComparisonPrecision() float
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=None)
Get the Otsu Threshold
- Parameters:
timestep (int) – timestep to analyse
bins (int) – bin count for the calculation
- getPhysicalMax(self) float
Note
The return value is not normalized, but it is always typecast to a double.
- Returns:
output (float) –
- getPhysicalMin(self) float
Note
The return value is not normalized, but it is always typecast to a float.
- Returns:
output (float) –
- getPositionOnLine(self, pT: int, iZSlice: int, iYLine: int, xIndex: float) ORSModel.ors.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) ORSModel.ors.Vector3
Note
The X and Y positions can be outside the channel.
See also
setChannelOrientation(), getChannelOrientation(),
ORSModel.ors.Channel.setSliceOrientation(),ORSModel.ors.Channel.setSlicePosition(),ORSModel.ors.Channel.getSlicePosition()- 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)
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) ORSModel.ors.ArrayDouble
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:
pPoint1 (ORSModel.ors.Vector3) – a starting coordinate (an ORSVector3Ptr)
pPoint2 (ORSModel.ors.Vector3) – an ending coordinate (an ORSVector3Ptr)
timeStep (int) – the T index (an uint32_t)
- 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) ORSModel.ors.ArrayDouble
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
Note
First three indicies indicate X orientation, next three indicate Y orientation and last three are for Z.
See also
setChannelOrientation(), getChannelOrientation(),
ORSModel.ors.Channel.setSliceOrientation(),ORSModel.ors.Channel.setSlicePosition(),ORSModel.ors.Channel.getSlicePosition()- 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) ORSModel.ors.Vector3
See also
setPosition(), getPosition(),
ORSModel.ors.Channel.setSlicePosition(),ORSModel.ors.Channel.setSliceOrientation(),ORSModel.ors.Channel.getSliceOrientation()- 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) ORSModel.ors.Rectangle
- Parameters:
timeStep (int) –
sliceIndex (int) –
- Returns:
output (ORSModel.ors.Rectangle) –
- getSlope(self) float
Gets the channel slope.
See also
ORSModel.ors.Channel.setOffset(),ORSModel.ors.Channel.setSlope(),ORSModel.ors.Channel.getOffset()- Returns:
output (float) – the slope (a double)
- getSobel(is3D: bool = True, sigma: int = 1)
Apply Sobel filter (with Gaussian before) and output the resulting new channel
- Parameters:
is3D (bool) – Determines if the sobel should be 2D or 3D
sigma (int) – sigma used for the gaussian kernel
- Return:
the output Channel that is the result of the Sobel filtering
- Rtype:
- 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
Note
The suggested leveling values are only used to present suitable values to end users.
See also
getSuggestedWIndowLevelCenterAt(),
ORSModel.ors.Channel.getNumberOfSuggestedWindowLevelValues()- Parameters:
pIndex (int) – the index (a uint16_t)
- Returns:
output (float) – the window center (a double)
- getSuggestedWindowLevelWidthAt(self, pIndex: int) float
Note
The suggested leveling values are only used to present suitable values to end users.
See also
getSuggestedWIndowLevelCenterAt(),
ORSModel.ors.Channel.getNumberOfSuggestedWindowLevelValues()- Parameters:
pIndex (int) – the index (a uint32_t)
- Returns:
output (float) – the window width (a double)
- getTRawDataChunk(self, iLevel1: int) int
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 (unsigned char**)
- getTimeFrame(self, pTimeStep: int)
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 uint64_t)
- getTotalSliceIntersectionLength(self, timeStep: int) float
- Parameters:
timeStep (int) –
- Returns:
output (float) –
- getTransformationToGoTo(self, pInChannel: ORSModel.ors.Channel) ORSModel.ors.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) –
- getValueAsDoubleAtWorldCoordinateCubic(self, aWorldCoordinate: ORSModel.ors.Vector3, tIndex: int) float
Get cubic interpolated value at world position.
Note
return 0 if the world coordinate is outside of the Channel
- Parameters:
aWorldCoordinate (ORSModel.ors.Vector3) – a world coordinate (a Vector3)
tIndex (int) – the T index (an uint32_t)
- Returns:
output (float) – the interpolated value (a double)
- getValueAsDoubleAtWorldCoordinateLinear(self, aWorldCoordinate: ORSModel.ors.Vector3, tIndex: int) float
Get linear interpolated value at world position.
Note
return 0 if the world coordinate is outside of the Channel
- Parameters:
aWorldCoordinate (ORSModel.ors.Vector3) – a world coordinate (a Vector3)
tIndex (int) – the T index (an uint32_t)
- Returns:
output (float) – the interpolated value (a double)
- getValueAsDoubleAtWorldCoordinateNearest(self, aWorldCoordinate: ORSModel.ors.Vector3, tIndex: int) float
Get nearest interpolated value at world position.
Note
return 0 if the world coordinate is outside of the Channel
- Parameters:
aWorldCoordinate (ORSModel.ors.Vector3) – a world coordinate (a Vector3)
tIndex (int) – the T index (an uint32_t)
- Returns:
output (float) – the interpolated value (a double)
- 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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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 file(s)
- Parameters:
files (file or str) – fully qualified file name list or fully qualified file name
- 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
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.
See also
ORSModel.ors.Channel.getTotalByteCount(),ORSModel.ors.StructuredGrid.setXSize(),ORSModel.ors.StructuredGrid.setYSize(),ORSModel.ors.StructuredGrid.setZSize(),ORSModel.ors.StructuredGrid.setTSize()- Returns:
output (bool) –
- initializeDataForFLOAT(self) bool
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.
See also
ORSModel.ors.Channel.getTotalByteCount(),ORSModel.ors.StructuredGrid.setXSize(),ORSModel.ors.StructuredGrid.setYSize(),ORSModel.ors.StructuredGrid.setZSize(),ORSModel.ors.StructuredGrid.setTSize()- Returns:
output (bool) –
- initializeDataForUCHAR(self) bool
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.
See also
ORSModel.ors.Channel.getTotalByteCount(),ORSModel.ors.StructuredGrid.setXSize(),ORSModel.ors.StructuredGrid.setYSize(),ORSModel.ors.StructuredGrid.setZSize(),ORSModel.ors.StructuredGrid.setTSize()- Returns:
output (bool) –
- 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.
See also
ORSModel.ors.Channel.getTotalByteCount(),ORSModel.ors.StructuredGrid.setXSize(),ORSModel.ors.StructuredGrid.setYSize(),ORSModel.ors.StructuredGrid.setZSize(),ORSModel.ors.StructuredGrid.setTSize()- 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.
See also
ORSModel.ors.Channel.getTotalByteCount(),ORSModel.ors.StructuredGrid.setXSize(),ORSModel.ors.StructuredGrid.setYSize(),ORSModel.ors.StructuredGrid.setZSize(),ORSModel.ors.StructuredGrid.setTSize()- 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) ORSModel.ors.Channel
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: bytes)
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)
Merges the channel with another channel, feeding a third channel.
Note
Merging respects both channels’ orientation, size, spacing, etc.
- Parameters:
channelB (ORSModel.ors.Channel) – a source channel (a Channel)
channelC (ORSModel.ors.Channel) – a target channel (a Channel)
IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
- moveChannelDataAddingInto(self, otherChannel: ORSModel.ors.Channel) bool
Move the data from the source channel to the target channel, adding to the target channel’s data.
Note
After calling this method, the source channel has no pixel data.
- Parameters:
otherChannel (ORSModel.ors.Channel) – The channel to move data into (a Channel)
- Returns:
output (bool) –
- moveChannelDataInto(self, otherChannel: ORSModel.ors.Channel) bool
Move the data from the source channel to the target channel.
Note
After calling this method, the source channel has no pixel data.
- Parameters:
otherChannel (ORSModel.ors.Channel) – The channel to move data into (a Channel)
- Returns:
output (bool) –
- moveSlicedata(self, zIndex: int, timeStep: int, xTranslation: int, yTranslation: int)
- Parameters:
zIndex (int) –
timeStep (int) –
xTranslation (int) –
yTranslation (int) –
- none() Channel
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Channel) –
- overwriteRangeWithValue(self, minValue: float, maxValue: float, replacementValue: float)
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
See also
- 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)
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)
Note
The replacement value must be supplied in normalized format, no matter the data type of the channel.
See also
ORSModel.ors.Channel.overwriteRangeWithValue(),ORSModel.ors.Channel.overwriteValueAtIndicies(),ORSModel.ors.Channel.overwriteValueWithROI()- 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)
- Parameters:
aMultiROI (ORSModel.ors.MultiROI) –
labelOffset (int) –
- overwriteValueWithMultiROIConsideringOpacity(self, aMultiROI: ORSModel.ors.MultiROI, labelOffset: int, fHightlightOpacity: float, fHightlightOpacityOutRange: float, fROIOpacity: float, fROIOpacityOutRange: float)
- Parameters:
aMultiROI (ORSModel.ors.MultiROI) –
labelOffset (int) –
fHightlightOpacity (float) –
fHightlightOpacityOutRange (float) –
fROIOpacity (float) –
fROIOpacityOutRange (float) –
- overwriteValueWithMultiROIOnSubBox(self, aMultiROI: ORSModel.ors.MultiROI, labelOffset: int, subBox: ORSModel.ors.Box, iTIndex: int = 0)
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:
aMultiROI (ORSModel.ors.MultiROI) – the time step index (uint32_t)
labelOffset (int) –
subBox (ORSModel.ors.Box) –
iTIndex (int) –
- overwriteValueWithMultiROIOnSubBoxConsideringOpacity(self, aMultiROI: ORSModel.ors.MultiROI, labelOffset: int, subBox: ORSModel.ors.Box, fHightlightOpacity: float, fHightlightOpacityOutRange: float, fROIOpacity: float, fROIOpacityOutRange: float, iTIndex: int = 0)
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:
aMultiROI (ORSModel.ors.MultiROI) – the time step index (uint32_t)
labelOffset (int) –
subBox (ORSModel.ors.Box) –
fHightlightOpacity (float) –
fHightlightOpacityOutRange (float) –
fROIOpacity (float) –
fROIOpacityOutRange (float) –
iTIndex (int) –
- overwriteValueWithROI(self, aVolumeROI: ORSModel.ors.ROI, pReplacementValue: float)
- Parameters:
aVolumeROI (ORSModel.ors.ROI) –
pReplacementValue (float) –
- overwriteValueWithROIOnSubBox(self, aROI: ORSModel.ors.ROI, pReplacementValue: float, subBox: ORSModel.ors.Box, iTIndex: int = 0)
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) – the time step index (uint32_t)
pReplacementValue (float) –
subBox (ORSModel.ors.Box) –
iTIndex (int) –
- 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) ORSModel.ors.Channel
- Parameters:
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) –
- Returns:
output (ORSModel.ors.Channel) –
- projectInShape(self, aShape: ORSModel.ors.Shape3D, sourceTime: int, channelFilteringMode: int, outputChannel: ORSModel.ors.Channel, outputChannelMask: ORSModel.ors.Channel, destinationTime: int) ORSModel.ors.Channel
- Parameters:
aShape (ORSModel.ors.Shape3D) –
sourceTime (int) –
channelFilteringMode (int) –
outputChannel (ORSModel.ors.Channel) –
outputChannelMask (ORSModel.ors.Channel) –
destinationTime (int) –
- Returns:
output (ORSModel.ors.Channel) –
- removeAllPrivateDICOMAttributes(self)
Removes all private DICOM attributes.
- removeSlice(self, pSliceIndex: int)
Note
Note that the same slice index will be removed in all T dimensions of the channel.
See also
- Parameters:
pSliceIndex (int) –
- resetSettingsOfPhysicalTransformation()
Resets the settings associated to the transformation to physical values. Slope is set as 1.0, offset is set as 0.0, dimensionUnit is set as generic continuous and calibration values are erased.
Dirty flags: OrsDataDirty
- setAllData(self, aValue: float)
Dirty flags: OrsDataDirty
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 = 0)
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)
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)
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
- setCalibrationValues(self, sCalibrationKey1: str, calibrationRawValue1: float, sCalibrationKey2: str, calibrationRawValue2: float)
Sets the channel’s calibration values.
Dirty flags: OrsDataDirty
Note
This is only to store information about calibration. There is no enforcement of coherence with the slope/offset/dimension unit contained in the channel instance.
See also
ORSModel.ors.Channel.getCalibrationKey1(), getPreCalibratedValue1(),ORSModel.ors.Channel.getCalibrationKey2(), getPreCalibratedValue2()- Parameters:
sCalibrationKey1 (str) – the first calibration key to use from the dimension unit (a string)
calibrationRawValue1 (float) – the raw value of the channel associated to the first calibration key (a double)
sCalibrationKey2 (str) – the second calibration key to use from the dimension unit (a string)
calibrationRawValue2 (float) – the raw value of the channel associated to the second calibration key (a double)
- setDICOMAttribute(self, sValue: str, iTIndex: int, iZIndex: int, pGroup: int, pElement: int, bReplaceExisting: bool) bool
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.
See also
ORSModel.ors.Channel.setDICOMAttribute(),ORSModel.ors.Channel.getDICOMAttributeFromSequence(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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
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.
See also
ORSModel.ors.Channel.getDICOMAttribute(),ORSModel.ors.Channel.removeAllPrivateDICOMAttributes()- 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: bytes)
Private.
- Parameters:
iTIndex (int) –
iZIndex (int) –
sData (bytes) –
- setDataDescription(self, pChannelDescriptionEnumValue: int)
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.
See also
CxvChannel_Description,
ORSModel.ors.Channel.getDataDescription()- Parameters:
pChannelDescriptionEnumValue (int) – a description index (a int32_t*)
- setDataRange(self, pValue: float)
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.
See also
- Parameters:
pValue (float) – a value (a double)
- setDataType(self, pDataType: int)
Sets the channel data type.
Dirty flags: OrsDataDirty
Note
See CxvChannel_Data_Type (in ORS_def.h) for supported data types.
See also
CxvChannel_Data_Type,
ORSModel.ors.Channel.getDataType(),ORSModel.ors.Channel.getBitCount(),ORSModel.ors.Channel.getTypeDescription()- Parameters:
pDataType (int) –
- setDataUnit(self, bDimensionalUnit: str)
Sets the channel data unit description.
- Parameters:
bDimensionalUnit (str) – a string
- setDimensionUnit(self, dimUnit: ORSModel.ors.DimensionUnit)
Sets the channel’s dimension unit.
Dirty flags: OrsDataDirty
- Parameters:
dimUnit (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
- setInitialWindowLevelValues(self, pWidth: float, pCenter: float)
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)
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.
See also
- Parameters:
pValue (bool) – true if data is 3D, false otherwise
- setIsLossy(self, pValue: bool)
Sets the channel to be lossy or not.
Note
A channel can be lossy for two different reasons:
See also
- Parameters:
pValue (bool) – true if data is lossy, false otherwise
- setIsMarkedSlice(self, pTIndex: int, pZSlice: int, pValue: bool)
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)
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)
Sets the channel offset.
Dirty flags: OrsDataDirty
See also
ORSModel.ors.Channel.getOffset(),ORSModel.ors.Channel.setSlope(),ORSModel.ors.Channel.getSlope()- Parameters:
pOffset (float) – the offset (a double)
- setSavePixelDataWhileSavingNode(self, pFlag: int)
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)
- Parameters:
seriesHasBeenChangedFlag (bool) –
- setSliceDirection0Size(self, timeStep: int, sliceIndex: int, direction0Size: float)
- Parameters:
timeStep (int) –
sliceIndex (int) –
direction0Size (float) –
- setSliceDirection0Spacing(self, timeStep: int, sliceIndex: int, direction0Spacing: float)
- Parameters:
timeStep (int) –
sliceIndex (int) –
direction0Spacing (float) –
- setSliceDirection1Size(self, timeStep: int, sliceIndex: int, direction1Size: float)
- Parameters:
timeStep (int) –
sliceIndex (int) –
direction1Size (float) –
- setSliceDirection1Spacing(self, timeStep: int, sliceIndex: int, direction1Spacing: float)
- Parameters:
timeStep (int) –
sliceIndex (int) –
direction1Spacing (float) –
- setSliceOrientation(self, pTIndex: int, pZSlice: int, index: int, value: float)
Note
First three indicies indicate X orientation, next three indicate Y orientation and last three are for Z.
See also
getChannelOrientation(), setChannelOrientation(),
ORSModel.ors.Channel.getSliceOrientation(),ORSModel.ors.Channel.setSlicePosition(),ORSModel.ors.Channel.getSlicePosition()- 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)
See also
getPosition(), setPosition(),
ORSModel.ors.Channel.getSlicePosition(),ORSModel.ors.Channel.setSliceOrientation(),ORSModel.ors.Channel.getSliceOrientation()- 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)
- Parameters:
timeStep (int) –
sliceIndex (int) –
pBoundedPlane (ORSModel.ors.Rectangle) –
- setSlope(self, pSlope: float)
Sets the channel slope.
Dirty flags: OrsDataDirty
See also
ORSModel.ors.Channel.setOffset(),ORSModel.ors.Channel.getSlope(),ORSModel.ors.Channel.getOffset()- Parameters:
pSlope (float) – the slope (a double)
- setSpacingValidity(self, bXSpacing: bool, bYSpacing: bool, bZSpacing: bool)
Sets if the channel has valid spacing.
See also
ORSModel.ors.Channel.getSpacingXValidity(),ORSModel.ors.Channel.getSpacingYValidity(),ORSModel.ors.Channel.getSpacingZValidity()- 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)
Writes a channel subset into the current channel data.
Dirty flags: OrsDataDirty
- 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)
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)
- swapSliceData(self, iTSource: int, iZSource: int, iTTarget: int, iZTarget: int)
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)
- Parameters:
transformationMatrix (ORSModel.ors.Matrix4x4) –
- updateCrossSection(self, path: ORSModel.ors.VisualPath, aTransformationMatrix: ORSModel.ors.Matrix4x4, timeStep: int, pInChannel: ORSModel.ors.Channel)
- Parameters:
path (ORSModel.ors.VisualPath) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
timeStep (int) –
pInChannel (ORSModel.ors.Channel) –
- updateSliceMatricesWithGlobalMatrixValue(self)
Channel2DOverlapMergerHelper¶
- class ORSModel.ors.Channel2DOverlapMergerHelper(self)
Bases:
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) ORSModel.ors.Channel
- Parameters:
outputChannel (ORSModel.ors.Channel) –
listOfChannelsToMerge (ORSModel.ors.List) –
z (int) –
t (int) –
method (int) –
onlyOverlap (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- none() Channel2DOverlapMergerHelper
- Returns:
output (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)
- 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(self)
Bases:
Unmanaged- blend(self, outputChannel: ORSModel.ors.Channel, listOfChannelsToMerge: ORSModel.ors.List, t: int, method: int, interpolation: int, progress: ORSModel.ors.Progress) ORSModel.ors.Channel
- Parameters:
outputChannel (ORSModel.ors.Channel) –
listOfChannelsToMerge (ORSModel.ors.List) –
t (int) –
method (int) –
interpolation (int) –
progress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.Channel) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() Channel3DBlendingHelper
- Returns:
output (Channel3DBlendingHelper) –
ChannelRegistrationHelper¶
- class ORSModel.ors.ChannelRegistrationHelper(self)
Bases:
Unmanaged- applyTransformationDegreeOfFreedomOnChannel(self, kindOfDegreeOfFreedom: int, numeroDirection: int, backward: bool)
- Parameters:
kindOfDegreeOfFreedom (int) –
numeroDirection (int) –
backward (bool) –
- getChannelA(self) ORSModel.ors.Channel
- Returns:
output (ORSModel.ors.Channel) –
- getChannelB(self) ORSModel.ors.Channel
- Returns:
output (ORSModel.ors.Channel) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getCurrentSimilarity(self) float
- Returns:
output (float) –
- getEpsilonRotation(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getEpsilonScaleFactor(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getEpsilonTranslation(self) ORSModel.ors.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) ORSModel.ors.Matrix4x4
- Parameters:
bApplyTransformation (bool) –
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getRotationScaleCenter(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getRotationScaleCenterAlwaysAtCenter(self) bool
- Returns:
output (bool) –
- getSearchDeltaRotation(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getSearchDeltaScaleFactor(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getSearchDeltaTranslation(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getSuggestedHistogramSizesSturgesRule(self, pIChannelA: ORSModel.ors.Channel, pIChannelB: ORSModel.ors.Channel) int
- Parameters:
pIChannelA (ORSModel.ors.Channel) –
pIChannelB (ORSModel.ors.Channel) –
- Returns:
output (int) –
- 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
- Returns:
output (ChannelRegistrationHelper) –
- resetRotationScaleCenter(self)
- setChannelA(self, pIChannel: ORSModel.ors.Channel)
- Parameters:
pIChannel (ORSModel.ors.Channel) –
- setChannelAB(self, pIChannelA: ORSModel.ors.Channel, pIChannelB: ORSModel.ors.Channel)
- Parameters:
pIChannelA (ORSModel.ors.Channel) –
pIChannelB (ORSModel.ors.Channel) –
- setChannelB(self, pIChannel: ORSModel.ors.Channel)
- Parameters:
pIChannel (ORSModel.ors.Channel) –
- setEpsilonRotation(self, pVector: ORSModel.ors.Vector3)
- Parameters:
pVector (ORSModel.ors.Vector3) –
- setEpsilonScaleFactor(self, pVector: ORSModel.ors.Vector3)
- Parameters:
pVector (ORSModel.ors.Vector3) –
- setEpsilonTranslation(self, pVector: ORSModel.ors.Vector3)
- Parameters:
pVector (ORSModel.ors.Vector3) –
- setFactorOfCompressionHistogramA(self, factor: int)
- Parameters:
factor (int) –
- setFactorOfCompressionHistogramB(self, factor: int)
- Parameters:
factor (int) –
- setHistogramASize(self, value: int)
- Parameters:
value (int) –
- setHistogramBSize(self, value: int)
- Parameters:
value (int) –
- setMask(self, pROiMask: ORSModel.ors.ROI)
- Parameters:
pROiMask (ORSModel.ors.ROI) –
- setNearestInterpolation(self, aFlag: bool)
- Parameters:
aFlag (bool) –
- setRotationScaleCenter(self, pVect: ORSModel.ors.Vector3)
- Parameters:
pVect (ORSModel.ors.Vector3) –
- setRotationScaleCenterAlwaysAtCenter(self, aFlag: bool)
- Parameters:
aFlag (bool) –
- setSearchDeltaEpsilonRotation(self, pIInputChannel: ORSModel.ors.Channel, searchDelta: float, epsilon: float)
- Parameters:
pIInputChannel (ORSModel.ors.Channel) –
searchDelta (float) –
epsilon (float) –
- setSearchDeltaEpsilonScaleFactor(self, pIInputChannel: ORSModel.ors.Channel, searchDelta: float, epsilon: float)
- Parameters:
pIInputChannel (ORSModel.ors.Channel) –
searchDelta (float) –
epsilon (float) –
- setSearchDeltaEpsilonTranslation(self, pIInputChannel: ORSModel.ors.Channel, searchDelta: float, epsilon: float)
- Parameters:
pIInputChannel (ORSModel.ors.Channel) –
searchDelta (float) –
epsilon (float) –
- setSearchDeltaRotation(self, pVector: ORSModel.ors.Vector3)
- Parameters:
pVector (ORSModel.ors.Vector3) –
- setSearchDeltaScaleFactor(self, pVector: ORSModel.ors.Vector3)
- Parameters:
pVector (ORSModel.ors.Vector3) –
- setSearchDeltaTranslation(self, pVector: ORSModel.ors.Vector3)
- Parameters:
pVector (ORSModel.ors.Vector3) –
- setSearchDirectionBox(self, pIChannelBox: ORSModel.ors.Box)
- Parameters:
pIChannelBox (ORSModel.ors.Box) –
- setSearchDirectionChannel(self, pIChannel: ORSModel.ors.Channel)
- Parameters:
pIChannel (ORSModel.ors.Channel) –
- setTimeA(self, time: int)
- Parameters:
time (int) –
- setTimeB(self, time: int)
- Parameters:
time (int) –
- setUseMultiScale(self, aFlag: bool)
- Parameters:
aFlag (bool) –
- setUseMutualInfo(self, aFlag: bool)
- Parameters:
aFlag (bool) –
- setXSampling(self, aSampling: int)
- Parameters:
aSampling (int) –
- setYSampling(self, aSampling: int)
- Parameters:
aSampling (int) –
- setZSampling(self, aSampling: int)
- Parameters:
aSampling (int) –
ChannelSliceRegistrationHelper¶
- class ORSModel.ors.ChannelSliceRegistrationHelper(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Node- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
ChannelSliceRegistrationHelper.__init__(self)
- addTranslation(self, zIndex: int, tIndex: int, aVect: ORSModel.ors.Vector3)
- Parameters:
zIndex (int) –
tIndex (int) –
aVect (ORSModel.ors.Vector3) –
- applySliceRegistrationToChannel(self, pInputChannel: ORSModel.ors.Channel, iTIndex: int, IProgress: ORSModel.ors.Progress, pOutputChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
- Parameters:
pInputChannel (ORSModel.ors.Channel) –
iTIndex (int) –
IProgress (ORSModel.ors.Progress) –
pOutputChannel (ORSModel.ors.Channel) –
- Returns:
output (ORSModel.ors.Channel) –
- composeMatrix(self, zIndex: int, tIndex: int, aMatrix: ORSModel.ors.Matrix4x4)
Compose the transformation matrix from slice (zIndex-1) registered position to slice zIndex registered position with thw given matrix.
- Parameters:
zIndex (int) –
tIndex (int) –
aMatrix (ORSModel.ors.Matrix4x4) –
- copyInto(self, aDestinationRegistration: ORSModel.ors.ChannelSliceRegistrationHelper)
- Parameters:
aDestinationRegistration (ORSModel.ors.ChannelSliceRegistrationHelper) –
- copyShapeFromChannel(self, aChannel: ORSModel.ors.Channel)
- 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) ORSModel.ors.Channel
- Parameters:
pInputChannel (ORSModel.ors.Channel) –
aCutPlane (ORSModel.ors.Plane) –
IOutputSliceChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
- 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) ORSModel.ors.Channel
- Parameters:
pInputChannel (ORSModel.ors.Channel) –
aCutPlane (ORSModel.ors.Plane) –
IOutputSliceChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.Channel) –
- getApplicableChannelList(self) ORSModel.ors.List
- Returns:
output (ORSModel.ors.List) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getComposeMatrixFromSliceIToJ(self, zIndexI: int, zIndexJ: int, tIndex: int) ORSModel.ors.Matrix4x4
- Parameters:
zIndexI (int) –
zIndexJ (int) –
tIndex (int) –
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getGlobalMatrix(self, zIndex: int, tIndex: int) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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:
aChannel (ORSModel.ors.Channel) –
nZIndex (int) –
nTIndex (int) –
pIBoundingBoxSearchArea (ORSModel.ors.Box) –
- Returns:
output (int) –
- getRegisteredChannelBox(self, aChannel: ORSModel.ors.Channel) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.ChannelSliceRegistrationHelper
- Parameters:
pInputRegistrationHelper (ORSModel.ors.ChannelSliceRegistrationHelper) –
startZ (int) –
endZ (int) –
startT (int) –
endT (int) –
pOutputRegistrationHelper (ORSModel.ors.ChannelSliceRegistrationHelper) –
- Returns:
output (ORSModel.ors.ChannelSliceRegistrationHelper) –
- none() ChannelSliceRegistrationHelper
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ChannelSliceRegistrationHelper) –
- registerSliceMutualInfo(self, aChannel: ORSModel.ors.Channel, startZ: int, endZ: int, tIndex: int, nbIteration: int, bResetRegistration: bool, IProgress: ORSModel.ors.Progress)
Note
Set the parameter with setSimilarityXSampling(), setSimilarityYSampling(), setMaximumXOffsetBetweenSlice(), setMaximumYOffsetBetweenSlice()
- Parameters:
aChannel (ORSModel.ors.Channel) –
startZ (int) –
endZ (int) –
tIndex (int) –
nbIteration (int) –
bResetRegistration (bool) –
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)
- Parameters:
aChannel (ORSModel.ors.Channel) – the initial step on Y axis is the first translation that will be applied and tested by the algorithm
startZ (int) – the smallest step on X axis is the minimum distance that could be tested by the algorithm
endZ (int) – the smallest step on Y axis is the minimum distance that could be tested by the algorithm
tIndex (int) – the initial step is the first rotation that will be applied and tested by the algorithm
fDeltaTranslationX (float) – the smallest step is the is minimum rotation that could be tested by the algorithm
fDeltaTranslationY (float) – indicate if the registration matrix should be reseted (a bool)
fEpsilonTranslationX (float) – indicate if we register on a fixed slice (a bool)
fEpsilonTranslationY (float) – indicate the fixed slice index (if we register on a fixed slice) (a uint32_t)
fDeltaRotation (float) – the progress bar (an Progress)
fEpsilonRotation (float) –
bResetRegistration (bool) –
bUseFixReferenceSlice (bool) –
nFixReferenceSliceIdx (int) –
IProgress (ORSModel.ors.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)
Note
Determining Optical Flow, Berthold K.P. Horn and Brian G. Schunck. MIT, Artificial Intelligence Laboratory, April 1980.
Note
Relaxing the Brightness Constancy Assumption in Computing Optical Flow, Michael A. Gennert and Shahriar Negahdaripour. MIT, Artificial Intelligence Laboratory, June 1987.
Note
On Variable Brightness Optical Flow for Tagged MRI, Sandeep N. Gupta and Jerry L. Prince. Information Processing in Medical Imaging, 1995.
- Parameters:
aChannel (ORSModel.ors.Channel) – indicate that the algorithm should use rotation(a bool)
startZ (int) – smallest rotation (in radians) (from the last iteration) that should be reached to stop the iterative process(a double)
endZ (int) – maximal number of iterations(an unsigned short)
tIndex (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)
bUseTranslation (bool) – indicate if the linear factor of brightness correction(for stabilization) should be used(a bool)
fMinimalDistanceToStop (float) – 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)
bUseRotation (bool) – indicate if a pass of registration by mutual information should be performed after the pass of optical flow(a bool)
fMinimalRotationToStop (float) – the section of the image of reference to be detected in the other image(an Box)
nMaxIteration (int) – the area where the section of the image of reference should be found in the other image(an Box)
nGaussianPyramid (int) – indicate if the registration matrix should be reset(a bool)
bUseLinearFactor (bool) – the progress bar(an Progress)
bUseConstantFactor (bool) –
bUseMIRegistration (bool) –
IInterestBox (ORSModel.ors.Box) –
ISearchBox (ORSModel.ors.Box) –
bResetRegistration (bool) –
IProgress (ORSModel.ors.Progress) –
- registerSliceSSD(self, aChannel: ORSModel.ors.Channel, startZ: int, endZ: int, tIndex: int, nbIteration: int, bResetRegistration: bool, IProgress: ORSModel.ors.Progress)
Note
Set the parameter with setSimilarityXSampling(), setSimilarityYSampling(), setMaximumXOffsetBetweenSlice(), setMaximumYOffsetBetweenSlice()
- Parameters:
aChannel (ORSModel.ors.Channel) –
startZ (int) –
endZ (int) –
tIndex (int) –
nbIteration (int) –
bResetRegistration (bool) –
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)
- Parameters:
aChannel (ORSModel.ors.Channel) – the initial step on Y axis is the first translation that will be applied and tested by the algorithm
startZ (int) – the smallest step on X axis is the minimum distance that could be tested by the algorithm
endZ (int) – the smallest step on Y axis is the minimum distance that could be tested by the algorithm
tIndex (int) – the initial step is the first rotation that will be applied and tested by the algorithm
fDeltaTranslationX (float) – the smallest step is the is minimum rotation that could be tested by the algorithm
fDeltaTranslationY (float) – indicate if the registration matrix should be reseted (a bool)
fEpsilonTranslationX (float) – indicate if we register on a fixed slice (a bool)
fEpsilonTranslationY (float) – indicate the fixed slice index (if we register on a fixed slice) (a uint32_t)
fDeltaRotation (float) – the progress bar (an Progress)
fEpsilonRotation (float) –
bResetRegistration (bool) –
bUseFixReferenceSlice (bool) –
nFixReferenceSliceIdx (int) –
IProgress (ORSModel.ors.Progress) –
- resetRegistration(self)
- setEndOfInterestZone(self, xEnd: int, yEnd: int)
- Parameters:
xEnd (int) –
yEnd (int) –
- setIsSliceUnmovable(self, zIndex: int, tIndex: int, bUnmovable: bool)
- Parameters:
zIndex (int) –
tIndex (int) –
bUnmovable (bool) –
- setMatrix(self, zIndex: int, tIndex: int, aMatrix: ORSModel.ors.Matrix4x4)
Set the transformation matrix from slice (zIndex-1) registered position to slice zIndex registered position.
- Parameters:
zIndex (int) –
tIndex (int) –
aMatrix (ORSModel.ors.Matrix4x4) –
- setMaximumXOffsetBetweenSlice(self, maxOffset: int)
- Parameters:
maxOffset (int) –
- setMaximumYOffsetBetweenSlice(self, maxOffset: int)
- Parameters:
maxOffset (int) –
- setSimilarityXSampling(self, sampling: int)
- Parameters:
sampling (int) –
- setSimilarityYSampling(self, sampling: int)
- Parameters:
sampling (int) –
- setStartOfInterestZone(self, xStart: int, yStart: int)
- Parameters:
xStart (int) –
yStart (int) –
- setTSize(self, tSize: int)
- Parameters:
tSize (int) –
- setTranslation(self, zIndex: int, tIndex: int, aVect: ORSModel.ors.Vector3)
- Parameters:
zIndex (int) –
tIndex (int) –
aVect (ORSModel.ors.Vector3) –
- setZSize(self, zSize: int)
- Parameters:
zSize (int) –
ChannelSliceReplacementHelper¶
- class ORSModel.ors.ChannelSliceReplacementHelper(self)
Bases:
Unmanaged- analyzeAndReplaceMarkedSlices(self)
- canSliceReplacementBePerformed(self) bool
- Returns:
output (bool) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() ChannelSliceReplacementHelper
- Returns:
output (ChannelSliceReplacementHelper) –
- setChannel(self, pIInputChannel: ORSModel.ors.Channel)
- Parameters:
pIInputChannel (ORSModel.ors.Channel) –
- setTime(self, value: int)
- Parameters:
value (int) –
Circle¶
- class ORSModel.ors.Circle
Bases:
Shape2DCircle manipulation services.
- copy(self) ORSModel.ors.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) ORSModel.ors.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)
Initializes theCircle from 3 points.
- Parameters:
point0 (ORSModel.ors.Vector3) – The first point (an Vector3)
point1 (ORSModel.ors.Vector3) – The second point (an Vector3)
point2 (ORSModel.ors.Vector3) – The third point (an Vector3)
- fromNPointsLeastMeanSquares(self, aPointCollection: ORSModel.ors.SequenceableCollection, normal: ORSModel.ors.Vector3)
set a circle from a set of (at least 2) points.
- Parameters:
aPointCollection (ORSModel.ors.SequenceableCollection) – a collection containing the points coordinates
normal (ORSModel.ors.Vector3) – a normalized normal vector to the plane in which to draw the circle
- getArea(self) float
- Returns:
output (float) –
- getCenter(self) ORSModel.ors.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) ORSModel.ors.Vector3
- 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) ORSModel.ors.Vector3
- Parameters:
aLineSegment (ORSModel.ors.LineSegment) –
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3) or NULL if not intersection
- getIntersectionWithPlane(self, pPlane: ORSModel.ors.Plane) ORSModel.ors.LineSegment
- Parameters:
pPlane (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) –
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- getNormal(self) ORSModel.ors.Vector3
Returns the normal of theCircle.
- Returns:
output (ORSModel.ors.Vector3) – A vector (an Vector3)
- getPlane(self) ORSModel.ors.Plane
- Returns:
output (ORSModel.ors.Plane) –
- getRadius(self) float
- Returns:
output (float) –
- getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) ORSModel.ors.Circle
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
rotationCenter (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.Circle) –
- rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float)
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)
- Parameters:
aCenter (ORSModel.ors.Vector3) –
- setNormal(self, aNormal: ORSModel.ors.Vector3)
Returns the normal of theCircle.
- Parameters:
aNormal (ORSModel.ors.Vector3) –
- setRadius(self, aRadius: float)
- Parameters:
aRadius (float) –
Collection¶
- class ORSModel.ors.Collection(*args, **kwargs)
Bases:
ManagedAbstraction class for collections.
- applyLinearTransformation(self, slope: float, offset: float)
- Parameters:
slope (float) –
offset (float) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getSize(self) int
- Returns:
output (int) –
- none() Collection
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Collection) –
Color¶
- class ORSModel.ors.Color
Bases:
UnmanagedWraps and defines colors.
- class OPACITY_FLAG(value)
Bases:
IntEnumAn enumeration.
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Color
Create aColor from a python representation a static method.
- Parameters:
aPythonRepresentation (str) – a string
- Returns:
output (ORSModel.ors.Color) – a color (a Color)
- 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)
- 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) ORSModel.ors.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
- 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)
- setAlpha(self, alpha: float)
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)
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)
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)
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)
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)
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(self)
Bases:
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) ORSModel.ors.Channel
- Parameters:
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) –
- Returns:
output (ORSModel.ors.Channel) –
- get1DConvolution(self, inputValues: ORSModel.ors.Array, pKernel: ORSModel.ors.ConvolutionKernel, nBorderHandling: int, values: ORSModel.ors.Array) ORSModel.ors.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.
- Parameters:
inputValues (ORSModel.ors.Array) – the input array (an ORS::Array)
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ORS::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.
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) ORSModel.ors.Array
- Parameters:
inputValues (ORSModel.ors.Array) –
kernelSize (int) –
nBorderHandling (int) –
values (ORSModel.ors.Array) –
- 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) ORSModel.ors.Channel
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) – a progress object (an Progress)
nMinZ (int) – an optional output channel to fill(an Channel)
nMaxZ (int) –
nMinT (int) –
nMaxT (int) –
pKernel (ORSModel.ors.ConvolutionKernel) –
nBorderHandling (int) –
nOutputChannelDatatype (int) –
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) ORSModel.ors.Channel
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 minimal y index of the input channel to compute the convolution on (an unsigned int)
xMinInput (int) – the minimal z (slice) index of the input channel to compute the convolution on (an unsigned int)
yMinInput (int) – the minimal t (time) index of the input channel to compute the convolution on (an unsigned int)
zMinInput (int) – the number of pixels to compute in x (an unsigned int)
tMinInput (int) – the number of pixels to compute in y (an unsigned int)
xSize (int) – the number of pixels to compute in z (an unsigned int)
ySize (int) – the number of time steps to compute (an unsigned int)
zSize (int) – the minimal x index of the output channel to write the result in (an unsigned int)
tSize (int) – the minimal y index of the output channel to write the result in (an unsigned int)
xMinOutput (int) – the minimal z index of the output channel to write the result in (an unsigned int)
yMinOutput (int) – the minimal t index of the output channel to write the result in (an unsigned int)
zMinOutput (int) – the kernel
tMinOutput (int) – The border handling algorithm to use(an int). One of: CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution.
pKernel (ORSModel.ors.ConvolutionKernel) – the data type of the output channel, if the output channel is not given
nBorderHandling (int) – a progress object (an Progress)
nOutputChannelDatatypeIfOutputChannelIsNull (int) – an optional output channel to fill(an Channel)
IProgress (ORSModel.ors.Progress) –
pOutChannel (ORSModel.ors.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)
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.
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) ORSModel.ors.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 convolution.
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) ORSModel.ors.Channel
- Parameters:
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) –
- 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) ORSModel.ors.Channel
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 minimal y index of the input channel to evaluate the minimum value on (a uint32_t)
xMinInput (int) – the minimal z (slice) index of the input channel to evaluate the minimum value on (a uint32_t)
yMinInput (int) – the minimal t (time) index of the input channel to evaluate the minimum value on (a uint32_t)
zMinInput (int) – the number of pixels to evaluate in x (a uint32_t)
tMinInput (int) – the number of pixels to evaluate in y (a uint32_t)
xSize (int) – the number of pixels to evaluate in z (a uint32_t)
ySize (int) – the number of time steps to evaluate (a uint32_t)
zSize (int) – the minimal x index of the output channel to write the result in (a uint32_t)
tSize (int) – the minimal y index of the output channel to write the result in (a uint32_t)
xMinOutput (int) – the minimal z index of the output channel to write the result in (a uint32_t)
yMinOutput (int) – the minimal t index of the output channel to write the result in (a uint32_t)
zMinOutput (int) – the kernel
tMinOutput (int) – The border handling algorithm to use(a uint16_t). One of: CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution.
pKernel (ORSModel.ors.ConvolutionKernel) – a progress object (a Progress)
nBorderHandling (int) – an optional output channel to fill (a Channel)
IProgress (ORSModel.ors.Progress) –
pOutChannel (ORSModel.ors.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
- Returns:
output (ConvolutionHelper) –
- setPaddingValue(self, aValue: float)
- Parameters:
aValue (float) –
- setZOffsetInputToOutputWithOutsideZRangeUnaffected(self, aValue: int)
- Parameters:
aValue (int) –
ConvolutionKernel¶
- class ORSModel.ors.ConvolutionKernel(self, pythonRepresentation: str, isPythonRepresentation: bool)
Bases:
Unmanaged- Parameters:
pythonRepresentation (str) –
isPythonRepresentation (bool) –
ConvolutionKernel.__init__(self)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.ConvolutionKernel
Create aConvolutionKernel from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.ConvolutionKernel) –
- 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)
- 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) –
- getValueAt(self, indexX: int, indexY: int, indexZ: int) float
- Parameters:
indexX (int) –
indexY (int) –
indexZ (int) –
- Returns:
output (float) –
- initializeAs1DKernel(self, indexX: int)
- Parameters:
indexX (int) –
- initializeAs2DKernel(self, indexX: int, indexY: int)
- Parameters:
indexX (int) –
indexY (int) –
- initializeAs3DKernel(self, indexX: int, indexY: int, indexZ: int)
- Parameters:
indexX (int) –
indexY (int) –
indexZ (int) –
- multiplyAllElementBy(self, aValue: float)
- Parameters:
aValue (float) –
- none() ConvolutionKernel
- Returns:
output (ConvolutionKernel) –
- setAsGaussianWithMinimumUnnormalizedSmallestValue(self, aValue: float)
- Parameters:
aValue (float) –
- setAsGaussianWithStandarDeviation(self, sigma: float)
- Parameters:
sigma (float) –
- setKernelStarPoint(self, indexX: int, indexY: int, indexZ: int)
- Parameters:
indexX (int) –
indexY (int) –
indexZ (int) –
- setValueAt(self, indexX: int, indexY: int, indexZ: int, aValue: float)
- Parameters:
indexX (int) –
indexY (int) –
indexZ (int) –
aValue (float) –
Cursor3D¶
- class ORSModel.ors.Cursor3D(*args, **kwargs)
Bases:
VisualA visual artifact used to illustrate a position in a 3D referential.
- getActivePlaneColor(self) ORSModel.ors.Color
Gets the active plane color of the 3D cursor.
Note
The color is expressed in RGB fashion.
See also
ORSModel.ors.Cursor3D.setActivePlaneColor(),ORSModel.ors.Cursor3D.setColor(),ORSModel.ors.Cursor3D.getColor()- Returns:
output (ORSModel.ors.Color) – a color (an Color)
- getAllHighlightedViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View) ORSModel.ors.List
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.List) –
- getAllHighlightedViewLineInView(self, pCurrentDisplay: ORSModel.ors.View) ORSModel.ors.List
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.List) –
- getAllHighlightedViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View) ORSModel.ors.List
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.List) –
- getAllParentViewsExcludingCurrent(self, pCurrentDisplay: ORSModel.ors.View) ORSModel.ors.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) ORSModel.ors.List
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.List) –
- getAllShownViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View) ORSModel.ors.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) ORSModel.ors.Color
Gets the color of the 3D cursor.
Note
The color is expressed in RGB fashion.
See also
ORSModel.ors.Cursor3D.getActivePlaneColor(),ORSModel.ors.Cursor3D.setActivePlaneColor(),ORSModel.ors.Cursor3D.setColor()- Returns:
output (ORSModel.ors.Color) – a color (an Color)
- getCrossHairMode(self) int
- Returns:
output (int) –
- getCrossHairWidth(self) float
- Returns:
output (float) –
- getCursorIn3DThickness(self) float
- Returns:
output (float) –
- getFontName(self) str
- Returns:
output (str) –
- getFontSize(self) float
- Returns:
output (float) –
- 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) –
- getIsDisplayLineHighlightedRotational(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:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- getIsHighlightedViewLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) bool
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- getIsHighlightedViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) bool
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- getIsShowViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) bool
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- getIsShowViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View) bool
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
- 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) –
- getMinimumFontSize(self) int
- Returns:
output (int) –
- getPickAnchor(self, pDisplay: ORSModel.ors.View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getRenderCurrentViewPlane(self) bool
- Returns:
output (bool) –
- getRenderViewPlaneOpacity(self) float
- Returns:
output (float) –
- getShowCircleForView(self, pCurrentDisplay: ORSModel.ors.View) bool
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- getShowCursorInMaximizedView(self) bool
- Returns:
output (bool) –
- getShowObliqueSliderForView(self, pCurrentDisplay: ORSModel.ors.View) bool
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- getViewsDefineAValidCursorPosition(self, pCurrentDisplay: ORSModel.ors.View) bool
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- hideAllCircle(self)
- hideAllMIPLine(self)
- hideAllObliqueSlider(self)
- hideAllViewAnchors(self)
- none() Cursor3D
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Cursor3D) –
- resetRenderCurrentViewPlane(self, pCurrentDisplay: ORSModel.ors.View)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
- setActivePlaneColor(self, IColor: ORSModel.ors.Color)
Sets the active plane color of the 3D cursor.
Note
The color is expressed in RGB fashion.
See also
ORSModel.ors.Cursor3D.getActivePlaneColor(),ORSModel.ors.Cursor3D.setColor(),ORSModel.ors.Cursor3D.getColor()- Parameters:
IColor (ORSModel.ors.Color) – a color (an Color)
- setColor(self, IColor: ORSModel.ors.Color)
Sets the color of the 3D cursor.
Note
The color is expressed in RGB fashion.
See also
ORSModel.ors.Cursor3D.getActivePlaneColor(),ORSModel.ors.Cursor3D.setActivePlaneColor(),ORSModel.ors.Cursor3D.getColor()- Parameters:
IColor (ORSModel.ors.Color) – a color (an Color)
- setCrossHairMode(self, iMode: int)
- Parameters:
iMode (int) –
- setCrossHairWidth(self, value: float)
- Parameters:
value (float) –
- setCursorIn3DThickness(self, pThickness: float)
- Parameters:
pThickness (float) –
- setCursorPositionFromParentView(self, pDisplay: ORSModel.ors.View) bool
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- setDisplayLineHighlightedRotational(self, pCurrentDisplay: ORSModel.ors.View, highlight: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
highlight (bool) –
- setFontName(self, sFontName: str)
- Parameters:
sFontName (str) –
- setFontSize(self, pSize: float)
- Parameters:
pSize (float) –
- setHighlightedCircleInView(self, pCurrentDisplay: ORSModel.ors.View, highlight: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
highlight (bool) –
- setHighlightedObliqueSliderInView(self, pCurrentDisplay: ORSModel.ors.View, highlight: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
highlight (bool) –
- setHighlightedViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, highlight: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
highlight (bool) –
- setHighlightedViewLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, highlight: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
highlight (bool) –
- setHighlightedViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, highlight: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
highlight (bool) –
- setLineThickness(self, value: float)
Sets the line thickness (in screen one thousandths)
- Parameters:
value (float) –
- setMiddleHoleSize(self, value: float)
Sets the size of the blank hole in the middle of the 3D cursor (in screen one thousandths)
- Parameters:
value (float) –
- setMinimumFontSize(self, pSize: int)
- Parameters:
pSize (int) –
- setPosition(self, pPosition: ORSModel.ors.Vector3)
Sets the position of the 3D cursor.
See also
- Parameters:
pPosition (ORSModel.ors.Vector3) – a screen position (an Vector3)
- setRenderCurrentViewPlane(self, bRender: bool)
- Parameters:
bRender (bool) –
- setRenderViewPlaneOpacity(self, pOpacity: float)
- Parameters:
pOpacity (float) –
- setShowCircleInView(self, pCurrentDisplay: ORSModel.ors.View, showC: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
showC (bool) –
- setShowCursorInMaximizedView(self, bShow: bool)
- Parameters:
bShow (bool) –
- setShowObliqueSliderInView(self, pCurrentDisplay: ORSModel.ors.View, showO: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
showO (bool) –
- setShowViewAnchorsInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, showA: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
showA (bool) –
- setShowViewMIPLineInView(self, pCurrentDisplay: ORSModel.ors.View, anotherDisplay: ORSModel.ors.View, showA: bool)
- Parameters:
pCurrentDisplay (ORSModel.ors.View) –
anotherDisplay (ORSModel.ors.View) –
showA (bool) –
- unHighlightedAllCircle(self)
- unHighlightedAllMIPLine(self)
- unHighlightedAllObliqueSlider(self)
- unHighlightedAllViewAnchors(self)
- unHighlightedAllViewLine(self)
Cylinder¶
- class ORSModel.ors.Cylinder
Bases:
Shape3DCylinder manipulation services.
- copy(self) ORSModel.ors.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) ORSModel.ors.Cylinder
Create aCylinder from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Cylinder) –
- fromNPointsLeastMeanSquares(self, aPointCollection: ORSModel.ors.SequenceableCollection)
Sets the cylinder minimizing the sum of the squares distances from a set of (at leats 6) points.
- Parameters:
aPointCollection (ORSModel.ors.SequenceableCollection) –
- getAxis(self) ORSModel.ors.Vector3
Returns the normal of theCylinder.
- Returns:
output (ORSModel.ors.Vector3) – A vector (an Vector3)
- getCap1Center(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getCap1Circle(self) ORSModel.ors.Circle
Gets the top of the cylinder as a circle.
- Returns:
output (ORSModel.ors.Circle) – ORS::Circle
- getCap2Center(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getCap2Circle(self) ORSModel.ors.Circle
Gets the bottom of the cylinder as a circle.
- Returns:
output (ORSModel.ors.Circle) – ORS::Circle
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDistanceFromPoint(self, aPoint: ORSModel.ors.Vector3) float
Gets the distance from a point to the cylinder.
Note
For points beyond the caps: combines axial and radial distances
Note
For points between caps: returns signed radial distance (negative when inside)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
The point from which to measure distance
- Returns:
output (float) – The distance (a double). Negative if point is inside the cylinder.
- getHeight(self) float
GetsCylinder Height.
- Returns:
output (float) – An Height (a double)
- getIntersectionWithLine(self, aLine: ORSModel.ors.Line) ORSModel.ors.LineSegment
- 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) ORSModel.ors.LineSegment
- 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
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- getRadius(self) float
- Returns:
output (float) –
- getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) ORSModel.ors.Cylinder
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
rotationCenter (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.Cylinder) –
- getSurface(self) float
GetsCylinder Surface.
- Returns:
output (float) – A Surface (a double)
- getThetaOffset(self) float
- Returns:
output (float) –
- getVolume(self) float
GetsCylinder Volume.
- Returns:
output (float) – A Volume (a double)
- rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float)
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)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setCap2Center(self, aPoint: ORSModel.ors.Vector3)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setCenter(self, aPoint: ORSModel.ors.Vector3)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setRadius(self, aRadius: float)
- Parameters:
aRadius (float) –
- setThetaOffset(self, anOffset: float)
- Parameters:
anOffset (float) –
- transform(self, transformationMatrix: ORSModel.ors.Matrix4x4)
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)
DatasetPresenter¶
- class ORSModel.ors.DatasetPresenter(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Visual- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
- get2DWindowLevel2CenterForAllViews(self) float
- Returns:
output (float) –
- get2DWindowLevel2CenterForView(self, pDisplay: ORSModel.ors.View) float
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- get2DWindowLevel2MaxForAllViews(self) float
- Returns:
output (float) –
- get2DWindowLevel2MaxForView(self, pDisplay: ORSModel.ors.View) float
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- get2DWindowLevel2MinForAllViews(self) float
- Returns:
output (float) –
- get2DWindowLevel2MinForView(self, pDisplay: ORSModel.ors.View) float
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- get2DWindowLevel2OpacityForAllViews(self) float
- Returns:
output (float) –
- get2DWindowLevel2OpacityForView(self, pDisplay: ORSModel.ors.View) float
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- get2DWindowLevel2RangeForAllViews(self)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Returns:
fMin (float) – The lower range value (a double)
fMax (float) – The upper range value (a double)
- get2DWindowLevel2RangeForView(self, pDisplay: ORSModel.ors.View, pMin: float, pMax: float)
- Parameters:
pDisplay (ORSModel.ors.View) –
pMin (float) –
pMax (float) –
- get2DWindowLevel2ValuesForAllViews(self, pWindowWidth: float, pWindowCenter: float)
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.
See also
get3DWindowLevelValues(), get2DWindowLevelValues()
- Parameters:
pWindowWidth (float) –
pWindowCenter (float) –
- get2DWindowLevel2ValuesForView(self, pDisplay: ORSModel.ors.View, pWindowWidth: float, pWindowCenter: float)
- Parameters:
pDisplay (ORSModel.ors.View) –
pWindowWidth (float) –
pWindowCenter (float) –
- get2DWindowLevel2WidthForAllViews(self) float
- Returns:
output (float) –
- get2DWindowLevel2WidthForView(self, pDisplay: ORSModel.ors.View) float
- Parameters:
pDisplay (ORSModel.ors.View) –
- 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)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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, pMax: float)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Returns:
pWindowWidth (float) – the window level width (a double*)
pWindowCenter (float) – the window level center (a double*)
- get2DWindowLevelValuesForView(self, pDisplay: ORSModel.ors.View)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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, pMax: float)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Returns:
pWindowWidth (float) – the window level width (a double*)
pWindowCenter (float) – the window level center (a double*)
- get3DWindowLevelValuesForView(self, pDisplay: ORSModel.ors.View)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getRangeSelectionEnabledForAllViews(self) bool
- Returns:
output (bool) –
- getRangeSelectionEnabledForView(self, pDisplay: ORSModel.ors.View) bool
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- none() DatasetPresenter
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (DatasetPresenter) –
- set2DWindowLevel2OpacityForAllViews(self, aValue: float)
- Parameters:
aValue (float) –
- set2DWindowLevel2OpacityForView(self, pDisplay: ORSModel.ors.View, aValue: float)
- Parameters:
pDisplay (ORSModel.ors.View) –
aValue (float) –
- set2DWindowLevel2RangeForAllViews(self, fMin: float, fMax: float)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Parameters:
fMin (float) – The lower range value (a double)
fMax (float) – The upper range value (a double)
- set2DWindowLevel2RangeForView(self, pDisplay: ORSModel.ors.View, iMin: float, iMax: float)
- Parameters:
pDisplay (ORSModel.ors.View) –
iMin (float) –
iMax (float) –
- set2DWindowLevel2ValuesForAllViews(self, pWindowWidth: float, pWindowCenter: float)
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.
See also
set3DWindowLevelValues(), set2DWindowLevelValues()
- Parameters:
pWindowWidth (float) – the window width (a double)
pWindowCenter (float) – the window center (a double)
- set2DWindowLevel2ValuesForView(self, pDisplay: ORSModel.ors.View, iWindowWidth: float, iWindowCenter: float)
- Parameters:
pDisplay (ORSModel.ors.View) –
iWindowWidth (float) –
iWindowCenter (float) –
- set2DWindowLevelRangeForAllViews(self, iMin: float, iMax: float)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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)
Note
The values should be expressed in physical units.
See also
set3DWindowLevelValues()
- Parameters:
iWindowWidth (float) –
iWindowCenter (float) –
- set2DWindowLevelValuesForView(self, pDisplay: ORSModel.ors.View, iWindowWidth: float, iWindowCenter: float)
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.
See also
set2DWindowLevelValues()
- 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)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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)
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.
See also
get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- 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)
Note
The values should be expressed in physical units.
See also
set3DWindowLevelValues()
- Parameters:
iWindowWidth (float) –
iWindowCenter (float) –
- set3DWindowLevelValuesForView(self, pDisplay: ORSModel.ors.View, iWindowWidth: float, iWindowCenter: float)
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.
See also
set2DWindowLevelValues()
- 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)
- Parameters:
IColor (ORSModel.ors.Color) –
- setRangeSelectionEnabledForAllViews(self, aFlag: bool)
- Parameters:
aFlag (bool) –
- setRangeSelectionEnabledForView(self, pDisplay: ORSModel.ors.View, aFlag: bool)
Ask the dataset presenter to use the range selector.
- Parameters:
pDisplay (ORSModel.ors.View) –
aFlag (bool) –
Dijkstra¶
- class ORSModel.ors.Dijkstra(self)
Bases:
Unmanaged- cleanDistanceMapChannel(self, outputChannel: ORSModel.ors.Channel)
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)
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)
- 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)
- 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)
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 (a Channel)
aTargetVolumeROI (ORSModel.ors.ROI) – stop points provided as a ROI, i.e. every labeled voxel is a stop point (a ROI)
lOutputChannelTraceBack (ORSModel.ors.Channel) – a traceback channel, can be None (a 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
- createDistanceMapUntilPointInWorldCoordinatesIsReached(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, xStopPointInWorld: float, yStopPointInWorld: float, zStopPointInWorld: float, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, continueDijkstra: bool)
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 (a Channel)
xStopPointInWorld (float) – X stop point position, in world coordinates (a double)
yStopPointInWorld (float) – Y stop point position, in world coordinates (a double)
zStopPointInWorld (float) – Z stop point position, in world coordinates (a double)
lOutputChannelTraceBack (ORSModel.ors.Channel) – a traceback channel, can be NULL (a Channel)
lOutputChannelLabel (ORSModel.ors.Channel) – a label channel, can be NULL (a 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
- createDistanceMapUntilPointsAreReached(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, positionTripleInSourceRef: int, nbPosition: int, waitForNIndex: int, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, breakForAny: bool, continueDijkstra: bool)
- 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.
See also
- Returns:
output (float) – the alpha parameter (a 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 (a 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.
See also
- Returns:
output (float) – peak center of the gaussian (a double)
- getIndexOfStopPointReach(self) int
Note
Only useful when distance map was generated using methods createDistanceMapUntilAnyPointInTargetRoiIsReached, createDistanceMapUntilPointInWorldCoordinatesIsReached or createDistanceMapUntilPointsAreReached.
- Returns:
output (int) –
- getKappa(self) float
Gets the kappa parameter for the metric == 1.
Note
Only useful when metric is set to 1.
See also
- Returns:
output (float) – the kappa parameter (a 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)
- 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 unsigned char)
- getROI(self, index: int) ORSModel.ors.ROI
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) –
- Returns:
output (ORSModel.ors.ROI) –
- 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 unsigned 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.
See also
- Returns:
output (float) – variance of the gaussian (a double)
- resetROIs(self)
Empties all the sourceROI slots.
- setAlphaParameter(self, alpha: float)
Sets the alpha parameter for the metric == 1.
Note
Only useful when metric is set to 1.
See also
- Parameters:
alpha (float) – the alpha parameter (a double)
- setEuclideanBias(self, EuclideanBias: float)
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)
Sets the peak position of the gaussian used if the metric == 1.
Note
Only useful when metric is set to 1.
See also
- 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)
Note
The min and max boundaries must not describe a space bigger than the input channel.
- Parameters:
inputChannel (ORSModel.ors.Channel) –
minX (int) –
minY (int) –
minZ (int) –
maxX (int) –
maxY (int) –
maxZ (int) –
currentT (int) –
- setInputLabelsChannel(self, aInputLabelsChannel: ORSModel.ors.Channel)
- Parameters:
aInputLabelsChannel (ORSModel.ors.Channel) –
- setInputMultiROI(self, anInputMultiROI: ORSModel.ors.MultiROI)
- Parameters:
anInputMultiROI (ORSModel.ors.MultiROI) –
- setKappa(self, kappa: float)
Sets the kappa parameter for the metric == 1.
Note
Only useful when metric is set to 1.
See also
- Parameters:
kappa (float) – the kappa parameter (a double)
- setMaskROI(self, IMaskROI: ORSModel.ors.ROI)
- Parameters:
IMaskROI (ORSModel.ors.ROI) –
- setMetric(self, metricType: int)
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)
- Parameters:
metricType (int) – 0 or 1
- setNeighborCountTo18(self)
Sets the number of neighbors used by theDijkstra algorithm to 6 ( Neighbor distance == 1).
- setNeighborCountTo26(self)
Sets the number of neighbors used by theDijkstra algorithm to 6 ( Neighbor distance == 1).
- setNeighborCountTo6(self)
Sets the number of neighbors used by theDijkstra algorithm to 6 ( Neighbor distance == 1).
- setProgressObject(self, IProgress: ORSModel.ors.Progress)
- Parameters:
IProgress (ORSModel.ors.Progress) –
- setROI(self, index: int, aVolROI: ORSModel.ors.ROI)
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) –
aVolROI (ORSModel.ors.ROI) –
- setSigmaPow2(self, aLimit: float)
Sets the variance used by the gaussian used if the metric == 1.
Note
Only useful when metric is set to 1.
See also
- Parameters:
aLimit (float) – variance of the gaussian (a double)
- tracebackCPU(self, aROI: ORSModel.ors.ROI, linputChannelTraceBack: ORSModel.ors.Channel, aPath: ORSModel.ors.VisualPath)
Uses a traceback channel to fill a path from aROI to the nearest source ROI.
- Parameters:
aROI (ORSModel.ors.ROI) – a trace back start (an ROI)
linputChannelTraceBack (ORSModel.ors.Channel) – a trace back channel (an ROI)
aPath (ORSModel.ors.VisualPath) –
- updateDistanceMapForMaxDistance(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, maxDistance: float, lOutputChannelTraceBack: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel)
- Parameters:
lOutputChannelDistanceMap (ORSModel.ors.Channel) –
maxDistance (float) –
lOutputChannelTraceBack (ORSModel.ors.Channel) –
lOutputChannelLabel (ORSModel.ors.Channel) –
Dijkstra2D¶
- class ORSModel.ors.Dijkstra2D(self)
Bases:
Unmanaged- cleanDistanceMapChannel(self, outputChannel: ORSModel.ors.Channel)
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)
- Parameters:
lOutputChannelDistanceMap (ORSModel.ors.Channel) –
lOutputChannelLabel (ORSModel.ors.Channel) –
- createDistanceMapWithTraceBack(self, lOutputChannelDistanceMap: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel, traceBackChannel: ORSModel.ors.Channel)
- Parameters:
lOutputChannelDistanceMap (ORSModel.ors.Channel) –
lOutputChannelLabel (ORSModel.ors.Channel) –
traceBackChannel (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
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 (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 unsigned char)
- getVolumeROI(self, index: int) ORSModel.ors.ROI
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) –
- Returns:
output (ORSModel.ors.ROI) –
- none() Dijkstra2D
- Returns:
output (Dijkstra2D) –
- resetVolumeROIs(self)
Empties all the sourceROI slots.
- setEuclideanBias(self, EuclideanBias: float)
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)
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 (a uint32_t)
minY (int) – the minimum Y index in the input channel (a uint32_t) TODO DOCUMENT_ME: Should this be removed?
maxX (int) – the minimum Z index in the input channel (a uint32_t)
maxY (int) – the maximum X index in the input channel (a uint32_t)
currentT (int) – the maximum Y index in the input channel (a uint32_t) TODO DOCUMENT_ME
- setNeighborCountTo4(self)
Sets the number of neighbors used by the 2DDijkstra algorithm to 4.
- setNeighborCountTo8(self)
Sets the number of neighbors used by the 2DDijkstra algorithm to 8.
- setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI)
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) –
aVolROI (ORSModel.ors.ROI) –
- traceback(self, traceBackChannel: ORSModel.ors.Channel, worldPosition: ORSModel.ors.Vector3, outArray: ORSModel.ors.Array) ORSModel.ors.Array
- Parameters:
traceBackChannel (ORSModel.ors.Channel) –
worldPosition (ORSModel.ors.Vector3) –
outArray (ORSModel.ors.Array) –
- Returns:
output (ORSModel.ors.Array) –
DimensionUnit¶
- class ORSModel.ors.DimensionUnit
Bases:
UnmanagedAn entity describing a unit of measure used by ORS.
- convertToUnit(self, aValue: float, aDimensionUnit: ORSModel.ors.DimensionUnit) float
Converts from a unit to another unit.
Note
Conversion can be applied only between units of the same type.
- Parameters:
aValue (float) –
aDimensionUnit (ORSModel.ors.DimensionUnit) –
- Returns:
output (float) –
- convertValuesToUnit(self, aValues: ORSModel.ors.ArrayDouble, aDimensionUnit: ORSModel.ors.DimensionUnit) ORSModel.ors.ArrayDouble
Converts an array of values from a unit to another unit.
Note
Conversion can be applied only between units of the same type.
Note
Each value in the array is converted individually using the same conversion logic as convertToUnit.
- Parameters:
aValues (ORSModel.ors.ArrayDouble) – the array of values to convert (an ArrayDouble)
aDimensionUnit (ORSModel.ors.DimensionUnit) – the target dimension unit (a DimensionUnit)
- Returns:
output (ORSModel.ors.ArrayDouble) – the converted array of values (an ArrayDouble)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.DimensionUnit
Create aDimensionUnit from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getAllCalibrationKeys(self) ORSModel.ors.ArrayString
Gets all the existing calibration keys of the dictionary of calibration values.
Note
it is the responsibility of the caller to delete the returned array
- Returns:
output (ORSModel.ors.ArrayString) – array of the calibration keys (an ArrayString)
- getAllRegistrationKeys() ORSModel.ors.ArrayString
Note
it is the responsibility of the caller to delete the returned array
- Returns:
output (ORSModel.ors.ArrayString) – array of the registration keys (an ArrayString)
- getCalibrationValue(self, sCalibrationKey: str) float
Gets a calibration value from the dictionary of calibration values.
- Parameters:
sCalibrationKey (str) – calibration key (a string)
- Returns:
output (float) – calibration value (a double)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDefault(dimensionType: int) ORSModel.ors.DimensionUnit
- Parameters:
dimensionType (int) –
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getDescription(self) str
Gets the description.
- Returns:
output (str) – the description (a string)
- getDimensionType(self) int
Note
See the CxvUniverse_Dimension_Type enum in ORS_def.h to know the supported values.
- Returns:
output (int) – a CxvUniverse_Dimension_Type describing the dimensionality of the dimension unit (an int)
- getFilenameCustomDimensionUnits() str
Gets the filename of the custom dimension units.
- Returns:
output (str) – filename of the custom dimension units (a string)
- getHasCalibrationKey(self, sCalibrationKey: str) bool
-
- Parameters:
sCalibrationKey (str) – calibration key (a string)
- Returns:
output (bool) – true if the calibration key is one of those defined for the calibration, false otherwise (a bool)
- getIsEqualTo(self, aDimensionUnit: ORSModel.ors.DimensionUnit) bool
Checks for equality to anotherDimensionUnit.
- Parameters:
aDimensionUnit (ORSModel.ors.DimensionUnit) – a DimensionUnit (a DimensionUnit)
- Returns:
output (bool) – true if the DimensionUnits are equal, false otherwise
- getIsImperialUnit(self) bool
- Returns:
output (bool) –
- getReferenceUnitConvertedToUnit(self, aVolume: float) float
Converts from MKS to another unit.
- Parameters:
aVolume (float) –
- Returns:
output (float) –
- getReferenceUnitToUnitFactor(self) float
- Returns:
output (float) –
- getRegisteredUnit(registrationKey: str) ORSModel.ors.DimensionUnit
Gets theDimensionUnit associated to a registration key.
- Parameters:
registrationKey (str) – registration key (a string)
- Returns:
output (ORSModel.ors.DimensionUnit) – a DimensionUnit (a DimensionUnit)
- getRegistrationKey(self) str
Gets the unit registration key.
- Returns:
output (str) – the unit registration key (a string)
- getRegistrationKeyFromCxvDimensionUniverse(pDimension: int) str
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 (str) – registration key (a string)
- getRegistrationKeysSpecificDimensionUnitType(dimensionType: int) ORSModel.ors.ArrayString
Note
See the CxvUniverse_Dimension_Type enum in ORS_def.h to know the supported values.
Note
it is the responsibility of the caller to delete the returned array
- Parameters:
dimensionType (int) – a dimension type (an int)
- Returns:
output (ORSModel.ors.ArrayString) – array of the registration keys (an ArrayString)
- getSquaredUnit(self) ORSModel.ors.DimensionUnit
Gets the squared unit corresponding to this dimension unit.
- Returns:
output (ORSModel.ors.DimensionUnit) – a DimensionUnit representing the squared version of this unit
- getSupportsConversion(self) bool
Gets if the unit supports conversion to another unit.
Note
Generic units don’t support conversion.
- Returns:
output (bool) – true if the unit can be converted to another unit, false otherwise (a bool)
- getSupportsConversionToUnit(self, aDimensionUnit: ORSModel.ors.DimensionUnit) bool
Gets if the unit can be converted in the other unit.
Note
Generic units don’t support conversion.
Note
Conversion can be applied only between units of the same type.
- Parameters:
aDimensionUnit (ORSModel.ors.DimensionUnit) –
- Returns:
output (bool) – true if the unit can be converted to another unit, false otherwise (a bool)
- getTypeForID(pDimension: int) int
Deprecated since version (unknown): use getDimensionType instead
Note
See the CxvUniverse_Dimension_Type enum in ORS_def.h to know the supported values.
- Parameters:
pDimension (int) – a dimension index (an int)
- Returns:
output (int) – a CxvUniverse_Dimension_Type describing the dimensionality of the dimension unit (an int)
- getUnitAbbreviation(self) str
Gets the unit abbreviation.
- Returns:
output (str) – the unit abbreviation (a string)
- getUnitConvertedToReferenceUnit(self, aVolume: float) float
Converts to MKS from another unit.
- Parameters:
aVolume (float) –
- Returns:
output (float) –
- getUnitForID(pDimension: int) ORSModel.ors.DimensionUnit
Deprecated since version (unknown): use getRegisteredUnit instead
Note
See the CxvUniverse_Dimension enum in ORS_def.h to know the supported values.
- Parameters:
pDimension (int) –
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getUnitName(self) str
Gets the unit name.
- Returns:
output (str) – the unit name (a string)
- getUnitWithAbbreviation(sAbbreviation: str) ORSModel.ors.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
- getUnitWithName(sUnitName: str) ORSModel.ors.DimensionUnit
Gets the unit that has the specified name.
- Parameters:
sUnitName (str) – a text name (a string)
- Returns:
output (ORSModel.ors.DimensionUnit) – a DimensionUnit or none
- none() DimensionUnit
- Returns:
output (DimensionUnit) –
- removeFromRegisteredDimensionUnits(registrationKey: str) bool
- Parameters:
registrationKey (str) – registration key (a string)
- Returns:
output (bool) – true if the removal from the dictionary is successful, false otherwise (a bool)
- setFilenameCustomDimensionUnits(filenameCustomDimensionUnits: str) bool
Sets the filename of the custom dimension units.
Note
the file should be accessible with reading and writing permissions
- Parameters:
filenameCustomDimensionUnits (str) – filename of the custom dimension units (a string)
- Returns:
output (bool) – true if the file can be used, false otherwise (a bool)
DistanceChannelAnalyzer¶
- class ORSModel.ors.DistanceChannelAnalyzer(self)
Bases:
Unmanaged- climbFromROI(self, lDistanceChannel: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI) ORSModel.ors.ROI
- Parameters:
lDistanceChannel (ORSModel.ors.Channel) –
inputROI (ORSModel.ors.ROI) –
outputROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.ROI) –
- descentPathTowardMinimum(self, lDistanceChannel: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, InputPath: ORSModel.ors.VisualPath) ORSModel.ors.VisualPath
- Parameters:
lDistanceChannel (ORSModel.ors.Channel) –
inputROI (ORSModel.ors.ROI) –
InputPath (ORSModel.ors.VisualPath) –
- Returns:
output (ORSModel.ors.VisualPath) –
- descentTowardMinimum(self, lDistanceChannel: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI) ORSModel.ors.ROI
- Parameters:
lDistanceChannel (ORSModel.ors.Channel) –
inputROI (ORSModel.ors.ROI) –
outputROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.ROI) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() DistanceChannelAnalyzer
- Returns:
output (DistanceChannelAnalyzer) –
DualQuaternion¶
- class ORSModel.ors.DualQuaternion
Bases:
UnmanagedA wrapper to a DualQuaternion.
- add(self, aVector: ORSModel.ors.DualQuaternion)
Adds a vector to the receiver.
- Parameters:
aVector (ORSModel.ors.DualQuaternion) – a vector (an Vector3)
- copy(self) ORSModel.ors.DualQuaternion
Returns a new vector identical to the receiver (a copy).
- Returns:
output (ORSModel.ors.DualQuaternion) –
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.DualQuaternion
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.DualQuaternion) –
- getAdditionWith(self, aVector: ORSModel.ors.DualQuaternion) ORSModel.ors.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) ORSModel.ors.DualQuaternion
Computes the lerp with another vector.
See also
getDotProductWith(), getAngleWith(), getDistanceFrom()
- Parameters:
point1 (ORSModel.ors.DualQuaternion) – a vector (an Vector3)
normalizePosition (float) – a interpolation factor [0,1](a double)
- Returns:
output (ORSModel.ors.DualQuaternion) – the lerp vector (an Vector3)
- getNegated(self) ORSModel.ors.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) ORSModel.ors.DualQuaternion
- Returns:
output (ORSModel.ors.DualQuaternion) –
- getScaledBy(self, scaleFactor: float) ORSModel.ors.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) ORSModel.ors.DualQuaternion
Computes the lerp with another vector.
See also
getDotProductWith(), getAngleWith(), getDistanceFrom()
- Parameters:
point1 (ORSModel.ors.DualQuaternion) – a vector (an Vector3)
normalizePosition (float) – a interpolation factor [0,1](a double)
- Returns:
output (ORSModel.ors.DualQuaternion) – the lerp vector (an Vector3)
- getSubtractionFrom(self, aVector: ORSModel.ors.DualQuaternion) ORSModel.ors.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)
Negates the vector.
- none() DualQuaternion
- Returns:
output (DualQuaternion) –
- normalize(self)
Normalizes the vector.
Note
A normalized vector has norm (length) 1.
- scale(self, scaleFactor: float)
Scales the vector.
- Parameters:
scaleFactor (float) – a scale factor (a double)
- subtract(self, aVector: ORSModel.ors.DualQuaternion)
Subtracts a vector from the receiver.
- Parameters:
aVector (ORSModel.ors.DualQuaternion) – a vector (an Vector3)
EuclideanDistanceMapGenerator¶
- class ORSModel.ors.EuclideanDistanceMapGenerator
Bases:
UnmanagedExact euclidean distance map generator.
- createDistanceMap(self, seedChannel: ORSModel.ors.Channel, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedChannel (ORSModel.ors.Channel) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- createDistanceMapFromROI(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedVolumeROI (ORSModel.ors.ROI) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- createFLOATDistanceMap(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedVolumeROI (ORSModel.ors.ROI) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- createFLOATDistanceMapFromROI(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedVolumeROI (ORSModel.ors.ROI) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- createSignedDistanceMapFromROI(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedVolumeROI (ORSModel.ors.ROI) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- createUBYTEDistanceMap(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedVolumeROI (ORSModel.ors.ROI) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- createUBYTEDistanceMapFromROI(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedVolumeROI (ORSModel.ors.ROI) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- createUSHORTDistanceMap(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedVolumeROI (ORSModel.ors.ROI) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- createUSHORTDistanceMapFromROI(self, seedVolumeROI: ORSModel.ors.ROI, outputChannel: ORSModel.ors.Channel, timeStep: int, IProgress: ORSModel.ors.Progress, bShowProgress: bool) ORSModel.ors.Channel
- Parameters:
seedVolumeROI (ORSModel.ors.ROI) –
outputChannel (ORSModel.ors.Channel) –
timeStep (int) –
IProgress (ORSModel.ors.Progress) –
bShowProgress (bool) –
- Returns:
output (ORSModel.ors.Channel) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() EuclideanDistanceMapGenerator
- Returns:
output (EuclideanDistanceMapGenerator) –
FaceVertexMesh¶
- class ORSModel.ors.FaceVertexMesh(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Mesh- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
FaceVertexMesh.__init__(self)
- copyInto(self, aDestinationUS: ORSModel.ors.UnstructuredGrid)
Copies the receiver unstructured grid into another unstructured grid.
- Parameters:
aDestinationUS (ORSModel.ors.UnstructuredGrid) – a destination unstructured grid
- getAsHalfEdgeMesh(self, pInOutMeshModel: ORSModel.ors.HalfEdgeMesh) ORSModel.ors.HalfEdgeMesh
- Parameters:
pInOutMeshModel (ORSModel.ors.HalfEdgeMesh) –
- Returns:
output (ORSModel.ors.HalfEdgeMesh) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getTotalByteCount(self) int
Gets the total byte count in memory of the mesh.
- Returns:
output (int) –
- none() FaceVertexMesh
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (FaceVertexMesh) –
FastMarching¶
- class ORSModel.ors.FastMarching(self)
Bases:
Unmanaged- cleanSpeedMapChannel(self, outputChannel: ORSModel.ors.Channel)
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)
- 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) ORSModel.ors.Channel
- Parameters:
inChannelDistanceMap (ORSModel.ors.Channel) –
positionTripleInSourceRef (int) –
nbPosition (int) –
lMaskChannel (ORSModel.ors.Channel) –
traceBackChannel (ORSModel.ors.Channel) –
- Returns:
output (ORSModel.ors.Channel) –
- createDistanceMapForNBIteration(self, lOutputChannelSpeedMap: ORSModel.ors.Channel, forNbIteration: int, autoUpdateROI: bool, lMaskChannel: ORSModel.ors.Channel)
- Parameters:
lOutputChannelSpeedMap (ORSModel.ors.Channel) –
forNbIteration (int) –
autoUpdateROI (bool) –
lMaskChannel (ORSModel.ors.Channel) –
- createDistanceMapWithMask(self, inChannelDistanceMap: ORSModel.ors.Channel, lMaskChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
- Parameters:
inChannelDistanceMap (ORSModel.ors.Channel) –
lMaskChannel (ORSModel.ors.Channel) –
- 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 (a 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) ORSModel.ors.ROI
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) –
- Returns:
output (ORSModel.ors.ROI) –
- 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 unsigned char)
- getStopValue(self) float
- Returns:
output (float) –
- getStopWhenValueIsEncountered(self) bool
- Returns:
output (bool) –
- getUsedForcedMean(self) bool
- Returns:
output (bool) –
- none() FastMarching
- Returns:
output (FastMarching) –
- recomputeValueWindow(self, aVolumeROI: ORSModel.ors.ROI)
- Parameters:
aVolumeROI (ORSModel.ors.ROI) –
- resetROIs(self)
Empties all the sourceROI slots.
- setEuclideanBias(self, EuclideanBias: float)
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)
- Parameters:
aVal (float) –
- setInputChannelAndWorkingArea(self, inputChannel: ORSModel.ors.Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int)
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 (a uint32_t)
minY (int) – the minimum Y index in the input channel (a uint32_t) TODO DOCUMENT_ME: Should this be removed?
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) TODO DOCUMENT_ME
maxZ (int) – the maximum Z index in the input channel (an unsigned short)
currentT (int) – the current time point (auint32_t)
- setMaxValueToConsider(self, maxValue: float)
- Parameters:
maxValue (float) –
- setMinValueToConsider(self, minValue: float)
- Parameters:
minValue (float) –
- setROI(self, index: int, aVolROI: ORSModel.ors.ROI)
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) –
aVolROI (ORSModel.ors.ROI) –
- setStopPosition(self, xP: int, yP: int, zP: int)
- Parameters:
xP (int) –
yP (int) –
zP (int) –
- setStopValue(self, stopValue: float)
- Parameters:
stopValue (float) –
- setStopWhenValueIsEncountered(self, aF: bool)
- Parameters:
aF (bool) –
- setUseValueWindow(self, aF: bool)
- Parameters:
aF (bool) –
- setUsedForcedMean(self, aF: bool)
- Parameters:
aF (bool) –
- useDijkstraMetric(self, aF: bool)
- Parameters:
aF (bool) –
FastMarching2D¶
- class ORSModel.ors.FastMarching2D(self)
Bases:
Unmanaged- cleanSpeedMapChannel(self, outputChannel: ORSModel.ors.Channel)
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)
- Parameters:
lOutputChannelDistanceMap (ORSModel.ors.Channel) –
lMaskChannel (ORSModel.ors.Channel) –
- createDistanceMapForNBIteration(self, lOutputChannelSpeedMap: ORSModel.ors.Channel, forNbIteration: int, autoUpdateROI: bool, lMaskChannel: ORSModel.ors.Channel)
- Parameters:
lOutputChannelSpeedMap (ORSModel.ors.Channel) –
forNbIteration (int) –
autoUpdateROI (bool) –
lMaskChannel (ORSModel.ors.Channel) –
- 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 unsigned char)
- getVolumeROI(self, index: int) ORSModel.ors.ROI
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) –
- Returns:
output (ORSModel.ors.ROI) –
- none() FastMarching2D
- Returns:
output (FastMarching2D) –
- resetVolumeROIs(self)
Empties all the sourceROI slots.
- setEuclideanBias(self, EuclideanBias: float)
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)
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 (a uint32_t)
minY (int) – the minimum Y 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)
currentT (int) – the T index in the input channel (a uint32_t)
- setMeanValue(self, mean: float)
Set the mean value used in the setian metric.
- Parameters:
mean (float) – float a normalized value
- setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI)
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) –
aVolROI (ORSModel.ors.ROI) –
- useDijkstraMetric(self, pFlag: bool)
- Parameters:
pFlag (bool) –
FastMarchingWatershed2D¶
- class ORSModel.ors.FastMarchingWatershed2D(self)
Bases:
FastMarching2D- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getGradMinimumSearchRange(self) int
- Returns:
output (int) –
- none() FastMarchingWatershed2D
- Returns:
output (FastMarchingWatershed2D) –
- setGradChannel(self, gradChannel: ORSModel.ors.Channel)
- Parameters:
gradChannel (ORSModel.ors.Channel) –
- setGradMinimumSearchRange(self, range: int)
- Parameters:
range (int) –
- setLabelChannel(self, labelChannel: ORSModel.ors.Channel)
- Parameters:
labelChannel (ORSModel.ors.Channel) –
FordBellmanAutomata¶
- class ORSModel.ors.FordBellmanAutomata(self)
Bases:
Unmanaged- cleanDistanceMapChannel(self, outputChannel: ORSModel.ors.Channel)
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)
- Parameters:
lOutputChannelDistanceMap (ORSModel.ors.Channel) –
lOutputChannelTraceBack (ORSModel.ors.Channel) –
lOutputChannelLabel (ORSModel.ors.Channel) –
nbIteration (int) –
- 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) ORSModel.ors.ROI
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) –
- Returns:
output (ORSModel.ors.ROI) –
- 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 unsigned char)
- none() FordBellmanAutomata
- Returns:
output (FordBellmanAutomata) –
- resetVolumeROIs(self)
Empties all the sourceROI slots.
- setEuclideanBias(self, EuclideanBias: float)
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)
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 (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) –
- setMetric(self, metricType: int)
- Parameters:
metricType (int) –
- setNeighborCountTo18(self)
- setNeighborCountTo26(self)
- setNeighborCountTo6(self)
- setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI)
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) –
aVolROI (ORSModel.ors.ROI) –
GaussianPyramid¶
- class ORSModel.ors.GaussianPyramid(self)
Bases:
Unmanaged- getChannelBase(self) ORSModel.ors.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)
- Parameters:
firstLevelChannel (ORSModel.ors.Channel) –
secondLevelChannel (ORSModel.ors.Channel) –
thirdLevelChannel (ORSModel.ors.Channel) –
fourthLevelChannel (ORSModel.ors.Channel) –
- getHalfsizeKernel(self, x: int, y: int, z: int)
- 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)
- 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)
- Parameters:
x (int) –
y (int) –
z (int) –
t (int) –
- none() GaussianPyramid
- Returns:
output (GaussianPyramid) –
- setChannelBase(self, pIInputChannel: ORSModel.ors.Channel)
- Parameters:
pIInputChannel (ORSModel.ors.Channel) –
- setHalfsizeKernel(self, x: int, y: int, z: int)
- Parameters:
x (int) –
y (int) –
z (int) –
- setLevelsGaussianPyramid(self, minLevel: int, maxLevel: int)
- Parameters:
minLevel (int) –
maxLevel (int) –
- setOriginSubsetPixels(self, x: int, y: int, z: int, t: int)
- Parameters:
x (int) –
y (int) –
z (int) –
t (int) –
- setPerformZReduction(self, bValue: bool)
- Parameters:
bValue (bool) –
- setSigma(self, value: float)
- Parameters:
value (float) –
- setSizeSubsetPixels(self, x: int, y: int, z: int, t: int)
- Parameters:
x (int) –
y (int) –
z (int) –
t (int) –
GeodesicDistanceMap¶
- class ORSModel.ors.GeodesicDistanceMap
Bases:
Unmanaged- createDistanceMap(maskROI: ORSModel.ors.ROI, seedROI: ORSModel.ors.ROI) ORSModel.ors.Channel
- Parameters:
maskROI (ORSModel.ors.ROI) –
seedROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.Channel) –
Graph¶
- class ORSModel.ors.Graph(self)
Bases:
UnstructuredGridGraph.__init__(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
- attachVertexToVertices(self, vertexIndex: int, arrayOfVertices: ORSModel.ors.ArrayUnsignedLong, iTIndex: int)
creates an edge between vertex index and every vertex in array
- Parameters:
vertexIndex (int) – vertex index (a uint64_t)
arrayOfVertices (ORSModel.ors.ArrayUnsignedLong) – array of vertices to connect (an ArrayUnsignedLong)
iTIndex (int) – the time step (a uint32_t)
- canBeRendered(self, iTIndex: int) bool
Indicate if the graph can be rendered by the HW.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (bool) – (a bool)
- computeDijkstraDistancesAndPredecessorMap(self, iTIndex: int, sourceVertexIndex: int, arrayOfDijkstraDistances: ORSModel.ors.ArrayDouble, arrayOfSourcesAndTargetsFromDijkstra: ORSModel.ors.ArrayUnsignedLong, weights: ORSModel.ors.SequenceableCollection)
- Parameters:
iTIndex (int) – the time step (a uint32_t)
sourceVertexIndex (int) – the index of the vertex that dijkstra starts calculating from (a uint64_t)
arrayOfDijkstraDistances (ORSModel.ors.ArrayDouble) – the distances of the vertices from source vertex from distance map (an ArrayDouble)
arrayOfSourcesAndTargetsFromDijkstra (ORSModel.ors.ArrayUnsignedLong) – the indices of the vertices of predecessors (an ArrayUnsignedLong)
weights (ORSModel.ors.SequenceableCollection) – the weights to associate de edges (a SequenceableCollection)
- findNeighbours(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getAnglesCount(self, iTIndex: int) int
- Parameters:
iTIndex (int) –
- Returns:
output (int) –
- getAnglesForNodeType(self, iTIndex: int, NumOutEdges: int, arrayAngles: ORSModel.ors.ArrayDouble, arrayFirstEdgeOfAngles: ORSModel.ors.ArrayUnsignedLong, arraySecondEdgeOfAngles: ORSModel.ors.ArrayUnsignedLong, arrayVertexOfAngles: ORSModel.ors.ArrayUnsignedLong)
- Parameters:
iTIndex (int) – the time step (a uint32_t)
NumOutEdges (int) – the number of out edges for a node which defines the required node type (a uint32_t)
arrayAngles (ORSModel.ors.ArrayDouble) – the angles associated with the specified node type (an ArrayDouble)
arrayFirstEdgeOfAngles (ORSModel.ors.ArrayUnsignedLong) – the index of the first edge of each angle (an ArrayUnsignedLong)
arraySecondEdgeOfAngles (ORSModel.ors.ArrayUnsignedLong) – the index of the second edge of each angle (an ArrayUnsignedLong)
arrayVertexOfAngles (ORSModel.ors.ArrayUnsignedLong) – the angles associated with the specified node type (an ArrayUnsignedLong)
- getAsROI(self, iTIndex: int, worldTransform: ORSModel.ors.Matrix4x4, pOutputROI: ORSModel.ors.ROI, progress: ORSModel.ors.Progress) bool
Makes a Region of Interest from the mesh.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
worldTransform (ORSModel.ors.Matrix4x4) – a transformation matrix (a Matrix4x4)
pOutputROI (ORSModel.ors.ROI) – a region of interest (a ROI)
progress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
- Returns:
output (bool) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getCurrentEdgeScalarValuesSlot(self) int
gets the current edge scalar.
Note
The scalar index is zero-based, and thus should be less than getEdgeScalarValuesSlotCount().
Note
Use -1 to indicate no current scalar
- Returns:
output (int) – the scalar slot index (an int32_t)
- 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) ORSModel.ors.Color
Gets the edge default color.
Note
Each color value goes between 0 (none) and 1 (full).
See also
ORSModel.ors.Graph.setUseDefaultEdgeColor(), setColors()- 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) – a uint64_t
- getEdgeScalarSlotIndexForDescription(self, sValue: str, iTIndex: int) int
Gets the scalar slot index from an edge scalar description.
- Parameters:
sValue (str) – the slot description (an std::wstring)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (int) – the index or -1 if not found
- getEdgeScalarValue(self, nScalarValueSlotIndex: int, scalarValueEdgeIndex: int, iTIndex: int) float
Gets the value of an edge scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
scalarValueEdgeIndex (int) – the edge index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (float) – the value of a edge scalar (a double)
- getEdgeScalarValueDescription(self, nScalarValueSlotIndex: int, iTIndex: int) str
Gets an edge 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)
- getEdgeScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, iTIndex: int) ORSModel.ors.DimensionUnit
Gets the dimension unit of an edge scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
- getEdgeScalarValueMax(self, nScalarValueSlotIndex: int, iTIndex: int) float
method getEdgeScalarValueMax
Deprecated since version (unknown): use getEdgeScalarValuesWindowMax instead
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getEdgeScalarValueMaxs(self, iTIndex: int) ORSModel.ors.ArrayDouble
method getEdgeScalarValueMaxs
Deprecated since version (unknown): use getEdgeScalarValuesWindowMaxs instead
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getEdgeScalarValueMin(self, nScalarValueSlotIndex: int, iTIndex: int) float
Gets an edge scalar min value.
Deprecated since version (unknown): use getEdgeScalarValuesWindowMin instead
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (float) – a double
- getEdgeScalarValueMins(self, iTIndex: int) ORSModel.ors.ArrayDouble
method getEdgeScalarValueMins
Deprecated since version (unknown): use getEdgeScalarValuesWindowMins instead
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getEdgeScalarValueOffset(self, nScalarValueSlotIndex: int, iTIndex: int) float
Gets an edge 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)
- getEdgeScalarValueOffsets(self, iTIndex: int) ORSModel.ors.ArrayDouble
Get the edge 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 an edge 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)
- getEdgeScalarValueSlopes(self, iTIndex: int) ORSModel.ors.ArrayDouble
Get the edge 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) –
- getEdgeScalarValues(self, nScalarValueSlotIndex: int, iTIndex: int) ORSModel.ors.Array
Gets the values of an edge scalar.
Note
The array of values is of length getEdgeCount() * getEdgeScalarValuesSlotCount().
Note
The scalar value in the slot s of the edge v is located at the index (getEdgeScalarValuesSlotCount() * v) + s of the array.
See also
ORSModel.ors.Graph.setEdgeScalarValues(),ORSModel.ors.Graph.getEdgeCount(),ORSModel.ors.Graph.getEdgeScalarValuesSlotCount()- Parameters:
nScalarValueSlotIndex (int) – the edge 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)
- getEdgeScalarValuesCollection(self) ORSModel.ors.ScalarValuesCollection
Queries the scalar values collection of the edges.
- Returns:
output (ORSModel.ors.ScalarValuesCollection) – the ScalarValuesCollection of the edges.
- getEdgeScalarValuesDatatype(self, nScalarValueSlotIndex: int) int
- Parameters:
nScalarValueSlotIndex (int) –
- Returns:
output (int) –
- getEdgeScalarValuesId(self, nScalarValueSlotIndex: int, iTIndex: int) str
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (str) –
- getEdgeScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, iTIndex: int) float
Get an edge 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
- getEdgeScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, iTIndex: int) float
Get an edge 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
- getEdgeScalarValuesRangeMax(self, nScalarValueSlotIndex: int, iTIndex: int) float
Get an edge 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
- getEdgeScalarValuesRangeMin(self, nScalarValueSlotIndex: int, iTIndex: int) float
Get an edge 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
- getEdgeScalarValuesSlotCount(self) int
Gets the number of slots for edge scalar values.
- Returns:
output (int) – the number of slots (a uint16_t)
- getEdgeScalarValuesWindowMax(self, nScalarValueSlotIndex: int, iTIndex: int) float
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getEdgeScalarValuesWindowMaxs(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getEdgeScalarValuesWindowMin(self, nScalarValueSlotIndex: int, iTIndex: int) float
Gets an edge 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
- getEdgeScalarValuesWindowMins(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getEdges(self, iTIndex: int) ORSModel.ors.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)
- getEdgesConnectedComponent(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
Get the edges connected componenent number.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – an ORS::ArrayUnsignedLong
- getEdgesLength(self, worldMatrix: ORSModel.ors.Matrix4x4, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
worldMatrix (ORSModel.ors.Matrix4x4) – the world matrix (a Matrix 4x4)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getEdgesTotalLength(self, worldMatrix: ORSModel.ors.Matrix4x4, iTIndex: int) float
Gets the total length of the edges.
- Parameters:
worldMatrix (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (float) –
- getHideOutOfRangeEdgeScalarValues(self) bool
Indicate if out of range values should be hidden.
- Returns:
output (bool) – (a bool)
- getMinMaxEdgeScalarValue(self, nScalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float)
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
fMinValue (float) –
fMaxValue (float) –
- getNumVertices(self, iTIndex: int) int
- Parameters:
iTIndex (int) –
- Returns:
output (int) –
- getOrderedEdgesArray(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getTotalByteCount(self) int
Gets the total byte count in memory of the graph.
- Returns:
output (int) –
- 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 edge scalar values or not.
- Returns:
output (bool) – true to use scalar values, false otherwise
- getVerticeConnectivityCount(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
Get the vertices connectivity count.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – an ORS::ArrayUnsignedLong
- getVerticesConnectedComponent(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
Get the vertices connected componenent number.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – an ORS::ArrayUnsignedLong
- getVerticesPredecessorAndSuccessor(self, iTIndex: int) ORSModel.ors.ArrayLong
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayLong) –
- getVerticesWithConnectivity(self, iTIndex: int, NumOfNeighbours: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
iTIndex (int) –
NumOfNeighbours (int) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getVerticesWithIntersectionOutsideOfArray(self, arrayOfIndices: ORSModel.ors.ArrayUnsignedLong, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
arrayOfIndices (ORSModel.ors.ArrayUnsignedLong) – the indices of the vertices (an ArrayUnsignedLong)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- graphStats(self, iTIndex: int)
- Parameters:
iTIndex (int) –
- makeSourceIndexSmallerThanTargetIndex(self, iTIndex: int)
- Parameters:
iTIndex (int) –
- mapEdgeScalarValuesFromChannel(self, aReferenceChannel: ORSModel.ors.Channel, sourceScalarValuesSlotIndex: int, channelTimeStep: int, sourceTIndex: int, percentageAwayFromSourceVertex: float)
- Parameters:
aReferenceChannel (ORSModel.ors.Channel) – the channel to take values at position (a Channel)
sourceScalarValuesSlotIndex (int) – scalar slot index (a uint16_t)
channelTimeStep (int) – the time step (a uint16_t)
sourceTIndex (int) – iTindex (a uint32_t)
percentageAwayFromSourceVertex (float) – fraction away from source vertex of the edge ex. 0,5 for mid edge (a double)
- nodeTypeCount(self, iTIndex: int, nodeTypeArray: ORSModel.ors.ArrayDouble) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
nodeTypeArray (ORSModel.ors.ArrayDouble) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- nodeTypePercentage(self, iTIndex: int, nodeTypeArray: ORSModel.ors.ArrayDouble) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
nodeTypeArray (ORSModel.ors.ArrayDouble) –
- 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)
Remove an edge scalar slot.
- Parameters:
nScalarValueSlotIndex (int) – the index of the slot to be removed (a uint16_t)
- removeDuplicateEdges(self, iTIndex: int, aProgress: ORSModel.ors.Progress)
Removes duplicate edges.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
aProgress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
- removeEdge(self, indiceOfEdge: int, iTInex: int)
removes edge
- Parameters:
indiceOfEdge (int) – index of edge to remove (a uint32_t)
iTInex (int) – the time step (a uint32_t)
- removeEdgesAttachedToVertices(self, arrayOfVertices: ORSModel.ors.ArrayUnsignedLong, iTIndex: int)
isolates vertices in given array by removing all its connected edges
- Parameters:
arrayOfVertices (ORSModel.ors.ArrayUnsignedLong) – array of vertices to isolate (an ArrayUnsignedLong)
iTIndex (int) – the time step (a uint32_t)
- removeIsolatedEdges(self, iTIndex: int)
- Parameters:
iTIndex (int) –
- removeIsolatedVertices(self, iTIndex: int)
- Parameters:
iTIndex (int) –
- removeSelfLoopEdges(self, iTIndex: int)
- Parameters:
iTIndex (int) –
- setCurrentEdgeScalarValuesSlot(self, slotIndex: int)
Sets the current edge scalar.
Note
The scalar index is zero-based, and thus should be less than getEdgeScalarValuesSlotCount().
Note
Use -1 to indicate no current scalar
- Parameters:
slotIndex (int) – the current scalar slot index (an int32_t)
- setDefaultEdgeAlphaColor(self, value: float)
Sets the edge its default alpha color.
- Parameters:
value (float) – Alpha color (double)
- setDefaultEdgeColor(self, IColor: ORSModel.ors.Color)
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.
See also
ORSModel.ors.Graph.setUseDefaultEdgeColor(), setColors()- Parameters:
IColor (ORSModel.ors.Color) – a color (an Color)
- setEdgeScalarValue(self, nScalarValueSlotIndex: int, scalarValueEdgeIndex: int, aValue: float, iTIndex: int)
Sets the value of an edge scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
scalarValueEdgeIndex (int) – the edge index (a uint32_t)
aValue (float) – the value of a edge scalar to set (a double)
iTIndex (int) – the time step (a uint32_t)
- setEdgeScalarValueDescription(self, nScalarValueSlotIndex: int, value: str, iTIndex: int)
- Parameters:
nScalarValueSlotIndex (int) –
value (str) –
iTIndex (int) –
- setEdgeScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, pDimensionUnit: ORSModel.ors.DimensionUnit, iTIndex: int)
Sets the dimension unit of an edge scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
pDimensionUnit (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
iTIndex (int) – the time step (a uint32_t)
- setEdgeScalarValueMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Sets an edge scalar max value.
Deprecated since version (unknown): use setEdgeScalarValuesWindowMax instead
- Parameters:
nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
value (float) – scalar max value (a double)
iTIndex (int) – time step (a uint32_t)
- setEdgeScalarValueMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
method setEdgeScalarValueMaxs
Deprecated since version (unknown): use setEdgeScalarValuesWindowMaxs instead
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setEdgeScalarValueMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
method setEdgeScalarValueMin
Deprecated since version (unknown): use setEdgeScalarValuesWindowMin instead
- Parameters:
nScalarValueSlotIndex (int) – the slot index (a uint16_t)
value (float) – the value (a double)
iTIndex (int) – the time step (a uint32_t)
- setEdgeScalarValueMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
method setEdgeScalarValueMins
Deprecated since version (unknown): use setEdgeScalarValuesWindowMins instead
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setEdgeScalarValueOffset(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Sets an edge 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)
- setEdgeScalarValueOffsets(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
Set the edge 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)
Gets a edge 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)
- setEdgeScalarValueSlopes(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
Set the edge 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)
- Parameters:
lookUpTable (dict) –
nScalarValueSlotIndex (int) –
iTIndex (int) –
- setEdgeScalarValueUnit(self, nScalarValueSlotIndex: int, value: int, iTIndex: int)
method setEdgeScalarValueUnit
Deprecated since version (unknown): use setEdgeScalarValueDimensionUnit instead
- Parameters:
nScalarValueSlotIndex (int) –
value (int) –
iTIndex (int) –
- setEdgeScalarValues(self, pScalarValues: ORSModel.ors.Array, nScalarValueSlotIndex: int, iTIndex: int)
Sets the values of an edge scalar.
Note
The array of values is of length getEdgeCount() * getEdgeScalarValuesSlotCount().
Note
The scalar value in the slot s of the edge v is located at the index (getEdgeScalarValuesSlotCount() * v) + s of the array.
See also
ORSModel.ors.Graph.getEdgeScalarValues(),ORSModel.ors.Graph.getEdgeCount(),ORSModel.ors.Graph.getEdgeScalarValuesSlotCount()- 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)
- setEdgeScalarValuesDatatype(self, iSlotIndex: int, nEdgeScalarValuesDatatype: int)
- Parameters:
iSlotIndex (int) –
nEdgeScalarValuesDatatype (int) –
- setEdgeScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Set an edge 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)
- setEdgeScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Set an edge 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)
- setEdgeScalarValuesRangeMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Set an edge 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)
- setEdgeScalarValuesRangeMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Set an edge 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)
- setEdgeScalarValuesSlotCount(self, slotCount: int)
Sets the number of slots for edge scalar values.
- Parameters:
slotCount (int) – the number of slots (a uint16_t)
- setEdgeScalarValuesWindowMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Sets an edge 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)
- setEdgeScalarValuesWindowMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setEdgeScalarValuesWindowMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
method setEdgeScalarValuesWindowMin
- Parameters:
nScalarValueSlotIndex (int) – the slot index (a uint16_t)
value (float) – the value (a double)
iTIndex (int) – the time step (a uint32_t)
- setEdgeScalarValuesWindowMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setEdges(self, pEdges: ORSModel.ors.ArrayUnsignedLong, iTIndex: int)
Sets the edges.
- Parameters:
pEdges (ORSModel.ors.ArrayUnsignedLong) – the edges(an ArrayUnsignedLong)
iTIndex (int) – the time step (a uint32_t)
- setHideOutOfRangeEdgeScalarValues(self, value: bool)
Indicate if out of range values should be hidden.
- Parameters:
value (bool) – (a bool)
- setUseDefaultEdgeAlphaColor(self, value: bool)
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)
Sets the edge to use its default color.
- Parameters:
value (bool) – true to use the edge default color, false otherwise
- setUseEdgeScalarValues(self, value: bool)
Gets the status of edge scalar values usage.
See also
getScalarValues(), getScalarValuesSlotCount()
- Parameters:
value (bool) –
GraphAnalyzer¶
- class ORSModel.ors.GraphAnalyzer(self)
Bases:
Unmanaged- computeStatisticsFor(self, denseGraph: ORSModel.ors.Graph, aTimeStep: int, edgeSlotIndex: int, pProgress: ORSModel.ors.Progress, sourceIndex: int) bool
- Parameters:
denseGraph (ORSModel.ors.Graph) –
aTimeStep (int) –
edgeSlotIndex (int) –
pProgress (ORSModel.ors.Progress) –
sourceIndex (int) –
- Returns:
output (bool) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDijkstraDistanceMap(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getDijkstraPredecessorMap(self) ORSModel.ors.ArrayUnsignedLong
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getDistancesBasedOnPredecessorMapForEdgeSlotIndex(self, anEdgeSlotIndex: int, destinationVerticesz: ORSModel.ors.ArrayUnsignedLong) ORSModel.ors.ArrayDouble
- Parameters:
anEdgeSlotIndex (int) –
destinationVerticesz (ORSModel.ors.ArrayUnsignedLong) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getEdgesOfPath(self, anEdgeSlotIndex: int, lastIndexInPath: int) ORSModel.ors.ArrayDouble
- Parameters:
anEdgeSlotIndex (int) –
lastIndexInPath (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getFirstAndLastVertexIndicesOfPathFromPredecessorMap(self, firstAndLastVertexIndicesInPath: ORSModel.ors.ArrayUnsignedLong) ORSModel.ors.ArrayUnsignedLong
- Parameters:
firstAndLastVertexIndicesInPath (ORSModel.ors.ArrayUnsignedLong) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getTimeStep(self) int
- Returns:
output (int) –
- initializeFor(self, denseGraph: ORSModel.ors.Graph)
- Parameters:
denseGraph (ORSModel.ors.Graph) –
- none() GraphAnalyzer
- Returns:
output (GraphAnalyzer) –
Group¶
- class ORSModel.ors.Group(*args, **kwargs)
Bases:
NodeA container object for managed objects.
- add(self, pObject: ORSModel.ors.Managed)
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 (a Managed)
- addAtKey(self, sKey: str, pObject: ORSModel.ors.Managed)
Adds an object to the group, at a specific key.
Note
This container behaves like a set, i.e. objects can only appear once.
- Parameters:
sKey (str) – a key (a string)
pObject (ORSModel.ors.Managed) – object to add (a Managed)
- addGroup(self, IInputGroup: ORSModel.ors.Group)
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 (a Group)
- empty(self)
Empties the group.
- getAllContainedInstancesOf(self, pProgId: str) ORSModel.ors.List
Note
Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – a class name (a string)
- Returns:
output (ORSModel.ors.List) – a list of objects (a List)
- getAllContainedObjects(self) ORSModel.ors.List
Returns all the objects found in the group.
- Returns:
output (ORSModel.ors.List) – a list of objects (a List)
- getAllContainedObjectsOfClassAndPrivateTitle(self, pProgId: str, pPrivateTitle: str) ORSModel.ors.List
Note
Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – a class name (a string)
pPrivateTitle (str) – a private title (a string)
- Returns:
output (ORSModel.ors.List) – a list of objects (a 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 (a Managed)
- Returns:
output (bool) – true if object is in the group, false otherwise
- getIncludesGUID(self, sGUID: str) bool
Checks to see if an object is in the group, via its GUID.
- Parameters:
sGUID (str) – guid to check (a string)
- Returns:
output (bool) – true if guid 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 (a Managed)
- 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) ORSModel.ors.Group
Note
The output group can be the same as the receiver group (i.e. can intersect another group into itself) or the same as the intersection group (i.e. can intersect another group into the intersection group).
Note
The output group is initialized as the set of objects of the receiver with their original keys, then all the objects absent from the intersection group are removed (independently of their associated keys).
- Parameters:
IInputGroup (ORSModel.ors.Group) –
IInOutGroup (ORSModel.ors.Group) –
- Returns:
output (ORSModel.ors.Group) –
- getKeysOfObject(self, pObject: ORSModel.ors.Managed) List[str]
Returns the keys associated to an object in the group.
- Parameters:
pObject (ORSModel.ors.Managed) – an object (a Managed)
- Returns:
output (List[str]) – a list of keys (a list of strings)
- getObjectAt(self, pos: int) ORSModel.ors.Managed
Returns the Nth object in the group.
- Parameters:
pos (int) – an index (a uint32_t)
- Returns:
output (ORSModel.ors.Managed) – an object (a Managed)
- getObjectsAtKey(self, sKey: str) ORSModel.ors.List
Returns the objects found at the given key.
- Parameters:
sKey (str) – a key (a string)
- Returns:
output (ORSModel.ors.List) – a list of objects (a List)
- getSubtractionFrom(self, IInputGroup: ORSModel.ors.Group, IInOutGroup: ORSModel.ors.Group) ORSModel.ors.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) or the same as the subtraction group (i.e. can subtract another group into the subtraction group).
Note
The output group is initialized as the set of objects of the receiver with their original keys, then all the objects present from the subtraction group are removed (independently of their associated keys).
- Parameters:
IInputGroup (ORSModel.ors.Group) – the group to subtract (a Group)
IInOutGroup (ORSModel.ors.Group) – the output group (a Group), see note below
- Returns:
output (ORSModel.ors.Group) – the subtracted group
- getUnionWith(self, IInputGroup: ORSModel.ors.Group, IInOutGroup: ORSModel.ors.Group) ORSModel.ors.Group
Note
The output group can be the same as the receiver group (i.e. can merge with another group into itself) or the same as the union group (i.e. can merge another group in the union group).
Note
The output group is initialized as the set of objects of the receiver with their original keys, then all the objects present in the union group are added with their associated keys.
- Parameters:
IInputGroup (ORSModel.ors.Group) –
IInOutGroup (ORSModel.ors.Group) –
- Returns:
output (ORSModel.ors.Group) –
- none() Group
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Group) –
- remove(self, pObject: ORSModel.ors.Managed)
Removes an object from the group.
- Parameters:
pObject (ORSModel.ors.Managed) – object to remove (a Managed)
- removeAtKey(self, sKey: str, pObject: ORSModel.ors.Managed)
Removes an object from the group, at a specific key.
Note
This container behaves like a set, i.e. objects can only appear once.
- Parameters:
sKey (str) – a key (a string)
pObject (ORSModel.ors.Managed) – object to remove (a Managed)
- removeGroup(self, IInputGroup: ORSModel.ors.Group)
Removes all the objects found in the supplied group from the group.
- Parameters:
IInputGroup (ORSModel.ors.Group) – another group (a Group)
HalfEdgeMesh¶
- class ORSModel.ors.HalfEdgeMesh(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Mesh- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
HalfEdgeMesh.__init__(self)
- copyInto(self, aDestinationUnstructuredGrid: ORSModel.ors.Node)
Copies the receiver unstructured grid into another unstructured grid.
- Parameters:
aDestinationUnstructuredGrid (ORSModel.ors.Node) – a destination unstructured grid
- getAsFaceVertexMesh(self, pInOutMeshModel: ORSModel.ors.FaceVertexMesh) ORSModel.ors.FaceVertexMesh
- Parameters:
pInOutMeshModel (ORSModel.ors.FaceVertexMesh) –
- Returns:
output (ORSModel.ors.FaceVertexMesh) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getEdgesInFaceVertexTopology(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getFacesAdjacencyArray(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – an array of int32_t (an ArrayLong)
- getTotalByteCount(self) int
Gets the total byte count in memory of the mesh.
- Returns:
output (int) –
- getVerticesAdjacencyArray(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – an array of int32_t (an ArrayLong)
- none() HalfEdgeMesh
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (HalfEdgeMesh) –
- setEdgesInFaceVertexTopology(self, pEdges: ORSModel.ors.ArrayUnsignedLong, iTIndex: int)
- Parameters:
pEdges (ORSModel.ors.ArrayUnsignedLong) –
iTIndex (int) –
HistogramAnalyzer¶
- class ORSModel.ors.HistogramAnalyzer(self)
Bases:
Unmanaged- fillHistogram1DFromChannel(self, IHistogramData: ORSModel.ors.HistogramData, IChannel1: ORSModel.ors.Channel, tChannel: int, IROI: ORSModel.ors.ROI, tROI: int)
- 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)
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)
- Parameters:
IHistogramData (ORSModel.ors.HistogramData) – the 1D histogram to fill (an HistogramData)
ICollection1 (ORSModel.ors.SequenceableCollection) – the collection values (a SequenceableCollection)
IFilterCollection (ORSModel.ors.SequenceableCollection) – the filter collection (a SequenceableCollection). If this parameter is given as nullptr, all elements of the collection values will be used.
IArrayBinIndexes (ORSModel.ors.ArrayUnsignedLONGLONG) – an array filled with the bin index of each element. If this parameter is given as nullptr, these indexes won’t be returned.
- fillHistogram1DFromCollectionSubset(self, IHistogramData: ORSModel.ors.HistogramData, ICollection1: ORSModel.ors.SequenceableCollection, indexStart: int, indexEnd: int)
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)
- 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)
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)
- Parameters:
IHistogramData (ORSModel.ors.HistogramData) – the 2D histogram to fill (an HistogramData)
ICollection1 (ORSModel.ors.SequenceableCollection) – the collection values of the first dimension (a SequenceableCollection)
ICollection2 (ORSModel.ors.SequenceableCollection) – the collection values of the second dimension (a SequenceableCollection)
IFilterCollection (ORSModel.ors.SequenceableCollection) – the filter collection (a SequenceableCollection). If this parameter is given as nullptr, all elements of the collections values will be used.
IArrayBinIndexes (ORSModel.ors.ArrayUnsignedLONGLONG) – an array filled with the linear bin index of each element. If this parameter is given as nullptr, these indexes won’t be returned.
- fillHistogram2DFromCollectionsSubset(self, IHistogramData: ORSModel.ors.HistogramData, ICollection1: ORSModel.ors.SequenceableCollection, ICollection2: ORSModel.ors.SequenceableCollection, indexStart: int, indexEnd: int)
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)
- 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
- Returns:
output (HistogramAnalyzer) –
HistogramData¶
- class ORSModel.ors.HistogramData(*args, **kwargs)
Bases:
NodeAn object that contains histogram data.
- addCountAtIndex1D(self, iIndex: int, countToAdd: int)
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)
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)
-
- 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)
-
- 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
- computeMax(self, dimension: int) float
Computes the maximum, which is the greatest value of i such that histogram[i] > 0.
- Parameters:
dimension (int) – index of the dimension (starting at 0)
- Returns:
output (float) – maximum value (a double)
- computeMean(self, dimension: int) float
Computes the mean.
- Parameters:
dimension (int) – index of the dimension (starting at 0)
- Returns:
output (float) – mean value (a double)
- computeMin(self, dimension: int) float
Computes the minimum, which is the least value of i such that histogram[i] > 0.
- Parameters:
dimension (int) – index of the dimension (starting at 0)
- Returns:
output (float) – minimum value (a double)
- computeMode(self, dimension: int) float
Computes the mode.
- Parameters:
dimension (int) – index of the dimension (starting at 0)
- Returns:
output (float) – mode value (a double)
- computeNthMoment(self, dimension: int, moment: int) float
Computes the Nth moment.
- Parameters:
dimension (int) – index of the dimension (starting at 0)
moment (int) – the moment to compute (starting at 1)
- Returns:
output (float) – the Nth moment value (a double)
- computeOtsu(self, dimension: int) float
Computes the otsu.
- Parameters:
dimension (int) – index of the dimension (starting at 0)
- Returns:
output (float) – otsu threshold (a double)
- computeStd(self, dimension: int) float
Computes the standard deviation.
- Parameters:
dimension (int) – index of the dimension (starting at 0)
- Returns:
output (float) – standard deviation value (a double)
- copyInto(self, destination: ORSModel.ors.HistogramData)
Copies the current histogram data in to the destination.
- Parameters:
destination (ORSModel.ors.HistogramData) – destination Histogram
- downSample(self, dimension: int, dStart: float, dEnd: float, nBins: int) ORSModel.ors.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) – ORS::HistogramData
HistogramData.downSample(self, dimension: int, nBins: int) -> ORSModel.ors.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) – ORS::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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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
See also
ORSModel.ors.HistogramData.isValueInsideRangeLimits(),ORSModel.ors.HistogramData.getIndexAtValueForDimension()- Parameters:
dValue (float) – value
- Returns:
output (int) – bin index
- getIndexAtValueForDimension(self, dimension: int, dValue: float) int
-
- 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
-
- 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
See also
ORSModel.ors.HistogramData.getIsDataInitialized(),ORSModel.ors.HistogramData.setDimensionCount(),ORSModel.ors.HistogramData.setBinEdgesFromWidth()- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (HistogramData) –
- setBinEdgesFromArray(self, dimension: int, dValues: ORSModel.ors.ArrayDouble)
- 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)
-
- 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)
-
- 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)
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)
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)
Sets the number of dimensions.
- Parameters:
nbDimensions (int) – number of dimensions (a uint32_t)
- setUseSparse(self, bUseSparse: bool)
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) ORSModel.ors.HistogramData
-
- Parameters:
dimension (int) – dimension along which the sum is made
- Returns:
output (ORSModel.ors.HistogramData) – New histogramData
Image¶
- class ORSModel.ors.Image(self)
Bases:
Node- copyDataFromChannel(self, aChannel: ORSModel.ors.Channel, timeStep: int)
- Parameters:
aChannel (ORSModel.ors.Channel) –
timeStep (int) –
- copyDataFromChannelWithLookupTable(self, aChannel: ORSModel.ors.Channel, timeStep: int, levelingMinValue: float, levelingMaxValue: float, slabThickness: float, aLUT: ORSModel.ors.LookupTable, alpha: float, gamma: float)
- Parameters:
aChannel (ORSModel.ors.Channel) –
timeStep (int) –
levelingMinValue (float) –
levelingMaxValue (float) –
slabThickness (float) –
aLUT (ORSModel.ors.LookupTable) –
alpha (float) –
gamma (float) –
- 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)
- flipImageDataVertically(self)
- getAllocatedSize(self) int
- Returns:
output (int) –
- getBoundedPlane(self) ORSModel.ors.Rectangle
- Returns:
output (ORSModel.ors.Rectangle) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getComponentCountPerPixel(self) int
Gets the number of components per pixel.
- Returns:
output (int) – a count (an unsigned short)
- 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.
See also
CxvChannel_Data_Type, setDataType()
- 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.
See also
initializeData()
- 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) –
- getRawImageData(self)
- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Image) –
- setBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle)
- Parameters:
aBoundedPlane (ORSModel.ors.Rectangle) –
- setDataOffsetForPixelComponent(self, offset: float, componentIndex: int)
- Parameters:
offset (float) –
componentIndex (int) –
- setDataSlopeForPixelComponent(self, slope: float, componentIndex: int)
- Parameters:
slope (float) –
componentIndex (int) –
- setDirections(self, direction0: ORSModel.ors.Vector3, direction1: ORSModel.ors.Vector3)
- Parameters:
direction0 (ORSModel.ors.Vector3) –
direction1 (ORSModel.ors.Vector3) –
- setMaxU(self, aValue: float)
- Parameters:
aValue (float) –
- setMaxV(self, aValue: float)
- Parameters:
aValue (float) –
- setMinU(self, aValue: float)
- Parameters:
aValue (float) –
- setMinV(self, aValue: float)
- Parameters:
aValue (float) –
- setOrigin(self, origin: ORSModel.ors.Vector3)
- Parameters:
origin (ORSModel.ors.Vector3) –
- setSpacings(self, xSpacing: float, ySpacing: float)
- Parameters:
xSpacing (float) –
ySpacing (float) –
- transform(self, aTransformationMatrix: ORSModel.ors.Matrix4x4)
- Parameters:
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
ImageCollection¶
- class ORSModel.ors.ImageCollection(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Node- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
ImageCollection.__init__(self)
- deleteAllImages(self)
Deletes all images.
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getImageAtIndex(self, imageIndex: int) ORSModel.ors.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)
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)
Inserts an image at start of list.
- Parameters:
anImage (ORSModel.ors.Image) – an image (an Image)
- insertImageLast(self, anImage: ORSModel.ors.Image)
Inserts an image at end of list.
- Parameters:
anImage (ORSModel.ors.Image) – an image (an Image)
- none() ImageCollection
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ImageCollection) –
- removeAllImages(self)
Removes all images.
- removeImage(self, anImage: ORSModel.ors.Image)
Removes an image.
- Parameters:
anImage (ORSModel.ors.Image) – an image (an Image)
- removeImageAtIndex(self, imageIndex: int)
Removes the image at given index.
- Parameters:
imageIndex (int) – the image index (an uint32_t)
ImageCollectionPresenter¶
- class ORSModel.ors.ImageCollectionPresenter(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
DatasetPresenter- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
ImageCollectionPresenter.__init__(self)
- 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:
aNode (ORSModel.ors.Node) –
anImage (ORSModel.ors.Image) –
- Returns:
output (bool) –
- getPresentationBoundedPlane(self) ORSModel.ors.Rectangle
- Returns:
output (ORSModel.ors.Rectangle) –
- none() ImageCollectionPresenter
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ImageCollectionPresenter) –
- setImageIndexForView(self, aView: ORSModel.ors.View, imageIndex: int)
- Parameters:
aView (ORSModel.ors.View) –
imageIndex (int) –
- setNodeNotVisibleForAllImage(self, aNode: ORSModel.ors.Node)
- Parameters:
aNode (ORSModel.ors.Node) –
- setNodeNotVisibleForImage(self, aNode: ORSModel.ors.Node, anImage: ORSModel.ors.Image)
- Parameters:
aNode (ORSModel.ors.Node) –
anImage (ORSModel.ors.Image) –
- setNodeVisibleForAllImage(self, aNode: ORSModel.ors.Node)
- Parameters:
aNode (ORSModel.ors.Node) –
- setNodeVisibleForImage(self, aNode: ORSModel.ors.Node, anImage: ORSModel.ors.Image)
- Parameters:
aNode (ORSModel.ors.Node) –
anImage (ORSModel.ors.Image) –
- setPresentationBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle)
- Parameters:
aBoundedPlane (ORSModel.ors.Rectangle) –
Intersection¶
- class ORSModel.ors.Intersection
Bases:
UnmanagedRepresents a ray pick result.
See also
View::pick(), Node::pick()
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getClosestVisual(self) ORSModel.ors.Visual
See also
getHighlightedVisual(),
ORSModel.ors.Intersection.getFarthestVisual()- Returns:
output (ORSModel.ors.Visual) –
- getClosestVisualOfClass(self, pProgId: str) ORSModel.ors.Visual
See also
getHighlightedVisual(),
ORSModel.ors.Intersection.getFarthestVisual()- Parameters:
pProgId (str) –
- Returns:
output (ORSModel.ors.Visual) –
- getColor(self) ORSModel.ors.Color
Returns the color value of the intersection.
- Returns:
output (ORSModel.ors.Color) – a color (a Color)
- getColorInPhysicalUnits(self) ORSModel.ors.Color
Gets the color value, adjusted to physical units (slope and offset).
See also
- 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) ORSModel.ors.Visual
See also
getHighlightedVisual(),
ORSModel.ors.Intersection.getClosestVisual()- Returns:
output (ORSModel.ors.Visual) –
- getFarthestVisualOfClass(self, pProgId: str) ORSModel.ors.Visual
See also
getHighlightedVisual(),
ORSModel.ors.Intersection.getClosestVisual()- Parameters:
pProgId (str) –
- Returns:
output (ORSModel.ors.Visual) –
- 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
See also
getBary2()
- Returns:
output (float) –
- getMeshFaceBary2(self) float
See also
getBary2()
- Returns:
output (float) –
- 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) ORSModel.ors.Vector3
- Parameters:
nth (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getNthPositionInWorldCoordinates(self, nth: int) ORSModel.ors.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.
See also
- Returns:
output (float) – the offset (a double)
- getPickDirection(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getPickOrigin(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getPixelPositionInView(self) ORSModel.ors.Vector3
Returns the position of the intersection in screen coordinates.
- Returns:
output (ORSModel.ors.Vector3) – a point (an Vector3)
- getPositionInLocalCoordinates(self) ORSModel.ors.Vector3
Returns the position of the intersection in local coordinates.
- Returns:
output (ORSModel.ors.Vector3) – a point (a Vector3)
- getPositionInVoxelIndex(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.StructuredGrid
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.
See also
getHighlightedVisual(),
ORSModel.ors.Intersection.getClosestVisual(),ORSModel.ors.Intersection.getVisualCount()- 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:
output (int) –
- getTimeStep(self) int
Returns the T value of the intersection.
- Returns:
output (int) – a uint32_t
- getVisualAtIndex(self, iIndex: int) ORSModel.ors.Visual
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.
See also
getHighlightedVisual(),
ORSModel.ors.Intersection.getClosestVisual(),ORSModel.ors.Intersection.getVisualCount()- 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:
output (int) –
- getVoxelIndex(self) int
- Returns:
output (int) –
- 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
- Returns:
output (Intersection) –
Layout¶
- class ORSModel.ors.Layout(*args, **kwargs)
Bases:
Managedobject used to describe a view layout
- addFirst(self, aLayout: ORSModel.ors.Layout)
- Parameters:
aLayout (ORSModel.ors.Layout) –
- addLast(self, aLayout: ORSModel.ors.Layout)
- Parameters:
aLayout (ORSModel.ors.Layout) –
- getAllChildLayout(self) ORSModel.ors.List
- Returns:
output (ORSModel.ors.List) –
- getAllChildViews(self) ORSModel.ors.List
- Returns:
output (ORSModel.ors.List) –
- getAllLeaves(self) ORSModel.ors.List
- Returns:
output (ORSModel.ors.List) –
- getBottomRight(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getBottomRightPositionOfChildren(self, aLayout: ORSModel.ors.Layout) ORSModel.ors.Vector3
- Parameters:
aLayout (ORSModel.ors.Layout) –
- Returns:
output (ORSModel.ors.Vector3) –
- getChildWithPrivateTitle(self, privateTitle: str) ORSModel.ors.Layout
- Parameters:
privateTitle (str) –
- Returns:
output (ORSModel.ors.Layout) –
- getChildren(self) ORSModel.ors.List
- Returns:
output (ORSModel.ors.List) –
- getChildrenAtIndex(self, index: int) ORSModel.ors.Layout
- Parameters:
index (int) –
- Returns:
output (ORSModel.ors.Layout) –
- getChildrenCount(self) int
- Returns:
output (int) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- 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) ORSModel.ors.Layout
- Returns:
output (ORSModel.ors.Layout) –
- getTopLeft(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getTopLeftPositionOfChildren(self, aLayout: ORSModel.ors.Layout) ORSModel.ors.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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Layout) –
- normalizeChildrenWeights(self)
- propagateLayoutUpdated(self) bool
- Returns:
output (bool) –
- removeAllChildren(self)
- removeChildren(self, aLayout: ORSModel.ors.Layout)
- Parameters:
aLayout (ORSModel.ors.Layout) –
- replaceChildren(self, aLayoutToBeReplace: ORSModel.ors.Layout, aLayoutReplacement: ORSModel.ors.Layout) bool
- Parameters:
aLayoutToBeReplace (ORSModel.ors.Layout) –
aLayoutReplacement (ORSModel.ors.Layout) –
- Returns:
output (bool) –
- setBottomRight(self, aVector: ORSModel.ors.Vector3)
- Parameters:
aVector (ORSModel.ors.Vector3) –
- setEnabled(self, bEnabled: bool)
- Parameters:
bEnabled (bool) –
- setIsLinear(self, aValue: bool)
- Parameters:
aValue (bool) –
- setIsVertical(self, aValue: bool)
- Parameters:
aValue (bool) –
- setLayoutClass(self, aClass: str)
- Parameters:
aClass (str) –
- setLeaveEmpty(self, aValue: bool)
- Parameters:
aValue (bool) –
- setTopLeft(self, aVector: ORSModel.ors.Vector3)
- Parameters:
aVector (ORSModel.ors.Vector3) –
- setViewGUID(self, aGUID: str)
- Parameters:
aGUID (str) –
- setWeight(self, aValue: float)
- Parameters:
aValue (float) –
Line¶
- class ORSModel.ors.Line
Bases:
Shape2DLine manipulation services.
- copy(self) ORSModel.ors.Line
Gets a copy of the receiver.
- Returns:
output (ORSModel.ors.Line) – a line (an Line)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.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)
Sets the the origin and orientation of the line.
Note
The orientation vector will be normalized.
- Parameters:
origin (ORSModel.ors.Vector3) – a point (an Vector3)
orientation (ORSModel.ors.Vector3) – an orientation (an Vector3)
- fromTwoPoints(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3)
Sets the the origin and orientation of the line based on the two provided points.
- Parameters:
point0 (ORSModel.ors.Vector3) – a point (an Vector3)
point1 (ORSModel.ors.Vector3) – a point (an Vector3)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getClosestPointOnLineFromPoint(self, aPoint: ORSModel.ors.Vector3) ORSModel.ors.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) –
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- getOrientation(self) ORSModel.ors.Vector3
Gets the receiver orientation.
Note
The orientation vector is normalized.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getOrigin(self) ORSModel.ors.Vector3
Gets the receiver origin position.
Note
The origin is in world coordinates.
- Returns:
output (ORSModel.ors.Vector3) – the origin (an Vector3)
- setOrientation(self, pVect: ORSModel.ors.Vector3)
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)
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:
Shape2DLine segment manipulation services.
- copy(self) ORSModel.ors.LineSegment
Gets a copy of the receiver.
- Returns:
output (ORSModel.ors.LineSegment) – a box (an LineSegment)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.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)
- Parameters:
origin (ORSModel.ors.Vector3) –
direction (ORSModel.ors.Vector3) –
length (float) –
- 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) ORSModel.ors.Vector3
Gets the receiver end point.
- Returns:
output (ORSModel.ors.Vector3) – a point (an Vector3)
- getEndProvidingOutput(self, pVect: ORSModel.ors.Vector3)
- Parameters:
pVect (ORSModel.ors.Vector3) –
- getIsEqualTo(self, aLineSegment: ORSModel.ors.LineSegment) bool
- Parameters:
aLineSegment (ORSModel.ors.LineSegment) –
- Returns:
output (bool) –
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- getLength(self) float
Gets the receiver length.
- Returns:
output (float) – a length (a double)
- getPointInBetween(self, aRatio: float) ORSModel.ors.Vector3
- Parameters:
aRatio (float) –
- Returns:
output (ORSModel.ors.Vector3) –
- getStart(self) ORSModel.ors.Vector3
Gets the receiver start point.
- Returns:
output (ORSModel.ors.Vector3) – a point (an Vector3)
- getStartProvidingOutput(self, pVect: ORSModel.ors.Vector3)
- Parameters:
pVect (ORSModel.ors.Vector3) –
- none() LineSegment
- Returns:
output (LineSegment) –
- setEnd(self, pVect: ORSModel.ors.Vector3)
Sets the receiver end point.
- Parameters:
pVect (ORSModel.ors.Vector3) – a point (an Vector3)
- setStart(self, pVect: ORSModel.ors.Vector3)
Set the receiver start point.
- Parameters:
pVect (ORSModel.ors.Vector3) – a point (an Vector3)
List¶
- class ORSModel.ors.List
Bases:
ORSBaseClassA list of Managed instances.
See also
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)
Adds an object to the list.
- Parameters:
pObject (ORSModel.ors.Managed) – an object (an Object)
- appendAllObjects(self, pList: ORSModel.ors.List)
Note
All objects are taken from the appended list, whether or not they are already in the receiver list.
See also
- Parameters:
pList (ORSModel.ors.List) –
- appendNonPresentObjects(self, pList: ORSModel.ors.List)
Note
Only the objects not already in the receiver are taken from the appended list.
See also
- Parameters:
pList (ORSModel.ors.List) –
- getAllElementsOfClass(self, pProgId: str) ORSModel.ors.List
Note
Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (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.
See also
- 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
Returns the index of an object in the list or -1 if not found.
- Parameters:
pObject (ORSModel.ors.Managed) –
- Returns:
output (int) –
- getIntersectionWith(self, pList: ORSModel.ors.List) ORSModel.ors.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) ORSModel.ors.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 chan = someList.getObjectAt(0). If the object at index 0 is not a channel, chan will be none.
See also
- 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) – std::wstring
- getSubtractionFrom(self, pList: ORSModel.ors.List) ORSModel.ors.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) –
- Returns:
output (ORSModel.ors.List) –
- getUnionWith(self, pList: ORSModel.ors.List) ORSModel.ors.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)
- isNone(self) bool
Checks if the object is none.
- Returns:
output (bool) –
- isNotNone(self) bool
Checks if the object is not none.
- Returns:
output (bool) –
- loadEmptyObjectsFromFile(self, sFilename: str, classNames: List[str])
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.
Note
Once you’re done with the list, you need to send deleteObject() to all objects within.
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().
See also
ORSModel.ors.List.saveToFile(),ORSModel.ors.List.loadFromFileFiltered(),ORSModel.ors.List.loadFromFile()- Parameters:
sFilename (str) – an input filename (a string)
classNames (List[str]) – list of class names (see note)
- loadFromFile(self, sFilename: str, preserveIdentity: bool, progress: ORSModel.ors.Progress)
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) – true to preserve identity, false otherwise (see note)
preserveIdentity (bool) – an optional progress object
progress (ORSModel.ors.Progress) –
- loadFromFileFiltered(self, sFilename: str, preserveIdentity: bool, classNames: List[str], progress: ORSModel.ors.Progress)
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 (List[str]) – list of class names (see note)
progress (ORSModel.ors.Progress) – a progress object
- loadSpecificObjectsFromFile(self, sFilename: str, preserveIdentity: bool, guids: List[str], progress: ORSModel.ors.Progress)
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)
guids (List[str]) – list of GUIDs to load
progress (ORSModel.ors.Progress) – a progress object
- 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)
- saveToFile(self, sFilename: str, iCompressionEngine: int = 1) int
Saves all the objects in the list to a file.
See also
- Parameters:
sFilename (str) – an output filename (a string)
iCompressionEngine (int) – the input compression engine (0: None, 1: ZSTD)
- Returns:
output (int) – a result (an int, 0 for no error, otherwise an error code)
- saveToFileToLegacyFormat(self, sFilename: str, iCompressionEngine: int = 1) int
Saves all the objects in the list to a file in the legacy (2022.2) format.
See also
- Parameters:
sFilename (str) – an output filename (a string)
iCompressionEngine (int) – the input compression engine (0: None, 1: ZSTD)
- Returns:
output (int) – a result (an int, 0 for no error, otherwise an error code)
Loader¶
- class ORSModel.ors.Loader(*args, **kwargs)
Bases:
ManagedAllows to load previously saved ORS objects.
See also
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)
- getCurrentNodeCompletePath(self) str
Gets the current node’s complete path from the document root.
- Returns:
output (str) – the path (a string)
- 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
Gets the current node’s name.
- Returns:
output (str) – the name (a string)
- 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 unsigned int)
- getCurrentNodeUnsignedIntValue(self) int
Gets the current node unsigned int value in an XML tree being parsed.
- Returns:
output (int) – the node value (an unsigned 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 unsigned short)
- getCurrentNodeUnsignedShortValue(self) int
Gets the current node unsigned short value in an XML tree being parsed.
- Returns:
output (int) – the node value (an unsigned short)
- getCurrentNodeValue(self) str
- Returns:
output (str) –
- getDataOffset(self, pXpath: str) int
Gets the data position of a given node.
- Parameters:
pXpath (str) – an XPath (a string)
- Returns:
output (int) – the offset value (an uint64_t)
- getFileValidity(self, filename: str) int
Validates a given file, returning a result code.
Note
Return is 0 if file is valid, otherwise an error code.
- Parameters:
filename (str) – a filename (a string)
- Returns:
output (int) – a result code (an int64_t)
- 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.0 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 unsigned 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 unsigned 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)
- getXML(self) str
Returns the underlying XML string.
- Returns:
output (str) – An XML string
- isCurrentFileCompressed(self) bool
Verifies if current file is compressed or not.
- Returns:
output (bool) – true if compressed, false otherwise
- loadObjectsFromFile(self, filename: str)
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)
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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Loader) –
- pop(self)
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.
See also
ORSModel.ors.Loader.pop(), Saver::addAttributeToCurrentNode()- 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.
See also
- 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(*args, **kwargs)
Bases:
NodeA Lookup Table that can adopt predefined and/or custom looks.
See also
VisualMesh::setLookupTable(), Vector3::setLookupTable()
- appendColor(self, IColor: ORSModel.ors.Color)
Add a color at the end of the table.
- Parameters:
IColor (ORSModel.ors.Color) –
- build(self)
Builds the LUT according to its settings.
- buildDiscreteLUT(self)
Build Discrete lut color and alpha control point arrays from color table.
Note
User-defined LUTs use color and alpha control points.
- copyColorSettingsFrom(self, ILookupTable: ORSModel.ors.LookupTable)
Copy color settings from the given lookup table.
Note
Copies only the color settings, leaving the object attributes unchanged.
See also
- Parameters:
ILookupTable (ORSModel.ors.LookupTable) –
- copyFrom(self, ILookupTable: ORSModel.ors.LookupTable)
Copy internal parameters from the given lookup table.
Note
Copies everything (color settings and object attributes).
- Parameters:
ILookupTable (ORSModel.ors.LookupTable) –
- fillColorFromMultiROI(self, aMultiROI: ORSModel.ors.MultiROI)
Fill a LUT fromMultiROI label Color.
- Parameters:
aMultiROI (ORSModel.ors.MultiROI) – a MultiROI (a MultiROI)
- fillRGBAColorArray(self, startIndex: int, endIndex: int, colorsArray: bytes, subtractFactors: bytes)
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()
- findAlphaControlPointIndexForPosition(self, pX: float) int
Note
The returned value may be used to determine the insertion index of a new control point at a given position.
- Parameters:
pX (float) –
- Returns:
output (int) –
- findColorControlPointIndexForPosition(self, pX: float) int
Note
The returned value may be used to determine the insertion index of a new control point at a given position.
- Parameters:
pX (float) –
- Returns:
output (int) –
- getAlphaControlPointAlphaValueHigh(self, index: int) float
-
- Parameters:
index (int) – the alpha control point index (a uint32_t)
- Returns:
output (float) – the alpha value (a double)
- getAlphaControlPointAlphaValueLow(self, index: int) float
-
- Parameters:
index (int) – the alpha control point index (a uint32_t)
- Returns:
output (float) – the alpha value (a double)
- getAlphaControlPointCount(self) int
Retrieves the total number of alpha control points in the LUT.
- Returns:
output (int) – the number of alpha control points (a uint32_t)
- getAlphaControlPointIsSplit(self, index: int) bool
Retrieves if the alpha control point is split.
- Parameters:
index (int) – the alpha control point index (a uint32_t)
- Returns:
output (bool) – the split value (a bool)
- getAlphaControlPointPositionX(self, index: int) float
Retrieves the X coordinate of an alpha control point.
- Parameters:
index (int) – the alpha control point index (a uint32_t)
- Returns:
output (float) – the X coordinate of the alpha control point (a double)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getColorAtIndex(self, inValue: int) ORSModel.ors.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) ORSModel.ors.Color
Note
This method returns a color at a position normalized between 0 and 1. If the position does not exactly match an existing color control point, the returned color will be an interpolation of the two closest colors.
- Parameters:
position (float) –
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- getColorControlPointColorHigh(self, index: int) ORSModel.ors.Color
-
- Parameters:
index (int) – the color control point index (a uint32_t)
- Returns:
output (ORSModel.ors.Color) – the color (an Color)
- getColorControlPointColorLow(self, index: int) ORSModel.ors.Color
-
- Parameters:
index (int) – the color control point index (a uint32_t)
- Returns:
output (ORSModel.ors.Color) – the color (an Color)
- getColorControlPointCount(self) int
Retrieves the total number of color control points in the LUT.
- Returns:
output (int) – the number of color control points (a uint32_t)
- getColorControlPointIsSplit(self, index: int) bool
Retrieves if the color control point is split.
- Parameters:
index (int) – the color control point index (a uint32_t)
- Returns:
output (bool) – the split value (a bool)
- getColorControlPointPositionX(self, index: int) float
Retrieves the X coordinate of a color control point.
- Parameters:
index (int) – the color control point index (a uint32_t)
- Returns:
output (float) – the X coordinate of the color control point (a double)
- getColorFromPosition(self, position: float, aColor: ORSModel.ors.Color)
- Parameters:
position (float) –
aColor (ORSModel.ors.Color) –
- getIsDiscrete(self) bool
Gets if the lookup table is discrete.
- Returns:
output (bool) –
- getQtLinearGradientFromORSLut(rangeInPixelMin, rangeInPixelMax, isXGradient=True, useAlphaValue=True)
Creates and return a QtGui.QLinearGradient object from the current lookupTable
- Parameters:
rangeInPixelMin (float) – starting value (pixel value) of the interpolation area
rangeInPixelMax (float) – final value (pixel value) of the interpolation area
isXGradient (bool) – if True, the linear the gradient will be along x direction, False for y. X gradient by default
useAlphaValue (bool) – if True, alpha value will be considered, false to not playing with the opacity.
- getRampUsesControlPoints(self) bool
Gets if the LUT is using control points to build his ramp.
- Returns:
output (bool) – true if the LUTs uses color and alpha control points, false otherwise (a bool)
- getTableSize(self) int
Get the table size.
See also
getDiscreteD3DColorAt()
- Returns:
output (int) – the table size (a uint32_t)
- insertAlphaControlPointAt(self, index: int, x: float, alphaValueL: float, alphaValueH: float, bIsSplit: bool)
- Parameters:
index (int) – the split value (a bool)
x (float) –
alphaValueL (float) –
alphaValueH (float) –
bIsSplit (bool) –
- insertColorControlPointAt(self, index: int, x: float, IColorLow: ORSModel.ors.Color, IColorHigh: ORSModel.ors.Color, bIsSplit: bool)
- Parameters:
index (int) – the split value (a bool)
x (float) –
IColorLow (ORSModel.ors.Color) –
IColorHigh (ORSModel.ors.Color) –
bIsSplit (bool) –
- none() LookupTable
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (LookupTable) –
- removeAllAlphaControlPoints(self)
Removes all LUT alpha control points.
- removeAllColorControlPoints(self)
Removes all LUT color control points.
- removeAllControlPoints(self)
Removes all LUT control points (color and alpha).
- removeAlphaControlPointAt(self, index: int)
Removes an alpha control point.
- Parameters:
index (int) – the alpha control point index (a uint32_t)
- removeColorAtIndex(self, nIndex: int) bool
Removes the color at the given index.
- Parameters:
nIndex (int) –
- Returns:
output (bool) –
- removeColorControlPointAt(self, index: int)
Removes a color control point.
- Parameters:
index (int) – the color control point index (a uint32_t)
- setAlphaControlPointAlphaValueHigh(self, index: int, alphaValue: float)
Changes the alpha value of an alpha control point (higher portion).
- Parameters:
index (int) – the alpha control point index (a uint32_t)
alphaValue (float) – the alpha value (a double). Should be in the range [0, 1].
- setAlphaControlPointAlphaValueLow(self, index: int, alphaValue: float)
Changes the alpha value of an alpha control point (lower portion).
- Parameters:
index (int) – the alpha control point index (a uint32_t)
alphaValue (float) – the alpha value (a double). Should be in the range [0, 1].
- setAlphaControlPointIsSplit(self, index: int, bIsSplit: bool)
- Parameters:
index (int) – the alpha control point index (a uint32_t)
bIsSplit (bool) – the split value (a bool)
- setAlphaControlPointPosition(self, index: int, pX: float)
Changes the position of an alpha control point.
- Parameters:
index (int) – the alpha control point index (a uint32_t)
pX (float) – the new X coordinate of the alpha control point (a double)
- setColorAtIndex(self, nIndex: int, IColor: ORSModel.ors.Color)
Sets the color at the given index.
- Parameters:
nIndex (int) –
IColor (ORSModel.ors.Color) –
- setColorAtPosition(self, position: float, IColor: ORSModel.ors.Color)
- Parameters:
position (float) –
IColor (ORSModel.ors.Color) –
- setColorControlPointColorHigh(self, index: int, IColor: ORSModel.ors.Color)
Changes the color of a color control point (higher portion).
- Parameters:
index (int) – the color control point index (a uint32_t)
IColor (ORSModel.ors.Color) – the color (a Color)
- setColorControlPointColorLow(self, index: int, IColor: ORSModel.ors.Color)
Changes the color of a color control point (lower portion).
- Parameters:
index (int) – the color control point index (a uint32_t)
IColor (ORSModel.ors.Color) – the color (a Color)
- setColorControlPointIsSplit(self, index: int, bIsSplit: bool)
- Parameters:
index (int) – the color control point index (a uint32_t)
bIsSplit (bool) – the split value (a bool)
- setColorControlPointPosition(self, index: int, pX: float)
Changes the position of a color control point.
- Parameters:
index (int) – the color control point index (a uint32_t)
pX (float) – the new X coordinate of the color control point (a double)
- setColorForIndexRange(self, nStartIndex: int, nEndIndex: int, IColor: ORSModel.ors.Color)
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)
- setIsDiscrete(self, bDiscrete: bool)
Sets the lookup table as discrete.
- Parameters:
bDiscrete (bool) –
- setRampBMPFile(self, filepath: str)
Sets the LUT to BMP file.
- Parameters:
filepath (str) –
- setRampGrayScale(self)
Sets the LUT to be gray scale.
Note
Gray scale LUTs divide the color range in 256 gray tones.
- setRampRainbow(self)
Sets the LUT to be rainbow.
Note
Rainbow LUTs divide the color range in 4 sections.
- setRampUserDefined(self)
Sets the LUT to be user-defined.
Note
User-defined LUTs use color and alpha control points.
- setTableSize(self, size: int)
Sets the table size.
- Parameters:
size (int) –
Managed¶
- class ORSModel.ors.Managed(*args, **kwargs)
Bases:
ORSBaseClassAn abstract class that implements all the default behavior of managed objects.
- 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)
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)
- addToSelection(contextInstance)
Adds the instance to the selection of a context
- Parameters:
contextInstance (plugin instance) – context instance
Note
Only representable object can be selected
- 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 saved.
- 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)
Loads an object from an XML string.
- Parameters:
anXML (str) – an XML (a string)
Managed.atomicLoadFrom(self, buffer: bytes, nBytes: int)
Loads an object from a memory buffer. Used for python pickling.
- Parameters:
buffer (bytes) – the buffer
nBytes (int) – the number of bytes in the buffer (a uint64_t)
Managed.atomicLoadFrom(self, stream: ORSModel.ors.Stream) -> int
Loads an object from a stream (using callback).
- Parameters:
stream (ORSModel.ors.Stream) – the stream to read data from
- Returns:
output (int) – 0 if successful, otherwise an error code
- atomicLoadSpecificNode(self, aFilename: str, aXPathOfTheNodeToLoad: str) bool
Loads an object from a file containing several objects.
- Parameters:
aFilename (str) – The file name, including entire path (a string)
aXPathOfTheNodeToLoad (str) – The XPath specification to find the node
- Returns:
output (bool) – true if node was found and loaded, false otherwise
- atomicSave(self, aFilename: str, isTemporary: bool = False, iCompressionEngine: int = 1) 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
iCompressionEngine (int) – the input compression engine (0: None, 1: ZSTD)
- Returns:
output (int) – 0 if successful, otherwise an error code
- atomicSaveToLegacyFormat(self, aFilename: str, isTemporary: bool = False, iCompressionEngine: int = 1) int
Saves the object to a file in the legacy (2022.2) format.
- Parameters:
aFilename (str) – path of the file to save
isTemporary (bool) – if true, try to keep file in memory
iCompressionEngine (int) – the input compression engine (0: None, 1: ZSTD)
- Returns:
output (int) – 0 if successful, otherwise an error code
- atomicSaveToStream(self, stream: ORSModel.ors.Stream, iCompressionEngine: int = 1) int
Saves the object to a stream (through callback).
- Parameters:
stream (ORSModel.ors.Stream) – stream object to save current object in
iCompressionEngine (int) – the input compression engine (0: None, 1: ZSTD)
- Returns:
output (int) – 0 if successful, otherwise an error code
- copy(self) ORSModel.ors.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)
- createScalarValuesCollection(self)
method createScalarValuesCollection
- deleteObject(self)
Explicitly deletes the core object wrapped by this Interface object.
- deleteObjectAndAllItsChildren(self)
Explicitly deletes the core object wrapped by this Interface object, along with all its children.
- ensureInitialization(self)
This is for the Python interface.
- getAllGroupsContaining(self, anIObject: ORSModel.ors.Managed) ORSModel.ors.List
Gets all the groups that contain the given object.
- Parameters:
anIObject (ORSModel.ors.Managed) –
- Returns:
output (ORSModel.ors.List) –
- getAllInstancesOf(pProgId: str) ORSModel.ors.List
Gathers all existing objects of the specified class.
- Parameters:
pProgId (str) –
- Returns:
output (ORSModel.ors.List) –
- getAllObjectsOfClassAndPrivateTitle(pProgId: str, pPrivateTitle: str) ORSModel.ors.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)
- getAllObjectsOfClassAndTitle(pProgId: str, pTitle: str) ORSModel.ors.List
Gathers all existing objects of the specified class, that have a matching title.
- Parameters:
pProgId (str) – name of the class (a string)
pTitle (str) – 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) ORSModel.ors.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)
- getAllRepresentableInstancesOf(pProgId: str) ORSModel.ors.List
Gathers all existing objects of the specified class that are representable.
- Parameters:
pProgId (str) –
- Returns:
output (ORSModel.ors.List) –
- getAllRepresentableObjects() ORSModel.ors.List
Gets all the representable objects of the world.
- Returns:
output (ORSModel.ors.List) – a list containing all the representable objects
- getAtomicTextRepresentation(self, bSelfContained: bool) str
Retrieves the object’s atomic text representation.
- Parameters:
bSelfContained (bool) –
- Returns:
output (str) –
- getAutoDelete(self) bool
Gets the autodelete value.
See also
- Returns:
output (bool) –
- getBinaryUserInfo(self, pTag: str)
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)
- 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
- getChildrenNodesOrganizationDirtySignature()
Gets the current dirty signature for the flag OrsChildrenNodesOrganizationDirty
- Returns:
childrenNodesOrganizationDirtySignature (int) – the dirty signature
- 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
- getDataChecksum(self) str
Returns the computed checksum of the data.
- Returns:
output (str) –
- 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 uint64_t)
- getEntireDirtySignature(self) int
Gets the current dirty signature for all aspects, added up.
Note
Objects can be dirty for several aspects, see the ors_def.h file for the different dirty aspects.
- Returns:
output (int) – entire dirty signature (a uint64_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) – true if callbacks exist for the event, false otherwise
- getHighlightDirtySignature()
Gets the current dirty signature for the flag OrsHighlightDirty
- Returns:
highlightDirtySignature (int) – the dirty signature
- 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
- getIsInDeleteSet(self, anIObject: ORSModel.ors.Managed) bool
Gets if an object is included in the receiver 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 look for in the receiver delete set (a Managed)
- Returns:
output (bool) – true if the object is in the delete set of the receiver, false otherwise
- 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) –
- 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
- 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
- getMetadataChecksum(self) str
Returns the computed checksum of the metadata.
- Returns:
output (str) –
- getObjectWithGUID(guid: str) ORSModel.ors.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
- getObjectWithGUIDasPointer(guid: str) ORSModel.ors.Managed
Retrieves an object from its GUID.
- Parameters:
guid (str) – a GUID (a string)
- Returns:
output (ORSModel.ors.Managed) – An object or nullptr 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) – private title of the object (a string)
- 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)
- getScalarValuesCollection(self) ORSModel.ors.ScalarValuesCollection
method getScalarValuesCollection
- Returns:
output (ORSModel.ors.ScalarValuesCollection) –
- 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)
- getUserInfoAsArray(self) ORSModel.ors.ArrayString
Retrieves the user info as a string array.
Note
The user info data is flattened into an array of string pairs, for the key and the value.
- Returns:
output (ORSModel.ors.ArrayString) – the data (an ArrayString, see note below)
- getUserInfoAsDictionary()
User info copy of Managed in a easy way for manipulation
return a copy of the object user info as a dictionary
- getUserInfoMatchingPattern(self, pattern: str, case_sensitive_search: bool) List[str]
Searches the user info dictionary based on a pattern matching.
Note
The pattern matching is done via regex.
- Parameters:
pattern (str) – a search pattern (a string)
case_sensitive_search (bool) – true to search case-sensitive, false otherwise (a bool)
- Returns:
output (List[str]) – a list of keys and values pairs, for all matching keys (a list of strings)
- 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
Checks if the underlying core object is None.
Note
Interface objects hold references to core objects, so this method checks to see if a core object is truly referred to.
- Returns:
output (bool) – true if the core object is non-existent, false otherwise.
- isNotNone(self) bool
Checks if the underlying core object is not None.
Note
Interface objects hold references to core objects, so this method checks to see if a core object is truly referred to.
- Returns:
output (bool) – true if the core object is existent, false otherwise.
- none() Managed
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Managed) –
- publish()
Sets an object as representable and notifies the Dragonfly UI of a new available object
- removeBinaryUserInfo(self, pTag: str)
Removes a user defined binary value.
- Parameters:
pTag (str) – key name of the binary value (a string)
- removeCallbackFromEvent(guid: str, sEventName: str, sCallbackName: str, bRemoveInDeletedObject: bool) bool
Removes a callback subscription to an event.
- Parameters:
guid (str) – object GUID (a string)
sEventName (str) – name of the callback event (a string)
sCallbackName (str) – name of the callback (a string)
bRemoveInDeletedObject (bool) – if true, the callback will be removed from the object even if that object is in the process of being deleted (a boolean)
- Returns:
output (bool) – true callback existed, false otherwise
- removeFromDeleteSet(self, anIObject: ORSModel.ors.Managed)
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)
Removes a user defined value.
- Parameters:
pTag (str) – key of the data (a string)
- selectExclusively(contextInstance)
Selects only the current instance for a context
- Parameters:
contextInstance (plugin instance) – context instance
Note
Only representable object can be selected
- 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.
- setAutoDelete(self, value: bool)
When set to true, the interface object will call deleteObject on its core object when it is being deleted.
- Parameters:
value (bool) –
- setBinaryUserInfo(self, pTag: str, pValue: bytes, iDataSize: int)
Sets a user defined binary value.
Note
Objects can carry user defined data in the form of strings or binary data.
See also
ORSModel.ors.Managed.setUserInfo(),ORSModel.ors.Managed.getUserInfo(),ORSModel.ors.Managed.getBinaryUserInfo()- 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)
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
- setChildrenNodesOrganizationDirty()
Calls for a setDirty with the flag OrsChildrenNodesOrganizationDirty
- setDataDirty()
Calls for a setDirty with the flag OrsDataDirty
- setDirty(self, dirtyFlag: str)
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
- setHighlightDirty()
Calls for a setDirty with the flag OrsHighlightDirty
- setIdentityIsPreservedForPickling(self, value: bool)
Set to True if the GUID is to be preserved when pickling and unpickling an object.
- Parameters:
value (bool) –
- setIsNotDirty(self)
Sets the object as not being dirty for all dirty flags.
- setIsRepresentable(self, isRepresentable: bool)
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)
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)
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)
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)
Sets the title of the object.
Dirty flags: OrsPropertyDirty
- Anonymize newVal:
True
- Parameters:
newVal (str) – new title (a string)
- setUserInfo(self, pTag: str, pValue: str)
- Parameters:
pTag (str) –
pValue (str) –
- setUserInfoFromDictionary(aDic)
Add key value pair to the user Info of the Object. an str call are done on the key and values to insure that we respect the UserInfo protocol of Managed Object
- Parameters:
aDic (dict) – a dictionary of information to add to the user information
- setVisibilityDirty()
Calls for a setDirty with the flag OrsVisibilityDirty
- switchAvailabilityToContext(oldContextID, newContextID)
Switches the availability of the object from an old context to a new context. This will be done only if the old context ID is found in the set of available contexts and the new context ID is not already in the set of available contexts. The availability for all other contexts remains unchanged.
The arguments oldContextID and newContextID are used as strings instead of plugin instances to support the situation where the old or new context is not existing (for example, to perform a copy of the objects).
- Parameters:
oldContextID (str) – old context ID
newContextID (str) – new context ID
- 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.
- unselect(contextInstance)
Unselects the instance for a context
- Parameters:
contextInstance (plugin instance) – context instance
MassiveMarchingAutomata¶
- class ORSModel.ors.MassiveMarchingAutomata(self)
Bases:
Unmanaged- cleanSpeedMapChannel(self, outputChannel: ORSModel.ors.Channel)
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)
- Parameters:
lOutputChannelDistanceMap (ORSModel.ors.Channel) –
lOutputChannelTraceBack (ORSModel.ors.Channel) –
lOutputChannelLabel (ORSModel.ors.Channel) –
nbIteration (int) –
- 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 unsigned char)
- getVolumeROI(self, index: int) ORSModel.ors.ROI
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) –
- Returns:
output (ORSModel.ors.ROI) –
- none() MassiveMarchingAutomata
- Returns:
output (MassiveMarchingAutomata) –
- resetVolumeROIs(self)
Empties all the sourceROI slots.
- setEuclideanBias(self, EuclideanBias: float)
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)
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)
- setNeighborCountTo26(self)
- setNeighborCountTo6(self)
- setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI)
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) –
aVolROI (ORSModel.ors.ROI) –
Material¶
- class ORSModel.ors.Material(*args, **kwargs)
Bases:
NodeRepresents the material of a visual (Visual).
See also
Visual::setMaterial(), Visual::getMaterial()
- getAmbiant(self) ORSModel.ors.Color
Gets the ambiant color of the material.
See also
- Returns:
output (ORSModel.ors.Color) – ambiant (a Color)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDiffuse(self) ORSModel.ors.Color
Gets the diffuse color of the material.
See also
- Returns:
output (ORSModel.ors.Color) – diffuse (a Color)
- getEmissive(self) ORSModel.ors.Color
Gets the emissive color of the material.
See also
- Returns:
output (ORSModel.ors.Color) – an emissive (a Color)
- getPower(self) float
Gets the power property of the material.
See also
- 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) ORSModel.ors.Color
Gets the specular color of the material.
See also
- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Material) –
- setAmbiant(self, IColor: ORSModel.ors.Color)
Sets the ambiant color, in Red-Green-Blue.
Note
Each color value goes between 0 (none) and 1 (full).
See also
- Parameters:
IColor (ORSModel.ors.Color) – a color object (a Color)
- setDiffuse(self, IColor: ORSModel.ors.Color)
Sets the diffuse color, in Red-Green-Blue.
Note
Each color value goes between 0 (none) and 1 (full).
See also
- Parameters:
IColor (ORSModel.ors.Color) – a color object (a Color)
- setEmissive(self, IColor: ORSModel.ors.Color)
Sets the emissive color, in Red-Green-Blue.
Note
Each color value goes between 0 (none) and 1 (full).
See also
- Parameters:
IColor (ORSModel.ors.Color) – a color object (a Color)
- setPower(self, value: float)
Sets the power property of the material.
See also
- Parameters:
value (float) – a power value (a float)
- setShadowIntensity(self, value: float)
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)
Sets the specular color, in Red-Green-Blue.
Note
Each color value goes between 0 (none) and 1 (full).
See also
- Parameters:
IColor (ORSModel.ors.Color) – a color object (a Color)
- setTexture(self, filename: str, stage: int)
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)
Sets the texture scale factor.
- Parameters:
value (float) – a scale factor (a float)
Matrix4x4¶
- class ORSModel.ors.Matrix4x4
Bases:
UnmanagedA wrapper to a 3D matrix.
- asRotationMatrix(self, inputVector: ORSModel.ors.Vector3)
As rotation matrix from quaternion.
- Parameters:
inputVector (ORSModel.ors.Vector3) –
- copy(self) ORSModel.ors.Matrix4x4
Gets a copy.
- Returns:
output (ORSModel.ors.Matrix4x4) –
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Matrix4x4
Create a ORS::Matrix from a python representation static method.
- Parameters:
aPythonRepresentation (str) – aPythonRepresentation (an wstring)
- Returns:
output (ORSModel.ors.Matrix4x4) – a Matrix4x4 (ORS::Matrix4x4)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getInverted(self) ORSModel.ors.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) ORSModel.ors.Matrix4x4
Matrix4x4 product.
- Parameters:
IMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getScale(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getTransformedBoundedPlane(self, inputBoundedPlane: ORSModel.ors.Rectangle) ORSModel.ors.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) ORSModel.ors.Box
Applies a matrix transformation to a box.
- Parameters:
inputBox (ORSModel.ors.Box) –
- Returns:
output (ORSModel.ors.Box) –
- getTransformedCoordinate(self, inputCoordinate: ORSModel.ors.Vector3) ORSModel.ors.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) ORSModel.ors.Line
Applies a matrix transformation to a line.
- Parameters:
inputLine (ORSModel.ors.Line) –
- Returns:
output (ORSModel.ors.Line) –
- getTransformedLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Plane
Applies a matrix transformation to a plane.
- Parameters:
inputPlane (ORSModel.ors.Plane) –
- Returns:
output (ORSModel.ors.Plane) –
- getTransformedVector(self, inputVector: ORSModel.ors.Vector3) ORSModel.ors.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) ORSModel.ors.Vector3
Gets the translation vector.
- Returns:
output (ORSModel.ors.Vector3) –
- getTransposed(self) ORSModel.ors.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.
See also
- Parameters:
row (int) – row (an int)
column (int) – column (an int)
- Returns:
output (float) – a double
- multiply(self, IMatrix: ORSModel.ors.Matrix4x4)
Multiplies the matrix by another matrix.
Note
The receiver is modified.
- Parameters:
IMatrix (ORSModel.ors.Matrix4x4) – a matrix to multiply with (an Matrix4x4)
- setAsRotation(self, axisOfRotation: ORSModel.ors.Vector3, angleInRadian: float)
As rotation matrix from rotation axis and angle.
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
angleInRadian (float) –
- setScale(self, scaleVector: ORSModel.ors.Vector3)
Sets the scale vector.
- Parameters:
scaleVector (ORSModel.ors.Vector3) –
- setTranslation(self, translation: ORSModel.ors.Vector3)
Sets the translation vector.
- Parameters:
translation (ORSModel.ors.Vector3) –
- setValue(self, row: int, column: int, value: float)
Sets a value in the matrix.
Note
Row and column are both between 0 and 3.
See also
- Parameters:
row (int) – row (an int)
column (int) – column (an int)
value (float) – a double value
- setValues(self, values: float)
Sets the matrix values from an array of doubles.
Note
The array of doubles should contain 16 double (4 rows X 4 colums).
- Parameters:
values (float) – an array of 16 float values (a doublePtr)
- setupAsIdentity(self)
Initializes the matrix.
Mesh¶
- class ORSModel.ors.Mesh(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
UnstructuredGrid- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
- cleanMeshWinding(iTIndex)
all cell of the mesh generated by the scipy spatial convexhull does not have the same winding so make sure they are all in same order. vtkPolyDataNormals filter is used here to clean the mesh.
- Parameters:
iTIndex (int) – Time index of the target mesh to be cleaned.
- Return:
Returns True if the mesh was successfully cleaned, otherwise returns False.
- Rtype:
bool
- 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, IProgress: ORSModel.ors.Progress) bool
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)
IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (bool) – true if the computation was completed successfully, false otherwise
- dilateWithVerticesNormal(self, distanceToDilate: float, iTIndex: int)
- Parameters:
distanceToDilate (float) –
iTIndex (int) –
- findMeshContourPointsAndConnectionOnAPlane(self, cuttingPlane: ORSModel.ors.Plane, anOctreeBox: ORSModel.ors.Octree, iTIndex: int, oPoints: ORSModel.ors.ArrayDouble, oPointsConnection: ORSModel.ors.ArrayUnsignedLONGLONG, oNbOfPts: int, oNbOfConnection: int)
Find points of the mesh on a plane and all connection between those points.
- Parameters:
cuttingPlane (ORSModel.ors.Plane) – a cutting plane (ORS::Plane)
anOctreeBox (ORSModel.ors.Octree) – an octree, if the octree is none a default one will be created (ORS::Octree)
iTIndex (int) – the time step (a uint32_t)
oPoints (ORSModel.ors.ArrayDouble) – output points collection (ORS::ArrayDouble)
oPointsConnection (ORSModel.ors.ArrayUnsignedLONGLONG) – output points connection (edges with size = 2) collection (ORS::ArrayUnsignedLongLong)
oNbOfPts (int) – number of point that make the contour on plane (int)
oNbOfConnection (int) – number of edges that make the contour on plane (int)
- 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) ORSModel.ors.Mesh
- Parameters:
aPlane (ORSModel.ors.Plane) –
iTIndex (int) –
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) –
inMesh (ORSModel.ors.Mesh) –
- Returns:
output (ORSModel.ors.Mesh) –
- getAsMeshWithEdgesDecimatedSmallerThan(self, value: float, IProgress: ORSModel.ors.Progress, worldTransform: ORSModel.ors.Matrix4x4, inoutMesh: ORSModel.ors.Mesh) ORSModel.ors.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:
value (float) – the threshold value (a double)
IProgress (ORSModel.ors.Progress) –
worldTransform (ORSModel.ors.Matrix4x4) –
inoutMesh (ORSModel.ors.Mesh) –
- Returns:
output (ORSModel.ors.Mesh) –
- getAsROI(self, iTIndex: int, worldTransform: ORSModel.ors.Matrix4x4, pOutputROI: ORSModel.ors.ROI, progress: ORSModel.ors.Progress)
- Parameters:
iTIndex (int) –
worldTransform (ORSModel.ors.Matrix4x4) –
pOutputROI (ORSModel.ors.ROI) –
progress (ORSModel.ors.Progress) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getContourAreaForPlane(self, nax: float, nby: float, ncz: float, nd: float, iTIndex: int) float
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) ORSModel.ors.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().
Note
Use -1 to indicate no current scalar
- Returns:
output (int) – the scalar slot index (a int32_t, see not)
- getCurrentLabelScalarValuesSlot(self) int
gets the current label scalar.
Note
The scalar index is zero-based, and thus should be less than getLabelScalarValuesSlotCount().
Note
Use -1 to indicate no current scalar
- Returns:
output (int) – the scalar slot index (a int32_t, see not)
- getDefaultColor(self) ORSModel.ors.Color
Gets the mesh default color.
Note
Each color value goes between 0 (none) and 1 (full).
See also
ORSModel.ors.Mesh.setUseDefaultMeshColor(), setColors()- Returns:
output (ORSModel.ors.Color) – a color (an Color)
- getDefaultFaceAlphaColor(self) float
Queries the face to get its default alpha color.
- Returns:
output (float) – Default alpha color used for the face (a double)
- getDefaultFaceColor(self) ORSModel.ors.Color
Gets the face default color.
Note
Each color value goes between 0 (none) and 1 (full).
See also
ORSModel.ors.Mesh.setUseDefaultFaceColor(), setColors()- Returns:
output (ORSModel.ors.Color) – a color (an Color)
- getDefaultMeshAlphaColor(self) float
Queries the mesh to get its default alpha color.
Deprecated since version (unknown): Use
- Returns:
output (float) – Default alpha color used for the mesh (a double)
- getDistanceFromRays(self, aLineSegment: ORSModel.ors.LineSegment, rotationAxis: ORSModel.ors.Vector3, rayCount: int, timeStep: int, octree: ORSModel.ors.Octree, outputArray: ORSModel.ors.ArrayDouble) ORSModel.ors.ArrayDouble
Get the unsigned distance between theLineSegment, rotated around rotationAxis arayCount number of times, a and the surface of the mesh. If the ray does not collide a triangle (for instance the start member of the line segmenet is out of the mesh) return 0.
- Parameters:
aLineSegment (ORSModel.ors.LineSegment) – the line segment (ORS::LineSegment )
rotationAxis (ORSModel.ors.Vector3) – rotation Axis (ORS::Vector3)
rayCount (int) – ray Count arount the axis (a uint32_t)
timeStep (int) – timeStep of the receiving Mesh to considered (a uint32_t)
octree (ORSModel.ors.Octree) – the octree (optional), useful when calling more than once on the same mesh(ORS::octree)
outputArray (ORSModel.ors.ArrayDouble) –
- Returns:
output (ORSModel.ors.ArrayDouble) – the Output Array Double (ORS::ArrayDouble)
- getDistanceFromRaysWithFibonaciDistristributionOnSphere(self, centerOfTheSphere: ORSModel.ors.Vector3, rayCount: int, timeStep: int, octree: ORSModel.ors.Octree, outputArray: ORSModel.ors.ArrayDouble) ORSModel.ors.ArrayDouble
Get the distance then center of the provided sphere and rayCount points on it surface. The points are distributed using the Fibonacci algorithm (http://extremelearning.com.au/evenly-distributing-points-on-a-sphere/)
- Parameters:
centerOfTheSphere (ORSModel.ors.Vector3) – the center of the sphere (ORS::Vector3 )
rayCount (int) – number of point on the surface (ORS::Vector3)
timeStep (int) – ray Count arount the axis (a uint32_t)
octree (ORSModel.ors.Octree) – timeStep of the receiving Mesh to considered (a uint32_t)
outputArray (ORSModel.ors.ArrayDouble) – the octree (optional), useful when calling more than once on the same mesh(ORS::octree)
- Returns:
output (ORSModel.ors.ArrayDouble) – the Output Array Double (ORS::ArrayDouble)
- 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) ORSModel.ors.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)
- getEdgesForLabel(self, pLabel: int, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
pLabel (int) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getEulerCharacteristicNumber(self, iTIndex: int) int
Get euler characteristic number to describe shape of mesh.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (int) – a int64_t
- getExtractedSubMesh(IMeshROI: ORSModel.ors.MeshFacesROI, IOutputMesh: ORSModel.ors.Mesh, bExtractSubMeshROI: bool) ORSModel.ors.Mesh
- Parameters:
IMeshROI (ORSModel.ors.MeshFacesROI) –
IOutputMesh (ORSModel.ors.Mesh) –
bExtractSubMeshROI (bool) –
- Returns:
output (ORSModel.ors.Mesh) –
- getFace(self, nFaceId: int, iTIndex: int, nVertex0: int, nVertex1: int, nVertex2: int)
Gets the face at index.
- Parameters:
nFaceId (int) – faceIndex
iTIndex (int) – time Index
nVertex0 (int) –
nVertex1 (int) –
nVertex2 (int) –
- 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
- getFaceScalarSlotIndexForDescription(self, sValue: str, iTIndex: int) int
Gets the scalar slot index from a face scalar description.
- Parameters:
sValue (str) – the slot description (an std::wstring)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (int) – the index or -1 if not found
- 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 uint32_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)
- getFaceScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, iTIndex: int) ORSModel.ors.DimensionUnit
Gets the dimension unit of a face scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
- getFaceScalarValueMax(self, nScalarValueSlotIndex: int, iTIndex: int) float
method getFaceScalarValueMax
Deprecated since version (unknown): use getFaceScalarValuesWindowMax instead
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getFaceScalarValueMaxs(self, iTIndex: int) ORSModel.ors.ArrayDouble
method getFaceScalarValueMaxs
Deprecated since version (unknown): use getFaceScalarValuesWindowMaxs instead
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getFaceScalarValueMin(self, nScalarValueSlotIndex: int, iTIndex: int) float
Gets a face scalar min value.
Deprecated since version (unknown): use getFaceScalarValuesWindowMin instead
- 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) ORSModel.ors.ArrayDouble
method getFaceScalarValueMins
Deprecated since version (unknown): use getFaceScalarValuesWindowMins instead
- 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) ORSModel.ors.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) ORSModel.ors.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) –
- getFaceScalarValues(self, nScalarValueSlotIndex: int, iTIndex: int) ORSModel.ors.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.
See also
ORSModel.ors.Mesh.setFaceScalarValues(),ORSModel.ors.Mesh.getFaceCount(),ORSModel.ors.Mesh.getFaceScalarValuesSlotCount()- 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)
- getFaceScalarValuesCollection(self) ORSModel.ors.ScalarValuesCollection
Queries the scalar values collection of the faces.
- Returns:
output (ORSModel.ors.ScalarValuesCollection) – the ScalarValuesCollection of the faces.
- getFaceScalarValuesDatatype(self, nScalarValueSlotIndex: int) int
- Parameters:
nScalarValueSlotIndex (int) –
- Returns:
output (int) –
- getFaceScalarValuesId(self, nScalarValueSlotIndex: int, iTIndex: int) str
Gets the scalar slot id from a face scalar values slot.
- Parameters:
nScalarValueSlotIndex (int) – the index of the slot (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (str) –
- 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) ORSModel.ors.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) ORSModel.ors.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)
- getHideOutOfRangeLabelScalarValues(self) bool
Indicate if out of range values should be hiden.
- Returns:
output (bool) – (a bool)
- getLabelCount(self, iTIndex: int) int
Gets the number of labels.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (int) – an uint64_t
- getLabelScalarSlotIndexForDescription(self, sValue: str, iTIndex: int) int
Gets the scalar slot index from a label scalar description.
- Parameters:
sValue (str) – the slot description (an std::wstring)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (int) – the index or -1 if not found
- getLabelScalarValue(self, nScalarValueSlotIndex: int, scalarValueLabelIndex: int, iTIndex: int) float
Gets the value of a label scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
scalarValueLabelIndex (int) – the label index (a uint32_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (float) – the value of a label scalar (a double)
- getLabelScalarValueDescription(self, nScalarValueSlotIndex: int, iTIndex: int) str
Gets a label 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)
- getLabelScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, iTIndex: int) ORSModel.ors.DimensionUnit
Gets the dimension unit of a label scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
- getLabelScalarValueOffset(self, nScalarValueSlotIndex: int, iTIndex: int) float
Gets a label 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)
- getLabelScalarValueOffsets(self, iTIndex: int) ORSModel.ors.ArrayDouble
Get the label scalar offset values.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayDouble) – the scalar offset values (an ArrayDouble)
- getLabelScalarValueOrNull(self, nValueIndex: int, nSlotIndex: int, iTIndex: int) Optional[float]
- Parameters:
nValueIndex (int) –
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (Optional[float]) –
- getLabelScalarValueSlope(self, scalarValueSlotIndex: int, iTIndex: int) float
Gets a label 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)
- getLabelScalarValueSlopes(self, iTIndex: int) ORSModel.ors.ArrayDouble
Get the label scalar slope values.
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayDouble) – the scalar slope values (an ArrayDouble)
- getLabelScalarValueSlotLookUpTable(self, nScalarValueSlotIndex: int, iTIndex: int) dict
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (dict) –
- getLabelScalarValues(self, nScalarValueSlotIndex: int, iTIndex: int) ORSModel.ors.Array
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.Array) –
- getLabelScalarValuesCollection(self) ORSModel.ors.ScalarValuesCollection
Queries the scalar values collection of the labels.
- Returns:
output (ORSModel.ors.ScalarValuesCollection) – the ScalarValuesCollection of the labels.
- getLabelScalarValuesDatatype(self, nScalarValueSlotIndex: int) int
- Parameters:
nScalarValueSlotIndex (int) –
- Returns:
output (int) –
- getLabelScalarValuesId(self, nScalarValueSlotIndex: int, iTIndex: int) str
Gets the scalar slot id from a label scalar values slot.
- Parameters:
nScalarValueSlotIndex (int) – the index of the slot (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (str) –
- getLabelScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, iTIndex: int) float
Get a label 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
- getLabelScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, iTIndex: int) float
Get a label 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
- getLabelScalarValuesRangeMax(self, nScalarValueSlotIndex: int, iTIndex: int) float
Get a label 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
- getLabelScalarValuesRangeMin(self, nScalarValueSlotIndex: int, iTIndex: int) float
Get a label 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
- getLabelScalarValuesSlotCount(self) int
Gets the number of slots for label scalar values.
- Returns:
output (int) – the number of slots (a uint16_t)
- getLabelScalarValuesWindowMax(self, nScalarValueSlotIndex: int, iTIndex: int) float
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getLabelScalarValuesWindowMaxs(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelScalarValuesWindowMin(self, nScalarValueSlotIndex: int, iTIndex: int) float
Gets a label 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
- getLabelScalarValuesWindowMins(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getMeshContourOnPlane(self, aPlane: ORSModel.ors.Plane, iTIndex: int, pResultEdgesMap: ORSModel.ors.ArrayUnsignedLong) ORSModel.ors.ArrayDouble
- Parameters:
aPlane (ORSModel.ors.Plane) –
iTIndex (int) –
pResultEdgesMap (ORSModel.ors.ArrayUnsignedLong) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getMeshThicknessOnGPU(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress, lowerBound: float, upperBound: float, thicknessType: int) ORSModel.ors.ArrayFloat
Get absolute distance between vertices of two meshes, along the normal of the vertices of the receiving mesh.
- Parameters:
target (ORSModel.ors.Mesh) – mesh target (ORS::Mesh )
targetOctree (ORSModel.ors.Octree) – targetOctree(ORS::Octree)
iTIndex (int) – iTIndex (a uint32_t)
pProgress (ORSModel.ors.Progress) – pProgress (ORS::Progress)
lowerBound (float) –
upperBound (float) –
thicknessType (int) –
- Returns:
output (ORSModel.ors.ArrayFloat) –
- getMinMaxFaceScalarValue(self, nScalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float)
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
fMinValue (float) –
fMaxValue (float) –
- getMinMaxLabelScalarValue(self, nScalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float)
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
fMinValue (float) –
fMaxValue (float) –
- getMinimumAndMaximumDistanceOnPlaneFromCenterOf(self, anOrientedPlane: ORSModel.ors.OrientedPlane, iTIndex: int, minValue: float, maxValue: float)
- Parameters:
anOrientedPlane (ORSModel.ors.OrientedPlane) –
iTIndex (int) –
minValue (float) –
maxValue (float) –
- getModifiedLabelScalarValuesCollection(self) ORSModel.ors.ScalarValuesCollection
Queries the scalar values collection of the labels reordered by label.
- Returns:
output (ORSModel.ors.ScalarValuesCollection) – a new rearranged ScalarValuesCollection of the labels-should be deleted accordingly.
- getNormalsMomentOfInertia(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) ORSModel.ors.Matrix4x4
- Parameters:
iTIndex (int) –
aWorldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getSignedVerticesDistance(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, maxSearchDistance: float, iTIndex: int, pProgress: ORSModel.ors.Progress) ORSModel.ors.ArrayFloat
Get signed distance between vertices of two meshes, vertices of the receiveing mesh to the target faces.
- Parameters:
target (ORSModel.ors.Mesh) – mesh target (ORS::Mesh )
targetOctree (ORSModel.ors.Octree) – targetOctree(ORS::Octree)
maxSearchDistance (float) – maxSearchDistance( a double)
iTIndex (int) – iTIndex (a uint32_t)
pProgress (ORSModel.ors.Progress) – pProgress (ORS::Progress)
- Returns:
output (ORSModel.ors.ArrayFloat) –
- getSignedVerticesNormalDistance(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress) ORSModel.ors.ArrayFloat
Get signed distance between vertices of two meshes, along the normal of the vertices of the receiving mesh.
- Parameters:
target (ORSModel.ors.Mesh) – mesh target (ORS::Mesh )
targetOctree (ORSModel.ors.Octree) – targetOctree(ORS::Octree)
iTIndex (int) – iTIndex (a uint32_t)
pProgress (ORSModel.ors.Progress) – pProgress (ORS::Progress)
- Returns:
output (ORSModel.ors.ArrayFloat) –
- getSphericalEquiRectangularHeightProjection(self, aSphere: ORSModel.ors.Sphere, xSize: int, ySize: int, timeStep: int, aChannel: ORSModel.ors.Channel) ORSModel.ors.Channel
Get the signed distance between the sphere and the surface of the mesh, in a Equirectangular projection.
- Parameters:
aSphere (ORSModel.ors.Sphere) – aSphere target (ORS::Sphere )
xSize (int) – xSize of the output Channel (a uint32_t)
ySize (int) – ySize of the output Channel (a uint32_t)
timeStep (int) – timeStep of the receiving Mesh to considered (a uint32_t)
aChannel (ORSModel.ors.Channel) – output Channel, can be None (ORS::Channel)
- Returns:
output (ORSModel.ors.Channel) – the Output Channel (ORS::Channel)
- getTransformed(self, aTransformationMatrix: ORSModel.ors.Matrix4x4, pInOutMesh: ORSModel.ors.Mesh) ORSModel.ors.Mesh
- Parameters:
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pInOutMesh (ORSModel.ors.Mesh) –
- Returns:
output (ORSModel.ors.Mesh) –
- getTriangleIndicesContainedInSphere(self, centerOfTheSphere: ORSModel.ors.Vector3, radiusOfSphere: float, iTIndex: int, IProgress: ORSModel.ors.Progress) ORSModel.ors.ArrayUnsignedLong
Get triangles indices that are contained in sphere.
- Parameters:
centerOfTheSphere (ORSModel.ors.Vector3) – the sphere center (a Vector3)
radiusOfSphere (float) – the sphere radius (a double)
iTIndex (int) – the time step (a uint32_t)
IProgress (ORSModel.ors.Progress) – a progress object (a Progress) or NULL for no progress
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – an array of int32_t (an ArrayLong)
- getUVs(self, iTIndex: int) ORSModel.ors.ArrayFloat
Gets the UV values.
See also
setUVs()
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayFloat) – an array of float (an ArrayFloat)
- getUseDefaultFaceAlphaColor(self) bool
Queries the face to see if it uses its default alpha color.
- Returns:
output (bool) – true if a default alpha color is used for the face, false otherwise
- getUseDefaultFaceColor(self) bool
Queries the face to see if it uses its default color.
- Returns:
output (bool) – true if the face uses its default color, false otherwise
- getUseDefaultLabelColor(self) bool
Queries the label to see if it uses its default color.
- Returns:
output (bool) – true if the label uses its default color, false otherwise
- getUseDefaultMeshAlphaColor(self) bool
Queries the mesh to see if it uses its default alpha color.
Deprecated since version (unknown): use getUseDefaultVertexAlphaColor instead
- 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.
Deprecated since version (unknown): use getUseDefaultVertexColor instead
- 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
- getUseLabelScalarValues(self) bool
Sets the mesh to have label scalar values or not.
- Returns:
output (bool) – TRUE to use scalar values, FALSE otherwise
- getVerticesClosestFacesId(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress, oMapping: ORSModel.ors.ArrayLong, oCollisionPoints: ORSModel.ors.ArrayDouble)
Get for each vertex of a mesh the closest faces id of an other mesh.
- Parameters:
target (ORSModel.ors.Mesh) – mesh target (ORS::Mesh )
targetOctree (ORSModel.ors.Octree) – targetOctree(ORS::Octree)
iTIndex (int) – iTIndex (a uint32_t)
pProgress (ORSModel.ors.Progress) – pProgress (ORS::Progress)
oMapping (ORSModel.ors.ArrayLong) – pProgress (ORS::ArrayLong)
oCollisionPoints (ORSModel.ors.ArrayDouble) – pProgress (ORS::ArrayDouble)
- getVerticesCoordinatesWhereNormalIsAlignedWithDirection(self, direction: ORSModel.ors.Vector3, angle: float, iTIndex: int) ORSModel.ors.ArrayFloat
- Parameters:
direction (ORSModel.ors.Vector3) –
angle (float) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayFloat) –
- getVerticesDistance(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, maxSearchDistance: float, iTIndex: int, pProgress: ORSModel.ors.Progress) ORSModel.ors.ArrayFloat
Get distance between vertices of two meshes, vertices of the receiveing mesh to the target faces.
- Parameters:
target (ORSModel.ors.Mesh) – mesh target (ORS::Mesh )
targetOctree (ORSModel.ors.Octree) – targetOctree(ORS::Octree)
maxSearchDistance (float) – maxSearchDistance( a double)
iTIndex (int) – iTIndex (a uint32_t)
pProgress (ORSModel.ors.Progress) – pProgress (ORS::Progress)
- Returns:
output (ORSModel.ors.ArrayFloat) –
- getVerticesForLabel(self, pLabel: int, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
pLabel (int) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getVerticesNormalDistance(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress) ORSModel.ors.ArrayFloat
Get absolute distance between vertices of two meshes, along the normal of the vertices of the receiving mesh.
- Parameters:
target (ORSModel.ors.Mesh) – mesh target (ORS::Mesh )
targetOctree (ORSModel.ors.Octree) – targetOctree(ORS::Octree)
iTIndex (int) – iTIndex (a uint32_t)
pProgress (ORSModel.ors.Progress) – pProgress (ORS::Progress)
- Returns:
output (ORSModel.ors.ArrayFloat) –
- getVerticesNormals(self, iTIndex: int) ORSModel.ors.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:
aPlane (ORSModel.ors.Plane) – a progress object (an Progress) or NULL for no progress
timeStep (int) –
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) –
IProgress (ORSModel.ors.Progress) –
- 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:
- 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) –
- labelizeVertices(self, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
Labelizes mesh vertices based on connectivity.
Note
The scalar for the specified index should be already initialized.
- Parameters:
iTIndex (int) – the time index (a uint16_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – the vertices label (an ArrayUnsignedLong)
- labelizeVerticesForScalarValues(self, iTIndex: int)
Labelizes mesh vertices based on connectivity and initilizes the label scalar values if not already initialized.
- Parameters:
iTIndex (int) – the time index (a uint16_t)
- laplacianSmooth(self, nNbIterations: int, iTIndex: int, relaxationFactor: float)
Smooth the mesh using Laplacien algorithm.
- Parameters:
nNbIterations (int) – number of smooth iteration (uint16_t)
iTIndex (int) – time step to smooth (uint32_t)
relaxationFactor (float) – relaxation factor (double) , must be between 0 and 1
- laplacianSmoothWithPerVerticeRelaxationFactor(self, nNbIterations: int, iTIndex: int, relaxationFactorPerVertice: ORSModel.ors.Array)
Smooth the mesh using Laplacien algorithm applying the relaxation factors provided.
- Parameters:
nNbIterations (int) – number of smooth iteration (uint16_t)
iTIndex (int) – time step to smooth (uint32_t)
relaxationFactorPerVertice (ORSModel.ors.Array) – relaxationFactorPerVertice (an Array), values should be between 0 and 1
- mapScalarValuesFromAnOtherMesh(self, referenceMesh: ORSModel.ors.Mesh, mapping: ORSModel.ors.ArrayLong, collisionPoints: ORSModel.ors.ArrayDouble, referenceSlotIndex: int, sourceSlotIndex: int, referenceTIndex: int, sourceTIndex: int, defaultScalarValue: float)
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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Mesh) –
- removeAFaceScalarValuesSlot(self, nScalarValueSlotIndex: int)
Remove a scalar slot from the face scalars values slot.
- Parameters:
nScalarValueSlotIndex (int) – the index of the slot to be removed (a uint16_t)
- removeALabelScalarValuesSlot(self, nScalarValueSlotIndex: int)
Remove a scalar slot from the label scalars values slot.
- Parameters:
nScalarValueSlotIndex (int) – the index of the slot to be removed (a uint16_t)
- removeDuplicateVertices(self, fEpsilon: float, iTIndex: int, pInOutMesh: ORSModel.ors.Mesh) ORSModel.ors.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 double)
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)
Sets the current face scalar.
Note
The scalar index is zero-based, and thus should be less than getFaceScalarValuesSlotCount().
Note
Use -1 to indicate no current scalar
- Parameters:
slotIndex (int) – the current scalar slot index (an int32_t)
- setCurrentLabelScalarValuesSlot(self, slotIndex: int)
- Parameters:
slotIndex (int) –
- setDefaultColor(self, IColor: ORSModel.ors.Color)
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.
See also
ORSModel.ors.Mesh.setUseDefaultMeshColor(), setColors()- Parameters:
IColor (ORSModel.ors.Color) – a color (an Color)
- setDefaultFaceAlphaColor(self, value: float)
Sets the face its default alpha color.
- Parameters:
value (float) – Alpha color (double)
- setDefaultFaceColor(self, IColor: ORSModel.ors.Color)
Sets the face 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.
See also
ORSModel.ors.Mesh.setUseDefaultFaceColor(), setColors()- Parameters:
IColor (ORSModel.ors.Color) – a color (an Color)
- setDefaultMeshAlphaColor(self, value: float)
Sets the mesh its default alpha color.
Deprecated since version (unknown): use
- Parameters:
value (float) – Alpha color (double)
- setEdgeCountPerFace(self, value: int)
- Parameters:
value (int) –
- setFace(self, nFaceId: int, iTIndex: int, nVertex0: int, nVertex1: int, nVertex2: int)
Sets the face at index.
- Parameters:
nFaceId (int) – faceIndex
iTIndex (int) – time Index
nVertex0 (int) – first vertex index
nVertex1 (int) – second vertex index
nVertex2 (int) – third vertex index
- setFaceCount(self, faceCount: int, iTIndex: int)
Sets the number of faces.
- Parameters:
faceCount (int) – the new face count (a uint32_t)
iTIndex (int) – the time step (a uint32_t)
- setFaceScalarValue(self, nScalarValueSlotIndex: int, scalarValueFaceIndex: int, aValue: float, iTIndex: int)
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)
- Parameters:
nScalarValueSlotIndex (int) –
value (str) –
iTIndex (int) –
- setFaceScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, pDimensionUnit: ORSModel.ors.DimensionUnit, iTIndex: int)
Sets the dimension unit of a face scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
pDimensionUnit (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
iTIndex (int) – the time step (a uint32_t)
- setFaceScalarValueMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Sets a face scalar max value.
Deprecated since version (unknown): use setFaceScalarValuesWindowMax instead
- 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)
method setFaceScalarValueMaxs
Deprecated since version (unknown): use setFaceScalarValuesWindowMaxs instead
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setFaceScalarValueMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
method setFaceScalarValueMin
Deprecated since version (unknown): use setFaceScalarValuesWindowMin instead
- 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)
method setFaceScalarValueMins
Deprecated since version (unknown): use setFaceScalarValuesWindowMins instead
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setFaceScalarValueOffset(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
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)
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)
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)
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)
- Parameters:
lookUpTable (dict) –
nScalarValueSlotIndex (int) –
iTIndex (int) –
- setFaceScalarValueUnit(self, nScalarValueSlotIndex: int, value: int, iTIndex: int)
method setFaceScalarValueUnit
Deprecated since version (unknown): use setFaceScalarValueDimensionUnit instead
- Parameters:
nScalarValueSlotIndex (int) –
value (int) –
iTIndex (int) –
- setFaceScalarValues(self, pScalarValues: ORSModel.ors.Array, nScalarValueSlotIndex: int, iTIndex: int)
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.
See also
ORSModel.ors.Mesh.getFaceScalarValues(),ORSModel.ors.Mesh.getFaceCount(),ORSModel.ors.Mesh.getFaceScalarValuesSlotCount()- 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, nFaceScalarValuesDatatype: int)
- Parameters:
iSlotIndex (int) –
nFaceScalarValuesDatatype (int) –
- setFaceScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
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)
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)
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)
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, slotCount: int)
Sets the number of slots for face scalar values.
- Parameters:
slotCount (int) – the number of slots (a uint16_t)
- setFaceScalarValuesWindowMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
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)
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setFaceScalarValuesWindowMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
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)
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setHideOutOfRangeFaceScalarValues(self, value: bool)
Indicate if out of range values should be hiden.
- Parameters:
value (bool) –
- setHideOutOfRangeLabelScalarValues(self, value: bool)
Indicate if out of range values should be hiden.
- Parameters:
value (bool) –
- setLabelCount(self, faceCount: int, iTIndex: int)
Sets the number of labels.
- Parameters:
faceCount (int) – the new face count (a uint32_t)
iTIndex (int) – the time step (a uint32_t)
- setLabelScalarValue(self, nScalarValueSlotIndex: int, scalarValueLabelIndex: int, aValue: float, iTIndex: int)
Sets the value of a label scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
scalarValueLabelIndex (int) – the label index (an uint32_t)
aValue (float) – the value of a label scalar to set (a double)
iTIndex (int) – the time step (a uint32_t)
- setLabelScalarValueDescription(self, nScalarValueSlotIndex: int, value: str, iTIndex: int)
- Parameters:
nScalarValueSlotIndex (int) –
value (str) –
iTIndex (int) –
- setLabelScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, pDimensionUnit: ORSModel.ors.DimensionUnit, iTIndex: int)
Sets the dimension unit of a label scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
pDimensionUnit (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
iTIndex (int) – the time step (a uint32_t)
- setLabelScalarValueNull(self, nValueIndex: int, nScalarValueSlotIndex: int, iTIndex: int)
- Parameters:
nValueIndex (int) –
nScalarValueSlotIndex (int) –
iTIndex (int) –
- setLabelScalarValueOffset(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Sets a label 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)
- setLabelScalarValueOffsets(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
Set the label scalar offset values.
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) – scalar offset values (an ArrayDouble)
iTIndex (int) – time step (a uint32_t)
- setLabelScalarValueSlope(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Gets a label 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)
- setLabelScalarValueSlopes(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
Set the label scalar slope values.
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) – scalar slope values (an ArrayDouble)
iTIndex (int) – time step (a uint32_t)
- setLabelScalarValueSlotLookUpTable(self, lookUpTable: dict, nScalarValueSlotIndex: int, iTIndex: int)
- Parameters:
lookUpTable (dict) –
nScalarValueSlotIndex (int) –
iTIndex (int) –
- setLabelScalarValues(self, pScalarValues: ORSModel.ors.Array, nScalarValueSlotIndex: int, iTIndex: int)
Sets the values of a label scalar.
Note
The array of values is of length getVertexCount() * getLabelScalarValuesSlotCount().
- 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)
- setLabelScalarValuesDatatype(self, iSlotIndex: int, nLabelScalarValuesDatatype: int)
- Parameters:
iSlotIndex (int) –
nLabelScalarValuesDatatype (int) –
- setLabelScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Set a label 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)
- setLabelScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Set a label 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)
- setLabelScalarValuesRangeMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Set a label 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)
- setLabelScalarValuesRangeMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Set a label 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)
- setLabelScalarValuesSlotCount(self, slotCount: int)
Sets the number of slots for label scalar values.
- Parameters:
slotCount (int) – the number of slots (a uint16_t)
- setLabelScalarValuesWindowMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
Sets a label 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)
- setLabelScalarValuesWindowMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setLabelScalarValuesWindowMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
method setLabelScalarValuesWindowMin
- Parameters:
nScalarValueSlotIndex (int) – the slot index (a uint16_t)
value (float) – the value (a double)
iTIndex (int) – the time step (a uint32_t)
- setLabelScalarValuesWindowMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setUseDefaultFaceAlphaColor(self, value: bool)
Sets the face to use its default alpha color.
- Parameters:
value (bool) – true for using a default alpha color for the face, false otherwise (bool)
- setUseDefaultFaceColor(self, value: bool)
Sets the face to use its default color.
- Parameters:
value (bool) – true to use the face default color, false otherwise
- setUseDefaultLabelColor(self, value: bool)
Sets the face to use its default color.
- Parameters:
value (bool) – true to use the face default color, false otherwise
- setUseDefaultMeshAlphaColor(self, value: bool)
Sets the mesh to use its default alpha color.
Deprecated since version (unknown): Use
- Parameters:
value (bool) – TRUE for using a default alpha color for the mesh, FALSE otherwise (bool)
- setUseDefaultMeshColor(self, value: bool)
Sets the mesh to use its default color.
Deprecated since version (unknown): use setUseDefaultVertexColor instead
- Parameters:
value (bool) – TRUE to use the mesh default color, FALSE otherwise
- setUseFaceScalarValues(self, value: bool)
Gets the status of face scalar values usage.
See also
getScalarValues(), getSlotCount()
- Parameters:
value (bool) –
- setUseLabelScalarValues(self, value: bool)
Gets the status of label scalar values usage.
See also
getScalarValues(), getSlotCount()
- Parameters:
value (bool) –
- snapOnData(self, aDataset: ORSModel.ors.Channel, searchLength: float, iTIndex: int, relaxation: float, iteration: int, smoothIteration: int, relaxationFactor: float, pMinDisplacement: float, pMaxDisplacement: float, falloff_factor: float, mergeVertices: bool, autoAdjustFalloff: bool, negativeconst: bool, IProgress: ORSModel.ors.Progress)
- Parameters:
aDataset (ORSModel.ors.Channel) –
searchLength (float) –
iTIndex (int) –
relaxation (float) –
iteration (int) –
smoothIteration (int) –
relaxationFactor (float) –
pMinDisplacement (float) –
pMaxDisplacement (float) –
falloff_factor (float) –
mergeVertices (bool) –
autoAdjustFalloff (bool) –
negativeconst (bool) –
IProgress (ORSModel.ors.Progress) –
- updateVerticesNormal(self, iTIndex: int)
- Parameters:
iTIndex (int) –
MeshFacesROI¶
- class ORSModel.ors.MeshFacesROI(*args, **kwargs)
Bases:
NodeRepresents a region of interest for a mesh (Mesh).
See also
ROI
- addFaceIndex(self, nFaceIndex: int, nTIndex: int)
- Parameters:
nFaceIndex (int) –
nTIndex (int) –
- addFacesIndexes(self, indexes: ORSModel.ors.ArrayUnsignedLong, nNbIndex: int, nTIndex: int)
- Parameters:
indexes (ORSModel.ors.ArrayUnsignedLong) –
nNbIndex (int) –
nTIndex (int) –
- 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) ORSModel.ors.ArrayUnsignedLong
- Parameters:
nTimeStep (int) –
IInputFaceIndexes (ORSModel.ors.ArrayUnsignedLong) –
- 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) ORSModel.ors.MeshFacesROI
- Parameters:
IInputMeshROI (ORSModel.ors.MeshFacesROI) –
nTimeStep (int) –
IOutputMeshROI (ORSModel.ors.MeshFacesROI) –
- Returns:
output (ORSModel.ors.MeshFacesROI) –
- getInverseMeshFacesROI(self, nTimeStep: int, IOutputMeshROI: ORSModel.ors.MeshFacesROI) ORSModel.ors.MeshFacesROI
- Parameters:
nTimeStep (int) –
IOutputMeshROI (ORSModel.ors.MeshFacesROI) –
- Returns:
output (ORSModel.ors.MeshFacesROI) –
- getIsVisibleForAllDisplays(self) bool
- Returns:
output (bool) –
- getIsVisibleForDisplay(self, IDisplay: ORSModel.ors.View) bool
- Parameters:
IDisplay (ORSModel.ors.View) –
- Returns:
output (bool) –
- getSubtractionFromMeshFacesROI(self, IInputMeshROI: ORSModel.ors.MeshFacesROI, nTimeStep: int, IOutputMeshROI: ORSModel.ors.MeshFacesROI) ORSModel.ors.MeshFacesROI
- Parameters:
IInputMeshROI (ORSModel.ors.MeshFacesROI) –
nTimeStep (int) –
IOutputMeshROI (ORSModel.ors.MeshFacesROI) –
- Returns:
output (ORSModel.ors.MeshFacesROI) –
- getUnionWithMeshFacesROI(self, IInputMeshROI: ORSModel.ors.MeshFacesROI, nTimeStep: int, IOutputMeshROI: ORSModel.ors.MeshFacesROI) ORSModel.ors.MeshFacesROI
- Parameters:
IInputMeshROI (ORSModel.ors.MeshFacesROI) –
nTimeStep (int) –
IOutputMeshROI (ORSModel.ors.MeshFacesROI) –
- Returns:
output (ORSModel.ors.MeshFacesROI) –
- none() MeshFacesROI
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (MeshFacesROI) –
- removeAllFaceIndexes(self, nTIndex: int)
- Parameters:
nTIndex (int) –
- removeFaceIndex(self, nFaceIndex: int, nTIndex: int)
- 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)
- Parameters:
aColor (ORSModel.ors.Color) –
- setIsVisibleForAllDisplays(self, bValue: bool)
Note
This API overrides all prior calls to setIsVisibleForDisplay(), or in other words, any display specific setting is erased.
See also
ORSModel.ors.MeshFacesROI.getIsVisibleForDisplay(),ORSModel.ors.MeshFacesROI.getIsVisibleForDisplay(),ORSModel.ors.MeshFacesROI.getIsVisibleForAllDisplays()- Parameters:
bValue (bool) –
- setIsVisibleForDisplay(self, IDisplay: ORSModel.ors.View, bValue: bool)
Note
This API overrides a prior call to setIsVisibleForAllDisplays(), for a given display.
See also
ORSModel.ors.MeshFacesROI.getIsVisibleForDisplay(),ORSModel.ors.MeshFacesROI.setIsVisibleForAllDisplays(),ORSModel.ors.MeshFacesROI.getIsVisibleForAllDisplays()- Parameters:
IDisplay (ORSModel.ors.View) –
bValue (bool) –
Model¶
- class ORSModel.ors.Model
Main gateway into the ORS Core library.
- static addAListOfObjectsToSelection(aListOfObjects, contextInstance)
Adds a list of objects to selection for a given context.
- Parameters:
aListOfObjects (ORSModel.ors.Managed) [count=[0, None]] – list of objects to add (list)
contextInstance (plugin instance) – context instance
Note
Only representable object can be un selected
- addCallbackToClassEvent(aClassName: str, anEventName: str, sCallbackName: str, callbackInfo: bytes, permanent: bool) bool
- Parameters:
aClassName (str) –
anEventName (str) –
sCallbackName (str) –
callbackInfo (bytes) –
permanent (bool) –
- Returns:
output (bool) – true if operation was successful, false otherwise (the callback already existed)
- addCallbackToGlobalEvent(anEventName: str, sCallbackName: str, callbackInfo: bytes, permanent: bool) bool
- Parameters:
anEventName (str) –
sCallbackName (str) –
callbackInfo (bytes) –
permanent (bool) –
- Returns:
output (bool) – true if operation was successful, false otherwise (the callback already existed)
- canExecuteGPGPUCommand(inputGUID: str, GPGPUCommand: str) int
verifiy if the execution for a GPGPU shader file on the object is possible
- Parameters:
inputGUID (str) –
GPGPUCommand (str) –
- Returns:
output (int) – true succeeded, false otherwise
- deleteAllObjects(pFinalExit: bool)
Deletes every core object.
- Parameters:
pFinalExit (bool) –
- executeGPGPUCommand(inputGUID: str, outputGUID: str, GPGPUCommand: str, numericArgument: dict) bool
execute an GPGPU shader file on the object in arguement.
- Parameters:
inputGUID (str) –
outputGUID (str) –
GPGPUCommand (str) –
numericArgument (dict) –
- Returns:
output (bool) – true succeeded, false otherwise
- getActiveWorkerThreadsCount() int
Returns the number of active worker threads.
- Returns:
output (int) – a count of active worker threads (a uint32_t)
- static getAllSelectedObjectsOfClass(pProgId, contextInstance)
Returns a flattened list of all representable selected object of the given class and context.
- Parameters:
pProgId (str) – the ProgId of the class to test against
contextInstance (plugin instance) – context instance
- Returns:
output (ORSModel.ors.Managed) [count=[0, None]] – a list of all selected objects
- getAvailableCPUCount() int
-
- Returns:
output (int) –
- 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
- Parameters:
aClassName (str) –
sEventName (str) –
sCallbackName (str) –
- Returns:
output (bool) –
- getCredentialsFilePath() str
- Returns:
output (str) –
- getCurrentActivationFor(product: int) str
- Parameters:
product (int) –
- Returns:
output (str) –
- classmethod getCurrentAvailableGPUMemoryNVIDIADisplay()
Returns available GPU memory (in kb) on current NVIDIA display.
Note
This function should not be called in a run in back ground function. Also application should be running so that the OpenGL context is started.
- getCurrentLicenseInformationFor(product: int) str
- Parameters:
product (int) –
- Returns:
output (str) –
- 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.
Note
Return a concatenated string of all known font names, separated by a pipe character (|).
- Returns:
output (str) – All the known font names (a string, see note below)
- getGlobalEventCallbackEnabled(sEventName: str, sCallbackName: str) bool
- Parameters:
sEventName (str) –
sCallbackName (str) –
- Returns:
output (bool) –
- getIsDeployment() bool
verifiy if the current dll is compiled for deployment or not
- Returns:
output (bool) – true if deployment, false otherwise
- 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) –
- 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) –
- getModelObjectsCount() int
Returns the count of currently live objects.
- Returns:
output (int) –
- getPresetFileExtension() str
Gets the extension of preset files.
- Returns:
output (str) –
- getStartupResultCode() int
- Returns:
output (int) –
- classmethod getTotalGPUMemoryNVIDIADisplay()
Returns the total GPU memory (in kb) on current NVIDIA display.
Note
This function should not be called in a run in back ground function. Also application should be running so that the OpenGL context is started.
- hasBaseFeature(iMode: int) bool
- Parameters:
iMode (int) –
- Returns:
output (bool) –
- hasFeature(iFeature: int, iMode: int) bool
- Parameters:
iFeature (int) –
iMode (int) –
- Returns:
output (bool) –
- hasGPU() bool
Returns if a GPU is enabled.
- Returns:
output (bool) –
- initializeUIDeleteFramework()
Starts the UI delete framework. The UI is then responsible for periodically invokingprocessUIDelete() from the UI thread.
- isAMD() bool
Checks if an AMD dedicated GPU is present.
- Returns:
output (bool) – true if an AMD GPU was detected, false otherwise
- isAWS() bool
- Returns:
output (bool) –
- isNVidia() bool
Checks if an Nvidia dedicated GPU is present.
- Returns:
output (bool) – true if an Nvidia GPU was detected, false otherwise
- isNotNone() bool
- Returns:
output (bool) –
- loadSessionFromFile(aFilename: str) List[str]
Loads a session file.
- Parameters:
aFilename (str) – a fully qualified file path (a string)
- Returns:
output (List[str]) – a list of errors, or an empty list if operation was successful
- processUIDelete()
Gives the UI delete sub-system some processing time. Must be invoked from the UI thread.
- 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, progress: ORSModel.ors.Progress, iCompressionEngine: int = 1) 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)
progress (ORSModel.ors.Progress) – a progress object or none (a Progress)
iCompressionEngine (int) – the input compression engine (0: None, 1: ZSTD)
- Returns:
output (int) – 0 if operation was successful, otherwise an error code
- static selectExclusivelyAListOfObjects(aListOfObjects, contextInstance)
Selects only the given objects for the context.
- Parameters:
aListOfObjects (ORSModel.ors.Managed) [count=[0, None]] – list of objects to be selected exclusively (list)
contextInstance (plugin instance) – context instance
Note
Only representable object can be un selected
- setAvailableCPUCount(pNbCPUs: int)
Note
Setting this value to 0 means to use all CPUs.
- Parameters:
pNbCPUs (int) –
- 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)
Sets the COM’s debug mode on or off.
- Parameters:
pState (bool) –
- setEpsilon(anEpsilon: float)
- 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)
Sets the precision of computations when displayed.
- Parameters:
iPrecision (int) –
- setupForNoGPU()
Indicates that rendering is impossible because no GPU is present.
- startWorkersFor(pWorkData: bytes)
- Parameters:
pWorkData (bytes) –
- stopWorkersWithID(id: int)
- 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
- static unselectAListOfObjects(aListOfObjects, contextInstance)
Removes a list of objects to selection for a given context.
- Parameters:
aListOfObjects (ORSModel.ors.Managed) [count=[0, None]] – list of objects to remove (list)
contextInstance (plugin instance) – context instance
- static unselectAllObjects(contextInstance)
Removes all selected object of selection for the given context.
- Parameters:
contextInstance (plugin instance) – context instance
- yieldUIWorker()
Gives the UI worker control to process any pending tasks that it holds.
MultiROI¶
- class ORSModel.ors.MultiROI(*args, **kwargs)
Bases:
MultiROIAbstractContainer for multiple ROIs.
- class COLOR_SLOT(value)
Bases:
IntEnumAn enumeration.
- addAllUnlabeledVoxelsToLabel(self, label: int)
Adds all unlabeled voxels, giving them a specific label.
- Parameters:
label (int) – the label (a uint32_t)
- addIndexIntervalToLabel(self, anIndex0: int, anIndex1: int, aLabel: int)
Adds index interval to the given label.
- Parameters:
anIndex0 (int) – the index0 (a uint64_t)
anIndex1 (int) – the index1 (a uint64_t)
aLabel (int) – the label (a uint32_t)
- addIndexToLabel(self, anIndex: int, aLabel: int)
Adds an Index to the given label.
- Parameters:
anIndex (int) – the index (a uint64_t)
aLabel (int) – the label (a uint32_t)
- addToVolumeROI(self, pOutputROI: ORSModel.ors.ROI, pLabel: int)
Adds all the voxels associated to a label to a VolumeROI.
Note
The ROI is not cleared prior to adding.
See also
ORSModel.ors.StructuredGrid.getAsROI(),ORSModel.ors.MultiROIAbstract.removeROI()- 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)
Finds the label at a given index, then extracts the label data and adds it to a VolumeROI.
See also
addToROI(),
ORSModel.ors.MultiROIAbstract.removeROI()- Parameters:
pOutputROI (ORSModel.ors.ROI) – the output Volume ROI (an ROI)
pIndex (int) – the index (an int64_t)
- addToVolumeROILabelAtPosition(self, pOutputROI: ORSModel.ors.ROI, tIndex: int, pVector: ORSModel.ors.Vector3)
Finds the label at a given position, then extracts the label data and adds it to aROI.
See also
addToROI(),
ORSModel.ors.MultiROIAbstract.removeROI()- Parameters:
pOutputROI (ORSModel.ors.ROI) – the output ROI (a ROI)
tIndex (int) – the T value (a uint32_t)
pVector (ORSModel.ors.Vector3) – the position (a Vector3)
- addVolumeROIToLabel(self, aLabel: int, pROI: ORSModel.ors.ROI, pTOffset: int = 0) bool
Adds anROI to the given label.
- Parameters:
aLabel (int) – the label (a uint32_t)
pROI (ORSModel.ors.ROI) – the ROI to add (an ROI)
pTOffset (int) – the faculative time Offset
- Returns:
output (bool) – true if succeeded, false otherwise
- addVolumeROIToLabelConstrained(self, aLabel: int, pROI: ORSModel.ors.ROI, sourceLabels: ORSModel.ors.ArrayUnsignedLong, pTOffset: int = 0) bool
- Parameters:
aLabel (int) –
pROI (ORSModel.ors.ROI) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
pTOffset (int) –
- Returns:
output (bool) –
- appendMultiROI(self, pLabeledMultiROI: ORSModel.ors.MultiROI, pLabelArray: ORSModel.ors.ArrayUnsignedLong)
- Parameters:
pLabeledMultiROI (ORSModel.ors.MultiROI) –
pLabelArray (ORSModel.ors.ArrayUnsignedLong) –
- assignDefaultColors()
Helper to assign default color to an instance of a MultiROI
- clear(self)
Clears the entire data.
Note
All label information is lost (scalars, colors, names, etc).
- clearAllLabels(self)
Clears (empties) all labels for all Ts.
Note
All label information is preserved (scalars, colors, names, etc).
- clearAllLabelsForTIndex(self, tIndex: int)
Clears (empties) all labels for a specific T index.
Note
All label information is preserved (scalars, colors, names, etc).
- Parameters:
tIndex (int) – a timeStep (uint32_t)
- clearLabel(self, pLabel: int)
Clears a label.
- Parameters:
pLabel (int) – the label to clear (a uint32_t)
- clearLabels(self, pLabelArray: ORSModel.ors.ArrayUnsignedLong)
Clears a set of labels.
- Parameters:
pLabelArray (ORSModel.ors.ArrayUnsignedLong) – an array of labels to clear (an ArrayUnsignedLong)
- clearLabelsForTIndex(self, labels: ORSModel.ors.ArrayUnsignedLong, tIndex: int)
Clears (empties) specific Labels for a specific T index.
Note
All label information is preserved (scalars, colors, names, etc).
- Parameters:
labels (ORSModel.ors.ArrayUnsignedLong) – Labels to be cleared
tIndex (int) – a timeStep (uint32_t)
- computeDenseGraphFromMultiROI(self, IProgress: ORSModel.ors.Progress) ORSModel.ors.Graph
Computes the graph of theMultiROI’s connectivity.
Note
The receiver MultiROI should already be skeletonized. The receiver should be a proper skeleton without any surface
- Parameters:
IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
- Returns:
output (ORSModel.ors.Graph) – graph of the MultiROI’s connectivity
- copyInto(self, aMultiROI: ORSModel.ors.MultiROI)
Copies the receiver into another Multi-ROI.
- Parameters:
aMultiROI (ORSModel.ors.MultiROI) – a destination multiROI (an MultiROI)
- copyLabelAndScalarInformationInto(self, pDestinationMultiROI: ORSModel.ors.MultiROI)
Copy scalars, labels color, opacity and title into pDestinationMultiROI.
- Parameters:
pDestinationMultiROI (ORSModel.ors.MultiROI) –
- copyLabelInformationInto(self, pDestinationMultiROI: ORSModel.ors.MultiROI)
Copy labels color, opacity and title into pDestinationMultiROI.
- Parameters:
pDestinationMultiROI (ORSModel.ors.MultiROI) –
- copyScalarInformationInto(self, pDestinationMultiROI: ORSModel.ors.MultiROI)
Copy scalars into pDestinationMultiROI.
- Parameters:
pDestinationMultiROI (ORSModel.ors.MultiROI) –
- crossIndexing(self, multiROIToIntersectWith: ORSModel.ors.MultiROI) ORSModel.ors.ArrayUnsignedLong
cross-indexing with labels from another multiROI
- Parameters:
multiROIToIntersectWith (ORSModel.ors.MultiROI) – the other multi ROI to cross-index with
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- emptyLabelIntersectingROI(self, pInputROI: ORSModel.ors.ROI) bool
Empty labels that are intersecting the givenROI.
- Parameters:
pInputROI (ORSModel.ors.ROI) –
- Returns:
output (bool) – return true if label where removed (a bool)
- emptyLabelNotIntersectingROI(self, pInputROI: ORSModel.ors.ROI) bool
Empty labels that are not intersecting the givenROI.
- Parameters:
pInputROI (ORSModel.ors.ROI) –
- Returns:
output (bool) – return true if label where removed (a bool)
- fillAllInnerHoles2DAlongXAxis(self, labels: ORSModel.ors.ArrayUnsignedLong, iTIndex: int, considerDiagonal: bool)
Note
This method fills the interior of a MultiROI for each 2D slice along the X axis.
Note
Only those labels specified are filled, in the order they are supplied in.
Note
This method fills a MultiROI’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:
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to fill (an ArrayUnsignedLong)
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, labels: ORSModel.ors.ArrayUnsignedLong, iTIndex: int, considerDiagonal: bool)
Note
This method fills the interior of a MultiROI for each 2D slice along the Y axis.
Note
Only those labels specified are filled, in the order they are supplied in.
Note
This method fills a MultiROI’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:
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to fill (an ArrayUnsignedLong)
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, labels: ORSModel.ors.ArrayUnsignedLong, iTIndex: int, considerDiagonal: bool)
Note
This method fills the interior of a MultiROI for each 2D slice along the Z axis.
Note
Only those labels specified are filled, in the order they are supplied in.
Note
This method fills a MultiROI’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:
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to fill (an ArrayUnsignedLong)
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, labels: ORSModel.ors.ArrayUnsignedLong, iTIndex: int, considerDiagonal: bool)
Note
This method fills a MultiROI’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
Only those labels specified are filled, in the order they are supplied in.
Note
When trying to close a 2D MultiROI (for example a circle), you need to work with a 2D MultiROI (i.e. Z size = 1).
- Parameters:
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to fill (an ArrayUnsignedLong)
iTIndex (int) – the T index (a uint32_t)
considerDiagonal (bool) – true to use 26 neighbors, false to use 6 neighbors (see note below)
- fillWithCell(self, xCellSize: int, yCellSize: int, zCellSize: int, temporalCell: bool)
Clear the Muti-ROI and fill it with a grid of label.
- Parameters:
xCellSize (int) – the cell size in X (a uint32_t)
yCellSize (int) – the cell size in Y (a uint32_t)
zCellSize (int) – the cell size in Z (a uint32_t)
temporalCell (bool) – new label per T or same label across T dimension (a bool)
- fromChannel(self, pChan: ORSModel.ors.Channel)
- 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) ORSModel.ors.MultiROIAnalyzer
- Parameters:
inputChannel (ORSModel.ors.Channel) –
pROI (ORSModel.ors.ROI) –
aTimeStep (int) –
pStats (int) –
pCompute2DStats (bool) –
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.MultiROIAnalyzer) –
- get2DZAlignedProjection(self, iTIndex: int) ORSModel.ors.MultiROI
flatten the z axis of a multiROI
- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.MultiROI) –
- getAsArray(self, tIndex: int, pOutputArray: ORSModel.ors.ArrayUnsignedLong) ORSModel.ors.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.
See also
ORSModel.ors.StructuredGrid.getAsROI(), asChannel()- Parameters:
tIndex (int) – time index (a uint32_t)
pOutputArray (ORSModel.ors.ArrayUnsignedLong) – an optional output Array (an ArrayUnsignedLong)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – the resulting Array (an ArrayUnsignedLong)
- getAsChannelWithLabelOffset(self, labelOffset: int, pOutputChannel: ORSModel.ors.Channel) ORSModel.ors.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:
See also
asROI()
- 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) ORSModel.ors.Mesh
- Parameters:
bWorld (bool) –
IProgress (ORSModel.ors.Progress) –
IInMesh (ORSModel.ors.Mesh) –
- Returns:
output (ORSModel.ors.Mesh) –
- getAsCubicMeshForTIndex(self, bWorld: bool, timeStep: int, IProgress: ORSModel.ors.Progress, IInMesh: ORSModel.ors.Mesh) ORSModel.ors.Mesh
Note
If a target Mesh is supplied, data is written to it and returned, otherwise a new Mesh is created.
- Parameters:
bWorld (bool) – the time step to extract from the receiver (a uint32_t)
timeStep (int) – a progress object to show no progress (an Progress)
IProgress (ORSModel.ors.Progress) – an optional target mesh model (a Mesh)
IInMesh (ORSModel.ors.Mesh) –
- Returns:
output (ORSModel.ors.Mesh) – the resulting mesh model (an Mesh)
- getAsCubicMeshSubset(self, IEnabledLabel: ORSModel.ors.ArrayChar, bWorld: bool, IProgress: ORSModel.ors.Progress, IInMesh: ORSModel.ors.Mesh) ORSModel.ors.Mesh
- Parameters:
IEnabledLabel (ORSModel.ors.ArrayChar) –
bWorld (bool) –
IProgress (ORSModel.ors.Progress) –
IInMesh (ORSModel.ors.Mesh) –
- Returns:
output (ORSModel.ors.Mesh) –
- getAsGraph(self, optionalInputGraph: ORSModel.ors.Graph, IProgress: ORSModel.ors.Progress) ORSModel.ors.Graph
Computes the graph of theMultiROI’s connectivity.
- Parameters:
optionalInputGraph (ORSModel.ors.Graph) – an optional input graph to modify (a Graph)
IProgress (ORSModel.ors.Progress) – a progress object (a Progress)
- Returns:
output (ORSModel.ors.Graph) – graph of the MultiROI’s connectivity
- 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) ORSModel.ors.Mesh
- Parameters:
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) –
- Returns:
output (ORSModel.ors.Mesh) –
- getAsNDArray(timestep=0)
Get a numpy nd array representation
- Parameters:
timestep (int) – timestep to extract
- getBoundingBoxOfLabel(self, pTIndex: int, iLabel: int) ORSModel.ors.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:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- 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:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- Returns:
clipOriginSummit (ORSModel.ors.Vector3) – the origin summit of the clip box
clipOppositeSummit (ORSModel.ors.Vector3) – the origin opposite summit of the clip box
- getClosedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, pTimeStep: int, pOutMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
Only those labels specified are closed, in the order they are supplied in.
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 MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to close (an ArrayUnsignedLong)
pTimeStep (int) – the time step (a uint32_t)
pOutMultiROI (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getClosedWithKernelOnSpecificSlices(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, pTimeStep: int, axis: int, indices: ORSModel.ors.SequenceableCollection, pOutMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
Only those labels specified are closed, in the order they are supplied in.
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 MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to close (an ArrayUnsignedLong)
pTimeStep (int) – the time step (a uint32_t)
axis (int) – the axis of the specified slices (x=0,y=1,z=2) (a uint8_t)
indices (ORSModel.ors.SequenceableCollection) – the slices to work on (an SequenceableCollection)
pOutMultiROI (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getColorSlot(self) int
Get the color slot index.
- Returns:
output (int) –
- getConvexHullAsAFilledMultiROI(binning=1)
Return the convex hull of a MultiROI as a filled MultiROI
- Parameters:
binning (int) – the binning of the operation
- Returns:
newMultiROI (ORSModel.ors.MultiROI) – the created MultiROI
- getConvexHullMeshSurfaces(tIndex, progress=None, binning=1)
Creates a new Array Double of surface from convexHull of labels
- Parameters:
self (ORSModel.ors.MultiROI) – the source MultiROI
tIndex (int) – the time index of intersest
progress (ORSModel.ors.Progress) – a progress object
binning (int) – the binning of the operation
- Returns:
newArrayDouble (ORSModel.ors.ArrayDouble) – the created ArrayDouble
- getCorrelatedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, threshold: float, pTimeStep: int, pROIMask: ORSModel.ors.ROI, progress: ORSModel.ors.Progress, pOutput: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Correlates theMultiROI (see note below) with a supplied 3D kernel.
Note
This method can be used to smooth the MultiROI by providing a smoothing kernel (e.g. with a gaussian distribution).
Note
Only those labels specified are correlated, in the order they are supplied in.
Note
If a mask is provided, its T size should be 1.
Note
All voxels (partipating in the labels specified) of the input MultiROI not in the mask are copied into the output MultiROI.
Note
If a target MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to correlate (an ArrayUnsignedLong)
threshold (float) – the threshold value (a double). The output MultiROI will contain this voxel if the result of the correlation at that voxel is greater than or equal to this threshold value.
pTimeStep (int) – the time step of the receiver MultiROI to smooth (a uint32_t)
pROIMask (ORSModel.ors.ROI) – an optional mask (a ROI)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
pOutput (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getDilatedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, pTimeStep: int, progress: ORSModel.ors.Progress, pOutMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
Only those labels specified are dilated, in the order they are supplied in.
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 MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to dilate (an ArrayUnsignedLong)
pTimeStep (int) – the time step (a uint32_t)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
pOutMultiROI (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getDilatedWithKernelOnSpecificSlices(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, pTimeStep: int, axis: int, indices: ORSModel.ors.SequenceableCollection, progress: ORSModel.ors.Progress, pOutMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
Only those labels specified are dilated, in the order they are supplied in.
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 MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to dilate (an ArrayUnsignedLong)
pTimeStep (int) – the time step (a uint32_t)
axis (int) – the axis of the specified slices (x=0,y=1,z=2) (a uint8_t)
indices (ORSModel.ors.SequenceableCollection) – the slices to work on (an SequenceableCollection)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
pOutMultiROI (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getErodedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, pTimeStep: int, progress: ORSModel.ors.Progress, pOutMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
Only those labels specified are eroded, in the order they are supplied in.
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 MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to erode (an ArrayUnsignedLong)
pTimeStep (int) – the time step (a uint32_t)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
pOutMultiROI (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getErodedWithKernelOnSpecificSlices(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, pTimeStep: int, axis: int, indices: ORSModel.ors.SequenceableCollection, progress: ORSModel.ors.Progress, pOutMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
Only those labels specified are eroded, in the order they are supplied in.
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 MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to erode (an ArrayUnsignedLong)
pTimeStep (int) – the time step (a uint32_t)
axis (int) – the axis of the specified slices (x=0,y=1,z=2) (a uint8_t)
indices (ORSModel.ors.SequenceableCollection) – the slices to work on (an SequenceableCollection)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
pOutMultiROI (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getFeretBox(iTIndex, iAngleSampling=5)
Gets Feret box of a MultiROI
Note
Default value for angle sampling is 5
- Parameters:
iTIndex (int) – the T index
iAngleSampling (int) – the angle sampling, steps between each angle iteration
- Returns:
output (ORSModel.ors.Box) – Feret box
- getIntersectionWithLabeledMultiROI(self, pInputLabeledMultiROI: ORSModel.ors.MultiROI, anOutputLabeledMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.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:
pInputLabeledMultiROI (ORSModel.ors.MultiROI) – the MultiROI to intersect with (a MultiROI)
anOutputLabeledMultiROI (ORSModel.ors.MultiROI) – the output MultiROI (a MultiROI), see note below
- Returns:
output (ORSModel.ors.MultiROI) – the intersection result
- getIntersectionWithROI(self, aROI: ORSModel.ors.ROI, anOutputMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.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:
aROI (ORSModel.ors.ROI) – the ROI to intersect with (an ROI)
anOutputMultiROI (ORSModel.ors.MultiROI) – the output MultiROI (a MultiROI), see note below
- Returns:
output (ORSModel.ors.MultiROI) – the intersection result
- getIsClipped(timestep=0, display=None)
Gets to know if there is a clip box attached to the ROI or MultiROI
- Parameters:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- Returns:
isClipped (bool) – if True, the clip box of the ROI or MultiROI is visible; 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.
See also
ORSModel.ors.MultiROIAbstract.getLabelAtPosition()- Parameters:
pIndex (int) – the index (a int64_t)
- Returns:
output (int) – the resulting label (a uint32_t)
- getLabelColor(self, label: int) ORSModel.ors.Color
Gets the label color (See note below)
Note
Labels have two colors: the label color and the color of the current scalar.
- Parameters:
label (int) – The label (a uint32_t)
- Returns:
output (ORSModel.ors.Color) – a color (an ORS::Color)
- getLabelCount(self) int
Gets the number of distinct labels within.
- Returns:
output (int) – the number of labels (a uint32_t)
- getLabelScalarValuesCollection(self) ORSModel.ors.ScalarValuesCollection
Queries the scalar values collection of the labels.
- Returns:
output (ORSModel.ors.ScalarValuesCollection) – the ScalarValuesCollection of the labels.
- 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 (a uint64_t)
- getLabelSizes(self, pLabelArray: ORSModel.ors.ArrayLONGLONG)
- Parameters:
pLabelArray (ORSModel.ors.ArrayLONGLONG) –
- getLockedLabel(self, label: int) bool
Returns a bool to know if a label is locked.
- Parameters:
label (int) – a Label (uint32_t)
- Returns:
output (bool) – A bool (true if locked, false if unlocked)
- getLockedLabels(self) ORSModel.ors.ArrayUnsignedLong
Returns the Locked Labels.
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – An array of labels
- getMergedLabelsIntersectingMultiROI(self, pInputMROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
- Parameters:
pInputMROI (ORSModel.ors.MultiROI) –
- Returns:
output (ORSModel.ors.MultiROI) –
- getMergedLabelsIntersectingROI(self, inputROI: ORSModel.ors.ROI) ORSModel.ors.MultiROI
- Parameters:
inputROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.MultiROI) –
- getMergedWith(self, otherMultiROI: ORSModel.ors.MultiROI, outputMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Merges with the suppliedMultiROI.
Note
All the labels from the merge MultiROI are added to the receiver. If a label exists in the receiver then the two labels are merged, if not then the label is added.
- Parameters:
otherMultiROI (ORSModel.ors.MultiROI) – the multiROI to merge with (a MultiROI)
outputMultiROI (ORSModel.ors.MultiROI) – an output multiROI (a MultiROI)
- 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) –
- getNDArray(timestep=0)
Get a numpy nd array representation
- Parameters:
timestep (int) – timestep to analyse
Deprecated since version 2021.1: use getAsNDArray instead
- 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) ORSModel.ors.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)
- getOpenWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, pTimeStep: int, pOutMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
Only those labels specified are open, in the order they are supplied in.
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 MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to open (an ArrayUnsignedLong)
pTimeStep (int) – the time step (a uint32_t)
pOutMultiROI (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getOpenWithKernelOnSpecificSlices(self, pKernel: ORSModel.ors.ConvolutionKernel, labels: ORSModel.ors.ArrayUnsignedLong, pTimeStep: int, axis: int, indices: ORSModel.ors.SequenceableCollection, pOutMultiROI: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
Only those labels specified are open, in the order they are supplied in.
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 MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (a ConvolutionKernel)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels to open (an ArrayUnsignedLong)
pTimeStep (int) – the time step (a uint32_t)
axis (int) – the axis of the specified slices (x=0,y=1,z=2) (a uint8_t)
indices (ORSModel.ors.SequenceableCollection) – the slices to work on (an SequenceableCollection)
pOutMultiROI (ORSModel.ors.MultiROI) – an optional output MultiROI (a MultiROI)
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (a MultiROI)
- getProjectionIn(self, aLabeledMultiROI: ORSModel.ors.MultiROI, sourceTimeOffset: int, pProgress: ORSModel.ors.Progress) ORSModel.ors.MultiROI
- Parameters:
aLabeledMultiROI (ORSModel.ors.MultiROI) –
sourceTimeOffset (int) –
pProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.MultiROI) –
- getScalarSlotAsChannel(self, scalarSlot: int) ORSModel.ors.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.
See also
asROI()
- Parameters:
scalarSlot (int) – a scalar slot (a uint32_t)
- Returns:
output (ORSModel.ors.Channel) – the resulting channel (an Channel)
- getSliceAsNDArray(sliceIndex: int = 0, timestep: int = 0)
Get a numpy nd array representation
- Parameters:
sliceIndex (int) – slice to extract
timestep (int) – timestep to extract
- getSumOfSizesOfSelectedLabels(self) int
Gets the total size of all selected labels.
See also
ORSModel.ors.MultiROI.getLabelSize(),ORSModel.ors.MultiROI.getVoxelCount(),ORSModel.ors.MultiROI.getTotalVoxelCount()- Returns:
output (int) – the sum of all selected labels sizes (a uint64_t)
- getTotalVoxelCount(self) int
Gets the total size of all labels.
- Returns:
output (int) – the total size (a uint64_t)
- getUnlabeledVoxelCount(self) int
Gets the count of unlabeled voxels.
Note
This number is the total size of the receiver (X*Y*Z*T) less the total size of all labeled voxels.
- Returns:
output (int) – the count of unlabeled voxels (a uint64_t)
- 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 (an uint64_t)
- grid(self, celXSize: int, celYSize: int, celZSize: int, minT: int, maxT: int)
- 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
- 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
MultiROI.mergeLabels(self, targetLabel: int, sourceLabels: ORSModel.ors.ArrayUnsignedLong) -> bool
Merge several labels into another one.
- Parameters:
targetLabel (int) – the target label (a uint32_t)
sourceLabels (ORSModel.ors.ArrayUnsignedLong) – the source labels (an ArrayUnsignedLong)
- Returns:
output (bool) – true if the operation succeeded, false otherwise
- mergeLabelsIntersectingMultiROI(self, pInputMROI: ORSModel.ors.MultiROI) bool
- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (MultiROI) –
- paintBoxConstrained(self, pBox: ORSModel.ors.Box, destinationLabel: float, sourceLabels: ORSModel.ors.ArrayUnsignedLong, tStep: int)
- Parameters:
pBox (ORSModel.ors.Box) –
destinationLabel (float) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
tStep (int) –
- paintBoxConstrainedIfInRange(self, pBox: ORSModel.ors.Box, destinationLabel: float, sourceLabels: ORSModel.ors.ArrayUnsignedLong, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
pBox (ORSModel.ors.Box) –
destinationLabel (float) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
tStep (int) –
fMinValue (float) –
fMaxValue (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- paintCircleConstrainedOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, destinationLabel: float, sourceLabels: ORSModel.ors.ArrayUnsignedLong, timeIndex: int)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
radius (float) –
destinationLabel (float) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
timeIndex (int) –
- paintCircleConstrainedOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, destinationLabel: float, sourceLabels: ORSModel.ors.ArrayUnsignedLong, timeIndex: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
radius (float) –
destinationLabel (float) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
timeIndex (int) –
fMinValue (float) –
fMaxValue (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- paintRemoveBox(self, pBox: ORSModel.ors.Box, label: float, addLabel: float, tStep: int)
Removes a box (3D object) from the receiver.
- Parameters:
pBox (ORSModel.ors.Box) – The box (a Box)
label (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label to add removed voxels to (or 0 to just remove voxels and not add them to any label)
tStep (int) – The T index (a uint32_t)
- paintRemoveBoxIfInRange(self, pBox: ORSModel.ors.Box, eraseLabel: float, addLabel: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
Removes a box (3D object) from the receiver if the data within the box is in the supplied range.
- Parameters:
pBox (ORSModel.ors.Box) – The box (a Box)
eraseLabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label to add removed voxels to (or 0 to just remove voxels and not add them to any label)
tStep (int) – The T index (a uint32_t)
fMinValue (float) – The range lower bound (a double)
fMaxValue (float) – The range upper bound (a double)
pRangeChannel (ORSModel.ors.StructuredGrid) – The dataset where to check (a StructuredGrid)
- paintRemoveBoxIntersectingChannel(self, pBox: ORSModel.ors.Box, eraseLabel: float, addLabel: float, tStep: int, intersectingChannel: ORSModel.ors.Channel, levelingMinRange: float, levelingMaxRange: float, pLUT: ORSModel.ors.LookupTable, intersectingChannelClipBox: ORSModel.ors.Box)
Removes a box (3D object) from the receiver if the box intersects with the supplied channel.
- Parameters:
pBox (ORSModel.ors.Box) – The brush box (a Box)
eraseLabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
tStep (int) – The T index (a uint32_t)
intersectingChannel (ORSModel.ors.Channel) – The intersecting channel (a Channel)
levelingMinRange (float) – The window leveling lower bound (a double)
levelingMaxRange (float) – The window leveling upper bound(a double)
pLUT (ORSModel.ors.LookupTable) – The look up table (a LUT)
intersectingChannelClipBox (ORSModel.ors.Box) – The channel box (a Box)
- paintRemoveBoxIntersectingMultiROI(self, pBox: ORSModel.ors.Box, eraseLabel: float, addLabel: float, tStep: int, intersectingMultiROI: ORSModel.ors.MultiROI, fHightlightOpacity: float, fHightlightOpacityOutRange: float, intersectingMultiROIClipBox: ORSModel.ors.Box)
Removes a box (3D object) from the receiver if the sphere intersects with the suppliedMultiROI.
- Parameters:
pBox (ORSModel.ors.Box) – The brush box (a Box)
eraseLabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
tStep (int) – The T index (a uint32_t)
intersectingMultiROI (ORSModel.ors.MultiROI) – The intersecting MultiROI (a MultiROI)
fHightlightOpacity (float) – The highlight opacity (a double)
fHightlightOpacityOutRange (float) – The highlight opacity range (a double)
intersectingMultiROIClipBox (ORSModel.ors.Box) – The MultiROI clip box (a Box)
- paintRemoveBoxIntersectingROI(self, pBox: ORSModel.ors.Box, eraseLabel: float, addLabel: float, tStep: int, intersectingROI: ORSModel.ors.ROI, intersectingROIClipBox: ORSModel.ors.Box)
Removes a box (3D object) from the receiver if the sphere intersects with the suppliedROI.
- Parameters:
pBox (ORSModel.ors.Box) – The brush box (a Box)
eraseLabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
tStep (int) – The T index (a uint32_t)
intersectingROI (ORSModel.ors.ROI) – The intersecting ROI (a ROI)
intersectingROIClipBox (ORSModel.ors.Box) – The ROI clip box (a Box)
- paintRemoveCircleOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, label: float, addLabel: float, timeIndex: int)
Removes a circle (2D object) from the receiver.
- Parameters:
pPlane (ORSModel.ors.Rectangle) – The plane of the circle (a Rectangle)
worldPos (ORSModel.ors.Vector3) – The center of the circle (a Vector3)
radius (float) – The radius circle (a double)
label (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
timeIndex (int) – The T index (a uint32_t)
- paintRemoveCircleOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, eraselabel: float, addLabel: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid)
Removes a circle (2D object) from the receiver if the data within the circle is in the supplied range.
- Parameters:
pPlane (ORSModel.ors.Rectangle) – The plane of the circle (a Rectangle)
worldPos (ORSModel.ors.Vector3) – The center of the circle (a Vector3)
radius (float) – The radius circle (a double)
eraselabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
timeIndex (int) – The T index (a uint32_t)
lowerThreshold (float) – The range lower bound (a double)
upperThreshold (float) – The range upper bound (a double)
pRangeChannel (ORSModel.ors.StructuredGrid) – The dataset where to check (a StructuredGrid)
- paintRemoveSphere(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, addLabel: float, tStep: int)
Removes a sphere (3D object) from the receiver.
- Parameters:
worldPos (ORSModel.ors.Vector3) – The center of the sphere (a Vector3)
fRadius (float) – The sphere radius (a double)
label (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label to add removed voxels to (or 0 to just remove voxels and not add them to any label)
tStep (int) – The T index (a uint32_t)
- paintRemoveSphereIfInRange(self, worldPos: ORSModel.ors.Vector3, fRadius: float, eraseLabel: float, addLabel: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
Removes a sphere (3D object) from the receiver if the data within the sphere is in the supplied range.
- Parameters:
worldPos (ORSModel.ors.Vector3) – The center of the sphere (a Vector3)
fRadius (float) – The sphere radius (a double)
eraseLabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
tStep (int) – The T index (a uint32_t)
fMinValue (float) – The range lower bound (a double)
fMaxValue (float) – The range upper bound (a double)
pRangeChannel (ORSModel.ors.StructuredGrid) – The dataset where to check (a StructuredGrid)
- paintRemoveSphereIntersectingChannel(self, worldPos: ORSModel.ors.Vector3, fRadius: float, eraseLabel: float, addLabel: float, tStep: int, intersectingChannel: ORSModel.ors.Channel, levelingMinRange: float, levelingMaxRange: float, ILUT: ORSModel.ors.LookupTable, intersectingChannelClipBox: ORSModel.ors.Box)
Removes a sphere (3D object) from the receiver if the sphere intersects with the supplied channel.
- Parameters:
worldPos (ORSModel.ors.Vector3) – The center of the sphere (a Vector3)
fRadius (float) – The sphere radius (a double)
eraseLabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
tStep (int) – The T index (a uint32_t)
intersectingChannel (ORSModel.ors.Channel) – The intersecting channel (a Channel)
levelingMinRange (float) – The window leveling lower bound (a double)
levelingMaxRange (float) – The window leveling upper bound(a double)
ILUT (ORSModel.ors.LookupTable) – The look up table (a LUT)
intersectingChannelClipBox (ORSModel.ors.Box) – The channel box (a Box)
- paintRemoveSphereIntersectingMultiROI(self, worldPos: ORSModel.ors.Vector3, radius: float, eraseLabel: float, addLabel: float, tStep: int, intersectingMultiROI: ORSModel.ors.MultiROI, fHightlightOpacity: float, fHightlightOpacityOutRange: float, intersectingMultiROIClipBox: ORSModel.ors.Box)
Removes a sphere (3D object) from the receiver if the sphere intersects with the suppliedMultiROI.
- Parameters:
worldPos (ORSModel.ors.Vector3) – The center of the sphere (a Vector3)
radius (float) – The sphere radius (a double)
eraseLabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
tStep (int) – The T index (a uint32_t)
intersectingMultiROI (ORSModel.ors.MultiROI) – The intersecting MultiROI (a MultiROI)
fHightlightOpacity (float) – The highlight opacity (a double)
fHightlightOpacityOutRange (float) – The highlight opacity range (a double)
intersectingMultiROIClipBox (ORSModel.ors.Box) – The MultiROI clip box (a Box)
- paintRemoveSphereIntersectingROI(self, worldPos: ORSModel.ors.Vector3, fRadius: float, eraseLabel: float, label: float, tStep: int, intersectingROI: ORSModel.ors.ROI, intersectingROIClipBox: ORSModel.ors.Box)
Removes a sphere (3D object) from the receiver if the sphere intersects with the suppliedROI.
- Parameters:
worldPos (ORSModel.ors.Vector3) – The center of the sphere (a Vector3)
fRadius (float) – The sphere radius (a double)
eraseLabel (float) – The label to remove from (or 0 to remove from any label)
label (float) – The label where the removed voxels should be written (a double, see note)
tStep (int) – The T index (a uint32_t)
intersectingROI (ORSModel.ors.ROI) – The intersecting ROI (a ROI)
intersectingROIClipBox (ORSModel.ors.Box) – The ROI clip box (a Box)
- paintRemoveSquareOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, label: float, addLabel: float, timeIndex: int)
Removes a square (2D object) from the receiver.
- Parameters:
pPlane (ORSModel.ors.Rectangle) – The plane of the square (a Rectangle)
worldPos (ORSModel.ors.Vector3) – The center of the square (a Vector3)
radius (float) – The radius (a double)
label (float) – The label affected (a double)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
timeIndex (int) – The T index (a uint32_t)
- paintRemoveSquareOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, width: float, eraselabel: float, addLabel: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid)
Removes a square (2D object) from the receiver if the data within the square is in the supplied range.
- Parameters:
pPlane (ORSModel.ors.Rectangle) – The plane of the square (a Rectangle)
worldPos (ORSModel.ors.Vector3) – The center of the square (a Vector3)
width (float) – The square width (a double)
eraselabel (float) – The label to remove from (or 0 to remove from any label)
addLabel (float) – The label where the removed voxels should be written (a double, see note)
timeIndex (int) – The T index (a uint32_t)
lowerThreshold (float) – The range lower bound (a double)
upperThreshold (float) – The range upper bound (a double)
pRangeChannel (ORSModel.ors.StructuredGrid) – The dataset where to check (a StructuredGrid)
- paintSphereConstrained(self, worldPos: ORSModel.ors.Vector3, fRadius: float, destinationLabel: float, sourceLabels: ORSModel.ors.ArrayUnsignedLong, tStep: int)
- Parameters:
worldPos (ORSModel.ors.Vector3) –
fRadius (float) –
destinationLabel (float) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
tStep (int) –
- paintSphereConstrainedIfInRange(self, worldPos: ORSModel.ors.Vector3, fRadius: float, destinationLabel: float, sourceLabels: ORSModel.ors.ArrayUnsignedLong, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
worldPos (ORSModel.ors.Vector3) –
fRadius (float) –
destinationLabel (float) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
tStep (int) –
fMinValue (float) –
fMaxValue (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- paintSquareConstrainedOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, width: float, destinationLabel: float, sourceLabels: ORSModel.ors.ArrayUnsignedLong, timeIndex: int)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
width (float) –
destinationLabel (float) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
timeIndex (int) –
- paintSquareConstrainedOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, width: float, destinationLabel: float, sourceLabels: ORSModel.ors.ArrayUnsignedLong, timeIndex: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
width (float) –
destinationLabel (float) –
sourceLabels (ORSModel.ors.ArrayUnsignedLong) –
timeIndex (int) –
fMinValue (float) –
fMaxValue (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- projectInShape(self, aShape: ORSModel.ors.Shape3D, sourceTime: int, destinationMROI: ORSModel.ors.MultiROI, destinationTime: int) ORSModel.ors.MultiROI
- Parameters:
aShape (ORSModel.ors.Shape3D) –
sourceTime (int) –
destinationMROI (ORSModel.ors.MultiROI) –
destinationTime (int) –
- Returns:
output (ORSModel.ors.MultiROI) –
- removeEmptyLabelsAndRenumber(self)
Removes all empty labels and renumber the remaining labels in the same order.
- removeFromVolumeROI(self, pOutputROI: ORSModel.ors.ROI, pLabel: int)
Remove all the voxels associated to a label from a VolumeROI.
See also
ORSModel.ors.StructuredGrid.getAsROI(),ORSModel.ors.MultiROIAbstract.removeROI()- Parameters:
pOutputROI (ORSModel.ors.ROI) – the output Volume ROI (an ROI)
pLabel (int) – the label to extract (a uint32_t)
- removeIndex(self, anIndex: int)
Remove an Index from theMultiROI.
- Parameters:
anIndex (int) – the index (a uint64_t)
- removeIndexInterval(self, anIndex0: int, anIndex1: int)
Remove index interval from theMultiROI.
- Parameters:
anIndex0 (int) – the index0 (a uint64_t)
anIndex1 (int) – the index1 (a uint64_t)
- removeLabelAndRenumber(self, pLabel: int)
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)
Removes aMultiROI.
- Parameters:
pInputLabeledMultiROI (ORSModel.ors.MultiROI) – the MultiROI to remove (a MultiROI)
- removeLabelsAndRenumber(self, pLabelArray: ORSModel.ors.ArrayUnsignedLong)
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)
- removeShape3DIntersectingLabels(self, aShape: ORSModel.ors.Shape3D, labels: ORSModel.ors.ArrayUnsignedLong, destinationLabel: int, timestep: int)
Removes the intersection of the supplied shape and the list of labels.
- Parameters:
aShape (ORSModel.ors.Shape3D) – a shape (a Shape3D)
labels (ORSModel.ors.ArrayUnsignedLong) – an array of labels
destinationLabel (int) – the destination label of removed voxels (0 to just remove them) (a uint32_t)
timestep (int) – the time step (a uint32_t)
- removeVolumeROIFromLabel(self, aLabel: int, pROI: ORSModel.ors.ROI, pTOffset: int = 0) bool
- Parameters:
aLabel (int) –
pROI (ORSModel.ors.ROI) –
pTOffset (int) –
- Returns:
output (bool) –
- setColorSlot(self, colorSlot: int)
Set the color slot index.
- Parameters:
colorSlot (int) –
- setLabelCount(self, aCount: int)
Sets the label count.
Note
Changing the label count preserves existing label data, unless you reduce the count, in which case the data subtracted is lost.
- Parameters:
aCount (int) – the label count to set (a uint32_t)
- setLockedLabel(self, label: int, locked: bool)
Lock or Unlock 1 Label.
- Parameters:
label (int) – An array of labels
locked (bool) – true to lock, false to unlock
- setLockedLabels(self, labels: ORSModel.ors.ArrayUnsignedLong, locked: bool)
Lock or Unlock 1 or more Labels.
- Parameters:
labels (ORSModel.ors.ArrayUnsignedLong) – An array of labels
locked (bool) – true to lock, false to unlock
- sortAndRenumberLabelsOnSize(self, bAscending: bool, bRemoveEmptyLabels: bool)
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
- swapLabels(self, label1: int, label2: int)
Swaps two labels.
- Parameters:
label1 (int) – the first label (a uint32_t)
label2 (int) – the second label (a uint32_t)
MultiROIAnalyzer¶
- class ORSModel.ors.MultiROIAnalyzer
Bases:
UnmanagedAnalyzer for multi-ROIs.
- computeStatisticsFor(self, IChannel: ORSModel.ors.Channel, pTimeStep: int, IROI: ORSModel.ors.ROI, IProgress: ORSModel.ors.Progress)
- Parameters:
IChannel (ORSModel.ors.Channel) –
pTimeStep (int) –
IROI (ORSModel.ors.ROI) –
IProgress (ORSModel.ors.Progress) –
- getCenterOfMassIndexXCollection(self) ORSModel.ors.ArrayLONGLONG
Get the the center of mass X index.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getCenterOfMassIndexYCollection(self) ORSModel.ors.ArrayLONGLONG
Get the the center of mass Y index.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getCenterOfMassIndexZCollection(self) ORSModel.ors.ArrayLONGLONG
Get the the center of mass Z index.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getCenterOfMassMinMax(self, pXMin: float, pYMin: float, pZMin: float, pXMax: float, pYMax: float, pZMax: float)
- 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, aMultiROI: ORSModel.ors.MultiROI, IListOfLabels: ORSModel.ors.ArrayUnsignedLong, tChannel: int, tLMR: int, bins: int, pMinRange: float, pMaxRange: float) ORSModel.ors.ArrayUnsignedLONGLONG
- Parameters:
IChannel (ORSModel.ors.Channel) –
aMultiROI (ORSModel.ors.MultiROI) –
IListOfLabels (ORSModel.ors.ArrayUnsignedLong) –
tChannel (int) –
tLMR (int) –
bins (int) –
pMinRange (float) –
pMaxRange (float) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLONGLONG) –
- getEquivalentRadiusMinMax(self, pMin: float, pMax: float)
- Parameters:
pMin (float) –
pMax (float) –
- getFeretLengthMax(self) ORSModel.ors.ArrayDouble
Gets maximum feret size.
- Returns:
output (ORSModel.ors.ArrayDouble) – feret maximum size (an ArrayDouble)
- getFeretLengthMean(self) ORSModel.ors.ArrayDouble
Gets medium feret size.
- Returns:
output (ORSModel.ors.ArrayDouble) – feret medium size (an ArrayDouble)
- getFeretLengthMin(self) ORSModel.ors.ArrayDouble
Gets minimum feret size.
- Returns:
output (ORSModel.ors.ArrayDouble) – feret minimum size (an ArrayDouble)
- getFeretLengthMinOrtho(self) ORSModel.ors.ArrayDouble
Gets minimum orthogonal feret diameter.
- Returns:
output (ORSModel.ors.ArrayDouble) – feret minimum orthogonal (an ArrayDouble)
- getIndiciesCountInLabels(self) ORSModel.ors.ArrayLONGLONG
- Returns:
output (ORSModel.ors.ArrayLONGLONG) –
- getLabelAspectRatio(self, pLabel: int) float
- Parameters:
pLabel (int) –
- Returns:
output (float) –
- getLabelCenterOfMass(self, pLabel: int) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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)
- getLabelInertiaEigenVectorWithMaxEigenValueInWorld(self, pLabel: int) ORSModel.ors.Vector3
Gets the eigenvector associated to the maximum eigenvalue of the inertia tensor for the specified label in world.
- Parameters:
pLabel (int) – label (a uint32_t)
- Returns:
output (ORSModel.ors.Vector3) – the eigenvector (a Vector3)
- getLabelInertiaEigenVectorWithMedEigenValue(self, pLabel: int) ORSModel.ors.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)
- getLabelInertiaEigenVectorWithMedEigenValueInWorld(self, pLabel: int) ORSModel.ors.Vector3
Gets the eigenvector associated to the medium eigenvalue of the inertia tensor for the specified label in world.
- Parameters:
pLabel (int) – label (a uint32_t)
- Returns:
output (ORSModel.ors.Vector3) – the eigenvector (a Vector3)
- getLabelInertiaEigenVectorWithMinEigenValue(self, pLabel: int) ORSModel.ors.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)
- getLabelInertiaEigenVectorWithMinEigenValueInWorld(self, pLabel: int) ORSModel.ors.Vector3
Gets the eigenvector associated to the minimum eigenvalue of the inertia tensor for the specified label in wolrd.
- 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)
- getLabelInertiaEigenVectorWithMinEigenValuePhiInWorldAngle(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 in world.
- 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)
- getLabelInertiaEigenVectorWithMinEigenValueThetaInWorldAngle(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 in world.
- 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)
- 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) ORSModel.ors.Vector3
- Parameters:
pLabel (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getLabelsAspectRatio(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsCenterOfMassX(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsCenterOfMassY(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsCenterOfMassZ(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsContinueSurfaceArea(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsEntropy(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsEquivalentRadius(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsInertiaEigenValueMax(self) ORSModel.ors.ArrayDouble
Gets the maximum eigenvalues of the inertia tensor.
- Returns:
output (ORSModel.ors.ArrayDouble) – the eigenvalues (an ArrayDouble)
- getLabelsInertiaEigenValueMed(self) ORSModel.ors.ArrayDouble
Gets the medium eigenvalues of the inertia tensor.
- Returns:
output (ORSModel.ors.ArrayDouble) – the eigenvalues (an ArrayDouble)
- getLabelsInertiaEigenValueMin(self) ORSModel.ors.ArrayDouble
Gets the minimum eigenvalues of the inertia tensor.
- Returns:
output (ORSModel.ors.ArrayDouble) – the eigenvalues (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMaxEigenValuePhiAngle(self) ORSModel.ors.ArrayDouble
Gets the phi angle for the eigenvector associated to the maximum eigenvalue of the inertia tensor for each label.
- Returns:
output (ORSModel.ors.ArrayDouble) – the phi angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMaxEigenValuePhiInWorldAngle(self) ORSModel.ors.ArrayDouble
Gets the phi angle for the eigenvector associated to the maximum eigenvalue of the inertia tensor for each label in world.
- Returns:
output (ORSModel.ors.ArrayDouble) – the phi angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMaxEigenValueThetaAngle(self) ORSModel.ors.ArrayDouble
Gets the theta angle for the eigenvector associated to the maximum eigenvalue of the inertia tensor for each label.
- Returns:
output (ORSModel.ors.ArrayDouble) – the theta angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMaxEigenValueThetaInWorldAngle(self) ORSModel.ors.ArrayDouble
Gets the theta angle for the eigenvector associated to the maximum eigenvalue of the inertia tensor for each label in world.
- Returns:
output (ORSModel.ors.ArrayDouble) – the theta angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMedEigenValuePhiAngle(self) ORSModel.ors.ArrayDouble
Gets the phi angle for the eigenvector associated to the middle eigenvalue of the inertia tensor for each label.
- Returns:
output (ORSModel.ors.ArrayDouble) – the phi angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMedEigenValuePhiInWorldAngle(self) ORSModel.ors.ArrayDouble
Gets the phi angle for the eigenvector associated to the middle eigenvalue of the inertia tensor for each label in world.
- Returns:
output (ORSModel.ors.ArrayDouble) – the phi angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMedEigenValueThetaAngle(self) ORSModel.ors.ArrayDouble
Gets the theta angle for the eigenvector associated to the middle eigenvalue of the inertia tensor for each label.
- Returns:
output (ORSModel.ors.ArrayDouble) – the theta angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMedEigenValueThetaInWorldAngle(self) ORSModel.ors.ArrayDouble
Gets the theta angle for the eigenvector associated to the middle eigenvalue of the inertia tensor for each label in world.
- Returns:
output (ORSModel.ors.ArrayDouble) – the theta angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMinEigenValuePhiAngle(self) ORSModel.ors.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)
- getLabelsInertiaEigenVectorWithMinEigenValuePhiInWorldAngle(self) ORSModel.ors.ArrayDouble
Gets the phi angle for the eigenvector associated to the minimum eigenvalue of the inertia tensor for each label in world.
- Returns:
output (ORSModel.ors.ArrayDouble) – the phi angles in radian (an ArrayDouble)
- getLabelsInertiaEigenVectorWithMinEigenValueThetaAngle(self) ORSModel.ors.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)
- getLabelsInertiaEigenVectorWithMinEigenValueThetaInWorldAngle(self) ORSModel.ors.ArrayDouble
Gets the theta angle for the eigenvector associated to the minimum eigenvalue of the inertia tensor for each label in world.
- Returns:
output (ORSModel.ors.ArrayDouble) – the theta angles in radian (an ArrayDouble)
- getLabelsMaxLocationX(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsMaxLocationY(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsMaxLocationZ(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsMaximumVoxel(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsMeanVoxel(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsMinLocationX(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsMinLocationY(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsMinLocationZ(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsMinimumVoxel(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsSphericity(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsStandardDeviationVoxel(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsSurfaceArea(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsSurfaceXArea(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsSurfaceYArea(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsSurfaceZArea(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsVarianceVoxel(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsWeightedCenterOfMassX(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsWeightedCenterOfMassY(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getLabelsWeightedCenterOfMassZ(self) ORSModel.ors.ArrayDouble
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getMaxLocationIndexXCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated x index of the labels maximum position.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMaxLocationIndexYCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated y index of the labels maximum position.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMaxLocationIndexZCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated z index of the labels maximum position.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMaximumValueIndexXCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated x index of the maximum value of labels.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMaximumValueIndexYCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated y index of the maximum value of labels.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMaximumValueIndexZCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated z index of the maximum value of labels.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMaximumValueXLocationCollection(self) ORSModel.ors.ArrayDouble
Get the associated x position in world coordinate of the maximum value of labels.
- Returns:
output (ORSModel.ors.ArrayDouble) – return 0 if the label is empty
- getMaximumValueYLocationCollection(self) ORSModel.ors.ArrayDouble
Get the associated y position in world coordinate of the maximum value of labels.
- Returns:
output (ORSModel.ors.ArrayDouble) – return 0 if the label is empty
- getMaximumValueZLocationCollection(self) ORSModel.ors.ArrayDouble
Get the associated z position in world coordinate of the maximum value of labels.
- Returns:
output (ORSModel.ors.ArrayDouble) – return 0 if the label is empty
- getMaximumVoxelIndexCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated index of the maximum value of labels.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – index of maximum, if label is empty value is -1 (an ArrayLONGLONG)
- getMaximumVoxelMinMax(self, pMin: float, pMax: float)
- Parameters:
pMin (float) –
pMax (float) –
- getMeanVoxelMinMax(self, pMin: float, pMax: float)
- Parameters:
pMin (float) –
pMax (float) –
- getMinLocationIndexXCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated x index of the labels minimum position.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMinLocationIndexYCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated y index of the labels minimum position.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMinLocationIndexZCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated z index of the labels minimum position.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMinimumValueIndexXCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated x index of the minimum value of labels.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMinimumValueIndexYCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated y index of the minimum value of labels.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMinimumValueIndexZCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated z index of the minimum value of labels.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getMinimumValueXLocationCollection(self) ORSModel.ors.ArrayDouble
Get the associated x position in world coordinate of the minimum value of labels.
- Returns:
output (ORSModel.ors.ArrayDouble) – return 0 if the label is empty
- getMinimumValueYLocationCollection(self) ORSModel.ors.ArrayDouble
Get the associated y position in world coordinate of the minimum value of labels.
- Returns:
output (ORSModel.ors.ArrayDouble) – return 0 if the label is empty
- getMinimumValueZLocationCollection(self) ORSModel.ors.ArrayDouble
Get the associated z position in world coordinate of the minimum value of labels.
- Returns:
output (ORSModel.ors.ArrayDouble) – return 0 if the label is empty
- getMinimumVoxelIndexCollection(self) ORSModel.ors.ArrayLONGLONG
Get the associated index of the minimum value of labels.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – index of minimum, if label is empty value is -1 (an ArrayLONGLONG)
- getMinimumVoxelMinMax(self, pMin: float, pMax: float)
- Parameters:
pMin (float) –
pMax (float) –
- getNumberOfROIIndiciesInLabel(self, pLabel: int) int
- Parameters:
pLabel (int) –
- Returns:
output (int) –
- getNumberOfROIIndiciesInLabelsMinMax(self, pMin: int, pMax: int)
- Parameters:
pMin (int) –
pMax (int) –
- getSphericityMinMax(self, pMin: float, pMax: float)
- Parameters:
pMin (float) –
pMax (float) –
- getStandardDeviationVoxelMinMax(self, pMin: float, pMax: float)
- Parameters:
pMin (float) –
pMax (float) –
- getSurfaceAreaFromMarchingCube(self) ORSModel.ors.ArrayDouble
Get the surfaces of labels computed from the marching cube algorithm.
- Returns:
output (ORSModel.ors.ArrayDouble) – surface from marching cube (an ArrayDouble)
- getSurfaceAreaMax(self) float
- Returns:
output (float) –
- getSurfaceAreaMin(self) float
- Returns:
output (float) –
- getSurfaceAreaMinMax(self, pMin: float, pMax: float)
- 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) –
- getTotalRoughnessFromSurfaceDistancesMax(self) ORSModel.ors.ArrayDouble
Gets the total roughness max distance based on the surface distance from the center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness range (an ArrayDouble)
- getTotalRoughnessFromSurfaceDistancesMean(self) ORSModel.ors.ArrayDouble
Gets the total roughness mean distance based on the surface distance from the center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness range (an ArrayDouble)
- getTotalRoughnessFromSurfaceDistancesMin(self) ORSModel.ors.ArrayDouble
Gets the total roughness min distance based on the surface distance from the center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness range (an ArrayDouble)
- getTotalRoughnessFromSurfaceDistancesRange(self) ORSModel.ors.ArrayDouble
Gets the total roughness range based on the surface distance from the center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness range (an ArrayDouble)
- getTotalRoughnessFromSurfaceDistancesSTD(self) ORSModel.ors.ArrayDouble
Gets the total roughness standart deviation based on the surface distance from the center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness range (an ArrayDouble)
- getTotalRoughnessProxyXY(self) ORSModel.ors.ArrayDouble
Gets the total roughness of the on the XY plane from the center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness on the XY plane (an ArrayDouble)
- getTotalRoughnessProxyXYZ(self) ORSModel.ors.ArrayDouble
Gets the total roughness of the on the XY,YZ, XZ plane from center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness on the XY,YZ, XZ plane (an ArrayDouble)
- getTotalRoughnessProxyXZ(self) ORSModel.ors.ArrayDouble
Gets the total roughness of the on the XY plane from center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness on the XZ plane (an ArrayDouble)
- getTotalRoughnessProxyYZ(self) ORSModel.ors.ArrayDouble
Gets the total roughness of the on the YZ plane from center of mass of label.
- Returns:
output (ORSModel.ors.ArrayDouble) – total roughness on the YZ plane (an ArrayDouble)
- getVarianceVoxelMinMax(self, pMin: float, pMax: float)
- Parameters:
pMin (float) –
pMax (float) –
- getWeightedCenterOfMassIndexXCollection(self) ORSModel.ors.ArrayLONGLONG
Get the the weighted center of mass X index.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getWeightedCenterOfMassIndexYCollection(self) ORSModel.ors.ArrayLONGLONG
Get the the weighted center of mass Y index.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getWeightedCenterOfMassIndexZCollection(self) ORSModel.ors.ArrayLONGLONG
Get the the weighted center of mass Z index.
- Returns:
output (ORSModel.ors.ArrayLONGLONG) – return values equal -1 if the label is empty
- getWeightedCenterOfMassMinMax(self, pXMin: float, pYMin: float, pZMin: float, pXMax: float, pYMax: float, pZMax: float)
- Parameters:
pXMin (float) –
pYMin (float) –
pZMin (float) –
pXMax (float) –
pYMax (float) –
pZMax (float) –
- initializeFor(self, IMultiROI: ORSModel.ors.MultiROI, pStats: int, pCompute2DStats: bool)
- Parameters:
IMultiROI (ORSModel.ors.MultiROI) –
pStats (int) –
pCompute2DStats (bool) –
- none() MultiROIAnalyzer
- Returns:
output (MultiROIAnalyzer) –
- class stats(value)
Bases:
IntEnumAn enumeration.
Node¶
- class ORSModel.ors.Node(*args, **kwargs)
Bases:
ManagedAn abstract class for any object that can be a node in the visualization flow.
- 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
- attachChildAtIndex(self, anINode: ORSModel.ors.Node, index: int) bool
Attaches a child node at a given index.
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)
index (int) – the index (a uint32_t)
- Returns:
output (bool) – true if child was attached, false otherwise
- copyGraph(self) ORSModel.ors.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) ORSModel.ors.List
Returns a flattened list of the child hierarchy of the node.
Note
The child hierarchy is flattened.
Note
Expect a depth first search ordering of the nodes.
- Returns:
output (ORSModel.ors.List) – a list of all nodes below the node (a List)
- getAllChildrenOfClass(self, pProgId: str) ORSModel.ors.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 depth-first.
Note
Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name of the class to test against (a string)
- Returns:
output (ORSModel.ors.List) – a list of nodes (a List)
- getAllChildrenOfClassReachableByRenderer(self, pProgId: str) ORSModel.ors.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).
Note
Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name 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) ORSModel.ors.List
Returns a flattened list of the parent hierarchy of the node.
Note
The parent hierarchy is flattened.
Note
Expect a depth first search ordering of the nodes.
- Returns:
output (ORSModel.ors.List) – a list of all nodes above the node (an List)
- getAllParentsOfClass(self, pProgId: str) ORSModel.ors.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 depth-first.
Note
Use static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name of the class to test against (a string)
- Returns:
output (ORSModel.ors.List) – a list of nodes (an List)
- getChildWithGUID(self, aGUID: str) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.List
Returns the list of immediate child nodes.
- Returns:
output (ORSModel.ors.List) – a list of nodes (an List)
- getChildrenOfClass(self, pProgId: str) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name 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) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name 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) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
See also
ORSModel.ors.Managed.setPrivateTitle(),ORSModel.ors.Managed.getPrivateTitle(),ORSModel.ors.Node.getFirstParentOfClassAndPrivateTitle()- Parameters:
pProgId (str) – the name 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
- getFirstFrameTowardsNode(self, anINode: ORSModel.ors.Node) ORSModel.ors.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 none if no frame is found
- getFirstNodeWithClassNameTowardsNode(self, pProgId: str, anINode: ORSModel.ors.Node) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
See also
ORSModel.ors.Managed.setPrivateTitle(),ORSModel.ors.Managed.getPrivateTitle(),ORSModel.ors.Node.getFirstChildOfClassAndPrivateTitle()- Parameters:
pProgId (str) – the name 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) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name 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) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
See also
ORSModel.ors.Managed.setPrivateTitle(),ORSModel.ors.Managed.getPrivateTitle(),ORSModel.ors.Node.getFirstChildOfClassAndPrivateTitle()- Parameters:
pProgId (str) – the name 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
- getFrameTransformationFromNode(self, towardNode: ORSModel.ors.Node, pTimeStep: int) ORSModel.ors.Matrix4x4
- Parameters:
towardNode (ORSModel.ors.Node) –
pTimeStep (int) –
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getImmediateChildOfClass(self, pProgId: str) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name 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) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name 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) ORSModel.ors.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
- getMaxTSizeOfChilden(self) int
Get Maximum T Size of all children node of this node.
- Returns:
output (int) –
- getParentNodes(self) ORSModel.ors.List
Gets the immediate parent nodes.
- Returns:
output (ORSModel.ors.List) – a list of nodes (a List)
- getParentWithGUID(self, pGUID: str) ORSModel.ors.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) ORSModel.ors.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 static class names to search for objects (e.g. ORS::ReferenceFrame::getClassNameStatic())).
- Parameters:
pProgId (str) – the name of the class to test against (a string)
- Returns:
output (ORSModel.ors.List) – a list of nodes (a List)
- getVisual(self) ORSModel.ors.Visual
- Returns:
output (ORSModel.ors.Visual) – the visual of a model (a Visual)
- isVisibleInView(view: View) bool
Gets the visibility of the receiver in a given view.
- Parameters:
view (ORSModel.ors.View) – The current view
- Returns:
output (bool) – true if the receiver is visible, false otherwise
- none() Node
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Node) –
- propagateChildrenNodesOrganizationDirty(includeSelf=False)
Calls for a propagateDirty with the flag OrsChildrenNodesOrganizationDirty
- Parameters:
includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
- 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 = False)
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
- propagateHighlightDirty(includeSelf=False)
Calls for a propagateDirty with the flag OrsHighlightDirty
- 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)
Causes all 2D views in the parent hierarchy of the node to be refreshed.
- refreshAll2DParentViewsIfVisible(self)
Causes all 2D views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.
- refreshAll3DParentViews(self)
Causes all 3D views in the parent hierarchy of the node to be refreshed.
- refreshAll3DParentViewsIfVisible(self)
Causes all 3D views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.
- refreshAllParentViews(self)
Causes all views in the parent hierarchy of the node to be refreshed.
- refreshAllParentViewsIfVisible(self)
Causes all views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.
- setAllowRenderingInAllParentViews(self, bValue: bool)
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:
anINode1 (ORSModel.ors.Node) – a child node (a Node)
anINode2 (ORSModel.ors.Node) – a child node (a Node)
- 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:
anINode1 (ORSModel.ors.Node) – a parent node (a Node)
anINode2 (ORSModel.ors.Node) – a parent node (a Node)
- Returns:
output (bool) – true if successful, false otherwise
ORSBaseClass¶
- class ORSModel.ors.ORSBaseClass
An abstract class from which all objects issued from the ORS Core Library inherit.
- getPythonTraceBack() List[str]
Set the python traceback for a call from python.
- Returns:
output (List[str]) –
- isManaged(self) bool
- Returns:
output (bool) –
- isNone(self) bool
- Returns:
output (bool) –
- setPythonTraceBack(tb: List[str])
Set the python traceback for a call from python.
- Parameters:
tb (List[str]) –
Octree¶
- class ORSModel.ors.Octree(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Node- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
Octree.__init__(self)
- buildOctreeBox(self, pGrid: ORSModel.ors.UnstructuredGrid, iTIndex: int, bAppend: bool)
- Parameters:
pGrid (ORSModel.ors.UnstructuredGrid) –
iTIndex (int) –
bAppend (bool) –
- buildOctreeBoxMultiThread(self, pGrid: ORSModel.ors.UnstructuredGrid, iTIndex: int, bAppend: bool)
- Parameters:
pGrid (ORSModel.ors.UnstructuredGrid) –
iTIndex (int) –
bAppend (bool) –
- buildPointsOctreeBox(self, pCollection: ORSModel.ors.SequenceableCollection, boxThatContainTheSpheres: ORSModel.ors.Box, iTIndex: int, bAppend: bool, aProgress: ORSModel.ors.Progress)
- Parameters:
pCollection (ORSModel.ors.SequenceableCollection) –
boxThatContainTheSpheres (ORSModel.ors.Box) –
iTIndex (int) –
bAppend (bool) –
aProgress (ORSModel.ors.Progress) –
- buildSpheresOctreeBox(self, pCollection: ORSModel.ors.SequenceableCollection, boxThatContainTheSpheres: ORSModel.ors.Box, iTIndex: int, bAppend: bool, aProgress: ORSModel.ors.Progress)
- Parameters:
pCollection (ORSModel.ors.SequenceableCollection) –
boxThatContainTheSpheres (ORSModel.ors.Box) –
iTIndex (int) –
bAppend (bool) –
aProgress (ORSModel.ors.Progress) –
- getAtomsForPoint(self, x: float, y: float, z: float, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
- Parameters:
x (float) –
y (float) –
z (float) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) –
- getAtomsIntersectingBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle, iTIndex: int) ORSModel.ors.List
- Parameters:
aBoundedPlane (ORSModel.ors.Rectangle) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.List) –
- getAtomsIntersectingBox(self, aBox: ORSModel.ors.Box, iTIndex: int) ORSModel.ors.List
- Parameters:
aBox (ORSModel.ors.Box) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.List) –
- getAtomsIntersectingLine(self, aLine: ORSModel.ors.Line, iTIndex: int) ORSModel.ors.List
- Parameters:
aLine (ORSModel.ors.Line) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.List) –
- getAtomsIntersectingPlane(self, a: float, b: float, c: float, d: float, iTIndex: int) ORSModel.ors.List
- Parameters:
a (float) –
b (float) –
c (float) –
d (float) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.List) –
- getAtomsIntersectingSphere(self, aSphere: ORSModel.ors.Sphere, iTIndex: int) ORSModel.ors.List
- Parameters:
aSphere (ORSModel.ors.Sphere) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.List) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- isEqualTo(self, anOctree: ORSModel.ors.Octree, iTIndex: int) bool
- Parameters:
anOctree (ORSModel.ors.Octree) –
iTIndex (int) –
- Returns:
output (bool) –
OpticalFlow¶
- class ORSModel.ors.OpticalFlow(self)
Bases:
Unmanaged- computeAverageSpeedAndRotation(self, bUsePonderationByIntensityIm1: bool, pAverageSpeedX: float, pAverageSpeedY: float, pAverageSpeedZ: float, pAverageRotationAroundZ: float, pBarycenterX: float, pBarycenterY: float)
- Parameters:
bUsePonderationByIntensityIm1 (bool) –
pAverageSpeedX (float) –
pAverageSpeedY (float) –
pAverageSpeedZ (float) –
pAverageRotationAroundZ (float) –
pBarycenterX (float) –
pBarycenterY (float) –
- computeOpticalFlow(self)
- createGaussianPyramid(self, pIOutChannelsGaussianPyramidIm1: ORSModel.ors.Channel, pIOutChannelsGaussianPyramidIm2: ORSModel.ors.Channel, pNumberOfLevels: int)
- Parameters:
pIOutChannelsGaussianPyramidIm1 (ORSModel.ors.Channel) –
pIOutChannelsGaussianPyramidIm2 (ORSModel.ors.Channel) –
pNumberOfLevels (int) –
- 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) ORSModel.ors.Channel
- Returns:
output (ORSModel.ors.Channel) –
- getChannelIm2(self) ORSModel.ors.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)
- 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)
- Parameters:
x (int) –
y (int) –
z (int) –
- getOriginPixelsIm1(self, x: int, y: int, z: int, t: int)
- Parameters:
x (int) –
y (int) –
z (int) –
t (int) –
- getOriginPixelsIm2(self, x: int, y: int, z: int, t: int)
- Parameters:
x (int) –
y (int) –
z (int) –
t (int) –
- getPatchWindowHalfsize(self, x: int, y: int, z: int)
- Parameters:
x (int) –
y (int) –
z (int) –
- getPerformZReduction(self) bool
- Returns:
output (bool) –
- getSizeImagesPixels(self, x: int, y: int, z: int)
- Parameters:
x (int) –
y (int) –
z (int) –
- getSizePixelsAverageSpeed(self, x: int, y: int, z: int)
- Parameters:
x (int) –
y (int) –
z (int) –
- getUpsampleSpeedToSameSizeAsBaseChannel(self) bool
- Returns:
output (bool) –
- getUseBrightnessCorrectionFactors(self, pValueLinearFactor: bool, pValueConstantFactor: bool)
- 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) ORSModel.ors.Channel
- Returns:
output (ORSModel.ors.Channel) –
- getYSpeed(self) ORSModel.ors.Channel
- Returns:
output (ORSModel.ors.Channel) –
- getZSpeed(self) ORSModel.ors.Channel
- Returns:
output (ORSModel.ors.Channel) –
- none() OpticalFlow
- Returns:
output (OpticalFlow) –
- registration2DTransformation(self, pIBoundingBoxReferenceIm1: ORSModel.ors.Box, pIBoundingBoxSearchArea: ORSModel.ors.Box, minimalDistanceToStopOpticalFlow: float, minimalRotationToStopOpticalFlow: float, maximalNumberOfIterationsOpticalFlow: int, bApplyTransformation: bool, IProgress: ORSModel.ors.Progress) ORSModel.ors.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)
- Parameters:
pIInputChannel (ORSModel.ors.Channel) –
- setChannelIm2(self, pIInputChannel: ORSModel.ors.Channel)
- Parameters:
pIInputChannel (ORSModel.ors.Channel) –
- setFactorRegularizationSpeedCorrection(self, value: float)
- Parameters:
value (float) –
- setLevelsGaussianPyramid(self, minLevel: int, maxLevel: int)
- Parameters:
minLevel (int) –
maxLevel (int) –
- setMaximalConditionValueRegularizedAtransposeA(self, value: float)
- Parameters:
value (float) –
- setOriginPixelsAverageSpeedIm1(self, x: int, y: int, z: int)
- Parameters:
x (int) –
y (int) –
z (int) –
- setOriginPixelsIm1(self, x: int, y: int, z: int, t: int)
- Parameters:
x (int) –
y (int) –
z (int) –
t (int) –
- setOriginPixelsIm2(self, x: int, y: int, z: int, t: int)
- Parameters:
x (int) –
y (int) –
z (int) –
t (int) –
- setPatchWindowHalfsize(self, x: int, y: int, z: int)
- Parameters:
x (int) –
y (int) –
z (int) –
- setPerformZReduction(self, bValue: bool)
- Parameters:
bValue (bool) –
- setSizeImagesPixels(self, x: int, y: int, z: int)
- Parameters:
x (int) –
y (int) –
z (int) –
- setSizePixelsAverageSpeed(self, x: int, y: int, z: int)
- Parameters:
x (int) –
y (int) –
z (int) –
- setUpsampleSpeedToSameSizeAsBaseChannel(self, bValue: bool)
- Parameters:
bValue (bool) –
- setUseBrightnessCorrectionFactors(self, bValueLinearFactor: bool, bValueConstantFactor: bool)
- Parameters:
bValueLinearFactor (bool) –
bValueConstantFactor (bool) –
- setUseRotationAroundZ(self, bValue: bool)
- Parameters:
bValue (bool) –
- setUseTranslationX(self, bValue: bool)
- Parameters:
bValue (bool) –
- setUseTranslationY(self, bValue: bool)
- Parameters:
bValue (bool) –
OrderedCollection¶
- class ORSModel.ors.OrderedCollection(*args, **kwargs)
Bases:
SequenceableCollectionAbstraction class for ordered collections.
- addAll(self, aSequenceableCollection: ORSModel.ors.SequenceableCollection)
- Parameters:
aSequenceableCollection (ORSModel.ors.SequenceableCollection) –
- addAllFirst(self, aSequenceableCollection: ORSModel.ors.SequenceableCollection)
- Parameters:
aSequenceableCollection (ORSModel.ors.SequenceableCollection) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() OrderedCollection
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollection) –
OrderedCollectionChar¶
- class ORSModel.ors.OrderedCollectionChar(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionChar.__init__(self)
- add(self, pValue: int)
- Parameters:
pValue (int) –
- addBeforeIndex(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- addFirst(self, pValue: int)
- Parameters:
pValue (int) –
- at(self, index: int) int
- Parameters:
index (int) –
- Returns:
output (int) –
- atPut(self, index: int, pValue: int)
- 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) –
- includes(self, pValue: int) bool
Return if the array includes a given value.
- Parameters:
pValue (int) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- none() OrderedCollectionChar
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionChar) –
- removeAllOccurrencesOf(self, pValue: int)
- Parameters:
pValue (int) –
OrderedCollectionDouble¶
- class ORSModel.ors.OrderedCollectionDouble(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionDouble.__init__(self)
- add(self, pValue: float)
- Parameters:
pValue (float) –
- addBeforeIndex(self, index: int, pValue: float)
- Parameters:
index (int) –
pValue (float) –
- addFirst(self, pValue: float)
- Parameters:
pValue (float) –
- at(self, index: int) float
- Parameters:
index (int) –
- Returns:
output (float) –
- atPut(self, index: int, pValue: float)
- 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) –
- includes(self, pValue: float) bool
Return if the array includes a given value.
- Parameters:
pValue (float) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: float)
- Parameters:
index (int) –
pValue (float) –
- none() OrderedCollectionDouble
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionDouble) –
- removeAllOccurrencesOf(self, pValue: float)
- Parameters:
pValue (float) –
OrderedCollectionFloat¶
- class ORSModel.ors.OrderedCollectionFloat(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionFloat.__init__(self)
- add(self, pValue: float)
- Parameters:
pValue (float) –
- addBeforeIndex(self, index: int, pValue: float)
- Parameters:
index (int) –
pValue (float) –
- addFirst(self, pValue: float)
- Parameters:
pValue (float) –
- at(self, index: int) float
- Parameters:
index (int) –
- Returns:
output (float) –
- atPut(self, index: int, pValue: float)
- 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) –
- includes(self, pValue: float) bool
Return if the array includes a given value.
- Parameters:
pValue (float) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: float)
- Parameters:
index (int) –
pValue (float) –
- none() OrderedCollectionFloat
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionFloat) –
- removeAllOccurrencesOf(self, pValue: float)
- Parameters:
pValue (float) –
OrderedCollectionLONGLONG¶
- class ORSModel.ors.OrderedCollectionLONGLONG(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionLONGLONG.__init__(self)
- add(self, pValue: int)
- Parameters:
pValue (int) –
- addBeforeIndex(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- addFirst(self, pValue: int)
- Parameters:
pValue (int) –
- at(self, index: int) int
- Parameters:
index (int) –
- Returns:
output (int) –
- atPut(self, index: int, pValue: int)
- 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) –
- includes(self, pValue: int) bool
Return if the array includes a given value.
- Parameters:
pValue (int) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- none() OrderedCollectionLONGLONG
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionLONGLONG) –
- removeAllOccurrencesOf(self, pValue: int)
- Parameters:
pValue (int) –
OrderedCollectionLong¶
- class ORSModel.ors.OrderedCollectionLong(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionLong.__init__(self)
- add(self, pValue: int)
- Parameters:
pValue (int) –
- addBeforeIndex(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- addFirst(self, pValue: int)
- Parameters:
pValue (int) –
- at(self, index: int) int
- Parameters:
index (int) –
- Returns:
output (int) –
- atPut(self, index: int, pValue: int)
- 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) –
- includes(self, pValue: int) bool
Return if the array includes a given value.
- Parameters:
pValue (int) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- none() OrderedCollectionLong
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionLong) –
- removeAllOccurrencesOf(self, pValue: int)
- Parameters:
pValue (int) –
OrderedCollectionShort¶
- class ORSModel.ors.OrderedCollectionShort(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionShort.__init__(self)
- add(self, pValue: int)
- Parameters:
pValue (int) –
- addBeforeIndex(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- addFirst(self, pValue: int)
- Parameters:
pValue (int) –
- at(self, index: int) int
- Parameters:
index (int) –
- Returns:
output (int) –
- atPut(self, index: int, pValue: int)
- 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) –
- includes(self, pValue: int) bool
Return if the array includes a given value.
- Parameters:
pValue (int) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- none() OrderedCollectionShort
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionShort) –
- removeAllOccurrencesOf(self, pValue: int)
- Parameters:
pValue (int) –
OrderedCollectionUnsignedChar¶
- class ORSModel.ors.OrderedCollectionUnsignedChar(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionUnsignedChar.__init__(self)
- add(self, pValue: int)
- Parameters:
pValue (int) –
- addBeforeIndex(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- addFirst(self, pValue: int)
- Parameters:
pValue (int) –
- at(self, index: int) int
- Parameters:
index (int) –
- Returns:
output (int) –
- atPut(self, index: int, pValue: int)
- 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) –
- includes(self, pValue: int) bool
Return if the array includes a given value.
- Parameters:
pValue (int) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- none() OrderedCollectionUnsignedChar
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionUnsignedChar) –
- removeAllOccurrencesOf(self, pValue: int)
- Parameters:
pValue (int) –
OrderedCollectionUnsignedLONGLONG¶
- class ORSModel.ors.OrderedCollectionUnsignedLONGLONG(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionUnsignedLONGLONG.__init__(self)
- add(self, pValue: int)
- Parameters:
pValue (int) –
- addBeforeIndex(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- addFirst(self, pValue: int)
- Parameters:
pValue (int) –
- at(self, index: int) int
- Parameters:
index (int) –
- Returns:
output (int) –
- atPut(self, index: int, pValue: int)
- 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) –
- includes(self, pValue: int) bool
Return if the array includes a given value.
- Parameters:
pValue (int) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- none() OrderedCollectionUnsignedLONGLONG
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionUnsignedLONGLONG) –
- removeAllOccurrencesOf(self, pValue: int)
- Parameters:
pValue (int) –
OrderedCollectionUnsignedLong¶
- class ORSModel.ors.OrderedCollectionUnsignedLong(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionUnsignedLong.__init__(self)
- add(self, pValue: int)
- Parameters:
pValue (int) –
- addBeforeIndex(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- addFirst(self, pValue: int)
- Parameters:
pValue (int) –
- at(self, index: int) int
- Parameters:
index (int) –
- Returns:
output (int) –
- atPut(self, index: int, pValue: int)
- 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) –
- includes(self, pValue: int) bool
Return if the array includes a given value.
- Parameters:
pValue (int) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- none() OrderedCollectionUnsignedLong
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionUnsignedLong) –
- removeAllOccurrencesOf(self, pValue: int)
- Parameters:
pValue (int) –
OrderedCollectionUnsignedShort¶
- class ORSModel.ors.OrderedCollectionUnsignedShort(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
OrderedCollection- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
OrderedCollectionUnsignedShort.__init__(self)
- add(self, pValue: int)
- Parameters:
pValue (int) –
- addBeforeIndex(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- addFirst(self, pValue: int)
- Parameters:
pValue (int) –
- at(self, index: int) int
- Parameters:
index (int) –
- Returns:
output (int) –
- atPut(self, index: int, pValue: int)
- 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) –
- includes(self, pValue: int) bool
Return if the array includes a given value.
- Parameters:
pValue (int) – the value to look for
- Returns:
output (bool) – true or false
- insertAt(self, index: int, pValue: int)
- Parameters:
index (int) –
pValue (int) –
- none() OrderedCollectionUnsignedShort
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrderedCollectionUnsignedShort) –
- removeAllOccurrencesOf(self, pValue: int)
- Parameters:
pValue (int) –
OrientationGizmo¶
- class ORSModel.ors.OrientationGizmo(*args, **kwargs)
Bases:
VisualThe Orientation Gizmo, to visual represent the x,y,z directions.
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getHighlightedFace(self) int
Gets the highlighted face of the orientation indicators.
- Returns:
output (int) – an INT value
- getOrientationIndicatorMode(self) int
Gets the mode of the orientation indicators.
- Returns:
output (int) – an INT value
- getTrackInViewSpace(self) bool
Gets if the gizmo is tracking in view space (world space otherwise).
- Returns:
output (bool) – true if the orientation indicators is tracking in view space
- getVisible(self) bool
Gets the visibility of the orientation indicators.
- Returns:
output (bool) – true if the orientation indicators are visible, false otherwise
- none() OrientationGizmo
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (OrientationGizmo) –
- setHighlightedFace(self, iFace: int)
Sets the highlighted face of the orientation indicators.
- Parameters:
iFace (int) – the face -1: none; 0 ~ n: the face;
- setOrientationIndicatorMode(self, iMode: int)
Sets the mode of the orientation indicators.
- Parameters:
iMode (int) – the mode -1: unknown; 0 ~ n: the mode;
- setTrackInViewSpace(self, bTrack: bool)
Sets if the gizmo is tracking in view space (world space otherwise).
- Parameters:
bTrack (bool) –
- setVisible(self, bVisible: bool)
Sets the visibility of the orientation indicators.
- Parameters:
bVisible (bool) –
OrientedPlane¶
- class ORSModel.ors.OrientedPlane
Bases:
Shape2DOriented plane manipulation services.
- copy(self) ORSModel.ors.OrientedPlane
Gets a copy of the receiver.
- Returns:
output (ORSModel.ors.OrientedPlane) – an oriented plane (an OrientedPlane)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.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)
Initializes the plane from 3 points and an up vector.
Note
The up vector must be perpendicular to the normal vector.
- Parameters:
point0 (ORSModel.ors.Vector3) – The first point (an Vector3)
point1 (ORSModel.ors.Vector3) – The second point (an Vector3)
point2 (ORSModel.ors.Vector3) – The third point (an Vector3)
up (ORSModel.ors.Vector3) – The up vector (an Vector3)
- fromPointAndNormalAndUp(self, point: ORSModel.ors.Vector3, normal: ORSModel.ors.Vector3, up: ORSModel.ors.Vector3)
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:
point (ORSModel.ors.Vector3) – The point of origin (an Vector3)
normal (ORSModel.ors.Vector3) – The normal vector (an Vector3)
up (ORSModel.ors.Vector3) – The up vector (an Vector3)
- 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) ORSModel.ors.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) ORSModel.ors.Vector3
Gets the orientedPlane right direction.
Note
The direction0 vector is normalized.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getDirection1(self) ORSModel.ors.Vector3
Gets the orientedPlane up direction.
Note
The direction0 vector is normalized.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getDirection2(self) ORSModel.ors.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)
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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Vector3
Returns the point of the intersection with the provided planes.
- Parameters:
plane1 (ORSModel.ors.Plane) –
plane2 (ORSModel.ors.Plane) –
- 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) –
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a 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) ORSModel.ors.Vector3
Returns the normal of the plane.
- Returns:
output (ORSModel.ors.Vector3) – A vector (an Vector3)
- getPlane(self) ORSModel.ors.Plane
Gets the plane represented by the receiver.
- Returns:
output (ORSModel.ors.Plane) – a plane (an Plane)
- getPointOnOrientedPlaneClosestToOrigin(self) ORSModel.ors.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) ORSModel.ors.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)
- getRight(self) ORSModel.ors.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) ORSModel.ors.OrientedPlane
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
rotationCenter (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.OrientedPlane) –
- getTransformed(self, aTransformationMatrix: ORSModel.ors.Matrix4x4) ORSModel.ors.OrientedPlane
- Parameters:
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.OrientedPlane) –
- getTranslatedToIncludePoint(self, point: ORSModel.ors.Vector3) ORSModel.ors.OrientedPlane
- Parameters:
point (ORSModel.ors.Vector3) –
- Returns:
output (ORSModel.ors.OrientedPlane) –
- getUp(self) ORSModel.ors.Vector3
Gets the up vector.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- none() OrientedPlane
- Returns:
output (OrientedPlane) –
- rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float)
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)
Sets the A plane value.
- Parameters:
a (float) – the A value (a double)
- setB(self, b: float)
Sets the B plane value.
- Parameters:
b (float) – the B value (a double)
- setC(self, c: float)
Sets the C plane value.
- Parameters:
c (float) – the C value (a double)
- setCenter(self, pCenterVector: ORSModel.ors.Vector3)
Sets the center position.
- Parameters:
pCenterVector (ORSModel.ors.Vector3) – a vector (an Vector3)
- setD(self, d: float)
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)
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)
Sets the up vector.
- Parameters:
upVector (ORSModel.ors.Vector3) – a vector (an Vector3)
- translateToIncludePoint(self, point: ORSModel.ors.Vector3)
- Parameters:
point (ORSModel.ors.Vector3) –
PartialSpaceDijkstra¶
- class ORSModel.ors.PartialSpaceDijkstra(self)
Bases:
Dijkstra- extractBoundaryFromROI(self, aVolROI: ORSModel.ors.ROI)
- Parameters:
aVolROI (ORSModel.ors.ROI) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() PartialSpaceDijkstra
- Returns:
output (PartialSpaceDijkstra) –
- setRadiusOfInterest(self, radius: int)
- Parameters:
radius (int) –
PartialSpaceFastMarching¶
- class ORSModel.ors.PartialSpaceFastMarching(self)
Bases:
FastMarching- extractBoundaryFromROI(self, aVolROI: ORSModel.ors.ROI)
- Parameters:
aVolROI (ORSModel.ors.ROI) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() PartialSpaceFastMarching
- Returns:
output (PartialSpaceFastMarching) –
- setRadiusOfInterest(self, radius: int)
- Parameters:
radius (int) –
Pen¶
- class ORSModel.ors.Pen
Bases:
UnmanagedPen manipulation services.
- copy(self) ORSModel.ors.Pen
Copies aPen.
- Returns:
output (ORSModel.ors.Pen) – A new Pen (an Pen)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Pen
Create aPen from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Pen) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
PerimeterComputation¶
- class ORSModel.ors.PerimeterComputation(self)
Bases:
Unmanaged- computeTotalPerimeterFromOneSliceDataArray(self, sliceData: ORSModel.ors.ArrayUnsignedChar, iSizeX: int, iSizeY: int, dSpacingX: float, dSpacingY: float, occupiedvalue: int) float
- Parameters:
sliceData (ORSModel.ors.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 (ORSModel.ors.Plane) –
iTIndex (int) –
- Returns:
output (float) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- setROI(self, roi: ORSModel.ors.ROI)
- Parameters:
roi (ORSModel.ors.ROI) –
Plane¶
- class ORSModel.ors.Plane
Bases:
Shape2DPlane manipulation services.
- copy(self) ORSModel.ors.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) ORSModel.ors.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)
Initializes the plane from 3 points.
- Parameters:
point0 (ORSModel.ors.Vector3) – The first point (an Vector3)
point1 (ORSModel.ors.Vector3) – The second point (an Vector3)
point2 (ORSModel.ors.Vector3) – The third point (an Vector3)
- fromNPointsLeastMeanSquares(self, aPointCollection: ORSModel.ors.SequenceableCollection)
- Parameters:
aPointCollection (ORSModel.ors.SequenceableCollection) – A sequence of points coordinates.
- fromPointAndNormal(self, point: ORSModel.ors.Vector3, normal: ORSModel.ors.Vector3)
Initializes the plane from an origin point and a normal vector.
- Parameters:
point (ORSModel.ors.Vector3) – The point of origin (an Vector3)
normal (ORSModel.ors.Vector3) – The normal vector (an Vector3)
- 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) ORSModel.ors.Vector3
- Parameters:
aLine (ORSModel.ors.Line) – a line (a Line)
- Returns:
output (ORSModel.ors.Vector3) – a vector (a Vector3) or NULL if not intersection
- getIntersectionWithLineProvidingOutput(self, aLine: ORSModel.ors.Line, aVector3Output: ORSModel.ors.Vector3)
- Parameters:
aLine (ORSModel.ors.Line) – a line (a Line)
aVector3Output (ORSModel.ors.Vector3) – a vector (a Vector3) to fill
- getIntersectionWithLineSegment(self, aLineSegment: ORSModel.ors.LineSegment) ORSModel.ors.Vector3
- 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) ORSModel.ors.Line
- Parameters:
plane (ORSModel.ors.Plane) –
- Returns:
output (ORSModel.ors.Line) –
- getIntersectionWithPlanes(self, plane1: ORSModel.ors.Plane, plane2: ORSModel.ors.Plane) ORSModel.ors.Vector3
Return the point of the intersection of the provided planes and the receiver.
- Parameters:
plane1 (ORSModel.ors.Plane) –
plane2 (ORSModel.ors.Plane) –
- 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
- 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 plane intersects the line, FALSE otherwise (a bool)
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- 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) ORSModel.ors.Vector3
Returns the normal of the plane.
- Returns:
output (ORSModel.ors.Vector3) – A vector (an Vector3)
- getPointOnPlaneClosestToOrigin(self) ORSModel.ors.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) ORSModel.ors.Vector3
- Parameters:
point (ORSModel.ors.Vector3) –
- Returns:
output (ORSModel.ors.Vector3) –
- getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) ORSModel.ors.Plane
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
rotationCenter (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.Plane) –
- getTranslatedToIncludePoint(self, point: ORSModel.ors.Vector3) ORSModel.ors.Plane
- Parameters:
point (ORSModel.ors.Vector3) –
- Returns:
output (ORSModel.ors.Plane) –
- rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float)
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)
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)
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)
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)
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)
- Parameters:
point (ORSModel.ors.Vector3) –
PlaneCollection¶
- class ORSModel.ors.PlaneCollection(*args, **kwargs)
Bases:
VisualRepresents a collection of planes in the view.
- addPlane(self, aPlane: ORSModel.ors.Plane, tIndex: int)
- Parameters:
aPlane (ORSModel.ors.Plane) –
tIndex (int) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getHighlightedPlaneCollection(self, tIndex: int) ORSModel.ors.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) ORSModel.ors.Plane
- Parameters:
planeIndex (int) –
tIndex (int) –
- Returns:
output (ORSModel.ors.Plane) –
- getPlaneCount(self, tIndex: int) int
- Parameters:
tIndex (int) –
- Returns:
output (int) –
- getSelectedColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getSelectedPlaneCollection(self, tIndex: int) ORSModel.ors.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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (PlaneCollection) –
- removePlane(self, planeIndex: int, tIndex: int)
- Parameters:
planeIndex (int) –
tIndex (int) –
- setColor(self, color: ORSModel.ors.Color)
- Parameters:
color (ORSModel.ors.Color) –
- setPlane(self, aPlane: ORSModel.ors.Plane, planeIndex: int, tIndex: int)
- Parameters:
aPlane (ORSModel.ors.Plane) –
planeIndex (int) –
tIndex (int) –
- setSelectedColor(self, color: ORSModel.ors.Color)
- Parameters:
color (ORSModel.ors.Color) –
- setThicknessIn2DView(self, tickness: int)
- Parameters:
tickness (int) –
Progress¶
- class ORSModel.ors.Progress(*args, **kwargs)
Bases:
ManagedAn entity to control progress of lengthy processes.
- closeProgress(self)
- decrementRangeBy(self, iVal: int)
Note
This protocol is only relevant when the progress is not a working progress.
- Parameters:
iVal (int) –
- getAllProgressDisabled() bool
Checks if all the progress subsystem was disabled.
Note
This protocol is used to disable/enable all progress bars.
- Returns:
output (bool) – true if progress was disabled, false otherwise
- getCaption(self) str
Gets the caption.
- Returns:
output (str) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getCurrentProgress(self) int
- Returns:
output (int) –
- getExtraText(self) str
Gets the extra text.
- Returns:
output (str) –
- getID(self) int
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 unsigned short)
- getIsCancellable(self) bool
Gets if the progress is cancellable.
- Returns:
output (bool) – true if progress is cancellable, false otherwise
- getIsCancelled(self) bool
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
Note
This protocol is only relevant when the progress is not a working progress.
- Returns:
output (int) – the range (an uint32_t)
- incrementProgress(self, iIncrement: int)
- Parameters:
iIncrement (int) –
- incrementRangeBy(self, iVal: int)
Note
This protocol is only relevant when the progress is not a working progress.
- Parameters:
iVal (int) –
- none() Progress
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Progress) –
- reset(self)
Reset the progress.
- resetCancelledState(self)
Resets the cancelled state.
- setAllProgressDisabled(bState: bool)
Sets the state of the progress subsystem.
Note
This protocol is used to disable/enable all progress bars.
- Parameters:
bState (bool) –
- setCancelButtonText(self, sText: str)
Sets the text of the cancel button.
- Parameters:
sText (str) –
- setExtraText(self, text: str)
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)
Sets if the progress is cancellable.
- Parameters:
pValue (bool) – true to make the progress cancellable, false otherwise
- setIsCancelled(self, pValue: bool)
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)
Sets if the progress is visible.
- Parameters:
bVisible (bool) –
- startProgressWithCaption(self, sCaption: str, iRange: int, bCancellable: bool)
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)
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)
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)
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)
- Parameters:
iPosition (int) –
Quaternion¶
- class ORSModel.ors.Quaternion
Bases:
UnmanagedA wrapper to a 3D vector.
- add(self, aVector: ORSModel.ors.Quaternion)
Adds a vector to the receiver.
- Parameters:
aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
- copy(self) ORSModel.ors.Quaternion
Returns a new vector identical to the receiver (a copy).
- Returns:
output (ORSModel.ors.Quaternion) –
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Quaternion
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Quaternion) –
- fromAxisAndAngle(self, axis: ORSModel.ors.Vector3, angle: float)
- Parameters:
axis (ORSModel.ors.Vector3) –
angle (float) –
- fromRotationMatrix(self, aRotationMatrix: ORSModel.ors.Matrix4x4)
- Parameters:
aRotationMatrix (ORSModel.ors.Matrix4x4) –
- getAdditionWith(self, aVector: ORSModel.ors.Quaternion) ORSModel.ors.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) ORSModel.ors.Matrix4x4
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getAxis(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getConjugate(self) ORSModel.ors.Quaternion
- Returns:
output (ORSModel.ors.Quaternion) –
- getDirection(self) ORSModel.ors.Vector3
get direction of theQuaternion
- Returns:
output (ORSModel.ors.Vector3) – ORS::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) ORSModel.ors.Quaternion
Computes the lerp with another vector.
See also
ORSModel.ors.Quaternion.getDotProductWith(), getAngleWith(), getDistanceFrom()- 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) ORSModel.ors.Quaternion
multyply the receiver with the givenQuaternion.
See also
ORSModel.ors.Quaternion.setX(),ORSModel.ors.Quaternion.setZ(),ORSModel.ors.Quaternion.setW()- Parameters:
aQuaternion (ORSModel.ors.Quaternion) – a double value
- Returns:
output (ORSModel.ors.Quaternion) –
- getNegated(self) ORSModel.ors.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) ORSModel.ors.Quaternion
- Returns:
output (ORSModel.ors.Quaternion) –
- getOuterProduct(q1: ORSModel.ors.Quaternion, q2: ORSModel.ors.Quaternion) ORSModel.ors.Matrix4x4
- Parameters:
q1 (ORSModel.ors.Quaternion) –
q2 (ORSModel.ors.Quaternion) –
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getScaledBy(self, scaleFactor: float) ORSModel.ors.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) ORSModel.ors.Quaternion
Computes the slerp with another vector.
See also
ORSModel.ors.Quaternion.getDotProductWith(), getAngleWith(), getDistanceFrom()- 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) ORSModel.ors.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) ORSModel.ors.Vector3
get direction of theQuaternion
- Returns:
output (ORSModel.ors.Vector3) – ORS::Vectoupr3
- getW(self) float
Gets the W value from the vector.
See also
ORSModel.ors.Quaternion.getX(),ORSModel.ors.Quaternion.getY(),ORSModel.ors.Quaternion.getW()- Returns:
output (float) – a double
- getX(self) float
Gets the X value from the vector.
See also
ORSModel.ors.Quaternion.getY(),ORSModel.ors.Quaternion.getZ(),ORSModel.ors.Quaternion.getW()- Returns:
output (float) – a double
- getY(self) float
Gets the Y value from the vector.
See also
ORSModel.ors.Quaternion.getX(),ORSModel.ors.Quaternion.getZ(),ORSModel.ors.Quaternion.getW()- Returns:
output (float) – a double
- getZ(self) float
Gets the Z value from the vector.
See also
ORSModel.ors.Quaternion.getX(),ORSModel.ors.Quaternion.getY(),ORSModel.ors.Quaternion.getW()- Returns:
output (float) – a double
- multiply(self, aQuaternion: ORSModel.ors.Quaternion)
multyply the receiver with the givenQuaternion.
See also
ORSModel.ors.Quaternion.setX(),ORSModel.ors.Quaternion.setZ(),ORSModel.ors.Quaternion.setW()- Parameters:
aQuaternion (ORSModel.ors.Quaternion) – a double value
- none() Quaternion
- Returns:
output (Quaternion) –
- normalize(self)
Normalizes the vector.
Note
A normalized vector has norm (length) 1.
- scale(self, scaleFactor: float)
Scales the vector.
- Parameters:
scaleFactor (float) – a scale factor (a double)
- setW(self, value: float)
Sets the Y value of the vector.
See also
ORSModel.ors.Quaternion.setX(),ORSModel.ors.Quaternion.setZ(),ORSModel.ors.Quaternion.setW()- Parameters:
value (float) – a double value
- setX(self, value: float)
Sets the X value of the vector.
See also
ORSModel.ors.Quaternion.setY(),ORSModel.ors.Quaternion.setZ(),ORSModel.ors.Quaternion.setW()- Parameters:
value (float) – a double value
- setXYZ(self, x: float, y: float, z: float)
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)
Sets the Y value of the vector.
See also
ORSModel.ors.Quaternion.setX(),ORSModel.ors.Quaternion.setZ(),ORSModel.ors.Quaternion.setW()- Parameters:
value (float) – a double value
- setZ(self, value: float)
Sets the Z value of the vector.
See also
ORSModel.ors.Quaternion.setX(),ORSModel.ors.Quaternion.setY(),ORSModel.ors.Quaternion.setW()- Parameters:
value (float) – a double value
- subtract(self, aVector: ORSModel.ors.Quaternion)
Subtracts a vector from the receiver.
- Parameters:
aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
RBFRectangle¶
- class ORSModel.ors.RBFRectangle
Bases:
SurfaceControlPointsRBFRectangle manipulation services.
- copy(self) ORSModel.ors.RBFRectangle
Copies aRBFRectangle.
Note
The copied RBFRectangle has the same equation as the source RBFRectangle.
- Returns:
output (ORSModel.ors.RBFRectangle) – A new RBFRectangle (an RBFRectangle)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.RBFRectangle
Create aRBFRectangle from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.RBFRectangle) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getIsEqualTo(self, RBFRectangle: ORSModel.ors.RBFRectangle) bool
Verifies equality between the receiver and a givenRBFRectangle.
- Parameters:
RBFRectangle (ORSModel.ors.RBFRectangle) –
- Returns:
output (bool) – TRUE if the argument RBFRectangle is equal to the receiver, FALSE otherwise
- getRectangle(self) ORSModel.ors.Rectangle
- Returns:
output (ORSModel.ors.Rectangle) –
- interpolateMap(self, map: ORSModel.ors.Channel, iTIndex: int) bool
- Parameters:
map (ORSModel.ors.Channel) –
iTIndex (int) –
- Returns:
output (bool) –
- none() RBFRectangle
- Returns:
output (RBFRectangle) –
- setRectangle(self, aRectangle: ORSModel.ors.Rectangle)
- Parameters:
aRectangle (ORSModel.ors.Rectangle) –
- transform(self, transformationMatrix: ORSModel.ors.Matrix4x4)
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)
ROI¶
- class ORSModel.ors.ROI(*args, **kwargs)
Bases:
StructuredGridA region of interest that can be used to highlight, extract, or modify portions of a dataset.
ROI (Region of Interest) provides functionality to manipulate and visualize specific portions of a dataset. Each ROI instance maintains its own:
Color properties
Opacity settings
Visual state
Selection state
Note
There is a system limitation of 255 simultaneously visible ROIs.
See also
VisualChannel
See also
MeshFacesROI
- adaptToChannel(self, pChannel: ORSModel.ors.Channel, x: int, y: int, z: int, pTSourceOffset: int, pTRange: int)
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)
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)
Add a 2D polygon from aVisualPath to the ROI.
- Parameters:
path (ORSModel.ors.VisualPath) –
box (ORSModel.ors.Box) –
plane (ORSModel.ors.Plane) –
includeAllTouchingVoxel (bool) –
inverse (bool) –
bRemove (bool) –
IProgress (ORSModel.ors.Progress) –
tStep (int) –
- 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)
Add a 3D polygon from aVisualPath to the ROI.
- Parameters:
path (ORSModel.ors.VisualPath) –
box (ORSModel.ors.Box) –
plane (ORSModel.ors.Plane) –
includeAllTouchingVoxel (bool) –
inverse (bool) –
bRemove (bool) –
IProgress (ORSModel.ors.Progress) –
tStep (int) –
- addEllipse2D(self, plane: ORSModel.ors.Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: ORSModel.ors.Progress, tStep: int)
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)
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)
Adds a line to theROI.
Note
Note that the range values are inclusive.
See also
addSphere(), removeSphere(), removeSphereWithinRange()
- Parameters:
pLine (ORSModel.ors.Line) – None
tStep (int) – step
- addLineIfInRange(self, pLine: ORSModel.ors.Line, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel)
Note
Note that the range values are inclusive.
See also
addSphere(), removeSphere(), removeSphereWithinRange()
- 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)
Adds a line segment to theROI.
See also
addSphere(), removeSphere(), removeSphereWithinRange()
- Parameters:
lineSegment (ORSModel.ors.LineSegment) – the line to remove (an Line)
tStep (int) – the time step (a uint32_t)
- addLineSegmentIfInRange(self, lineSegment: ORSModel.ors.LineSegment, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel)
Note
Note that the range values are inclusive.
See also
addSphere(), removeSphere(), removeSphereWithinRange()
- 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)
Add aVisualPath contour to the ROI.
- Parameters:
aPath (ORSModel.ors.VisualPath) –
aBox (ORSModel.ors.Box) –
tStep (int) –
- addPolygon2D(self, ptsList: float, ptsListSize: int, plane: ORSModel.ors.Plane, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: ORSModel.ors.Progress, tStep: int)
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)
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)
Note
The ROI to add will be projected correctly if it doesn’t share the same characteristics.
See also
MergeWithROI()
- Parameters:
aROI (ORSModel.ors.ROI) – the ROI to add (an ROI)
- addROIAtTimeStepAtTOffset(self, aROI: ORSModel.ors.ROI, timeIndex: int, pTOffset: int)
Note
The ROI to add will be projected correctly if it doesn’t share the same characteristics.
See also
AddROI(), MergeWithROI()
- 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)
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)
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) ORSModel.ors.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)
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.
See also
addVoxelList(),
ORSModel.ors.ROI.addVoxels(),ORSModel.ors.ROI.removeVoxel(), removeVoxelList(),ORSModel.ors.ROI.removeVoxels()- Parameters:
index (int) –
- addVoxelFromWorldCoordinates(self, pVect: ORSModel.ors.Vector3, timeIndex: int)
Adds point (supplied in the form of world vector) to theROI.
- Parameters:
pVect (ORSModel.ors.Vector3) – pVect
timeIndex (int) – the T index (a uint32_t)
- addVoxelIndicesToROIIfInRange(self, indices: int, indicesSize: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel)
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)
Add voxel intersecting bounded plane.
- Parameters:
aPlane (ORSModel.ors.Rectangle) –
tStep (int) –
- addVoxelInterval(self, iStart: int, iEnd: int)
Note
Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
See also
ORSModel.ors.ROI.addVoxel(), addVoxelList(),ORSModel.ors.ROI.removeVoxel(), removeVoxelList(),ORSModel.ors.ROI.removeVoxels(),ORSModel.ors.ROI.removeVoxelInterval()- Parameters:
iStart (int) –
iEnd (int) –
- addVoxelIntervals(self, pIntervalArray: int, pNumberOfIntervals: int)
Note
Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
See also
ORSModel.ors.ROI.addVoxel(), addVoxelList(),ORSModel.ors.ROI.removeVoxel(), removeVoxelList(),ORSModel.ors.ROI.removeVoxels(),ORSModel.ors.ROI.removeVoxelInterval()- Parameters:
pIntervalArray (int) –
pNumberOfIntervals (int) –
- addVoxelIntervalsFromArray(self, pIntervals: ORSModel.ors.ArrayLONGLONG)
- Parameters:
pIntervals (ORSModel.ors.ArrayLONGLONG) –
- addVoxels(self, indices: int, indicesSize: int)
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.
See also
ORSModel.ors.ROI.addVoxel(), addVoxelList(),ORSModel.ors.ROI.removeVoxel(),ORSModel.ors.ROI.removeVoxels()- Parameters:
indices (int) – the number of indicies in the array (a int64_t)
indicesSize (int) –
ROI.addVoxels(self, indices: ORSModel.ors.ArrayLONGLONG)
Adds a list of voxels.
- Parameters:
indices (ORSModel.ors.ArrayLONGLONG) – an array of indices
- addVoxelsFromWorldCoordinates(self, worldPositionArray: ORSModel.ors.ArrayDouble, timeIndex: int)
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)
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)
- clear(self)
Empties all voxel data from the region of interest.
- clearTimeStepRange(self, pTimeStepStart: int, pTimeStepEnd: int)
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:
threshold (float) – distance threshold
progress (ORSModel.ors.Progress) – progress object
- Returns:
closedROI (ORSModel.ors.ROI) – a new ROI
- computeAnisotropyAtLocationFromMIL(self, iTIndex: int, centerPositionRCS: ORSModel.ors.Vector3, lengthToAnalyze: float, samplingDistance: float, countOrientations: int)
Note
to call this method from Python, use this syntax: eigenvectorMax = Vector3(); eigenvectorMid = Vector3(); eigenvectorMin = Vector3(); fabricTensor = Matrix4x4(); arrayOrientedMeanInterceptLengths = ArrayDouble(); anisotropy, eigenvalueMax, eigenvalueMid, eigenvalueMin = aROI.computeAnisotropyAtLocationFromMIL(0, Vector3(0.1, 1.1, 2.1), 0.1, 0.001, 5000, eigenvectorMax, eigenvectorMid, eigenvectorMin, fabricTensor, arrayOrientedMeanInterceptLengths)
- Parameters:
iTIndex (int) – the T index (a uint32_t)
centerPositionRCS (ORSModel.ors.Vector3) – the location of the star (a Vector3)
lengthToAnalyze (float) – the distance to analyze per orientation (a double)
samplingDistance (float) – the distance between each sample on the line of analysis (a double)
countOrientations (int) – the count of lines to analyze (a uint32_t)
- Returns:
anisotropy (float) – the anisotropy (a double*)
eigenvectorMax (ORSModel.ors.Vector3) – the normalized eigenvector associated to the longest axis of the ellipsoid (a Vector3)
eigenvalueMax (float) – the eigenvalue associated to the longest axis of the ellipsoid (a double*)
eigenvectorMid (ORSModel.ors.Vector3) – the normalized eigenvector associated to the medium axis of the ellipsoid (a Vector3)
eigenvalueMid (float) – the eigenvalue associated to the medium axis of the ellipsoid (a double*)
eigenvectorMin (ORSModel.ors.Vector3) – the normalized eigenvector associated to the smallest axis of the ellipsoid (a Vector3)
eigenvalueMin (float) – the eigenvalue associated to the smallest axis of the ellipsoid (a double*)
fabricTensor (ORSModel.ors.Matrix4x4) – the fabric tensor used to compute the eigenvectors and eigenvalues (a Matrix4x4)
arrayOrientedMeanInterceptLengths (ORSModel.ors.ArrayDouble) – the array of the oriented mean intercept lengths (X, Y, Z for each orientation) used to compute the fabric tensor (an ArrayDouble)
- 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
- 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
- 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) bool
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)
- Returns:
output (bool) – true if the computation was completed successfully, false otherwise
- 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) bool
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 uint16_t)
IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (bool) – true if the computation was completed successfully, false otherwise
- computeDenseGraph(self, IProgress: ORSModel.ors.Progress) ORSModel.ors.Graph
Computes the graph of theROI’s connectivity.
Note
The receiver ROI should already be skeletonized. The receiver should be a proper skeleton without any surface
- Parameters:
IProgress (ORSModel.ors.Progress) – a progress object (an Progress)
- Returns:
output (ORSModel.ors.Graph) – graph of the ROI’s connectivity
- computeGraph(self, IProgress: ORSModel.ors.Progress) ORSModel.ors.Graph
Computes the graph of theROI’s connectivity.
Note
The receiver ROI should already be skeletonized. The receiver should be a proper skeleton without any surface
- 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) bool
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)
- Returns:
output (bool) – true if the computation was completed successfully, false otherwise
- computeVoxelBasedDenseGraph(self, IProgress: ORSModel.ors.Progress) ORSModel.ors.Graph
- Parameters:
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.Graph) –
- 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:
- copyInto(self, aROI: ORSModel.ors.ROI)
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)
- Parameters:
inputChannel (ORSModel.ors.Channel) –
volumeToGrowIn (ORSModel.ors.Box) –
volumeOfTheGrow (float) –
timeStep (int) –
- dilate(self, pNumberOfIterations: int, pTimeStep: int, progress: ORSModel.ors.Progress)
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)
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)
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.
See also
hasSameSpatialBoxAsROI()
- Parameters:
aROI (ORSModel.ors.ROI) – a ROI (an ROI)
- Returns:
output (bool) – true if swap was successful, false otherwise
- executeGPGPUCommand(self, outputROI: ORSModel.ors.ROI, shaderFilename: str, Slabsize: int, iNbIteration: int, numericArguments: dict, iKernelSize: int) ORSModel.ors.ROI
Compute given compute shader program on anROI.
- Parameters:
outputROI (ORSModel.ors.ROI) – the result ROI (an ORS::ROI)
shaderFilename (str) – filename of the compute shader program (a string)
Slabsize (int) – the number of images in the input slab (an uint32_t)
iNbIteration (int) – number of iteration to run the program (an uint32_t)
numericArguments (dict) –
iKernelSize (int) –
- Returns:
output (ORSModel.ors.ROI) –
- fillAllInnerHoles2DAlongDirection(self, dirX: float, dirY: float, dirZ: float, considerDiagonal: bool)
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)
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)
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)
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)
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)
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)
Extracts indicies in the form of intervals.
- Returns:
pOutputLow (ORSModel.ors.ArrayUnsignedLong) – an output array for lower indicies (an ArrayUnsignedLong)
pOutputHigh (ArrayLONGLONG) – an output array for higher indicies (an ArrayLONGLONG)
- generateAnalyzer(self, aTimeStep: int, inputChannel: ORSModel.ors.Channel, useLinearInterpolation: bool, longestDistance: bool, longestSegment: bool, inertiaTensorPrincipalComponent: bool, surfaceArea: bool, centerOfMass: bool, IProgress: ORSModel.ors.Progress) ORSModel.ors.ROIAnalyzer
- Parameters:
aTimeStep (int) –
inputChannel (ORSModel.ors.Channel) –
useLinearInterpolation (bool) –
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 = 5) 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) ORSModel.ors.Mesh
Note
If a target Mesh is supplied, data is written to it and returned, otherwise a new Mesh is created.
- Parameters:
bWorld (bool) – an optional target mesh model (an Mesh)
IProgress (ORSModel.ors.Progress) –
IInMesh (ORSModel.ors.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) ORSModel.ors.Mesh
Note
If a target Mesh is supplied, data is written to it and returned, otherwise a new Mesh is created.
- Parameters:
bWorld (bool) – the TimeStep to extract (a uint32_t)
timeStep (int) – a progress object or NULL to show no progress (an Progress)
IProgress (ORSModel.ors.Progress) – an optional target mesh model (an Mesh)
IInMesh (ORSModel.ors.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) ORSModel.ors.Mesh
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)
pMesh (ORSModel.ors.Mesh) – an optional output mesh model (an Mesh)
- Returns:
output (ORSModel.ors.Mesh) – the resulting mesh model (an Mesh)
- getAsNDArray(timestep=0)
Get a numpy nd array representation
- Parameters:
timestep (int) – timestep to analyse
- getAsROIClipped(self, minX: int, minY: int, minZ: int, minT: int, maxX: int, maxY: int, maxZ: int, maxT: int, aROI: ORSModel.ors.ROI) ORSModel.ors.ROI
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)
- getAsROICloseWithKernelOnSpecificSlices(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int, axis: int, indices: ORSModel.ors.SequenceableCollection, progress: ORSModel.ors.Progress) ORSModel.ors.ROI
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:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (an ROI)
pTimeStep (int) – the time step (a uint32_t)
axis (int) – the axis of the specified slices (x=0,y=1,z=2) (a uint8_t)
indices (ORSModel.ors.SequenceableCollection) – the slices to work on (an SequenceableCollection)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getAsROIClosedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int) ORSModel.ors.ROI
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:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (an ROI)
pTimeStep (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getAsROICorrelatedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, threshold: float, pTimeStep: int, pROIMask: ORSModel.ors.ROI, progress: ORSModel.ors.Progress, pInRoi: ORSModel.ors.ROI) ORSModel.ors.ROI
Correlates theROI with a supplied 3D kernel.
Note
This method can be used to smooth the ROI by providing a smoothing kernel (e.g. with a gaussian distribution).
Note
If a mask is provided, its T size should be 1.
Note
All voxels of the input ROI not in the mask are copied into the output ROI.
Note
If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.
- Parameters:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
threshold (float) – the threshold value (a double). The output ROI will contain this voxel if the result of the correlation at that voxel is greater than or equal to this threshold value.
pTimeStep (int) – the time step of the receiver ROI to smooth (a uint32_t)
pROIMask (ORSModel.ors.ROI) – an optional mask (a ROI)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (a ROI)
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (a ROI)
- getAsROIDilatedWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int, progress: ORSModel.ors.Progress) ORSModel.ors.ROI
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:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (an ROI)
pTimeStep (int) – the time step (a uint32_t)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getAsROIDilatedWithKernelOnSpecificSlices(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int, axis: int, indices: ORSModel.ors.SequenceableCollection, progress: ORSModel.ors.Progress) ORSModel.ors.ROI
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:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (an ROI)
pTimeStep (int) – the time step (a uint32_t)
axis (int) – the axis of the specified slices (x=0,y=1,z=2) (a uint8_t)
indices (ORSModel.ors.SequenceableCollection) – the slices to work on (an SequenceableCollection)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- 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) ORSModel.ors.ROI
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:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (an ROI)
pTimeStep (int) – the time step (a uint32_t)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getAsROIErodedWithKernelOnSpecificSlices(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int, axis: int, indices: ORSModel.ors.SequenceableCollection, progress: ORSModel.ors.Progress) ORSModel.ors.ROI
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:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (an ROI)
pTimeStep (int) – the time step (a uint32_t)
axis (int) – the axis of the specified slices (x=0,y=1,z=2) (a uint8_t)
indices (ORSModel.ors.SequenceableCollection) – the slices to work on (an SequenceableCollection)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getAsROIFromTimeStepsUnion(self, pTimeStep1: int, pTimeStep2: int, anOutputROI: ORSModel.ors.ROI) ORSModel.ors.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 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) ORSModel.ors.ROI
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) – an X voxel offset (a uint32_t)
xOffset (int) – a Y voxel offset (a uint32_t)
yOffset (int) – a Z voxel offset (a uint32_t)
zOffset (int) – an optional output ROI (an ROI)
pTargetROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getAsROIOpenWithKernel(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int) ORSModel.ors.ROI
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:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (an ROI)
pTimeStep (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getAsROIOpenWithKernelOnSpecificSlices(self, pKernel: ORSModel.ors.ConvolutionKernel, pInRoi: ORSModel.ors.ROI, pTimeStep: int, axis: int, indices: ORSModel.ors.SequenceableCollection, progress: ORSModel.ors.Progress) ORSModel.ors.ROI
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:
pKernel (ORSModel.ors.ConvolutionKernel) – the kernel (an ConvolutionKernel)
pInRoi (ORSModel.ors.ROI) – an optional output ROI (an ROI)
pTimeStep (int) – the time step (a uint32_t)
axis (int) – the axis of the specified slices (x=0,y=1,z=2) (a uint8_t)
indices (ORSModel.ors.SequenceableCollection) – the slices to work on (an SequenceableCollection)
progress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getAsROIThinned(self, aROI: ORSModel.ors.ROI) ORSModel.ors.ROI
- Parameters:
aROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.ROI) –
- getBoxGrownToContainVoxels(self, aBox: ORSModel.ors.Box, timeStep: int) ORSModel.ors.Box
Grow the given box so that it include all the voxels of the specified time step.
- Parameters:
aBox (ORSModel.ors.Box) – the box to grow
timeStep (int) –
- Returns:
output (ORSModel.ors.Box) – the resulting Box (a Box)
- getCenterOfMass(self, pTimeStep: int) ORSModel.ors.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)
- Parameters:
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) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getClipBox(timestep=0, display=None)
Gets the clip box of the ROI or of the MultiROI
- Parameters:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- 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:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- Returns:
clipOriginSummit (ORSModel.ors.Vector3) – the origin summit of the clip box
clipOppositeSummit (ORSModel.ors.Vector3) – the origin opposite summit of the clip box
- getConnectedComponent(self, iTIndex: int, considerDiagonal: bool, IProgress: ORSModel.ors.Progress, pInData: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
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)
- Parameters:
pPlane (ORSModel.ors.Plane) –
nTimeStep (int) –
pfPoints (ORSModel.ors.Array) –
- getContour2(self, pBoundedPlane: ORSModel.ors.Rectangle, nTimeStep: int, pfPoints: ORSModel.ors.Array)
- Parameters:
pBoundedPlane (ORSModel.ors.Rectangle) –
nTimeStep (int) –
pfPoints (ORSModel.ors.Array) –
- getContourOrdered(self, pPlane: ORSModel.ors.Plane, nTimeStep: int, pfPoints: ORSModel.ors.Array, pnIndexes: ORSModel.ors.ArrayLong)
- Parameters:
pPlane (ORSModel.ors.Plane) –
nTimeStep (int) –
pfPoints (ORSModel.ors.Array) –
pnIndexes (ORSModel.ors.ArrayLong) –
- getContourOrdered2(self, pBoundedPlane: ORSModel.ors.Rectangle, nTimeStep: int, pfPoints: ORSModel.ors.Array, pnIndexes: ORSModel.ors.ArrayLong)
- Parameters:
pBoundedPlane (ORSModel.ors.Rectangle) –
nTimeStep (int) –
pfPoints (ORSModel.ors.Array) –
pnIndexes (ORSModel.ors.ArrayLong) –
- getEndPoints(self, aROI: ORSModel.ors.ROI) ORSModel.ors.ROI
- Parameters:
aROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.ROI) –
- getFeretBox(self, iTIndex: int, iAngleSampling: int = 5) ORSModel.ors.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 (ORSModel.ors.Box) –
- getFromTimeStepRange(self, pTimeStepStart: int, pTimeStepEnd: int, anOutputROI: ORSModel.ors.ROI) ORSModel.ors.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) ORSModel.ors.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)
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:
first (ORSModel.ors.Vector3) –
second (ORSModel.ors.Vector3) –
third (ORSModel.ors.Vector3) –
pTimeStep (int) –
- getInitialColor(self) ORSModel.ors.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
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)
- getInterfacialSurfaceAsCubicMesh(self, pOtherROI: ORSModel.ors.ROI, iTIndex: int, bWorld: bool, pProgress: ORSModel.ors.Progress) ORSModel.ors.Mesh
Generates the interface surface between 2 ROIs as a cubic mesh.
Note
This algorithm assume that ROIs do not contain intersecting voxel.
- Parameters:
pOtherROI (ORSModel.ors.ROI) – other ROI that share an interface with the current one (a ROI)
iTIndex (int) – the T index (a uint32_t)
bWorld (bool) – true to have the resulting mesh model in world coordinates, false in local (a bool)
pProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (ORSModel.ors.Mesh) –
- getInterfacialSurfaceAsMarchingCubesMesh(self, pOtherROI: ORSModel.ors.ROI, iTIndex: int, xSample: int, ySample: int, zSample: int, bWorld: bool, pProgress: ORSModel.ors.Progress) ORSModel.ors.Mesh
Generates the interface surface between 2 ROIs as a marching cubes mesh.
Note
This algorithm assume that ROIs do not contain intersecting voxel.
- Parameters:
pOtherROI (ORSModel.ors.ROI) – other ROI that share an interface with the current one (a ROI)
iTIndex (int) – the T index (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)
bWorld (bool) – true to have the resulting mesh model in world coordinates, false in local (a bool)
pProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (ORSModel.ors.Mesh) –
- getIntersectionCountWithROI(self, aROI: ORSModel.ors.ROI) int
Note
if the ROI provided does not have the same shape as the receiver, the count is zero.
- Parameters:
aROI (ORSModel.ors.ROI) – the ROI to intersect with (an ROI)
- Returns:
output (int) – number of common voxels
- getIntersectionWithROI(self, aROI: ORSModel.ors.ROI, anOutputROI: ORSModel.ors.ROI) ORSModel.ors.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:
aROI (ORSModel.ors.ROI) – the ROI to intersect with (an ROI)
anOutputROI (ORSModel.ors.ROI) – the output ROI (an ROI), see note below
- Returns:
output (ORSModel.ors.ROI) – the intersected ROI
- getIsAreaFull(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int) bool
Queries theROI to know if the specific range of indicies is full.
- 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 all data within the range (inclusive), false otherwise
- getIsClipped(timestep=0, display=None)
Gets to know if there is a clip box attached to the ROI or MultiROI
- Parameters:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- 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
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, perSlice: bool, IProgress: ORSModel.ors.Progress, pInData: ORSModel.ors.MultiROI) ORSModel.ors.MultiROI
Note
This method labels areas of the ROI by finding adjacent voxels and labelling them with sequential numbering.
Note
The perSlice parameter is useful when loading a time series of 2d images as a 3d volume.
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
perSlice (bool) – if True, labelling will only apply within an xy slice.
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) ORSModel.ors.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) ORSModel.ors.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)
- getMarchingCubeSurfaceFromWeightedVoxelEstimation(self, timeStep: int, progressBar: ORSModel.ors.Progress) float
Note
For more details about the algorithm, see Lorensen, William E.; Cline, Harvey E. (1 August 1987). “Marching cubes: A high resolution 3D surface construction algorithm”. ACM SIGGRAPH Computer Graphics. 21 (4): 163–169. CiteSeerX 10.1.1.545.613. doi:10.1145/37402.37422.
- 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 marching cube surface area (a double)
- 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
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
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
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) –
- getNDArray(timestep=0)
Get a numpy nd array representation
- Parameters:
timestep (int) – timestep to analyse
Deprecated since version 2021.1: use getAsNDArray instead
- getProjectionIn(self, pChannel: ORSModel.ors.Channel, sourceTimeOffset: int, pProgress: ORSModel.ors.Progress) ORSModel.ors.ROI
Note
If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.
- Parameters:
pChannel (ORSModel.ors.Channel) – the target channel (an Channel)
sourceTimeOffset (int) – a progress object (an Progress) or NULL for no progress
pProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.ROI) – the resulting ROI (an ROI)
- getReversed(self, pTargetROI: ORSModel.ors.ROI) ORSModel.ors.ROI
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)
- getSampledLineOfNPoints(self, pPoint1: ORSModel.ors.Vector3, pPoint2: ORSModel.ors.Vector3, timeStep: int, nbOutputPoint: int, samples: ORSModel.ors.ArrayDouble) ORSModel.ors.ArrayDouble
- Parameters:
pPoint1 (ORSModel.ors.Vector3) – a starting coordinate (an ORSVector3Ptr)
pPoint2 (ORSModel.ors.Vector3) – an ending coordinate (an ORSVector3Ptr)
timeStep (int) – the T index (a uint32_t)
nbOutputPoint (int) – the number of points to take between the two points
samples (ORSModel.ors.ArrayDouble) – the ArrayDoubleToPopulate
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getSimplePoints(self, aROI: ORSModel.ors.ROI) ORSModel.ors.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) ORSModel.ors.ROI
- Parameters:
aROI (ORSModel.ors.ROI) –
aResultMesh (ORSModel.ors.Mesh) –
aSurfaceMesh (ORSModel.ors.Mesh) –
- Returns:
output (ORSModel.ors.ROI) –
- getSliceAsNDArray(sliceIndex: int = 0, timestep: int = 0)
Get a numpy nd array representation
- Parameters:
sliceIndex (int) – slice to extract
timestep (int) – timestep to extract
- getStandardDeviationSourceDataValue(self, pTimeStep: int, pInputData: ORSModel.ors.Channel) float
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) ORSModel.ors.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:
aROI (ORSModel.ors.ROI) – the ROI to subtract (an ROI)
pOutputROI (ORSModel.ors.ROI) – the output ROI (an ROI), see note below
- Returns:
output (ORSModel.ors.ROI) – the subtracted ROI
- getSurface(self, timeStep: int) float
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
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
- 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 uint64_t)
- getUnionWithROI(self, aROI: ORSModel.ors.ROI, iTOffset: int, anOutputROI: ORSModel.ors.ROI) ORSModel.ors.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).
See also
- Parameters:
aROI (ORSModel.ors.ROI) – the ROI to merge with (an ROI)
iTOffset (int) – the output ROI (an ROI), see note below
anOutputROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.ROI) – the merged ROI
- getVolume(self, timeStep: int) float
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
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 uint64_t)
- getVoxelsNeighborCountGreaterThanOrEqualTo(self, neighborCount: int, pProgress: ORSModel.ors.Progress) ORSModel.ors.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
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) –
- 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: bytes, bForceSingleThread: bool, bAlignMultiThreadingToZ: bool, createMultiThreadDataFunction: int)
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) – any user data to be supplied to the callback function
userdata (bytes) – true to force single threaded execution, false to have it multi-threaded
bForceSingleThread (bool) – true to align multi-thread execution to Z slices, false to align to nothing
bAlignMultiThreadingToZ (bool) – a callback function to create multithread data (the address of a ORSVOLUMEROIITERATORCREATETHREADDATA function)
createMultiThreadDataFunction (int) –
- iterateXYZTIntervals(self, callbackFunction: int, userdata: bytes, bForceSingleThread: bool, bAlignMultiThreadingToZ: bool, createMultiThreadDataFunction: int)
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) ORSModel.ors.ROI
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 uint32_t)
y (int) – an Y offset (an uint32_t)
z (int) – a Z offset (an uint32_t)
- Returns:
output (ORSModel.ors.ROI) – a new ROI (an ROI)
- none() ROI
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ROI) –
- projectInShape(self, aShape: ORSModel.ors.Shape3D, sourceTime: int, outputROI: ORSModel.ors.ROI, destinationTime: int) ORSModel.ors.ROI
- Parameters:
aShape (ORSModel.ors.Shape3D) –
sourceTime (int) –
outputROI (ORSModel.ors.ROI) –
destinationTime (int) –
- Returns:
output (ORSModel.ors.ROI) –
- removeAllVoxelsIfInRange(self, timeStep: int, minValue: float, maxValue: float, pChannel: ORSModel.ors.Channel)
- Parameters:
timeStep (int) –
minValue (float) –
maxValue (float) –
pChannel (ORSModel.ors.Channel) –
- removeAllVoxelsIfNotInRange(self, timeStep: int, minValue: float, maxValue: float, pChannel: ORSModel.ors.Channel)
- Parameters:
timeStep (int) –
minValue (float) –
maxValue (float) –
pChannel (ORSModel.ors.Channel) –
- removeCircleArea(self, posX: float, posY: float, posZ: float, normalX: float, normalY: float, normalZ: float, radius: float, tStep: int)
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)
Removes a line from theROI.
See also
addSphere(), removeSphere(), removeSphereWithinRange()
- 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)
Note
Note that the range values are inclusive.
See also
addSphere(), removeSphere(), removeSphereWithinRange()
- 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)
Removes a line segment from theROI.
See also
addSphere(), removeSphere(), removeSphereWithinRange()
- 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)
Note
Note that the range values are inclusive.
See also
addSphere(), removeSphere(), removeSphereWithinRange()
- 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)
- Parameters:
aROI (ORSModel.ors.ROI) –
- removeSimplePointsWithDistanceMap(self, seedPointROI: ORSModel.ors.ROI, spaceChannel: ORSModel.ors.Channel, outputROI: ORSModel.ors.ROI) ORSModel.ors.ROI
- Parameters:
seedPointROI (ORSModel.ors.ROI) –
spaceChannel (ORSModel.ors.Channel) –
outputROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.ROI) –
- removeVoxel(self, index: int)
Note
Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
See also
ORSModel.ors.ROI.addVoxel(),ORSModel.ors.ROI.addVoxels(), addVoxelList(), removeVoxelList(),ORSModel.ors.ROI.removeVoxels()- Parameters:
index (int) –
- removeVoxelIndicesFromROIIfInRange(self, indices: int, indicesSize: int, lowerThreshold: float, upperThreshold: float, pChannel: ORSModel.ors.Channel)
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)
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.
See also
ORSModel.ors.ROI.addVoxel(), addVoxelList(),ORSModel.ors.ROI.removeVoxel(), removeVoxelList(),ORSModel.ors.ROI.removeVoxels(),ORSModel.ors.ROI.addVoxelInterval()- Parameters:
iStart (int) –
iEnd (int) –
- removeVoxelIntervals(self, pIntervalArray: int, pNumberOfIntervals: int)
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.
See also
ORSModel.ors.ROI.addVoxel(), addVoxelList(),ORSModel.ors.ROI.removeVoxel(), removeVoxelList(),ORSModel.ors.ROI.removeVoxels(),ORSModel.ors.ROI.removeVoxelInterval()- Parameters:
pIntervalArray (int) –
pNumberOfIntervals (int) –
- removeVoxels(self, indices: int, indicesSize: int)
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.
See also
ORSModel.ors.ROI.addVoxel(),ORSModel.ors.ROI.addVoxels(), addVoxelList(),ORSModel.ors.ROI.removeVoxel()- Parameters:
indices (int) – an array of indicies (a int64_t*)
indicesSize (int) – the number of indicies in the array (a int64_t)
ROI.removeVoxels(self, indices: ORSModel.ors.ArrayLONGLONG)
Note
Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
See also
ORSModel.ors.ROI.addVoxel(),ORSModel.ors.ROI.addVoxels(), addVoxelList(),ORSModel.ors.ROI.removeVoxel()- Parameters:
indices (ORSModel.ors.ArrayLONGLONG) –
- removeVoxelsFromWorldCoordinates(self, worldPositionArray: ORSModel.ors.ArrayDouble, timeIndex: int)
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)
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)
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)
- 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.
- setInitialColor(self, IColor: ORSModel.ors.Color)
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)
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)
- setWillBeDisplayed(self, value: bool)
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) –
ROIAnalyzer¶
- class ORSModel.ors.ROIAnalyzer
Bases:
UnmanagedAnalyzer for ROIs.
- geVolumeWasComputed(self) bool
- Returns:
output (bool) –
- getCenterOfMass(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getCenterOfMassWasComputed(self) bool
- Returns:
output (bool) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getInertiaTensorPrincipalComponent(self) ORSModel.ors.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) ORSModel.ors.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) –
- getMode(self) float
- Returns:
output (float) –
- getModeInPhysicalUnits(self) float
- Returns:
output (float) –
- 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
Gets the voxel count of theROI.
Note
Only the voxels inside the channel are considered.
- Returns:
output (int) – the voxel count (an uint64_t)
- none() ROIAnalyzer
- Returns:
output (ROIAnalyzer) –
Rectangle¶
- class ORSModel.ors.Rectangle
Bases:
Shape2DRectangle plane manipulation services.
- copy(self) ORSModel.ors.Rectangle
Gets a copy of the receiver.
- Returns:
output (ORSModel.ors.Rectangle) – a box (an Rectangle)
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.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)
- getArea(self) float
Gets the area of the receiver.
- Returns:
output (float) – an area (a double)
- getBoundedDoublePlaneInBoxReferential(self, inRefBox: ORSModel.ors.Box) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Vector3
Gets the geometrical middle of the bounded plane.
- Returns:
output (ORSModel.ors.Vector3) – a bounded plane center position (an Vector3)
- getCenterHalfVoxel(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) –
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- getLinearInterpolatedBoundedPlane(self, aPlane: ORSModel.ors.Rectangle, normalizedInterpolationFactor: float) ORSModel.ors.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) ORSModel.ors.Vector3
Returns the normal of theRectangle.
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getOrigin(self) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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)
- getSpacingInDirection(self, aDirection: ORSModel.ors.Vector3) float
Gets the spacing in the specified direction.
See also
ORSModel.ors.Rectangle.getDirection0Spacing(),ORSModel.ors.Rectangle.getDirection1Spacing()- Parameters:
aDirection (ORSModel.ors.Vector3) – the direction vector (an Vector3)
- Returns:
output (float) – the spacing (a double)
- getSummit(self, maxDirection0: bool, maxDirection1: bool) ORSModel.ors.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) ORSModel.ors.Rectangle
- Parameters:
aMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Rectangle) –
- getVoxelToWorldCoordinates(self, anIndex: ORSModel.ors.Vector3) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Matrix4x4
- Returns:
output (ORSModel.ors.Matrix4x4) –
- growToIncludePoint(self, aPoint: ORSModel.ors.Vector3)
Grows the receiver as to include the provided point.
Note
The provided point is projected on the bounded plane.
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setDirection(self, index: int, pVect: ORSModel.ors.Vector3)
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)
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)
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)
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)
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)
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)
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)
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)
Sets the direction size as a vector.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setDirectionSpacing(self, index: int, aSpacing: float)
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)
Sets the direction spacing as a vector.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- setOrigin(self, pVect: ORSModel.ors.Vector3)
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(*args, **kwargs)
Bases:
NodeUsed to represent a referential.
See also
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)
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)
- addLocalTranslationForAllTimeSteps(self, pTranslation: ORSModel.ors.Vector3)
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)
Adds a rotation to the frame referential.
Note
The rotation is along the specified vector, in the parent referential.
Note
Rotations are cumulative.
See also
addWorldRotation()
- 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)
- Parameters:
fromNode (ORSModel.ors.Node) –
axis (ORSModel.ors.Vector3) –
centerOfRotation (ORSModel.ors.Vector3) –
angle (float) –
pTimeStep (int) –
- addRotationAroundPointForAllTimeSteps(self, fromNode: ORSModel.ors.Node, axis: ORSModel.ors.Vector3, centerOfRotation: ORSModel.ors.Vector3, angle: float)
- Parameters:
fromNode (ORSModel.ors.Node) –
axis (ORSModel.ors.Vector3) –
centerOfRotation (ORSModel.ors.Vector3) –
angle (float) –
- addRotationForAllTimeSteps(self, pRotation: ORSModel.ors.Vector3, angle: float)
- Parameters:
pRotation (ORSModel.ors.Vector3) –
angle (float) –
- addScaling(self, pScale: ORSModel.ors.Vector3, pTimeStep: int)
- Parameters:
pScale (ORSModel.ors.Vector3) –
pTimeStep (int) –
- addScalingAtPoint(self, pScale: ORSModel.ors.Vector3, pPoint: ORSModel.ors.Vector3, pTimeStep: int)
- Parameters:
pScale (ORSModel.ors.Vector3) –
pPoint (ORSModel.ors.Vector3) –
pTimeStep (int) –
- addScalingAtPointForAllTimeSteps(self, pScale: ORSModel.ors.Vector3, pPoint: ORSModel.ors.Vector3)
- Parameters:
pScale (ORSModel.ors.Vector3) –
pPoint (ORSModel.ors.Vector3) –
- addScalingForAllTimeSteps(self, pScale: ORSModel.ors.Vector3)
- Parameters:
pScale (ORSModel.ors.Vector3) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getLocalPosition(self, pTimeStep: int) ORSModel.ors.Vector3
Gets the frame translation (a vector) from the local parent referential.
Note
The resulting translation is the frame position in the parent referential.
See also
ORSModel.ors.ReferenceFrame.setLocalPosition(), getWorldPosition(), setWorldPosition()- Parameters:
pTimeStep (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getMatrix(self, pTimeStep: int) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.Vector3
Gets the frame translation (a vector) directly from the world referential.
Note
The resulting translation is the frame position in the world referential.
See also
setWorldPosition(),
ORSModel.ors.ReferenceFrame.setLocalPosition(),ORSModel.ors.ReferenceFrame.getLocalPosition()- Parameters:
aNode (ORSModel.ors.Node) –
pTimeStep (int) –
- 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) ORSModel.ors.Matrix4x4
- Parameters:
fromNode (ORSModel.ors.Node) –
inputOutMatrix (ORSModel.ors.Matrix4x4) –
pTimeStep (int) –
- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ReferenceFrame) –
- reset(self, pTimeStep: int)
- Parameters:
pTimeStep (int) –
- resetForAllTimeSteps(self)
- resetFromBox(self, anIBox: ORSModel.ors.Box, pTimeStep: int)
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)
- resetFromBoxForAllTimeSteps(self, anIBox: ORSModel.ors.Box)
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)
Sets the frame translation from a vector in the local parent referential.
Note
The resulting translation is the frame position in the parent referential.
See also
getWorldPosition(),
ORSModel.ors.ReferenceFrame.setLocalPosition(),ORSModel.ors.ReferenceFrame.getLocalPosition()- Parameters:
aIVector (ORSModel.ors.Vector3) – a vector (an Vector3)
pTimeStep (int) – the time step (a uint32_t)
- setLocalPositionForAllTimeSteps(self, aIVector: ORSModel.ors.Vector3)
Sets the frame translation from a vector in the local parent referential.
Note
The resulting translation is the frame position in the parent referential.
See also
getWorldPosition(),
ORSModel.ors.ReferenceFrame.setLocalPosition(),ORSModel.ors.ReferenceFrame.getLocalPosition()- Parameters:
aIVector (ORSModel.ors.Vector3) – a vector (an Vector3)
- setLocalRotationMatrix(self, pMatrix: ORSModel.ors.Matrix4x4, pTimeStep: int)
- Parameters:
pMatrix (ORSModel.ors.Matrix4x4) –
pTimeStep (int) –
- setMatrix(self, pMatrix: ORSModel.ors.Matrix4x4, pTimeStep: int)
Sets the frame matrix.
- Parameters:
pMatrix (ORSModel.ors.Matrix4x4) – the matrix (an Matrix4x4)
pTimeStep (int) – the time step (a uint32_t)
- setMatrixForAllTimeSteps(self, pMatrix: ORSModel.ors.Matrix4x4)
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)
- Parameters:
fromNode (ORSModel.ors.Node) –
direction0Cosine (ORSModel.ors.Vector3) –
direction1Cosine (ORSModel.ors.Vector3) –
direction2Cosine (ORSModel.ors.Vector3) –
pTimeStep (int) –
- setOrientationCosineForAllTimeSteps(self, fromNode: ORSModel.ors.Node, direction0Cosine: ORSModel.ors.Vector3, direction1Cosine: ORSModel.ors.Vector3, direction2Cosine: ORSModel.ors.Vector3)
- Parameters:
fromNode (ORSModel.ors.Node) –
direction0Cosine (ORSModel.ors.Vector3) –
direction1Cosine (ORSModel.ors.Vector3) –
direction2Cosine (ORSModel.ors.Vector3) –
- setPosition(self, aNode: ORSModel.ors.Node, aIVector: ORSModel.ors.Vector3, pTimeStep: int)
See also
getWorldPosition(),
ORSModel.ors.ReferenceFrame.setLocalPosition(),ORSModel.ors.ReferenceFrame.getLocalPosition()- Parameters:
aNode (ORSModel.ors.Node) –
aIVector (ORSModel.ors.Vector3) –
pTimeStep (int) –
- setPositionForAllTimeSteps(self, aNode: ORSModel.ors.Node, aIVector: ORSModel.ors.Vector3)
See also
getWorldPosition(),
ORSModel.ors.ReferenceFrame.setLocalPosition(),ORSModel.ors.ReferenceFrame.getLocalPosition()- Parameters:
aNode (ORSModel.ors.Node) –
aIVector (ORSModel.ors.Vector3) –
- setTSize(self, pTSize: int)
- Parameters:
pTSize (int) –
- setXScale(self, xScale: float, pTimeStep: int)
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)
- setXScaleForAllTimeSteps(self, xScale: float)
Sets the X scale of the frame in the parent referential.
- Parameters:
xScale (float) – a scale (a double)
- setYScale(self, yScale: float, pTimeStep: int)
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)
- setYScaleForAllTimeSteps(self, yScale: float)
Sets the Y scale of the frame in the parent referential.
- Parameters:
yScale (float) – a scale (a double)
- setZScale(self, zScale: float, pTimeStep: int)
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)
- setZScaleForAllTimeSteps(self, zScale: float)
Sets the Z scale of the frame in the parent referential.
- Parameters:
zScale (float) – a scale (a double)
RenderingEffect¶
- class ORSModel.ors.RenderingEffect(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Node- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
RenderingEffect.__init__(self)
- addApplicableClassName(self, sClassName: str)
- Parameters:
sClassName (str) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getEngineVersion(self) int
returns the rendering engine version for this effect
- 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) str
get the evaluated shader code (in glsl)
- 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:
view (ORSModel.ors.View) –
variableName (str) –
- 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) ORSModel.ors.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) ORSModel.ors.LookupTable
Gets a shader variable of type LUT that applies to a specific view.
- Parameters:
view (ORSModel.ors.View) –
variableName (str) –
- Returns:
output (ORSModel.ors.LookupTable) –
- getShaderVariableLUTNameAtIndex(self, iIndex: int) str
- Parameters:
iIndex (int) –
- Returns:
output (str) –
- none() RenderingEffect
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (RenderingEffect) –
- setEngineVersion(self, iVersion: int)
get the rendering engine version for this effect
- Parameters:
iVersion (int) –
- setID(self, sId: str)
- Parameters:
sId (str) –
- setIsEnabledForView(self, view: ORSModel.ors.View, bState: bool)
- Parameters:
view (ORSModel.ors.View) –
bState (bool) –
- setIsGPUIntensive(self, bValue: bool)
Set if the effect is GPU intensive.
- Parameters:
bValue (bool) –
- setShaderCode(self, code: str)
setShaderCode
- Parameters:
code (str) –
- setShaderVariableDoubleForAll(self, variableName: str, aValue: float)
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)
Set a shader variable of type double that applies to a specific view.
- Parameters:
view (ORSModel.ors.View) –
variableName (str) –
aValue (float) –
- setShaderVariableLUTForAll(self, variableName: str, aLUT: ORSModel.ors.LookupTable)
Set a shader variable of type LUT that applies to all views.
- Parameters:
variableName (str) –
aLUT (ORSModel.ors.LookupTable) –
- setShaderVariableLUTForView(self, view: ORSModel.ors.View, variableName: str, aLUT: ORSModel.ors.LookupTable)
Set a shader variable of type LUT that applies to a specific view.
- Parameters:
view (ORSModel.ors.View) –
variableName (str) –
aLUT (ORSModel.ors.LookupTable) –
Saver¶
- class ORSModel.ors.Saver(*args, **kwargs)
Bases:
ManagedAllows to save ORS objects for later retrieval.
See also
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)
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)
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)
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)
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)
Adds a 32 bit signed integer attribute to the current node of an XML tree.
- Parameters:
sAttributeName (str) – the attribute name (a string)
lValue (int) – the attribute value (an int32_t)
- addLONGLONGAttributeToCurrentNode(self, sAttributeName: str, lValue: int)
Adds a 64 bit signed integer attribute to the current node of an XML tree.
- Parameters:
sAttributeName (str) – the attribute name (a string)
lValue (int) – the attribute value (an int64_t)
- addShortAttributeToCurrentNode(self, sAttributeName: str, lValue: int)
Adds a 16 bit signed integer attribute to the current node of an XML tree.
- Parameters:
sAttributeName (str) – the attribute name (a string)
lValue (int) – the attribute value (an int16_t)
- addSimpleBoolElementToCurrentNode(self, sElementName: str, bElementValue: bool)
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)
Adds a CDATA element to the current node of an XML tree.
See also
ORSModel.ors.Saver.push(),ORSModel.ors.Saver.addSimpleElementToCurrentNode(),ORSModel.ors.Saver.addAttributeToCurrentNode()- Parameters:
sElementName (str) – the element name (a string)
sElementValue (str) – the element value (a string)
- addSimpleDoubleElementToCurrentNode(self, sElementName: str, iElementValue: float)
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)
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)
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)
Adds an 32 bit signed integer element to the current node of an XML tree.
- Parameters:
sElementName (str) – the element name (a string)
lElementValue (int) – the element value (an int32_t)
- addSimpleLONGLONGElementToCurrentNode(self, sElementName: str, lElementValue: int)
Adds a 64 bit signed element to the current node of an XML tree.
- Parameters:
sElementName (str) – the element name (a string)
lElementValue (int) – the element value (an int64_t)
- addSimpleShortElementToCurrentNode(self, sElementName: str, lElementValue: int)
Adds a 16 bit signed integer element to the current node of an XML tree.
- Parameters:
sElementName (str) – the element name (a string)
lElementValue (int) – the element value (an int16_t)
- addSimpleULONGLONGElementToCurrentNode(self, sElementName: str, iElementValue: int)
Adds a 64 bit unsigned integer 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)
Adds a 32 bit unsigned integer element to the current node of an XML tree.
- Parameters:
sElementName (str) – the element name (a string)
iElementValue (int) – the element value (an uint32_t)
- addSimpleUnsignedShortElementToCurrentNode(self, sElementName: str, iElementValue: int)
Adds a 16 bit unsigned integer element to the current node of an XML tree.
- Parameters:
sElementName (str) – the element name (a string)
iElementValue (int) – the element value (an uint16_t)
- addULONGLONGAttributeToCurrentNode(self, sAttributeName: str, iValue: int)
Adds a 64 bit unsigned integer 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)
Adds an 32 bit unsigned integer attribute to the current node of an XML tree.
- Parameters:
sAttributeName (str) – the attribute name (a string)
iValue (int) – the attribute value (an uint32_t)
- addUnsignedShortAttributeToCurrentNode(self, sAttributeName: str, iValue: int)
Adds a 16 bit unsigned integer attribute to the current node of an XML tree.
- Parameters:
sAttributeName (str) – the attribute name (a string)
iValue (int) – the attribute value (an uint16_t)
- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Saver) –
- pop(self)
Goes up one level in an XML tree being created.
See also
- push(self, aXMLNodeName: str)
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.
See also
- 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 int64_t)
ScalarValuesCollection¶
- class ORSModel.ors.ScalarValuesCollection(self)
Bases:
Managed- appendInto(self, destination: ORSModel.ors.ScalarValuesCollection, iInsertionIndex: int, iStartIndex: int, iEndIndex: int)
- Parameters:
destination (ORSModel.ors.ScalarValuesCollection) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
- clear(self)
- copyInto(self, destination: ORSModel.ors.ScalarValuesCollection, iInsertionIndex: int, iStartIndex: int, iEndIndex: int, copyMetaInformation: bool = True)
- Parameters:
destination (ORSModel.ors.ScalarValuesCollection) –
iInsertionIndex (int) –
iStartIndex (int) –
iEndIndex (int) –
copyMetaInformation (bool) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getCurrentSlot(self) int
- Returns:
output (int) –
- getDataType(self, nScalarValueSlotIndex: int) int
- Parameters:
nScalarValueSlotIndex (int) –
- Returns:
output (int) –
- getDataTypes(self) ORSModel.ors.ArrayShort
- Returns:
output (ORSModel.ors.ArrayShort) –
- getDescription(self, nSlotIndex: int, iTIndex: int) str
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (str) –
- getDescriptions(timeStep)
Get the list of scalar values description.
- Parameters:
timeStep (int) – the time index
- getDimensionUnit(self, nSlotIndex: int, iTIndex: int) ORSModel.ors.DimensionUnit
Gets the dimension unit of a scalar value.
- Parameters:
nSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
- getIsNullable(self, nSlotIndex: int) bool
Tell whether or not a scalar value slot can contain NULL values.
- Parameters:
nSlotIndex (int) – the scalar slot index (a uint16_t)
- Returns:
output (bool) – True if NULL values are enabled; False otherwise
- getOffset(self, nSlotIndex: int, iTIndex: int) float
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getOffsets(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getRangeBoundaryMax(self, nSlotIndex: int, iTIndex: int) float
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getRangeBoundaryMaxs(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getRangeBoundaryMin(self, nSlotIndex: int, iTIndex: int) float
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getRangeBoundaryMins(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getRangeMax(self, nSlotIndex: int, iTIndex: int) float
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getRangeMaxs(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getRangeMin(self, nSlotIndex: int, iTIndex: int) float
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getRangeMins(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getScalarValueOrNull(self, nValueIndex: int, nSlotIndex: int, iTIndex: int) Optional[float]
Get a scalar value (if not NULL) or None otherwise.
- Parameters:
nValueIndex (int) – the scalar value index (a uint64_t)
nSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (Optional[float]) –
- getScalarValues(self, nSlotIndex: int, iTIndex: int) ORSModel.ors.SequenceableCollection
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.SequenceableCollection) –
- getScalarValuesNullMask(self, nSlotIndex: int, iTIndex: int) ORSModel.ors.ArrayBool
Give access to the underlying NULL mask array.
- Parameters:
nSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayBool) –
- getScalarValuesSize(self) int
- Returns:
output (int) –
- getScalarValuesSlotIndexForDescription(self, sValue: str, iTIndex: int) int
- Parameters:
sValue (str) –
iTIndex (int) –
- Returns:
output (int) –
- getSlope(self, nSlotIndex: int, iTIndex: int) float
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getSlopes(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getSlotCount(self) int
- Returns:
output (int) –
- getTSize(self) int
- Returns:
output (int) –
- getUseScalarValues(self) bool
- Returns:
output (bool) –
- getWindowMax(self, nSlotIndex: int, iTIndex: int) float
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getWindowMaxs(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getWindowMin(self, nSlotIndex: int, iTIndex: int) float
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getWindowMins(self, iTIndex: int) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- isEqualTo(self, anotherScalarValuesCollection: ORSModel.ors.ScalarValuesCollection) bool
- Parameters:
anotherScalarValuesCollection (ORSModel.ors.ScalarValuesCollection) –
- Returns:
output (bool) –
- none() ScalarValuesCollection
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ScalarValuesCollection) –
- removeSlot(self, nSlotIndex: int)
- Parameters:
nSlotIndex (int) –
- reset(self)
- setCurrentSlot(self, value: int)
- Parameters:
value (int) –
- setDataType(self, nValue: int, nScalarValueSlotIndex: int)
- Parameters:
nValue (int) –
nScalarValueSlotIndex (int) –
- setDataTypes(self, pValues: ORSModel.ors.ArrayShort)
- Parameters:
pValues (ORSModel.ors.ArrayShort) –
- setDescription(self, sValue: str, nSlotIndex: int, iTIndex: int)
- Parameters:
sValue (str) –
nSlotIndex (int) –
iTIndex (int) –
- setDimensionUnit(self, pDimensionUnit: ORSModel.ors.DimensionUnit, nSlotIndex: int, iTIndex: int)
Sets the dimension unit of a scalar value.
- Parameters:
pDimensionUnit (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
nSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- setIsNullable(self, newValue: bool, nSlotIndex: int)
Set whether or not a scalar value slot can contain NULL values.
- Parameters:
newValue (bool) – True if NULL values are enabled; False otherwise
nSlotIndex (int) – the scalar slot index (a uint16_t)
- setOffset(self, fValue: float, nSlotIndex: int, iTIndex: int)
- Parameters:
fValue (float) –
nSlotIndex (int) –
iTIndex (int) –
- setOffsets(self, pValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setRangeBoundaryMax(self, fValue: float, nSlotIndex: int, iTIndex: int)
- Parameters:
fValue (float) –
nSlotIndex (int) –
iTIndex (int) –
- setRangeBoundaryMin(self, fValue: float, nSlotIndex: int, iTIndex: int)
- Parameters:
fValue (float) –
nSlotIndex (int) –
iTIndex (int) –
- setRangeMax(self, fValue: float, nSlotIndex: int, iTIndex: int)
- Parameters:
fValue (float) –
nSlotIndex (int) –
iTIndex (int) –
- setRangeMin(self, fValue: float, nSlotIndex: int, iTIndex: int)
- Parameters:
fValue (float) –
nSlotIndex (int) –
iTIndex (int) –
- setScalarValue(self, fValue: float, nValueIndex: int, nSlotIndex: int, iTIndex: int)
Set a scalar value.
- Parameters:
fValue (float) – the scalar value index (a uint64_t)
nValueIndex (int) – the scalar slot index (a uint16_t)
nSlotIndex (int) – the time step (a uint32_t)
iTIndex (int) –
- setScalarValueNull(self, nValueIndex: int, nSlotIndex: int, iTIndex: int)
Set a scalar value to NULL (aka None or Undefined).
- Parameters:
nValueIndex (int) – the scalar value index (a uint64_t)
nSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- setScalarValues(self, pValues: ORSModel.ors.SequenceableCollection, nSlotIndex: int, iTIndex: int)
- Parameters:
pValues (ORSModel.ors.SequenceableCollection) –
nSlotIndex (int) –
iTIndex (int) –
- setScalarValuesNull(self, pValueIndices: ORSModel.ors.ArrayUnsignedLONGLONG, nSlotIndex: int, iTIndex: int)
Set multiple scalar values to NULL using an array of indices.
- Parameters:
pValueIndices (ORSModel.ors.ArrayUnsignedLONGLONG) – the array of indices to set to NULL (an ArrayUnsignedLONGLONG)
nSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- setScalarValuesSize(self, iNewSize: int)
- Parameters:
iNewSize (int) –
- setSlope(self, fValue: float, nSlotIndex: int, iTIndex: int)
- Parameters:
fValue (float) –
nSlotIndex (int) –
iTIndex (int) –
- setSlopes(self, pValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setSlotCount(self, nSlotCount: int)
- Parameters:
nSlotCount (int) –
- setSlotDefaultRangeValues(self, nSlotIndex: int, iTIndex: int)
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
- setTSize(self, nTSize: int)
- Parameters:
nTSize (int) –
- setUnit(self, nValue: int, nSlotIndex: int, iTIndex: int)
Sets a dimension unit (value from CxvUniverse_Dimension enum).
Deprecated since version (unknown): use setDimensionUnit instead
- Parameters:
nValue (int) –
nSlotIndex (int) –
iTIndex (int) –
- setUseScalarValues(self, value: bool)
- Parameters:
value (bool) –
- setWindowMax(self, fValue: float, nSlotIndex: int, iTIndex: int)
- Parameters:
fValue (float) –
nSlotIndex (int) –
iTIndex (int) –
- setWindowMaxs(self, pValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setWindowMin(self, fValue: float, nSlotIndex: int, iTIndex: int)
- Parameters:
fValue (float) –
nSlotIndex (int) –
iTIndex (int) –
- setWindowMins(self, pValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- swapSlotIds(self, nSlotIndex1: int, nSlotIndex2: int) bool
- Parameters:
nSlotIndex1 (int) –
nSlotIndex2 (int) –
- Returns:
output (bool) –
- updateSlotDataType(self, nValue: int, nSlotIndex: int)
- Parameters:
nValue (int) –
nSlotIndex (int) –
- validateSlotRangeValues(self, nSlotIndex: int, iTIndex: int)
- Parameters:
nSlotIndex (int) –
iTIndex (int) –
SequenceableCollection¶
- class ORSModel.ors.SequenceableCollection(*args, **kwargs)
Bases:
CollectionAbstraction class for sequenceable collections.
- asArray(self) ORSModel.ors.Array
- Returns:
output (ORSModel.ors.Array) –
- asOrderedCollection(self) ORSModel.ors.OrderedCollection
- Returns:
output (ORSModel.ors.OrderedCollection) –
- atAsChar(self, index: int) int
Return the value at index as a int8_t.
- Parameters:
index (int) –
- Returns:
output (int) – a int8_t
- atAsDouble(self, index: int) float
- Parameters:
index (int) –
- Returns:
output (float) –
- atAsFloat(self, index: int) float
Return the value at index as a float.
- Parameters:
index (int) –
- Returns:
output (float) – a float
- atAsLONGLONG(self, index: int) int
Return the value at index as a int64_t.
- Parameters:
index (int) –
- Returns:
output (int) – a int64_t
- atAsLong(self, index: int) int
Return the value at index as a int32_t.
- Parameters:
index (int) –
- Returns:
output (int) – a int32_t
- atAsShort(self, index: int) int
Return the value at index as a int16_t.
- Parameters:
index (int) –
- Returns:
output (int) – a int16_t
- atAsULONGLONG(self, index: int) int
Return the value at index as a uint64_t.
- Parameters:
index (int) –
- Returns:
output (int) – a int8_t
- atAsUnsignedChar(self, index: int) int
Return the value at index as a uint8_t.
- Parameters:
index (int) –
- Returns:
output (int) – a uint8_t
- atAsUnsignedLong(self, index: int) int
Return the value at index as a int32_t.
- Parameters:
index (int) –
- Returns:
output (int) – a int32_t
- atAsUnsignedShort(self, index: int) int
Return the value at index as a uint16_t.
- Parameters:
index (int) –
- Returns:
output (int) – a uint16_t
- atAsVoid(self, index: int)
Return the value at index as a void*.
- Parameters:
index (int) –
- atPutAsDouble(self, index: int, pValue: float)
- Parameters:
index (int) –
pValue (float) –
- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (SequenceableCollection) –
- removeAt(self, index: int)
- Parameters:
index (int) –
- removeDuplicate(self) bool
Remove duplicate entries.
- Returns:
output (bool) – true if duplicate where found
- removeFirst(self)
- removeLast(self)
- reverse(self)
- setSize(self, iNewSize: int)
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) –
- sortAscending(self, bSlave: ORSModel.ors.SequenceableCollection, cSlave: ORSModel.ors.SequenceableCollection, dSlave: ORSModel.ors.SequenceableCollection, eSlave: ORSModel.ors.SequenceableCollection)
- Parameters:
bSlave (ORSModel.ors.SequenceableCollection) –
cSlave (ORSModel.ors.SequenceableCollection) –
dSlave (ORSModel.ors.SequenceableCollection) –
eSlave (ORSModel.ors.SequenceableCollection) –
- sortDescending(self, bSlave: ORSModel.ors.SequenceableCollection, cSlave: ORSModel.ors.SequenceableCollection, dSlave: ORSModel.ors.SequenceableCollection, eSlave: ORSModel.ors.SequenceableCollection)
- Parameters:
bSlave (ORSModel.ors.SequenceableCollection) –
cSlave (ORSModel.ors.SequenceableCollection) –
dSlave (ORSModel.ors.SequenceableCollection) –
eSlave (ORSModel.ors.SequenceableCollection) –
- sortRangeAscending(self, index1: int, index2: int)
- Parameters:
index1 (int) –
index2 (int) –
- sortRangeDescending(self, index1: int, index2: int)
- Parameters:
index1 (int) –
index2 (int) –
- swap(self, index: int, index2: int)
- Parameters:
index (int) –
index2 (int) –
- transformCoordinate(self, aTransform: ORSModel.ors.Matrix4x4)
Apply the 3D coordinate transformation to the elements of the collection.
- Parameters:
aTransform (ORSModel.ors.Matrix4x4) –
- transformVector(self, aTransform: ORSModel.ors.Matrix4x4)
Apply the 3D coordinate transformation to the elements of the collection.
- Parameters:
aTransform (ORSModel.ors.Matrix4x4) –
Shape¶
- class ORSModel.ors.Shape
Bases:
UnmanagedShape manipulation services.
- copy(self) ORSModel.ors.Unmanaged
Gets a copy of the receiver.
- Returns:
output (ORSModel.ors.Unmanaged) – a shape
- getCanBeUsedForProjection(self) bool
- Returns:
output (bool) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) ORSModel.ors.Shape
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
rotationCenter (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.Shape) –
- getTransformed(self, aMatrix: ORSModel.ors.Matrix4x4) ORSModel.ors.Shape
- Parameters:
aMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Shape) –
- rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float)
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)
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¶
Shape3D¶
- class ORSModel.ors.Shape3D
Bases:
Shape- getCenter(self) ORSModel.ors.Vector3
Gets the geometrical middle of the shape.
- Returns:
output (ORSModel.ors.Vector3) – a shape center position (an Vector3)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getIsPointInside(self, aPosition: ORSModel.ors.Vector3) bool
Verifies if a point is inside the shape.
- Parameters:
aPosition (ORSModel.ors.Vector3) – a point (an Vector3)
- Returns:
output (bool) – TRUE if the point is inside the shape, FALSE otherwise
- getIsPointInsideFromComponents(self, aPositionX: float, aPositionY: float, aPositionZ: float) bool
Verifies if a point is inside the shape.
- Parameters:
aPositionX (float) – a point X component (a double)
aPositionY (float) – a point Y component (a double)
aPositionZ (float) – a point Z component (a double)
- Returns:
output (bool) – TRUE if the point is inside the shape, FALSE otherwise
- getProjectionRectangle(self) ORSModel.ors.Rectangle
- Returns:
output (ORSModel.ors.Rectangle) –
Sphere¶
- class ORSModel.ors.Sphere
Bases:
Shape3DSphere services.
- copy(self) ORSModel.ors.Sphere
Gets a copy of the receiver.
- Returns:
output (ORSModel.ors.Sphere) – a shape
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Sphere
Create aSphere from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Sphere) –
- fromNPointsLeastMeanSquares(self, aPointCollection: ORSModel.ors.SequenceableCollection)
set a sphere from a set of (at least 3) points
- Parameters:
aPointCollection (ORSModel.ors.SequenceableCollection) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getFibonacciDistributedPointsOnSurface(self, nbPoints: int) ORSModel.ors.ArrayDouble
- Parameters:
nbPoints (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getIntersectionWithLine(self, aLine: ORSModel.ors.Line) ORSModel.ors.LineSegment
- 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) ORSModel.ors.LineSegment
- 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
- getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) bool
Gets if the receiver intersects the given shape.
- Parameters:
aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape)
- Returns:
output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
- getPhiOffset(self) float
- Returns:
output (float) –
- getProjectionType(self) int
- Returns:
output (int) –
- getRadius(self) float
- Returns:
output (float) –
- getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) ORSModel.ors.Sphere
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
rotationCenter (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.Sphere) –
- getSurface(self) float
Gets the surface.
- Returns:
output (float) – a surface (a double)
- getThetaOffset(self) float
- Returns:
output (float) –
- getVolume(self) float
Gets the volume.
- Returns:
output (float) – a volume (a double)
- getWorldPositionFromUV(self, u: float, v: float, x: float, y: float, z: float)
- Parameters:
u (float) –
v (float) –
x (float) –
y (float) –
z (float) –
- rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float)
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)
- Parameters:
center (ORSModel.ors.Vector3) –
- setPhiOffset(self, anOffset: float)
- Parameters:
anOffset (float) –
- setProjectionType(self, aProjectionType: int)
- Parameters:
aProjectionType (int) –
- setRadius(self, radius: float)
- Parameters:
radius (float) –
- setThetaOffset(self, anOffset: float)
- Parameters:
anOffset (float) –
- transform(self, transformationMatrix: ORSModel.ors.Matrix4x4)
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)
StatisticalAnalyzer¶
- class ORSModel.ors.StatisticalAnalyzer(self)
Bases:
Unmanaged- analyze(self, momentsCount: int, median: bool, aCollection: ORSModel.ors.Collection)
- Parameters:
momentsCount (int) –
median (bool) –
aCollection (ORSModel.ors.Collection) –
- analyzeSubset(self, momentsCount: int, median: bool, startIndex: int, endIndex: int, aCollection: ORSModel.ors.SequenceableCollection)
- Parameters:
momentsCount (int) –
median (bool) –
startIndex (int) –
endIndex (int) –
aCollection (ORSModel.ors.SequenceableCollection) –
- 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
- Returns:
output (StatisticalAnalyzer) –
Stream¶
- class ORSModel.ors.Stream(*args, **kwargs)
Bases:
ManagedAllows to save ORS objects in streams (through callback).
Client should attach one ‘OrsStreamDataReady’ event callback to a Stream instance and pass it as parameter to stream operations, such as atomicSaveToStream() and atomicLoadFrom(). The callback is called when the stream has data ready to be written or is requesting data to read.
Upon writing, the ‘OrsStreamDataReady’ event callback is called with a data chunk ready to be written to a file, sent over the network, appended to a memory buffer or simply ignored (it is really up to the client to handle the data at this point). The callback handler must consume all of the data chunk (i.e. the handler will not be called again with the same data).
Upon reading, the ‘OrsStreamDataReady’ event callback is called with a data buffer to hold the incoming data (from a file, network or else). The handler must provide exactly the number of bytes requested.
In both cases, a ‘resultPtr’ event attribute holds a pointer to a boolean (initialized to false) used to signal the successful completion of the write operation. Failure to set the boolean to true will cause the whole stream operation to fail.
See also
OrsStreamDataReady in ORSEvents.h
See also
Managed::atomicSaveToStream(ORS::Stream, uint8_t)
See also
Managed::atomicLoadFrom(ORS::Stream)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
StructuredGrid¶
- class ORSModel.ors.StructuredGrid(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Node- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
- addROIAtTOffset(self, aROI: ORSModel.ors.ROI, label: int, pTOffset: int)
Note
The ROI to add will be projected correctly if it doesn’t share the same characteristics.
See also
AddROI(), MergeWithROI()
- Parameters:
aROI (ORSModel.ors.ROI) – the ROI to add (an ROI)
label (int) – a label (a uint32_t)
pTOffset (int) – the T offset (a uint32_t)
- copyShapeFromBox(self, pBox: ORSModel.ors.Box, tSize: int)
Initializes the structured grid’s shape based on a box.
Dirty flags: OrsDataDirty, OrsGeometryDirty
- Parameters:
pBox (ORSModel.ors.Box) – a box (a Box)
tSize (int) – a T size (an uint32_t)
- copyShapeFromRectangle(self, pRectangle: ORSModel.ors.Rectangle, zSpacing: float, tSize: int)
Initializes the structured grid’s shape based on a rectangle.
Dirty flags: OrsDataDirty, OrsGeometryDirty
- Parameters:
pRectangle (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)
Initializes the structured grid’s shape based on another structured grid.
Dirty flags: OrsDataDirty, OrsGeometryDirty
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) ORSModel.ors.Channel
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:
inOutStructuredGrid (ORSModel.ors.StructuredGrid) – an optional output channel (an StructuredGrid)
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.Channel) – the resulting channel (an StructuredGrid)
- getAsMultiROI(self, inOutStructuredGrid: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) ORSModel.ors.MultiROI
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.
See also
addToROI(), removeROI(),
ORSModel.ors.StructuredGrid.getAsChannel()- Parameters:
inOutStructuredGrid (ORSModel.ors.StructuredGrid) – an optional output MultiROI (an StructuredGrid)
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.MultiROI) – the resulting MultiROI (an StructuredGrid)
- getAsROI(self, inOutStructuredGrid: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) ORSModel.ors.ROI
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.
See also
addToROI(), removeROI(),
ORSModel.ors.StructuredGrid.getAsChannel()- Parameters:
inOutStructuredGrid (ORSModel.ors.StructuredGrid) – an optional output Volume ROI (an StructuredGrid)
IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
- Returns:
output (ORSModel.ors.ROI) – the resulting Volume ROI (an StructuredGrid)
- getBoundingBox(self, pTIndex: int) ORSModel.ors.Box
- Parameters:
pTIndex (int) –
- Returns:
output (ORSModel.ors.Box) –
- getBox(self) ORSModel.ors.Box
Gets the box.
- Returns:
output (ORSModel.ors.Box) – the box (an Box)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDirtyBox(self, bResetDirtyBox: bool) ORSModel.ors.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)
- getHasNonZeroDataOnPlane(self, aPlane: ORSModel.ors.Plane, tStep: int) bool
Test to know if there is a non zero value on plain.
- Parameters:
aPlane (ORSModel.ors.Plane) – a Plane (ORS::Plane)
tStep (int) – a time step (uint32_t)
- Returns:
output (bool) – a bool (bool)
- getHasNonZeroDataOnSlice(self, sliceIndex: int, timestep: int) bool
- Parameters:
sliceIndex (int) –
timestep (int) –
- Returns:
output (bool) –
- getHasSameShape(self, pStructuredGrid: ORSModel.ors.StructuredGrid) bool
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) ORSModel.ors.Vector3
- Parameters:
aLine (ORSModel.ors.Line) –
subBox (ORSModel.ors.Box) –
timestep (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getLabelAtPosition(self, tIndex: int, worldPosition: ORSModel.ors.Vector3) int
- Parameters:
tIndex (int) –
worldPosition (ORSModel.ors.Vector3) –
- Returns:
output (int) –
- getOrigin(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getOriginalBox(self) ORSModel.ors.Box
- Returns:
output (ORSModel.ors.Box) –
- getPositionOfFirstIntersectingNonZeroElement(self, aLine: ORSModel.ors.Line, subBox: ORSModel.ors.Box, timestep: int) ORSModel.ors.Vector3
- Parameters:
aLine (ORSModel.ors.Line) –
subBox (ORSModel.ors.Box) –
timestep (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getShape3DGrownToContain(self, aShape: ORSModel.ors.Shape3D, timeIndex: int) ORSModel.ors.Shape3D
- Parameters:
aShape (ORSModel.ors.Shape3D) –
timeIndex (int) –
- Returns:
output (ORSModel.ors.Shape3D) –
- getSliceAtIndex(self, zIndex: int, inStructuredGridSlice: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) ORSModel.ors.StructuredGrid
- Parameters:
zIndex (int) –
inStructuredGridSlice (ORSModel.ors.StructuredGrid) –
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.StructuredGrid) –
- getSliceIntersectingBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle, inStructuredGridSlice: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) ORSModel.ors.StructuredGrid
- Parameters:
aBoundedPlane (ORSModel.ors.Rectangle) –
inStructuredGridSlice (ORSModel.ors.StructuredGrid) –
IProgress (ORSModel.ors.Progress) –
- 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.
See also
ORSModel.ors.StructuredGrid.getXSpacing(),ORSModel.ors.StructuredGrid.getYSpacing(),ORSModel.ors.StructuredGrid.getZSpacing()- 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) ORSModel.ors.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) –
ymin (int) –
zmin (int) –
tmin (int) –
xmax (int) –
ymax (int) –
zmax (int) –
tmax (int) –
inChannelSubset (ORSModel.ors.StructuredGrid) –
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.StructuredGrid) – a StructuredGrid (see notes)
- getSubsetFromBox(self, subBox: ORSModel.ors.Box, timeIndex: int, inSGSubset: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress) ORSModel.ors.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:
subBox (ORSModel.ors.Box) –
timeIndex (int) –
inSGSubset (ORSModel.ors.StructuredGrid) –
IProgress (ORSModel.ors.Progress) –
- 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) ORSModel.ors.Matrix4x4
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getTransformationShape3D(self) ORSModel.ors.Shape3D
- Returns:
output (ORSModel.ors.Shape3D) –
- getValueAlongPrimitivePath(self, aPath: ORSModel.ors.VisualPath, nbPoint: int, timestep: int, values: ORSModel.ors.ArrayDouble, samplingPointsX: ORSModel.ors.ArrayDouble, samplingPointsY: ORSModel.ors.ArrayDouble, samplingPointsZ: ORSModel.ors.ArrayDouble)
- Parameters:
aPath (ORSModel.ors.VisualPath) –
nbPoint (int) –
timestep (int) –
values (ORSModel.ors.ArrayDouble) –
samplingPointsX (ORSModel.ors.ArrayDouble) –
samplingPointsY (ORSModel.ors.ArrayDouble) –
samplingPointsZ (ORSModel.ors.ArrayDouble) –
- getValueAlongPrimitiveRuler(self, aRuler: ORSModel.ors.VisualRuler, nbPoint: int, timestep: int, values: ORSModel.ors.ArrayDouble, samplingPointsX: ORSModel.ors.ArrayDouble, samplingPointsY: ORSModel.ors.ArrayDouble, samplingPointsZ: ORSModel.ors.ArrayDouble)
- Parameters:
aRuler (ORSModel.ors.VisualRuler) –
nbPoint (int) –
timestep (int) –
values (ORSModel.ors.ArrayDouble) –
samplingPointsX (ORSModel.ors.ArrayDouble) –
samplingPointsY (ORSModel.ors.ArrayDouble) –
samplingPointsZ (ORSModel.ors.ArrayDouble) –
- getValueAtPosition(self, worldPos: ORSModel.ors.Vector3, timestep: int, defaultValue: float = None) float
- Parameters:
worldPos (ORSModel.ors.Vector3) –
timestep (int) –
defaultValue (float) –
- Returns:
output (float) –
- getVoxelToWorldCoordinates(self, anIndex: ORSModel.ors.Vector3) ORSModel.ors.Vector3
- Parameters:
anIndex (ORSModel.ors.Vector3) –
- Returns:
output (ORSModel.ors.Vector3) –
- getWorldToVoxelCoordinates(self, pPointInWorld: ORSModel.ors.Vector3) ORSModel.ors.Vector3
Gets a given voxel’s index from world coordinates.
- Parameters:
pPointInWorld (ORSModel.ors.Vector3) – the voxel coordinate encoded in ORS::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.
See also
ORSModel.ors.StructuredGrid.setZSpacing(),ORSModel.ors.StructuredGrid.getZSpacing(),ORSModel.ors.StructuredGrid.setZSliceThickness()- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (StructuredGrid) –
- paintBox(self, pBox: ORSModel.ors.Box, label: float, tStep: int)
- Parameters:
pBox (ORSModel.ors.Box) –
label (float) –
tStep (int) –
- paintBoxIfInRange(self, pBox: ORSModel.ors.Box, label: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
pBox (ORSModel.ors.Box) –
label (float) –
tStep (int) –
fMinValue (float) –
fMaxValue (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- paintBoxIntersectingChannel(self, pBox: ORSModel.ors.Box, label: float, tStep: int, intersectingChannel: ORSModel.ors.Channel, levelingMinRange: float, levelingMaxRange: float, ILUT: ORSModel.ors.LookupTable, intersectingChannelClipBox: ORSModel.ors.Box)
- Parameters:
pBox (ORSModel.ors.Box) –
label (float) –
tStep (int) –
intersectingChannel (ORSModel.ors.Channel) –
levelingMinRange (float) –
levelingMaxRange (float) –
ILUT (ORSModel.ors.LookupTable) –
intersectingChannelClipBox (ORSModel.ors.Box) –
- paintBoxIntersectingMultiROI(self, pBox: ORSModel.ors.Box, label: float, tStep: int, intersectingMultiROI: ORSModel.ors.MultiROI, fHightlightOpacity: float, fHightlightOpacityOutRange: float, intersectingMultiROIClipBox: ORSModel.ors.Box)
- Parameters:
pBox (ORSModel.ors.Box) –
label (float) –
tStep (int) –
intersectingMultiROI (ORSModel.ors.MultiROI) –
fHightlightOpacity (float) –
fHightlightOpacityOutRange (float) –
intersectingMultiROIClipBox (ORSModel.ors.Box) –
- paintBoxIntersectingROI(self, pBox: ORSModel.ors.Box, label: float, tStep: int, intersectingROI: ORSModel.ors.ROI, intersectingROIClipBox: ORSModel.ors.Box)
- Parameters:
pBox (ORSModel.ors.Box) –
label (float) –
tStep (int) –
intersectingROI (ORSModel.ors.ROI) –
intersectingROIClipBox (ORSModel.ors.Box) –
- paintCircle(self, aCircle: ORSModel.ors.Circle, label: float, timeIndex: int)
- Parameters:
aCircle (ORSModel.ors.Circle) –
label (float) –
timeIndex (int) –
- paintCircleOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, label: float, timeIndex: int)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
radius (float) –
label (float) –
timeIndex (int) –
- paintCircleOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
radius (float) –
label (float) –
timeIndex (int) –
lowerThreshold (float) –
upperThreshold (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- paintEllipseOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, dir0Radius: float, dir1Radius: float, axisOrientation: float, label: float, timeIndex: int, worldPositionArray: ORSModel.ors.ArrayDouble)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
dir0Radius (float) –
dir1Radius (float) –
axisOrientation (float) –
label (float) –
timeIndex (int) –
worldPositionArray (ORSModel.ors.ArrayDouble) –
- 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)
- Parameters:
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) –
- paintPolygonOnPlane(self, pPlane: ORSModel.ors.Rectangle, polygonWorldPos: ORSModel.ors.ArrayDouble, label: float, timeIndex: int, worldPositionArray: ORSModel.ors.ArrayDouble)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
polygonWorldPos (ORSModel.ors.ArrayDouble) –
label (float) –
timeIndex (int) –
worldPositionArray (ORSModel.ors.ArrayDouble) –
- 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)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
polygonWorldPos (ORSModel.ors.ArrayDouble) –
label (float) –
timeIndex (int) –
lowerThreshold (float) –
upperThreshold (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
worldPositionArray (ORSModel.ors.ArrayDouble) –
- paintRectangleOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, dir0Length: float, dir1Length: float, label: float, timeIndex: int)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
dir0Length (float) –
dir1Length (float) –
label (float) –
timeIndex (int) –
- 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)
- Parameters:
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) –
- paintRemoveBox(self, pBox: ORSModel.ors.Box, tStep: int)
Removes a box (3D object) from the receiver.
- Parameters:
pBox (ORSModel.ors.Box) – The T index (a uint32_t)
tStep (int) –
- paintRemoveCircleOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, timeIndex: int)
Removes a circle (2D object) from the receiver.
- Parameters:
pPlane (ORSModel.ors.Rectangle) – The plane of the circle (a Rectangle)
worldPos (ORSModel.ors.Vector3) – The center of the circle (a Vector3)
radius (float) – The radius of the circle (a double)
timeIndex (int) – The T index (a uint32_t)
- paintRemoveSphere(self, worldPos: ORSModel.ors.Vector3, fRadius: float, tStep: int)
Removes a sphere (3D object) from the receiver.
- Parameters:
worldPos (ORSModel.ors.Vector3) – The center of the sphere (a Vector3)
fRadius (float) – The sphere radius (a double)
tStep (int) – The T index (a uint32_t)
- paintRemoveSquareOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, radius: float, timeIndex: int)
Removes a square (2D object) from the receiver.
- Parameters:
pPlane (ORSModel.ors.Rectangle) – The plane of the square (a Rectangle)
worldPos (ORSModel.ors.Vector3) – The center of the square (a Vector3)
radius (float) – The radius (a double)
timeIndex (int) – The T index (a uint32_t)
- paintShape3D(self, aShape: ORSModel.ors.Shape3D, label: float, tStep: int)
- Parameters:
aShape (ORSModel.ors.Shape3D) –
label (float) –
tStep (int) –
- paintShape3DIfInRange(self, aShape: ORSModel.ors.Shape3D, label: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
aShape (ORSModel.ors.Shape3D) –
label (float) –
tStep (int) –
fMinValue (float) –
fMaxValue (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- paintSphere(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int)
- Parameters:
worldPos (ORSModel.ors.Vector3) –
fRadius (float) –
label (float) –
tStep (int) –
- paintSphereIfInRange(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
worldPos (ORSModel.ors.Vector3) –
fRadius (float) –
label (float) –
tStep (int) –
fMinValue (float) –
fMaxValue (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- paintSphereIntersectingChannel(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int, intersectingChannel: ORSModel.ors.Channel, levelingMinRange: float, levelingMaxRange: float, ILUT: ORSModel.ors.LookupTable, intersectingChannelClipBox: ORSModel.ors.Box)
- Parameters:
worldPos (ORSModel.ors.Vector3) –
fRadius (float) –
label (float) –
tStep (int) –
intersectingChannel (ORSModel.ors.Channel) –
levelingMinRange (float) –
levelingMaxRange (float) –
ILUT (ORSModel.ors.LookupTable) –
intersectingChannelClipBox (ORSModel.ors.Box) –
- paintSphereIntersectingMultiROI(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int, intersectingMultiROI: ORSModel.ors.MultiROI, fHightlightOpacity: float, fHightlightOpacityOutRange: float, intersectingMultiROIClipBox: ORSModel.ors.Box)
- Parameters:
worldPos (ORSModel.ors.Vector3) –
fRadius (float) –
label (float) –
tStep (int) –
intersectingMultiROI (ORSModel.ors.MultiROI) –
fHightlightOpacity (float) –
fHightlightOpacityOutRange (float) –
intersectingMultiROIClipBox (ORSModel.ors.Box) –
- paintSphereIntersectingROI(self, worldPos: ORSModel.ors.Vector3, fRadius: float, label: float, tStep: int, intersectingROI: ORSModel.ors.ROI, intersectingROIClipBox: ORSModel.ors.Box)
- Parameters:
worldPos (ORSModel.ors.Vector3) –
fRadius (float) –
label (float) –
tStep (int) –
intersectingROI (ORSModel.ors.ROI) –
intersectingROIClipBox (ORSModel.ors.Box) –
- paintSquareOnPlane(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, width: float, label: float, timeIndex: int)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
width (float) –
label (float) –
timeIndex (int) –
- paintSquareOnPlaneIfInRange(self, pPlane: ORSModel.ors.Rectangle, worldPos: ORSModel.ors.Vector3, width: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
pPlane (ORSModel.ors.Rectangle) –
worldPos (ORSModel.ors.Vector3) –
width (float) –
label (float) –
timeIndex (int) –
lowerThreshold (float) –
upperThreshold (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- paintSubset(self, startX: int, startY: int, startZ: int, endX: int, endY: int, endZ: int, label: float, tStep: int)
- 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)
- 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)
- Parameters:
worldPositionArray (ORSModel.ors.ArrayDouble) –
label (float) –
timeIndex (int) –
- paintVoxelsFromWorldCoordinatesIfInRange(self, worldPositionArray: ORSModel.ors.ArrayDouble, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: ORSModel.ors.StructuredGrid)
- Parameters:
worldPositionArray (ORSModel.ors.ArrayDouble) –
label (float) –
timeIndex (int) –
lowerThreshold (float) –
upperThreshold (float) –
pRangeChannel (ORSModel.ors.StructuredGrid) –
- projectInto(self, aDestinationStructuredGrid: ORSModel.ors.StructuredGrid, IProgress: ORSModel.ors.Progress)
Copies the receiver into the destination, keeping the destination shape.
- Parameters:
aDestinationStructuredGrid (ORSModel.ors.StructuredGrid) – a destination StructuredGrid (a StructuredGrid)
IProgress (ORSModel.ors.Progress) –
- removeROIAtTOffset(self, aROI: ORSModel.ors.ROI, pTOffset: int)
Note
The ROI to add will be projected correctly if it doesn’t share the same characteristics.
See also
removeROI(), MergeWithROI()
- Parameters:
aROI (ORSModel.ors.ROI) – the ROI to remove (an ROI)
pTOffset (int) – the T offset (a uint32_t)
- setBox(self, IInBox: ORSModel.ors.Box)
Sets the box.
Dirty flags: OrsDataDirty, OrsGeometryDirty
- Parameters:
IInBox (ORSModel.ors.Box) – the box (an Box)
- setCurrentShapeAsOriginal(self)
- setOrigin(self, origin: ORSModel.ors.Vector3)
Set the origin.
Dirty flags: OrsGeometryDirty
- Parameters:
origin (ORSModel.ors.Vector3) – the new origin (a Vector3)
- setTSize(self, pTSize: int)
Sets the T size of the structured grid.
Dirty flags: OrsDataDirty, OrsGeometryDirty
Note
The T size is expressed in units.
- Parameters:
pTSize (int) – T size (an uint32_t)
- setTSpacing(self, pTSpacing: float)
Sets the structured grid’s T spacing.
Dirty flags: OrsGeometryDirty
Note
Spacing is used for structured grid visual representation.
- Parameters:
pTSpacing (float) – T spacing (a double)
- setTransformationShape3D(self, aShape: ORSModel.ors.Shape3D)
- Parameters:
aShape (ORSModel.ors.Shape3D) –
- setXSize(self, pXSize: int)
Sets the X size of the structured grid.
Dirty flags: OrsDataDirty, OrsGeometryDirty
Note
The size is expressed in pixels.
- Parameters:
pXSize (int) – X size (an uint32_t)
- setXSpacing(self, pXSpacing: float)
Sets the structured grid’s X spacing.
Dirty flags: OrsGeometryDirty
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)
Sets the X,Y,Z,T sizes of the structured grid.
Dirty flags: OrsDataDirty, OrsGeometryDirty
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)
Sets the Y size of the structured grid.
Dirty flags: OrsDataDirty, OrsGeometryDirty
Note
The size is expressed in pixels.
- Parameters:
pYSize (int) – Y size (an uint32_t)
- setYSpacing(self, pYSpacing: float)
Sets the structured grid’s Y spacing.
Dirty flags: OrsGeometryDirty
Note
Spacing is used for structured grid visual representation.
- Parameters:
pYSpacing (float) – Y spacing (a double)
- setZSize(self, pZSize: int)
Sets the Z size of the structured grid.
Dirty flags: OrsDataDirty, OrsGeometryDirty
Note
The size is expressed in pixels.
- Parameters:
pZSize (int) – Z size (an uint32_t)
- setZSliceThickness(self, pZThickness: float)
Sets the structured grid’s Z slice thickness.
Note
Slice thickness is used for structured grid visual representation.
See also
ORSModel.ors.StructuredGrid.setZSpacing(),ORSModel.ors.StructuredGrid.getZSpacing(),ORSModel.ors.StructuredGrid.getZSliceThickness()- Parameters:
pZThickness (float) – Z slice thickness (a double)
- setZSpacing(self, pZSpacing: float)
Sets the structured grid’s Z spacing.
Dirty flags: OrsGeometryDirty
Note
Spacing is used for structured grid visual representation.
- Parameters:
pZSpacing (float) – Z spacing (a double)
- warpWithDeformationChannels(self, deformationChannelX: ORSModel.ors.Channel, deformationChannelY: ORSModel.ors.Channel, deformationChannelZ: ORSModel.ors.Channel, tIndex: int) ORSModel.ors.StructuredGrid
- Parameters:
deformationChannelX (ORSModel.ors.Channel) –
deformationChannelY (ORSModel.ors.Channel) –
deformationChannelZ (ORSModel.ors.Channel) –
tIndex (int) –
- Returns:
output (ORSModel.ors.StructuredGrid) –
SurfaceControlPoints¶
- class ORSModel.ors.SurfaceControlPoints
Bases:
Shape3DSurfaceControlPoints manipulation services.
- copy(self) ORSModel.ors.SurfaceControlPoints
Note
The copied SurfaceControlPoints has the same equation as the source SurfaceControlPoints.
- Returns:
output (ORSModel.ors.SurfaceControlPoints) – A new SurfaceControlPoints (an SurfaceControlPoints)
- getCenter(self) ORSModel.ors.Vector3
Gets the geometrical middle of the surface.
- Returns:
output (ORSModel.ors.Vector3) – a surface center position (an Vector3)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getControlPoint(self, uIndex: int, vIndex: int) ORSModel.ors.Vector3
- Parameters:
uIndex (int) –
vIndex (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getControlPointAtIndex(self, index: int) ORSModel.ors.Vector3
- Parameters:
index (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getControlPointCount(self) int
- Returns:
output (int) –
- getIsEqualTo(self, SurfaceControlPoints: ORSModel.ors.SurfaceControlPoints) bool
- Parameters:
SurfaceControlPoints (ORSModel.ors.SurfaceControlPoints) –
- Returns:
output (bool) – TRUE if the argument SurfaceControlPoints is equal to the receiver, FALSE otherwise
- getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) ORSModel.ors.SurfaceControlPoints
- Parameters:
axisOfRotation (ORSModel.ors.Vector3) –
rotationCenter (ORSModel.ors.Vector3) –
angle (float) –
- Returns:
output (ORSModel.ors.SurfaceControlPoints) –
- getSurfaceMesh(self, xVertexCount: int, yVertexCount: int) ORSModel.ors.FaceVertexMesh
Create aFaceVertexMesh corresponding to the Surface generated by the control points.
- Parameters:
xVertexCount (int) – xVertexCount (a uint16_t)
yVertexCount (int) – yVertexCount (a uint16_t)
- Returns:
output (ORSModel.ors.FaceVertexMesh) – a Mesh (a FaceVertexMesh)
- getUControlPointCount(self) int
get the U control point count
- Returns:
output (int) – a count
- getVControlPointCount(self) int
get the V control point count
- Returns:
output (int) – a count (a uint32_t)
- getValueAt(self, u: float, v: float) ORSModel.ors.Vector3
- Parameters:
u (float) –
v (float) –
- Returns:
output (ORSModel.ors.Vector3) –
- none() SurfaceControlPoints
- Returns:
output (SurfaceControlPoints) –
- rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float)
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)
- setControlPoint(self, uIndex: int, vIndex: int, controlPoint: ORSModel.ors.Vector3)
- Parameters:
uIndex (int) –
vIndex (int) –
controlPoint (ORSModel.ors.Vector3) –
- setControlPointAtIndex(self, index: int, controlPoint: ORSModel.ors.Vector3)
- Parameters:
index (int) –
controlPoint (ORSModel.ors.Vector3) –
- setControlPointsFromArray(self, controlPoints: ORSModel.ors.Array) bool
Sets the control points from an array.
- Parameters:
controlPoints (ORSModel.ors.Array) –
- Returns:
output (bool) – an array (an Vector3)
- setSize(self, uControlPointCount: int, vControlPointCount: int)
- Parameters:
uControlPointCount (int) –
vControlPointCount (int) –
- transform(transformationMatrix: ORSModel.ors.Matrix4x4)
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)
ThresholdHelper¶
- class ORSModel.ors.ThresholdHelper(self)
Bases:
Unmanaged- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getGaussianThreshold(aDataset: ORSModel.ors.Channel, aROI: ORSModel.ors.ROI, worldPosition: ORSModel.ors.Vector3, sigma: float, timestepDataset: int, timestepROI: int) float
- Parameters:
aDataset (ORSModel.ors.Channel) –
aROI (ORSModel.ors.ROI) –
worldPosition (ORSModel.ors.Vector3) –
sigma (float) –
timestepDataset (int) –
timestepROI (int) –
- Returns:
output (float) –
- getOtsuThreshold(aDataset: ORSModel.ors.Channel, aROI: ORSModel.ors.ROI, timestepDataset: int, timestepROI: int, bin: int) float
- Parameters:
aDataset (ORSModel.ors.Channel) –
aROI (ORSModel.ors.ROI) –
timestepDataset (int) –
timestepROI (int) –
bin (int) –
- Returns:
output (float) –
- getOtsuThresholdGivenRange(aDataset: ORSModel.ors.Channel, aROI: ORSModel.ors.ROI, timestepDataset: int, lowerRange: float, upperRange: float, timestepROI: int, bin: int) float
- Parameters:
aDataset (ORSModel.ors.Channel) –
aROI (ORSModel.ors.ROI) –
timestepDataset (int) –
lowerRange (float) –
upperRange (float) –
timestepROI (int) –
bin (int) –
- Returns:
output (float) –
TraceBackChannelAnalyzer¶
- class ORSModel.ors.TraceBackChannelAnalyzer(self)
Bases:
Unmanaged- findAllLeaves(self, aChannel: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI) ORSModel.ors.ROI
- Parameters:
aChannel (ORSModel.ors.Channel) –
inputROI (ORSModel.ors.ROI) –
- Returns:
output (ORSModel.ors.ROI) –
- forwardSelectionFromRoi(self, linputChannelTraceForward: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI)
- Parameters:
linputChannelTraceForward (ORSModel.ors.Channel) –
inputROI (ORSModel.ors.ROI) –
outputROI (ORSModel.ors.ROI) –
- forwardSelectionFromRoiToDistance(self, linputChannelTraceForward: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI, distance: int)
- Parameters:
linputChannelTraceForward (ORSModel.ors.Channel) –
inputROI (ORSModel.ors.ROI) –
outputROI (ORSModel.ors.ROI) –
distance (int) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() TraceBackChannelAnalyzer
- Returns:
output (TraceBackChannelAnalyzer) –
- selectPointFurtherOrNearerThanMinDistance(self, linputChannelTraceBack: ORSModel.ors.Channel, indices: int, indicesSize: int, minDistance: int, outputROI: ORSModel.ors.ROI, further: bool)
- Parameters:
linputChannelTraceBack (ORSModel.ors.Channel) –
indices (int) –
indicesSize (int) –
minDistance (int) –
outputROI (ORSModel.ors.ROI) –
further (bool) –
- traceBackTotraceForward(self, linputChannelTraceBack: ORSModel.ors.Channel, loutputChannelTraceForward: ORSModel.ors.Channel)
- Parameters:
linputChannelTraceBack (ORSModel.ors.Channel) –
loutputChannelTraceForward (ORSModel.ors.Channel) –
- tracebackCPU(self, linputChannelTraceBack: ORSModel.ors.Channel, inputROI: ORSModel.ors.ROI, outputROI: ORSModel.ors.ROI, outputVoteChannel: ORSModel.ors.Channel, gatherAlgo: bool) ORSModel.ors.ROI
- Parameters:
linputChannelTraceBack (ORSModel.ors.Channel) –
inputROI (ORSModel.ors.ROI) –
outputROI (ORSModel.ors.ROI) –
outputVoteChannel (ORSModel.ors.Channel) –
gatherAlgo (bool) –
- 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)
- Parameters:
linputChannelTraceBack (ORSModel.ors.Channel) –
worldPosition (ORSModel.ors.Vector3) –
aPath (ORSModel.ors.VisualPath) –
pathWorldMatrix (ORSModel.ors.Matrix4x4) –
gatherAlgo (bool) –
Unmanaged¶
- class ORSModel.ors.Unmanaged
Bases:
ORSBaseClassAbstract class for objects that are not managed by the core library. Unmanaged objects are transient objects.
- 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) – an unmanaged 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) ORSModel.ors.Unmanaged
Create aUnmanaged Object from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Unmanaged) –
- fromPythonRepresentation(self, aPythonRepresentation: str) bool
Create aUnmanaged 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)
- 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) –
- getDataChecksum(self) str
- 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) –
- getPythonRepresentation(self) str
Gets a Python evaluable string representation.
- Returns:
output (str) –
- 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) –
UnstructuredGrid¶
- class ORSModel.ors.UnstructuredGrid(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Node- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
- getAllFeretDiameter(self, dMin: float, dMean: float, dMax: float, iTIndex: int, iAngleSampling: int = 5) 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) ORSModel.ors.Box
- Parameters:
iTIndex (int) –
aWorldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Box) –
- getBoundingBoxAlignWithBox(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4, aBox: ORSModel.ors.Box) ORSModel.ors.Box
- Parameters:
iTIndex (int) –
aWorldTransform (ORSModel.ors.Matrix4x4) –
aBox (ORSModel.ors.Box) –
- Returns:
output (ORSModel.ors.Box) –
- getCenterOfMass(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) ORSModel.ors.Vector3
- Parameters:
iTIndex (int) –
aWorldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Vector3) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getClipBox(timestep=0, display=None)
Gets the clip box of the channel
- Parameters:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- 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
Note
Use -1 to indicate no current scalar
- Returns:
output (int) –
- 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 = 5) 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)
- 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) ORSModel.ors.Box
- Parameters:
iTIndex (int) –
aWorldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Box) –
- getMomentOfInertia(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) ORSModel.ors.Matrix4x4
- Parameters:
iTIndex (int) –
aWorldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getTSize(self) int
Gets the number of time steps for the mesh.
See also
setCurrentTimeStep()
- 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)
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) –
- getVertexScalarSlotIndexForDescription(self, sValue: str, iTIndex: int) int
Gets the scalar slot index from a vertex scalar description.
- Parameters:
sValue (str) – the slot description (an std::wstring)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (int) – the index or -1 if not found
- getVertexScalarValue(self, scalarValueSlotIndex: int, scalarValueVertexIndex: int, iTIndex: int) float
Gets the value of a vertex scalar.
- Parameters:
scalarValueSlotIndex (int) – the scalar slot index (an uint16_t)
scalarValueVertexIndex (int) – the vertex index (an uint64_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (float) – the value of a vertex scalar (a double)
- getVertexScalarValueDescription(self, scalarValueSlotIndex: int, iTIndex: int) str
- Parameters:
scalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (str) –
- getVertexScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, iTIndex: int) ORSModel.ors.DimensionUnit
Gets the dimension unit of a vertex scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
- getVertexScalarValueMax(self, scalarValueSlotIndex: int, iTIndex: int) float
method getVertexScalarValueMax
Deprecated since version (unknown): use getVertexScalarValuesWindowMax instead
- Parameters:
scalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getVertexScalarValueMaxs(self, iTIndex: int) ORSModel.ors.ArrayDouble
method getVertexScalarValueMaxs
Deprecated since version (unknown): use getVertexScalarValuesWindowMaxs instead
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getVertexScalarValueMin(self, scalarValueSlotIndex: int, iTIndex: int) float
method getVertexScalarValueMin
Deprecated since version (unknown): use getVertexScalarValuesWindowMin instead
- Parameters:
scalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (float) –
- getVertexScalarValueMins(self, iTIndex: int) ORSModel.ors.ArrayDouble
method getVertexScalarValueMins
Deprecated since version (unknown): use getVertexScalarValuesWindowMins instead
- 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 double)
- getVertexScalarValueOffsets(self, iTIndex: int) ORSModel.ors.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 double array)
- 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 double)
- getVertexScalarValueSlopes(self, iTIndex: int) ORSModel.ors.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 double array)
- getVertexScalarValueSlotLookUpTable(self, nScalarValueSlotIndex: int, iTIndex: int) dict
- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (dict) –
- getVertexScalarValues(self, nScalarValueSlotIndex: int, iTIndex: int) ORSModel.ors.Array
Note
The scalar value in the slot s of the vertex v is located at the index (getVertexScalarValuesSlotCount() * v) + s of the array.
See also
ORSModel.ors.UnstructuredGrid.setVertexScalarValues(),ORSModel.ors.UnstructuredGrid.getVertexCount(),ORSModel.ors.UnstructuredGrid.getVertexScalarValuesSlotCount()- Parameters:
nScalarValueSlotIndex (int) –
iTIndex (int) –
- Returns:
output (ORSModel.ors.Array) –
- getVertexScalarValuesCollection(self) ORSModel.ors.ScalarValuesCollection
- Returns:
output (ORSModel.ors.ScalarValuesCollection) –
- getVertexScalarValuesDatatype(self, nScalarValueSlotIndex: int) int
- Parameters:
nScalarValueSlotIndex (int) –
- Returns:
output (int) –
- getVertexScalarValuesId(self, nScalarValueSlotIndex: int, iTIndex: int) str
Gets the scalar slot id from a vertex scalar values slot.
- Parameters:
nScalarValueSlotIndex (int) – the index of the slot (a uint16_t)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (str) –
- 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) ORSModel.ors.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) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getVerticeDistancesFromPoint(self, aPoint: ORSModel.ors.Vector3, timeStep: int, outputCollection: ORSModel.ors.ArrayDouble) ORSModel.ors.ArrayDouble
Get unsigned distance between the point and the the vertices of theMesh.
- Parameters:
aPoint (ORSModel.ors.Vector3) – aPoint (ORS::Vector3 )
timeStep (int) – timeStep of the receiving Mesh to considered (a uint32_t)
outputCollection (ORSModel.ors.ArrayDouble) – output ArrayDouble, can be None (ORS::ArrayDouble)
- Returns:
output (ORSModel.ors.ArrayDouble) – the Output ArrayDouble (ORS::ArrayDouble)
- getVertices(self, iTIndex: int) ORSModel.ors.Array
Gets the vertices.
See also
ORSModel.ors.UnstructuredGrid.setVertices(),ORSModel.ors.UnstructuredGrid.getVertexCount()- Parameters:
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.Array) – an array of float (an Array)
- getVerticesIndicesIncludedInBox(self, aBox: ORSModel.ors.Box, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
Get all the indices of vertices that are include in the provided box.
- Parameters:
aBox (ORSModel.ors.Box) – the box (ORS::Box)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – -an array containing all the vertices include in the box (ORS::ArrayUnsignedLong)
- getVerticesIndicesNotIncludedInBox(self, aBox: ORSModel.ors.Box, iTIndex: int) ORSModel.ors.ArrayUnsignedLong
Get all the indices of vertices that are not include in the provided box.
- Parameters:
aBox (ORSModel.ors.Box) – the box (ORS::Box)
iTIndex (int) – the time step (a uint32_t)
- Returns:
output (ORSModel.ors.ArrayUnsignedLong) – -an array containing all the vertices include in the box (ORS::ArrayUnsignedLong)
- mapScalarValuesFromAMultiROI(self, referenceMultiROI: ORSModel.ors.MultiROI, multiROIScalarValueSlotIndex: int, sourceScalarValuesSlotIndex: int, multiROITIndex: int, sourceTIndex: int, aDefaultScalarValue: float)
- Parameters:
referenceMultiROI (ORSModel.ors.MultiROI) – the multiROI time step (a uint32_t)
multiROIScalarValueSlotIndex (int) – the unstructured grid time step (a uint32_t)
sourceScalarValuesSlotIndex (int) – a default scalar value in case that no match is possible for a vertex between the structured grid and the MultiROI (a double)
multiROITIndex (int) –
sourceTIndex (int) –
aDefaultScalarValue (float) –
- mapScalarValuesFromChannel(self, aReferenceChannel: ORSModel.ors.Channel, sourceScalarValuesSlotIndex: int, channelTimeStep: int, sourceTIndex: int, aDefaultScalarValue: float)
- Parameters:
aReferenceChannel (ORSModel.ors.Channel) – the channel time step (a uint32_t)
sourceScalarValuesSlotIndex (int) – the unstructured grid time step (a uint32_t)
channelTimeStep (int) – a default scalar value in case that no match is possible for a vertex between the structured grid and the MultiROI (a double)
sourceTIndex (int) –
aDefaultScalarValue (float) –
- none() UnstructuredGrid
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (UnstructuredGrid) –
- offsetVertices(self, x: float, y: float, z: float)
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)
Remove a scalar slot from the vertex scalars values slot.
- Parameters:
nScalarValueSlotIndex (int) – the index of the slot to be removed (a uint16_t)
- setCurrentVertexScalarValuesSlot(self, nCurrentScalarValueSlotIndex: int)
Note
Use -1 to indicate no current scalar
- Parameters:
nCurrentScalarValueSlotIndex (int) –
- setDefaultVertexAlphaColor(self, value: float)
Sets the unstructured grid its default alpha color.
- Parameters:
value (float) – Alpha color (double)
- setDefaultVertexColor(self, color: ORSModel.ors.Color)
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 (ORSModel.ors.Color) – a color (an Color)
- setHideOutOfRangeVertexScalarValues(self, value: bool)
Indicate if out of range values should be hiden.
- Parameters:
value (bool) –
- setOutOfRangeScalarValue(self, value: float)
Sets a scalar out or range value.
- Parameters:
value (float) – the value (a float)
- setTSize(self, tSize: int)
Sets the number of time steps for the mesh.
- Parameters:
tSize (int) – a number (a uint32_t)
- setUseDefaultVertexAlphaColor(self, value: bool)
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)
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)
Gets the status of vertex scalar values usage.
See also
getScalarValues(), getScalarValuesSlotCount()
- Parameters:
value (bool) –
- setVertexAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float)
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)
- setVertexCount(self, nVertexCount: int, iTIndex: int)
Sets the number of vertex in the Unstructured Grid.
- Parameters:
nVertexCount (int) – the new Vertex Count (a uint32_t)
iTIndex (int) – the time step (a uint32_t)
- setVertexDatatype(self, nVertexDatatype: int)
- Parameters:
nVertexDatatype (int) –
- setVertexScalarValue(self, scalarValueSlotIndex: int, scalarValueVertexIndex: int, aValue: float, iTIndex: int)
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 double)
iTIndex (int) – the time step (a uint32_t)
- setVertexScalarValueDescription(self, scalarValueSlotIndex: int, value: str, iTIndex: int)
- Parameters:
scalarValueSlotIndex (int) –
value (str) –
iTIndex (int) –
- setVertexScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, pDimensionUnit: ORSModel.ors.DimensionUnit, iTIndex: int)
Sets the dimension unit of a vertex scalar.
- Parameters:
nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
pDimensionUnit (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
iTIndex (int) – the time step (a uint32_t)
- setVertexScalarValueMax(self, scalarValueSlotIndex: int, value: float, iTIndex: int)
method setVertexScalarValueMax
Deprecated since version (unknown): use setVertexScalarValuesWindowMax instead
- Parameters:
scalarValueSlotIndex (int) –
value (float) –
iTIndex (int) –
- setVertexScalarValueMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
method setVertexScalarValueMaxs
Deprecated since version (unknown): use setVertexScalarValuesWindowMaxs instead
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setVertexScalarValueMin(self, scalarValueSlotIndex: int, value: float, iTIndex: int)
method setVertexScalarValueMin
Deprecated since version (unknown): use setVertexScalarValuesWindowMin instead
- Parameters:
scalarValueSlotIndex (int) –
value (float) –
iTIndex (int) –
- setVertexScalarValueMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
method setVertexScalarValueMins
Deprecated since version (unknown): use setVertexScalarValuesWindowMins instead
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setVertexScalarValueOffset(self, scalarValueSlotIndex: int, value: float, iTIndex: int)
Sets a vertex scalar offset value.
- Parameters:
scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
value (float) – the scalar offset value (a double)
iTIndex (int) – the time step (a uint32_t)
- setVertexScalarValueOffsets(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
Set the vertex scalar offset values.
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) – scalar offset value (a double array)
iTIndex (int) – time step (a uint32_t)
- setVertexScalarValueSlope(self, scalarValueSlotIndex: int, value: float, iTIndex: int)
Set a vertex scalar slope value.
- Parameters:
scalarValueSlotIndex (int) – scalar slot index (an uint32_t)
value (float) – scalar slope value (a double)
iTIndex (int) – time step (a uint32_t)
- setVertexScalarValueSlopes(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
Set the vertex scalar slope values.
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) – scalar slope value (a double array)
iTIndex (int) – time step (a uint32_t)
- setVertexScalarValueSlotLookUpTable(self, lookUpTable: dict, nScalarValueSlotIndex: int, iTIndex: int)
- Parameters:
lookUpTable (dict) –
nScalarValueSlotIndex (int) –
iTIndex (int) –
- setVertexScalarValueUnit(self, scalarValueSlotIndex: int, value: int, iTIndex: int)
setVertexScalarValueUnit
Deprecated since version (unknown): use setVertexScalarValueDimensionUnit instead
- Parameters:
scalarValueSlotIndex (int) –
value (int) –
iTIndex (int) –
- setVertexScalarValues(self, pScalarValues: ORSModel.ors.Array, nScalarValueSlotIndex: int, iTIndex: int)
Note
The scalar value in the slot s of the vertex v is located at the index (getVertexScalarValuesSlotCount() * v) + s of the array.
See also
ORSModel.ors.UnstructuredGrid.getVertexScalarValues(),ORSModel.ors.UnstructuredGrid.getVertexCount(),ORSModel.ors.UnstructuredGrid.getVertexScalarValuesSlotCount()- Parameters:
pScalarValues (ORSModel.ors.Array) –
nScalarValueSlotIndex (int) –
iTIndex (int) –
- setVertexScalarValuesDatatype(self, nScalarValueSlotIndex: int, nVertexScalarValuesDatatype: int)
- Parameters:
nScalarValueSlotIndex (int) –
nVertexScalarValuesDatatype (int) –
- setVertexScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int)
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)
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)
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)
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)
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)
- Parameters:
scalarValueSlotIndex (int) –
value (float) –
iTIndex (int) –
- setVertexScalarValuesWindowMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setVertexScalarValuesWindowMin(self, scalarValueSlotIndex: int, value: float, iTIndex: int)
- Parameters:
scalarValueSlotIndex (int) –
value (float) –
iTIndex (int) –
- setVertexScalarValuesWindowMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int)
- Parameters:
pScalarValues (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
- setVertices(self, pVertices: ORSModel.ors.Array, iTIndex: int)
Sets the vertices.
See also
ORSModel.ors.UnstructuredGrid.getVertices(),ORSModel.ors.UnstructuredGrid.getVertexCount()- Parameters:
pVertices (ORSModel.ors.Array) – the vertices(an Array)
iTIndex (int) – the time step (a uint32_t)
Vector3¶
- class ORSModel.ors.Vector3
Bases:
UnmanagedA wrapper to a 3D vector.
- add(self, aVector: ORSModel.ors.Vector3)
Adds a vector to the receiver.
- Parameters:
aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
- copy(self) ORSModel.ors.Vector3
Returns a new vector identical to the receiver (a copy).
- Returns:
output (ORSModel.ors.Vector3) –
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Vector3
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Vector3) –
- getAPerpendicular(self) ORSModel.ors.Vector3
Computes a perpendicular from the vector.
See also
ORSModel.ors.Vector3.getDotProductWith(),ORSModel.ors.Vector3.getAngleWith(),ORSModel.ors.Vector3.getDistanceFrom()- Returns:
output (ORSModel.ors.Vector3) – a perpendicular vector (an Vector3)
- getAdditionWith(self, aVector: ORSModel.ors.Vector3) ORSModel.ors.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) –
- getClosestPointOnTriangle(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3, point2: ORSModel.ors.Vector3) ORSModel.ors.Vector3
- Parameters:
point0 (ORSModel.ors.Vector3) – a vector (an Vector3)
point1 (ORSModel.ors.Vector3) – a vector (an Vector3)
point2 (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getCrossProductWith(self, pVect: ORSModel.ors.Vector3) ORSModel.ors.Vector3
Computes the cross product with another vector.
See also
ORSModel.ors.Vector3.getDotProductWith(),ORSModel.ors.Vector3.getAngleWith(),ORSModel.ors.Vector3.getDistanceFrom()- 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)
- getDistanceFromClosestPointOnTriangle(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3, point2: ORSModel.ors.Vector3) float
- Parameters:
point0 (ORSModel.ors.Vector3) – a vector (an Vector3)
point1 (ORSModel.ors.Vector3) – a vector (an Vector3)
point2 (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (float) – a Double
- getDotProductWith(self, pVect: ORSModel.ors.Vector3) float
Computes the dot product with another vector.
See also
ORSModel.ors.Vector3.getCrossProductWith(),ORSModel.ors.Vector3.getAngleWith(),ORSModel.ors.Vector3.getDistanceFrom()- 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) ORSModel.ors.Vector3
Computes the lerp with another vector.
See also
ORSModel.ors.Vector3.getDotProductWith(),ORSModel.ors.Vector3.getAngleWith(),ORSModel.ors.Vector3.getDistanceFrom()- 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) ORSModel.ors.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) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getPhi(self) float
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)
- getRotatedAroundAxis(self, anAxis: ORSModel.ors.Vector3, centerOfRotation: ORSModel.ors.Vector3, angleInRadian: float) ORSModel.ors.Vector3
- 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) ORSModel.ors.Vector3
Gets the result of scaling 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) ORSModel.ors.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.
See also
ORSModel.ors.Vector3.getY(),ORSModel.ors.Vector3.getZ(), getW()- Returns:
output (float) – a double
- getY(self) float
Gets the Y value from the vector.
See also
ORSModel.ors.Vector3.getX(),ORSModel.ors.Vector3.getZ(), getW()- Returns:
output (float) – a double
- getZ(self) float
Gets the Z value from the vector.
See also
ORSModel.ors.Vector3.getX(),ORSModel.ors.Vector3.getY(), getW()- Returns:
output (float) – a double
- negate(self)
Negates the vector.
- normalize(self)
Normalizes the vector.
Note
A normalized vector has norm (length) 1.
- scale(self, scaleFactor: float)
Scales the vector.
- Parameters:
scaleFactor (float) – a scale factor (a double)
- setX(self, value: float)
Sets the X value of the vector.
See also
ORSModel.ors.Vector3.setY(),ORSModel.ors.Vector3.setZ(), setW()- Parameters:
value (float) – a double value
- setXYZ(self, x: float, y: float, z: float)
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)
Sets the Y value of the vector.
See also
ORSModel.ors.Vector3.setX(),ORSModel.ors.Vector3.setZ(), setW()- Parameters:
value (float) – a double value
- setZ(self, value: float)
Sets the Z value of the vector.
See also
ORSModel.ors.Vector3.setX(),ORSModel.ors.Vector3.setY(), setW()- Parameters:
value (float) – a double value
- subtract(self, aVector: ORSModel.ors.Vector3)
Subtracts a vector from the receiver.
- Parameters:
aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
VectorField¶
- class ORSModel.ors.VectorField(self)
Bases:
UnstructuredGridVectorField.__init__(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
- copyInto(self, aDestination: ORSModel.ors.VectorField)
Copies the receiver into another vector field.
- Parameters:
aDestination (ORSModel.ors.VectorField) – a destination vector field
- fromChannels(self, xValues: ORSModel.ors.Channel, yValues: ORSModel.ors.Channel, zValues: ORSModel.ors.Channel, norms: ORSModel.ors.Channel, xSampling: int, ySampling: int, zSampling: int, atTimeStep: int, fromTimeStep: int)
Add vectors on a regular grid specified by the input Channels.
- Parameters:
xValues (ORSModel.ors.Channel) – the X values of the vector (an ORS::Channel)
yValues (ORSModel.ors.Channel) – the Y values of the vector (an ORS::Channel)
zValues (ORSModel.ors.Channel) – the Z values of the vector (an ORS::Channel)
norms (ORSModel.ors.Channel) – optional norm values of the vector (an ORS::Channel)
xSampling (int) – the sampling in X (a uint32_t)
ySampling (int) – the sampling in Y (a uint32_t)
zSampling (int) – the sampling in Z (a uint32_t)
atTimeStep (int) – input Channels time to use (a uint32_t)
fromTimeStep (int) – at what timestep to put the new elements(a uint32_t)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getTotalByteCount(self) int
Gets the total byte count in memory of the vector field.
- Returns:
output (int) –
- getVectorAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float)
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) ORSModel.ors.ArrayDouble
Gets the vectors.
See also
ORSModel.ors.UnstructuredGrid.setVertices(),ORSModel.ors.UnstructuredGrid.getVertexCount()- 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)
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)
Sets the vectors.
- Parameters:
pVectors (ORSModel.ors.ArrayDouble) – the vectors(an ArrayDouble)
iTIndex (int) – the time step (a uint32_t)
View¶
- class ORSModel.ors.View(*args, **kwargs)
Bases:
NodeRepresents a host window where the renderer is displayed.
- compile(self)
- decrementTimeStep(self)
- draw(self)
Forces an immediate draw of the view.
- drawOnCurrentGLContext(self, bCapture: bool)
- Parameters:
bCapture (bool) –
- drawTextAtPosition(self, text: str, fontname: str, fontsize: int, positionX: float, positionY: float, color: ORSModel.ors.Color)
draws specific text at a 2D coordinate
- Parameters:
text (str) – the text to be rendered (a wstring)
fontname (str) – the font name (a wstring)
fontsize (int) – the font size (an unsigned int)
positionX (float) – the X 2D coordinate (a double)
positionY (float) – the Y 2D coordinate (a double)
color (ORSModel.ors.Color) – thetext color (a Color)
- exportSnapshotCustomSized(self, iWidth: int, iHeight: int, pOutputImage: ORSModel.ors.Image) ORSModel.ors.Image
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)
- Parameters:
IBoundedPlane (ORSModel.ors.Rectangle) –
- fitBoxInView(self, aBox: ORSModel.ors.Box)
- Parameters:
aBox (ORSModel.ors.Box) –
- gatherTimeStepMaxFromAll(self)
Queries all visible models to know how many timesteps there are.
- get2DBackgroundColor(self) ORSModel.ors.Color
Gets the view’s 3D first background color.
See also
ORSModel.ors.View.set3DBackgroundColor(),ORSModel.ors.View.set2DBackgroundColor(),ORSModel.ors.View.get2DBackgroundColor()- Returns:
output (ORSModel.ors.Color) – a color (an Color)
- get3DBackgroundColor1(self) ORSModel.ors.Color
Gets the view’s 3D first background color.
See also
ORSModel.ors.View.set3DBackgroundColor(),ORSModel.ors.View.set2DBackgroundColor(),ORSModel.ors.View.get2DBackgroundColor()- Returns:
output (ORSModel.ors.Color) – a color (an Color)
- get3DBackgroundColor2(self) ORSModel.ors.Color
Gets the view’s 3D first background color.
See also
ORSModel.ors.View.set3DBackgroundColor(),ORSModel.ors.View.set2DBackgroundColor(),ORSModel.ors.View.get2DBackgroundColor()- Returns:
output (ORSModel.ors.Color) – a color (a Color)
- get3DBackgroundColorMode(self) int
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.
See also
ORSModel.ors.View.set3DBackgroundColor(),ORSModel.ors.View.set2DBackgroundColor(),ORSModel.ors.View.get2DBackgroundColor()- Returns:
output (int) – color mode (a short, see note below)
- getAllChildrenOfClassesVisibleAndHighlightable(self, classes: List[str]) ORSModel.ors.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 (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) ORSModel.ors.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) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getAngleDimensionUnit(self) ORSModel.ors.DimensionUnit
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getAngularSpeed(self) float
- Returns:
output (float) –
- getAutoFocus(self) bool
- Returns:
output (bool) –
- getAutofocusFactor(self) float
- Returns:
output (float) –
- classmethod getBestViewFromGenealogicalName(genealogicalName)
Return the most appropriate view for the given genealogicalName
- Parameters:
genealogicalName (str) – a layout name hierachy
- Returns:
output (ORSModel.ors.View) – return the best view for the given genealogicalName
- getBorderColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getBorderWidth(self) float
- Returns:
output (float) –
- getBoundedPlaneOfFirstSliceOfBox(self, aBox: ORSModel.ors.Box) ORSModel.ors.Rectangle
- Parameters:
aBox (ORSModel.ors.Box) –
- Returns:
output (ORSModel.ors.Rectangle) –
- getBoundedPlaneOfLastSliceOfBox(self, aBox: ORSModel.ors.Box) ORSModel.ors.Rectangle
- Parameters:
aBox (ORSModel.ors.Box) –
- Returns:
output (ORSModel.ors.Rectangle) –
- getBoundedPlaneOfSliceOfBox(self, aBox: ORSModel.ors.Box, sliceIndex: int) ORSModel.ors.Rectangle
- Parameters:
aBox (ORSModel.ors.Box) –
sliceIndex (int) –
- Returns:
output (ORSModel.ors.Rectangle) –
- getBoxAbleToContainAllEnabledVisualReachableByRender(self, inbox: ORSModel.ors.Box) ORSModel.ors.Box
- Parameters:
inbox (ORSModel.ors.Box) –
- Returns:
output (ORSModel.ors.Box) –
- getBrightness(self) int
- Returns:
output (int) –
- getCamera(self) ORSModel.ors.Camera
- 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, index: int) ORSModel.ors.Vector3
- Parameters:
index (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getCanBreakRendering(self) bool
- Returns:
output (bool) –
- getCaptureBufferRatio(self) float
- Returns:
output (float) –
- getCineMode(self) int
- Returns:
output (int) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getContrast(self) int
- Returns:
output (int) –
- getCurrentActiveLightIndex(self) int
- Returns:
output (int) –
- getCurrentTimeStep(self) int
Gets the view’s current time step.
- Returns:
output (int) –
- getDiffuseLightColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getDimensionUnit(self, dimensionType: int) ORSModel.ors.DimensionUnit
Gets the view’s dimension unit.
Note
See the ORS_def.h file for enum CxvUniverse_Dimension_type values.
See also
ORSModel.ors.View.getDimensionUnit(),ORSModel.ors.View.getValueInMeterConvertedToCurrentUnit()- Parameters:
dimensionType (int) – the unit type (a CxvUniverse_Dimension_type)
- Returns:
output (ORSModel.ors.DimensionUnit) – the current dimension unit (DimensionUnit)
- 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) –
- getExportTransparentBackground(self) bool
- Returns:
output (bool) –
- getFadeFactor(self) float
- Returns:
output (float) –
- 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) –
- getFocalRange(self) float
- Returns:
output (float) –
- getFocusSigma(self) float
- Returns:
output (float) –
- getGammaCorrection(self) float
- Returns:
output (float) –
- getGlobalVolumeOpacity(self) float
- Returns:
output (float) –
- getHWND(self) int
Gets the view handle.
- Returns:
output (int) – the handle of the window
- getHue(self) int
- Returns:
output (int) –
- getImageNumberingAscending(self) bool
- Returns:
output (bool) –
- getIntersliceDistance(self, box: ORSModel.ors.Box) float
- Parameters:
box (ORSModel.ors.Box) –
- Returns:
output (float) –
- getIs3DAllowed(self) bool
Gets view 3D allowed attribute.
Note
This is used by the 3D renderer
- Returns:
output (bool) – true if can be in 3D
- getIsBackLight(self, index: int) bool
- Parameters:
index (int) –
- Returns:
output (bool) –
- 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
- getIsIn2DNonPlanarViewMode(self) bool
- Returns:
output (bool) –
- getIsIn2DPlanarViewMode(self) bool
- Returns:
output (bool) –
- getIsIn2DSlabAverageMode(self) bool
- Returns:
output (bool) –
- getIsIn2DSlabMode(self) bool
- Returns:
output (bool) –
- getIsIn2DSlabThinMIPMode(self) bool
- Returns:
output (bool) –
- getIsIn2DSlabThinmipMode(self) bool
- Returns:
output (bool) –
- getIsIn2DSliceMode(self) bool
- Returns:
output (bool) –
- getIsIn3DViewMode(self) bool
- Returns:
output (bool) –
- getIsInAcquisitionPlaneOf(self, aStructuredGrid: ORSModel.ors.StructuredGrid) bool
- Parameters:
aStructuredGrid (ORSModel.ors.StructuredGrid) –
- Returns:
output (bool) –
- getIsInAny2DViewMode(self) bool
- Returns:
output (bool) –
- getIsInNoViewMode(self) bool
- Returns:
output (bool) –
- getIsLightingEnabled(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
- getIsRenderingCapture(self) bool
- Returns:
output (bool) –
- getIsRenderingTiled(self) bool
- Returns:
output (bool) –
- getIsShadowEnabled(self) bool
- Returns:
output (bool) –
- getIsSpinning(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
- getIsViewRepresentationEnabled(self) bool
- Returns:
output (bool) –
- getIsVirtualFloorEnabled(self) bool
- Returns:
output (bool) –
- getLODEnabled(self) bool
- Returns:
output (bool) –
- getLODFactor(self) float
- Returns:
output (float) –
- getLODMode(self) int
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.
See also
- Returns:
output (int) – an LOD mode (a int32_t*)
- getLODSamplingFactor(self) float
- Returns:
output (float) –
- getLayout()
Gets the Layout of the view
- Returns:
aName (str) – the genealogical name of the view
- getLayoutGenealogicalFirstName()
Gets the genealogical first name of the view, like xy, xz, yz
- Returns:
aName (str) – the genealogical first name of the view
- 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) ORSModel.ors.DimensionUnit
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getLengthReciprocalDimensionUnit(self) ORSModel.ors.DimensionUnit
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getLightFollowCamera(self) bool
- Returns:
output (bool) –
- getLightIntensity(self, index: int) float
- Parameters:
index (int) –
- Returns:
output (float) –
- getLightMaxDistance(self) float
- Returns:
output (float) –
- getLightingInMotion(self) bool
- Returns:
output (bool) –
- getLocalPositionArrayTransformedToXY(self, pVisual: ORSModel.ors.Visual, pLocalPositions: ORSModel.ors.SequenceableCollection, nPtsCount: int, pTimeStep: int, pOutputXYPositions: ORSModel.ors.SequenceableCollection) ORSModel.ors.SequenceableCollection
- Parameters:
pVisual (ORSModel.ors.Visual) –
pLocalPositions (ORSModel.ors.SequenceableCollection) –
nPtsCount (int) –
pTimeStep (int) –
pOutputXYPositions (ORSModel.ors.SequenceableCollection) –
- Returns:
output (ORSModel.ors.SequenceableCollection) –
- getLocalPositionFromVisualLocalPosition(self, pVisual: ORSModel.ors.Visual, anotherVisual: ORSModel.ors.Visual, pAlocalPositionInAnotherVisual: ORSModel.ors.Vector3, pTimeStep: int) ORSModel.ors.Vector3
- Parameters:
pVisual (ORSModel.ors.Visual) –
anotherVisual (ORSModel.ors.Visual) –
pAlocalPositionInAnotherVisual (ORSModel.ors.Vector3) –
pTimeStep (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getLocalPositionFromWorldPosition(self, pVisual: ORSModel.ors.Visual, pWorldPosition: ORSModel.ors.Vector3, pTimeStep: int) ORSModel.ors.Vector3
- Parameters:
pVisual (ORSModel.ors.Visual) –
pWorldPosition (ORSModel.ors.Vector3) –
pTimeStep (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getLocalPositionTransformedToXY(self, IVisual: ORSModel.ors.Visual, pCoord: ORSModel.ors.Vector3, oY: float) bool
Transforms a local coordinate in 2D coordinates.
Note
The values are returned in the last two parameters supplied.
- Parameters:
IVisual (ORSModel.ors.Visual) – the visual (an Visual)
pCoord (ORSModel.ors.Vector3) – a coordinate (an Vector3)
oY (float) –
- 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*)
- getLuminosity(self) int
- Returns:
output (int) –
- 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) ORSModel.ors.Vector3
- Parameters:
aBox (ORSModel.ors.Box) –
- Returns:
output (ORSModel.ors.Vector3) –
- getNumberOfLights(self) int
- Returns:
output (int) –
- getOcclusionLODFactor(self) int
- Returns:
output (int) –
- getOrthoZoomFactor(self) float
- Returns:
output (float) –
- getPickData(self, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) ORSModel.ors.Intersection
Note
Returns an intersection describing what is currently under the mouse cursor in the view.
See also
ORSModel.ors.View.getPickVisualData(), getPickPlaneData()- Parameters:
pixelXPositionInDisplay (int) –
pixelYPositionInDisplay (int) –
- Returns:
output (ORSModel.ors.Intersection) – an intersection (an Intersection)
- getPickVisualData(self, aIVisual: ORSModel.ors.Visual, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) ORSModel.ors.Intersection
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.
See also
pick(), getPickPlaneData()
- Parameters:
aIVisual (ORSModel.ors.Visual) – a visual (an Visual)
pixelXPositionInDisplay (int) –
pixelYPositionInDisplay (int) –
- Returns:
output (ORSModel.ors.Intersection) – an intersection (an Intersection)
- getPickVisualDataConstrained(self, aIVisual: ORSModel.ors.Visual, currentPosition: ORSModel.ors.Vector3, constraintOrigin: ORSModel.ors.Vector3, constraintDirection: ORSModel.ors.Vector3, testDirection: bool) ORSModel.ors.Intersection
Note
Returns an intersection describing what is currently being picked in the visual supplied, constrained to the specified line. If the given visual is not being picked, getHit() on the intersection will return FALSE.
See also
pick(),
ORSModel.ors.View.getPickVisualData(), getPickPlaneData()- Parameters:
aIVisual (ORSModel.ors.Visual) – a visual (an Visual)
currentPosition (ORSModel.ors.Vector3) – the constraint origin (a Vector3)
constraintOrigin (ORSModel.ors.Vector3) – the constraint direction (a Vector3)
constraintDirection (ORSModel.ors.Vector3) – test for face normal (a bool)
testDirection (bool) –
- Returns:
output (ORSModel.ors.Intersection) – an intersection (an Intersection)
- getProjectionMatrix(self) ORSModel.ors.Matrix4x4
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getProjectionMode2D(self) int
See also
ORSModel.ors.View.setProjectionMode2D(), setProjectionMode(), getProjectionMode()- Returns:
output (int) –
- getRectangle()
Get the rectangle in the space defined by the View
- Returns:
rectangle (ORSModel.ors.Rectangle) – a Rectangle
- getReflectionPolishFactor(self) float
- Returns:
output (float) –
- getReflectiveSurfaceEnabled(self) bool
- Returns:
output (bool) –
- getRenderCount(self) int
Returns the number of times theView was rendered (draw)
- Returns:
output (int) – the rendereing count (unint32)
- getRenderMode() int
Gets the view render mode.
Deprecated since version (unknown): use VisualChannel.getRenderModeForDisplay() instead
- Returns:
output (int) – a render mode (a uint16_t, see ors_def.h)
- getRestTime(self) int
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)
- getRotationAxis(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getSaturation(self) int
- Returns:
output (int) –
- getSceneLayoutGenealogicalName()
Gets the genealogical name of the scene layout of the view
- Returns:
aName (str) – the genealogical name of the scene layout of the view
- 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) –
- 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
- getSpecularLightColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getSpotlightFactor(self) float
- Returns:
output (float) –
- getSurfaceDimensionUnit(self) ORSModel.ors.DimensionUnit
Gets the view’s surface dimension unit.
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getSurfaceReciprocalDimensionUnit(self) ORSModel.ors.DimensionUnit
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getTopFrame()
Gets the top frame of the view
- getTransformationShape3D(self) ORSModel.ors.Shape3D
- Returns:
output (ORSModel.ors.Shape3D) –
- getUseCustomCursor(self) bool
- Returns:
output (bool) –
- getUseMedianIn3D(self) bool
- Returns:
output (bool) –
- getUseSuperSampling(self) bool
- Returns:
output (bool) –
- getValueInCurrentUnitConvertedToMeter(self, pValue: float) float
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).
See also
ORSModel.ors.View.getDimensionUnit(), getDimensionAbbreviation(),ORSModel.ors.View.getValueInMeterConvertedToCurrentUnit()- 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
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().
See also
ORSModel.ors.View.getDimensionUnit(), getDimensionAbbreviation(),ORSModel.ors.View.getValueInCurrentUnitConvertedToMeter()- Parameters:
pValue (float) – the value (in meters) to be converted (a double)
- Returns:
output (float) – the value converted (a double)
- getViewAlignedBoxThatContainsAllEnabledVisualsReachableByRenderer(self) ORSModel.ors.Box
- Returns:
output (ORSModel.ors.Box) –
- getViewBoundedPlaneInWorldCoordinates(self) ORSModel.ors.Rectangle
Returns a plane bounded to the view, in world coordinates.
- Returns:
output (ORSModel.ors.Rectangle) – a plane (an Rectangle)
- getViewCenter(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getViewMatrix(self) ORSModel.ors.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.
See also
- Returns:
output (int) – a CxvView_Mode (a int32_t*)
- getViewNormal(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getViewOrientedBoxThatContainsBox(self, aBox: ORSModel.ors.Box) ORSModel.ors.Box
- Parameters:
aBox (ORSModel.ors.Box) –
- Returns:
output (ORSModel.ors.Box) –
- getViewOrientedPlane(self) ORSModel.ors.OrientedPlane
- Returns:
output (ORSModel.ors.OrientedPlane) –
- getViewPlane(self) ORSModel.ors.Plane
- Returns:
output (ORSModel.ors.Plane) –
- getViewRepresentationColor(self) ORSModel.ors.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)
- getVirtualFloorColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getVirtualFloorPlane(self) ORSModel.ors.Plane
- Returns:
output (ORSModel.ors.Plane) –
- getVirtualFloorSize(self) float
- Returns:
output (float) –
- getVolumeDimensionUnit(self) ORSModel.ors.DimensionUnit
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getVolumeReciprocalDimensionUnit(self) ORSModel.ors.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) ORSModel.ors.SequenceableCollection
- Parameters:
pWorldPositions (ORSModel.ors.SequenceableCollection) –
nPtsCount (int) –
pOutputXYPositions (ORSModel.ors.SequenceableCollection) –
- Returns:
output (ORSModel.ors.SequenceableCollection) –
- getWorldPositionFromLocalPosition(self, pVisual: ORSModel.ors.Visual, pLocalPosition: ORSModel.ors.Vector3, pTimeStep: int) ORSModel.ors.Vector3
- Parameters:
pVisual (ORSModel.ors.Visual) –
pLocalPosition (ORSModel.ors.Vector3) –
pTimeStep (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getWorldPositionTransformedToScreenCoord(self, pPosition: ORSModel.ors.Vector3) ORSModel.ors.Vector3
- Parameters:
pPosition (ORSModel.ors.Vector3) –
- Returns:
output (ORSModel.ors.Vector3) –
- getWorldPositionTransformedToXY(self, pPosition: ORSModel.ors.Vector3) 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.
See also
ORSModel.ors.View.setXSize(),ORSModel.ors.View.setYSize(),ORSModel.ors.View.setSize(),ORSModel.ors.View.getYSize()- 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) ORSModel.ors.SequenceableCollection
- Parameters:
pVisual (ORSModel.ors.Visual) –
pXYPositions (ORSModel.ors.SequenceableCollection) –
nPtsCount (int) –
pTimeStep (int) –
pOutputLocalPositions (ORSModel.ors.SequenceableCollection) –
- Returns:
output (ORSModel.ors.SequenceableCollection) –
- getXYArrayTransformedToWorldPosition(self, pXYPositions: ORSModel.ors.SequenceableCollection, nPtsCount: int, pOutputWorldPositions: ORSModel.ors.SequenceableCollection) ORSModel.ors.SequenceableCollection
- Parameters:
pXYPositions (ORSModel.ors.SequenceableCollection) –
nPtsCount (int) –
pOutputWorldPositions (ORSModel.ors.SequenceableCollection) –
- Returns:
output (ORSModel.ors.SequenceableCollection) –
- getXYTransformedToWorldPosition(self, x: float, y: float) ORSModel.ors.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.
See also
ORSModel.ors.View.setXSize(),ORSModel.ors.View.setYSize(),ORSModel.ors.View.setSize(),ORSModel.ors.View.getXSize()- 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)
- getdepthMapFarValue(self) float
- Returns:
output (float) –
- getdepthMapNearValue(self) float
- Returns:
output (float) –
- imhide(node)
With a view, hide the node (such as a Channel, ROI, Mesh) in this view
- Parameters:
node (ORSModel.ors.Node) –
- 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:
node (ORSModel.ors.Node) –
lut (ORSModel.ors.LookupTable) –
- incrementTimeStep(self)
- none() View
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (View) –
- refresh(self)
Refreshes the view.
Note
The view is not immediately refreshed, it will be so when the next timer fires up.
- refreshAndWait()
Forces a refresh of the view and wait for the refresh to be finished before return
- resetNeedRefresh(self)
- 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)
Sets the view’s 2D background color.
Note
The color should be expressed as RGB (the alpha is not used here).
See also
get3DBackgroundColor(),
ORSModel.ors.View.set3DBackgroundColor(),ORSModel.ors.View.get2DBackgroundColor()- Parameters:
IColor (ORSModel.ors.Color) – a color (an Color)
- set3DBackgroundColor(self, iMode: int, IColor1: ORSModel.ors.Color, IColor2: ORSModel.ors.Color)
Sets the view’s 3D background color.
Note
The colors should be expressed as RGB (the alpha is not used here).
See also
get3DBackgroundColor(),
ORSModel.ors.View.set2DBackgroundColor(),ORSModel.ors.View.get2DBackgroundColor()- Parameters:
iMode (int) – a mode (a short)
IColor1 (ORSModel.ors.Color) – a color (an Color)
IColor2 (ORSModel.ors.Color) – a color (an Color)
- setAmbientLightColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setAngularSpeed(self, value: float)
- Parameters:
value (float) –
- setAutoFocus(self, aValue: bool)
- Parameters:
aValue (bool) –
- setAutofocusFactor(self, value: float)
- Parameters:
value (float) –
- setBorderColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setBorderWidth(self, aValue: float)
- Parameters:
aValue (float) –
- setBrightness(self, value: int)
- Parameters:
value (int) –
- setCamera(self, aCamera: ORSModel.ors.Camera)
- Parameters:
aCamera (ORSModel.ors.Camera) –
- setCameraSpaceLightPos(self, index: int, pPosition: ORSModel.ors.Vector3)
- Parameters:
index (int) –
pPosition (ORSModel.ors.Vector3) –
- setCanBreakRendering(self, value: bool)
- Parameters:
value (bool) –
- setCaptionTextFontName(self, sFontName: str)
- Parameters:
sFontName (str) –
- setCaptureBufferRatio(self, pValue: float)
- Parameters:
pValue (float) –
- setCineMode(self, mode: int)
- Parameters:
mode (int) –
- setContrast(self, value: int)
- Parameters:
value (int) –
- setCurrentActiveLightIndex(self, value: int)
- Parameters:
value (int) –
- setCurrentTimeStep(self, value: int)
- Parameters:
value (int) –
- setCustomCursorInfos(self, width: int, height: int, iMode: int, caption: str, color: ORSModel.ors.Color)
- Parameters:
width (int) –
height (int) –
iMode (int) –
caption (str) –
color (ORSModel.ors.Color) –
- setCustomCursorPosition(self, posX: int, posY: int)
- Parameters:
posX (int) –
posY (int) –
- setDiffuseLightColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setDimensionUnit(self, dimensionType: int, aDimensionUnit: ORSModel.ors.DimensionUnit)
- Parameters:
dimensionType (int) –
aDimensionUnit (ORSModel.ors.DimensionUnit) –
- setDimensionUnitID(self, dimensionType: int, pUnit: int)
Deprecated since version (unknown): use setDimensionUnit instead
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 (an int32_t)
- setDrawFocusRect(self, value: bool)
- Parameters:
value (bool) –
- setEnableFocus(self, aValue: bool)
- Parameters:
aValue (bool) –
- setExportTransparentBackground(self, aValue: bool)
- Parameters:
aValue (bool) –
- setFadeFactor(self, value: float)
- Parameters:
value (float) –
- setFitToViewBorder(self, value: int)
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)
- Parameters:
aValue (float) –
- setFocalRange(self, value: float)
- Parameters:
value (float) –
- setFocusSigma(self, aValue: float)
- Parameters:
aValue (float) –
- setGammaCorrection(self, value: float)
- Parameters:
value (float) –
- setGlobalVolumeOpacity(self, aValue: float)
- Parameters:
aValue (float) –
- setHue(self, value: int)
- Parameters:
value (int) –
- setImageNumberingAscending(self, value: bool)
- Parameters:
value (bool) –
- setInImagePlaneOfBox(box)
Sets the view in the image plane of the given box
- Parameters:
box (ORSModel.ors.Box) – box to align the view with
- setIs3DAllowed(self, isAllowed: bool)
Set if the view is allowed to be in 3D viewmode.
Note
This is used by the 3D renderer
- Parameters:
isAllowed (bool) –
- setIsBackLight(self, index: int, value: bool)
- Parameters:
index (int) –
value (bool) –
- setIsBorderEnabled(self, aValue: bool)
Enables or disables the view border.
- Parameters:
aValue (bool) – true to enable the border, false to disable it.
- setIsEnabled(self, pEnabled: bool)
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
- setIsLightingEnabled(self, value: bool)
- Parameters:
value (bool) –
- setIsOrientationAndPositionLocked(self, value: bool)
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)
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)
- Parameters:
value (bool) –
- setIsPositionLocked(self, value: bool)
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
- setIsRenderingCapture(self, pVal: bool)
- Parameters:
pVal (bool) –
- setIsShadowEnabled(self, aValue: bool)
- Parameters:
aValue (bool) –
- setIsSpinning(self, value: bool)
- Parameters:
value (bool) –
- setIsTrackingLight(self, value: bool)
Sets the view to be in tracking light mode or not.
- Parameters:
value (bool) – true to be in tracking light mode, false otherwise
- setIsViewRepresentationEnabled(self, aValue: bool)
Enables or disables the view representation.
- Parameters:
aValue (bool) – true to enable the view representation, false to disable it.
- setIsVirtualFloorEnabled(self, value: bool)
- Parameters:
value (bool) –
- setLODEnabled(self, aValue: bool)
- Parameters:
aValue (bool) –
- setLODFactor(self, aValue: float)
- Parameters:
aValue (float) –
- setLODMode(self, dwMode: int)
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.
See also
- Parameters:
dwMode (int) – an LOD mode (a int32_t*)
- setLODSamplingFactor(self, aValue: float)
- Parameters:
aValue (float) –
- setLightFollowCamera(self, aValue: bool)
- Parameters:
aValue (bool) –
- setLightIntensity(self, index: int, value: float)
- Parameters:
index (int) –
value (float) –
- setLightMaxDistance(self, aValue: float)
- Parameters:
aValue (float) –
- setLightingInMotion(self, value: bool)
- Parameters:
value (bool) –
- setLuminosity(self, value: int)
- Parameters:
value (int) –
- setNumberOfLights(self, value: int)
- Parameters:
value (int) –
- setOcclusionLODFactor(self, aValue: int)
- Parameters:
aValue (int) –
- setOrientationIndicators(self, left: str, right: str, up: str, down: str, top: str, bottom: str)
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)
- Parameters:
anOrientedPlane (ORSModel.ors.OrientedPlane) –
aBox (ORSModel.ors.Box) –
- setOrthoZoomFactor(self, value: float)
- Parameters:
value (float) –
- setProjectionMode2D(self, iMode: int)
See also
ORSModel.ors.View.getProjectionMode2D(), setProjectionMode(), getProjectionMode()- Parameters:
iMode (int) –
- setReflectionPolishFactor(self, aValue: float)
- Parameters:
aValue (float) –
- setReflectiveSurfaceEnabled(self, aValue: bool)
- Parameters:
aValue (bool) –
- setRenderMode(self, mode: int)
Sets the view render mode.
Deprecated since version (unknown): use VisualChannel.setRenderModeForDisplay() instead
- Parameters:
mode (int) – an OrsRenderMode (a uint16_t, see ors_def.h)
- setRestTime(self, value: int)
- Parameters:
value (int) –
- setRotationAxis(self, value: ORSModel.ors.Vector3)
- Parameters:
value (ORSModel.ors.Vector3) –
- setSaturation(self, value: int)
- Parameters:
value (int) –
- setShadowMapSize(self, value: int)
- Parameters:
value (int) –
- setShadowOpacity(self, aValue: float)
- Parameters:
aValue (float) –
- setShadowPrecision(self, aValue: float)
- Parameters:
aValue (float) –
- setShadowStrength(self, aValue: float)
- Parameters:
aValue (float) –
- setShowOrientationIndicators(self, pFlag: bool)
Sets the visibility of the orientation indicators.
- Parameters:
pFlag (bool) – true to show the orientation indicators, false to hide them
- setShowViewFPS(self, bShow: bool)
- Parameters:
bShow (bool) –
- setSize(self, xSize: int, ySize: int)
Sets the view size.
See also
ORSModel.ors.View.setXSize(),ORSModel.ors.View.setYSize(),ORSModel.ors.View.getXSize(),ORSModel.ors.View.getYSize()- 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)
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)
- setSliceIndexOfBox(self, aBox: ORSModel.ors.Box, sliceIndex: float)
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
- setSpecularLightColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setSpotlightFactor(self, aValue: float)
- Parameters:
aValue (float) –
- setTransformationShape3D(self, aShape: ORSModel.ors.Shape3D)
- Parameters:
aShape (ORSModel.ors.Shape3D) –
- setUseCustomCursor(self, bUse: bool)
- Parameters:
bUse (bool) –
- setUseMedianIn3D(self, aValue: bool)
- Parameters:
aValue (bool) –
- setUseOrthographicProjectionIn3D(ortho)
Use or not orthographic projection in 3D
- Parameters:
ortho (bool) – use orthographic projection
- setUseSuperSampling(self, aValue: bool)
- Parameters:
aValue (bool) –
- setViewInOneForOne(self, aBox: ORSModel.ors.Box)
- Parameters:
aBox (ORSModel.ors.Box) –
- setViewMode(self, viewMode: int)
Sets the view’s volume mode.
Note
See the ORS_def.h file for valid values.
See also
- Parameters:
viewMode (int) – a CxvView_Mode (a int32_t*)
- setViewOrientedPlane(self, anOrientedPlane: ORSModel.ors.OrientedPlane, aSlabThickness: float)
- Parameters:
anOrientedPlane (ORSModel.ors.OrientedPlane) –
aSlabThickness (float) –
- setViewPlanePosition(self, worldPosition: ORSModel.ors.Vector3, centerView: bool)
- Parameters:
worldPosition (ORSModel.ors.Vector3) –
centerView (bool) –
- setViewRepresentationColor(self, IColor: ORSModel.ors.Color)
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)
- setVirtualFloorColor(self, value: ORSModel.ors.Color)
- Parameters:
value (ORSModel.ors.Color) –
- setVirtualFloorPlane(self, plane: ORSModel.ors.Plane)
- Parameters:
plane (ORSModel.ors.Plane) –
- setVirtualFloorSize(self, value: float)
- Parameters:
value (float) –
- setXSize(self, xSize: int)
Sets the view X size.
See also
ORSModel.ors.View.setSize(),ORSModel.ors.View.setYSize(),ORSModel.ors.View.getXSize(),ORSModel.ors.View.getYSize()- Parameters:
xSize (int) – the X size, in pixels (a uint16_t)
- setYSize(self, ySize: int)
Sets the view Y size.
See also
ORSModel.ors.View.setSize(),ORSModel.ors.View.setXSize(),ORSModel.ors.View.getXSize(),ORSModel.ors.View.getYSize()- Parameters:
ySize (int) – the Y size, in pixels (a uint16_t)
- setZoomFactor(self, value: float)
- Parameters:
value (float) –
- setdepthMapFarValue(self, aValue: float)
- Parameters:
aValue (float) –
- setdepthMapNearValue(self, aValue: float)
- Parameters:
aValue (float) –
ViewSplitter¶
- class ORSModel.ors.ViewSplitter(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualShape2D- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
ViewSplitter.__init__(self)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getEnabled(self) bool
- Returns:
output (bool) –
- getIsEditable(self) bool
- Returns:
output (bool) –
- getRelativePosition(self) float
- Returns:
output (float) –
- none() ViewSplitter
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (ViewSplitter) –
- setEnabled(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setIsEditable(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setRelativePosition(self, value: float)
- Parameters:
value (float) –
Visual¶
- class ORSModel.ors.Visual(*args, **kwargs)
Bases:
NodeAn abstract class that handles all services pertaining to visualizing objects.
- getAction(self) str
- Returns:
output (str) –
- getAllParentViewsWhereVisualIsVisible(self) ORSModel.ors.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) ORSModel.ors.Box
- Parameters:
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Box) –
- getBoundingBoxInView(self, aView: ORSModel.ors.View) ORSModel.ors.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) ORSModel.ors.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:
timestep (int) – the time index
display (ORSModel.ors.View) – a view
- Returns:
aClipBox (ORSModel.ors.Box) – the clip box
- getHighlightColor(self) ORSModel.ors.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.
See also
ORSModel.ors.Visual.getIsVisibleForView(),ORSModel.ors.Visual.getIsVisibleForView(),ORSModel.ors.Visual.setIsVisibleForAllViews()- 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.
See also
ORSModel.ors.Visual.setIsVisibleForView(),ORSModel.ors.Visual.setIsVisibleForAllViews(),ORSModel.ors.Visual.getIsVisibleForAllViews()- Parameters:
IView (ORSModel.ors.View) – the view (a View)
- Returns:
output (bool) – true if the receiver is visible, false otherwise
- getMaterial(self) ORSModel.ors.Material
Gets the visual’s material.
- Returns:
output (ORSModel.ors.Material) – a material (an Material) or NULL is none exists
- getModel(self) ORSModel.ors.Node
the same for meshes. For the visual that do not have model, return None
- Returns:
output (ORSModel.ors.Node) – the model of the visual
- getPickTolerance(self) float
Note
The pick tolerance is the radius, around any visual portion, where the mouse cursor can grab the visual. It’s expressed in relative size of the attached view.
- Returns:
output (float) –
- getShininess(self) float
- Returns:
output (float) –
- getShowIn2D(self) bool
Gets the visual visibility mode in 2D views.
See also
ORSModel.ors.Visual.setShowIn2D(),ORSModel.ors.Visual.setShowIn3D(),ORSModel.ors.Visual.getShowIn3D()- Returns:
output (bool) – true if the visual is visible in 2D views, false otherwise
- getShowIn3D(self) bool
Gets the visual visibility mode in 3D views.
See also
ORSModel.ors.Visual.setShowIn2D(),ORSModel.ors.Visual.setShowIn3D(),ORSModel.ors.Visual.getShowIn3D()- Returns:
output (bool) – true if the visual is visible in 3D views, false otherwise
- getTSize(self) int
Gets the T size.
See also
- Returns:
output (int) – T size (a uint32_t)
- getZEnabled(self) bool
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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (Visual) –
- resetVisibility(self)
- setAction(self, anAction: str)
- Parameters:
anAction (str) –
- setAssociatedState(self, aGlobalState: str)
- Parameters:
aGlobalState (str) –
- setHighlightColor(self, color: ORSModel.ors.Color)
- Parameters:
color (ORSModel.ors.Color) –
- setIsHighlightable(self, value: bool)
- Parameters:
value (bool) –
- setIsHighlightedInView(self, aView: ORSModel.ors.View, aFlag: bool)
- Parameters:
aView (ORSModel.ors.View) –
aFlag (bool) –
- setIsPickable(self, value: bool)
Sets the visual to be pickable or not.
- Parameters:
value (bool) – TRUE to make the visual pickable, false otherwise
- setIsSelected(self, aBool: bool)
- Parameters:
aBool (bool) –
- setIsShadowEnabled(self, value: bool)
- Parameters:
value (bool) –
- setIsVisibleForAllViews(self, bValue: bool)
Note
This API overrides all prior calls to setIsVisibleForViews(), or in other words, any view specific setting is erased.
See also
ORSModel.ors.Visual.getIsVisibleForView(),ORSModel.ors.Visual.getIsVisibleForView(),ORSModel.ors.Visual.getIsVisibleForAllViews()- Parameters:
bValue (bool) –
- setIsVisibleForView(self, IView: ORSModel.ors.View, bValue: bool)
Note
This API overrides a prior call to setIsVisibleForAllViews(), for a given view.
See also
ORSModel.ors.Visual.getIsVisibleForView(),ORSModel.ors.Visual.setIsVisibleForAllViews(),ORSModel.ors.Visual.getIsVisibleForAllViews()- Parameters:
IView (ORSModel.ors.View) –
bValue (bool) –
- setMaterial(self, aIMaterial: ORSModel.ors.Material)
Sets the visual’s material.
- Parameters:
aIMaterial (ORSModel.ors.Material) – a material (an Material)
- setPickTolerance(self, pValue: float)
Note
The pick tolerance is the radius, around any visual portion, where the mouse cursor can grab the visual. It’s expressed in relative size of the attached view.
Note
The anchors will automatically adjust visually to size changes.
- Parameters:
pValue (float) –
- setShininess(self, aValue: float)
- Parameters:
aValue (float) –
- setShowIn2D(self, show: bool)
Sets the visual to be visible or not in 2D views.
See also
ORSModel.ors.Visual.setShowIn3D(),ORSModel.ors.Visual.getShowIn2D(),ORSModel.ors.Visual.getShowIn3D()- Parameters:
show (bool) – true to have the visual be visible in 2D views, false otherwise
- setShowIn3D(self, show: bool)
Sets the visual to be visible or not in 3D views.
See also
ORSModel.ors.Visual.setShowIn2D(),ORSModel.ors.Visual.getShowIn3D(),ORSModel.ors.Visual.getShowIn2D()- Parameters:
show (bool) – true to have the visual be visible in 3D views, false otherwise
- setTSize(self, pTSize: int)
Sets the T size.
See also
- Parameters:
pTSize (int) – T size (a uint32_t)
- setZEnabled(self, value: bool)
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)
- unstackVisualState(self)
VisualAngle¶
- class ORSModel.ors.VisualAngle(*args, **kwargs)
Bases:
AnnotationRepresents an angle and its measurement.
- fitFromPoints(self, count: int, points: float, iTIndex: int)
See also
fitFromVector3(), fitFromPointList()
- Parameters:
count (int) –
points (float) –
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 double)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getIsSplitted(self, iTIndex: int) bool
Note
A splitted angle is not joined at the center, it is the angle between two vectors.
- Parameters:
iTIndex (int) –
- Returns:
output (bool) –
- none() VisualAngle
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualAngle) –
- setIsSplitted(self, value: bool, iTIndex: int)
Note
A splitted angle is not joined at the center, it is the angle between two vectors.
- Parameters:
value (bool) –
iTIndex (int) –
VisualArrow¶
- class ORSModel.ors.VisualArrow(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Annotation- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualArrow.__init__(self)
- getArrowHeadSize(self) float
Returns the arrow’s head size.
- Returns:
output (float) – the head size (a double), a value between 0 and 100.
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getHandlePositionInView(self, pView: ORSModel.ors.View) ORSModel.ors.Vector3
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.Vector3) –
- getPositionOnVisual(self, iTIndex: int) ORSModel.ors.Vector3
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.Vector3) –
- getSyncPositionInAllViews(self) bool
- Returns:
output (bool) –
- none() VisualArrow
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualArrow) –
- setArrowHeadSize(self, size: float)
Sets the arrow’s head size.
Dirty flags: OrsPropertyDirty
- Parameters:
size (float) – the head size (a double), a value between 0 and 100.
- setHandlePositionInView(self, pView: ORSModel.ors.View, aPoint: ORSModel.ors.Vector3)
- Parameters:
pView (ORSModel.ors.View) –
aPoint (ORSModel.ors.Vector3) –
- setIsPickingVisual(self, value: bool, iTIndex: int)
- Parameters:
value (bool) –
iTIndex (int) –
- setPositionOnVisual(self, x: float, y: float, z: float, iTIndex: int)
- Parameters:
x (float) –
y (float) –
z (float) –
iTIndex (int) –
- setPositionOnVisualForAllTimeSteps(self, x: float, y: float, z: float)
- Parameters:
x (float) –
y (float) –
z (float) –
- setSyncPositionInAllViews(self, value: bool)
- Parameters:
value (bool) –
VisualBezierPatch¶
- class ORSModel.ors.VisualBezierPatch(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualSurfaceControlPoints- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualBezierPatch.__init__(self)
- getBezierPatch(self, iTIndex: int) ORSModel.ors.BezierPatch
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.BezierPatch) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() VisualBezierPatch
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualBezierPatch) –
- setBezierPatch(self, aBezierPatch: ORSModel.ors.BezierPatch, iTIndex: int)
- Parameters:
aBezierPatch (ORSModel.ors.BezierPatch) –
iTIndex (int) –
VisualBox¶
- class ORSModel.ors.VisualBox(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualShape3Dcreate aVisualBox from an xml
- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualBox.__init__(self)
- get2LabelAxis(self) bool
get2LabelAxis
- Returns:
output (bool) –
- getAxisLengthFactor(self) float
return the axis length factor (% of the axis that overflows the box)
- Returns:
output (float) –
- getAxisSize(self) float
getAxisSize
- Returns:
output (float) –
- getBox(self, iTIndex: int) ORSModel.ors.Box
method getBox
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.Box) –
- getCaptionTextFontName(self) str
getCaptionTextFontName
- Returns:
output (str) –
- 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 unsigned short)
- getGridRectangleSize(self) float
getGridRectangleCount
- Returns:
output (float) –
- getHighlightedBoxFace(self, faceIndex: int, iTIndex: int) bool
getHighlightedBoxFace
Deprecated since version (unknown): Use parent method getHighlightedBorder
- Parameters:
faceIndex (int) –
iTIndex (int) –
- Returns:
output (bool) –
- getHighlightedBoxFaceCount(self, iTIndex: int) int
getHighlightedBoxFaceCount
Deprecated since version (unknown): Use parent method getHighlightedBorderCount
- Parameters:
iTIndex (int) –
- Returns:
output (int) –
- getIsMiddleAnchorHighlited(self, iTIndex: int) bool
method getIsMiddleAnchorHighlited
Deprecated since version (unknown): Use parent method getHighlightedAnchor
- Parameters:
iTIndex (int) –
- Returns:
output (bool) –
- getPickedFace(iTIndex: int) int
method getPickedFace
- Parameters:
iTIndex (int) –
- Returns:
output (int) –
- getPlaneColor(self) ORSModel.ors.Color
Gets the color of the box’s clipping plane.
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- getRangeMode(iTIndex: int) bool
method getRangeMode
- Parameters:
iTIndex (int) –
- Returns:
output (bool) –
- getSelectedBoxFace(faceIndex: int, iTIndex: int) bool
getSelectedBoxFace
Deprecated since version (unknown): Was doing nothing.
- Parameters:
faceIndex (int) –
iTIndex (int) –
- Returns:
output (bool) –
- getSelectedBoxFaceCount(iTIndex: int) int
getSelectedBoxFaceCount
Deprecated since version (unknown): Was doing nothing.
- Parameters:
iTIndex (int) –
- Returns:
output (int) –
- getShowAxis(self) bool
getShowAxis
- Returns:
output (bool) –
- getShowAxisCaptions(self) bool
getShowAxisCaptions
- Returns:
output (bool) –
- getShowAxisX(self) bool
getShowAxisX
- Returns:
output (bool) –
- getShowAxisY(self) bool
getShowAxisY
- Returns:
output (bool) –
- getShowAxisZ(self) bool
getShowAxisZ
- Returns:
output (bool) –
- getShowBorders(self) bool
getShowBorders
- Returns:
output (bool) –
- getShowFaceAnchors(self) bool
getShowFaceAnchors
- Returns:
output (bool) –
- getShowGrid(self) bool
getShowGrid
- Returns:
output (bool) –
- getShowLength(self) bool
getShowLength
- Returns:
output (bool) –
- getShowSolidFaces(self) bool
getShowSolidFaces
- Returns:
output (bool) –
- getShowTicks(self) bool
getShowTicks
- Returns:
output (bool) –
- getTextFontSize(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)
- getTextMinimumFontSize(self) int
Gets the minimum font size of text captions, in font points.
- Returns:
output (int) – the font size
- getTickAutoPlacement(self) bool
getTickAutoPlacement
- Returns:
output (bool) –
- getTicksColor(self) ORSModel.ors.Color
Gets the color of the box’s ticks marks.
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- getXAxisColor(self) ORSModel.ors.Color
Gets the color of the box’s X axis.
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- getYAxisColor(self) ORSModel.ors.Color
Gets the color of the box’s Y axis.
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- getZAxisColor(self) ORSModel.ors.Color
Gets the color of the box’s Z axis.
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- intersectBoxWithUnstructuredGrid(self, pGrid: ORSModel.ors.UnstructuredGrid, invert: bool, iTIndex: int)
Cuts the unstructured grid with a visual box ,removing vertices, faces and scalars.
- Parameters:
pGrid (ORSModel.ors.UnstructuredGrid) – a mesh (a UnstructuredGrid)
invert (bool) – true to cut inside the box, false for outisde (a bool)
iTIndex (int) – the T index (a uint32_t)
- none() VisualBox
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualBox) –
- pickBoxFace(self, pDisplay: ORSModel.ors.View, xPixelPositionInDisplay: int, yPixelPositionInDisplay: int) int
method pickBoxFace
Deprecated since version (unknown): Use parent method pickBorder
- Parameters:
pDisplay (ORSModel.ors.View) –
xPixelPositionInDisplay (int) –
yPixelPositionInDisplay (int) –
- Returns:
output (int) –
- pickBoxMiddleAnchor(self, pDisplay: ORSModel.ors.View, xPixelPositionInDisplay: int, yPixelPositionInDisplay: int) bool
method pickBoxMiddleAnchor
Deprecated since version (unknown): Use parent method pickAnchor
- 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
method pickSpecificBoxFace
Deprecated since version (unknown): Use parent method pickSpecificBorder
- Parameters:
pDisplay (ORSModel.ors.View) –
faceIndex (int) –
xPixelPositionInDisplay (int) –
yPixelPositionInDisplay (int) –
- Returns:
output (bool) –
- set2LabelAxis(self, flag: bool)
set2LabelAxis
Dirty flags: OrsPropertyDirty
- Parameters:
flag (bool) –
- setAxisLengthFactor(self, aFactor: float)
Sets the axis length factor.
- Parameters:
aFactor (float) – (% of the axis that overflows the box) (a double)
- setAxisSize(self, aSize: float)
setAxisSize
- Parameters:
aSize (float) –
- setBox(self, aBox: ORSModel.ors.Box, iTIndex: int)
method setBox
- Parameters:
aBox (ORSModel.ors.Box) –
iTIndex (int) –
- setDecimalPrecision(self, value: int)
Sets the decimal precision of the color bar.
- Parameters:
value (int) – the number of decimal places (an unsigned short)
- setGridRectangleSize(self, aSize: float)
setGridRectangleCount
Dirty flags: OrsPropertyDirty
- Parameters:
aSize (float) –
- setHighlightedBoxFace(self, faceIndex: int, iTIndex: int)
setHighlightedBoxFace
Deprecated since version (unknown): Use parent method setHighlightedBorder
- Parameters:
faceIndex (int) –
iTIndex (int) –
- setIsMiddleAnchorHighlited(self, aValue: bool, iTIndex: int)
method setIsMiddleAnchorHighlited
Deprecated since version (unknown): Use parent method setHighlightedAnchor
- Parameters:
aValue (bool) –
iTIndex (int) –
- setPickedFace(faceIndex: int, iTIndex: int)
method setPickedFace
- Parameters:
faceIndex (int) –
iTIndex (int) –
- setPlaneColor(self, IColor: ORSModel.ors.Color)
setPlaneColor
- Parameters:
IColor (ORSModel.ors.Color) –
- setRangeMode(aFlag: bool, iTIndex: int)
method setRangeMode
- Parameters:
aFlag (bool) –
iTIndex (int) –
- setSelectedBoxFace(faceIndex: int, iTIndex: int)
setSelectedBoxFace
Deprecated since version (unknown): Was doing nothing.
- Parameters:
faceIndex (int) –
iTIndex (int) –
- setShowAxis(self, flag: bool)
setShowAxis
Dirty flags: OrsPropertyDirty
- Parameters:
flag (bool) –
- setShowAxisCaptions(self, flag: bool)
setShowAxisCaptions
Dirty flags: OrsPropertyDirty
- Parameters:
flag (bool) –
- setShowAxisX(self, bShow: bool)
setShowAxisX
- Parameters:
bShow (bool) –
- setShowAxisY(self, bShow: bool)
setShowAxisY
- Parameters:
bShow (bool) –
- setShowAxisZ(self, bShow: bool)
setShowAxisZ
- Parameters:
bShow (bool) –
- setShowBorders(self, flag: bool)
setShowBorders
Dirty flags: OrsPropertyDirty
- Parameters:
flag (bool) –
- setShowFaceAnchors(self, showFaceAnchors: bool)
setShowFaceAnchors
- Parameters:
showFaceAnchors (bool) –
- setShowGrid(self, flag: bool)
setShowGrid
Dirty flags: OrsPropertyDirty
- Parameters:
flag (bool) –
- setShowLength(self, bShow: bool)
setShowLength
Dirty flags: OrsPropertyDirty
- Parameters:
bShow (bool) –
- setShowSolidFaces(self, flag: bool)
setShowSolidFaces
- Parameters:
flag (bool) –
- setShowTicks(self, flag: bool)
setShowTicksbool
Dirty flags: OrsPropertyDirty
- Parameters:
flag (bool) –
- setTextFontName(self, sFontName: str)
Sets the font name of text captions.
- Parameters:
sFontName (str) – the font name (a string)
- setTextFontSize(self, fontSize: float)
Sets the font size of text captions, in screen one thousandths.
- Parameters:
fontSize (float) – the font size (a double between 0 and 1)
- setTextMinimumFontSize(self, iVal: int)
Sets the minimum font size of text captions, in font points.
- Parameters:
iVal (int) – the font size
- setTickAutoPlacement(self, flag: bool)
setTickAutoPlacement
- Parameters:
flag (bool) –
- setTicksColor(self, IColor: ORSModel.ors.Color)
setTicksColor
- Parameters:
IColor (ORSModel.ors.Color) –
- setXAxisColor(self, IColor: ORSModel.ors.Color)
setXAxisColor
- Parameters:
IColor (ORSModel.ors.Color) –
- setYAxisColor(self, IColor: ORSModel.ors.Color)
setYAxisColor
- Parameters:
IColor (ORSModel.ors.Color) –
- setZAxisColor(self, IColor: ORSModel.ors.Color)
setZAxisColor
- Parameters:
IColor (ORSModel.ors.Color) –
- unHighlightAllBoxFace(self, iTIndex: int)
unHighlightAllBoxFace
Deprecated since version (unknown): Use parent method unHighlightAllBorder
- Parameters:
iTIndex (int) –
- unSelectAllBoxFace(iTIndex: int)
unSelectAllBoxFace
Deprecated since version (unknown): Was doing nothing.
- Parameters:
iTIndex (int) –
VisualCapsule¶
- class ORSModel.ors.VisualCapsule(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualShape3D- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualCapsule.__init__(self)
- getCapsule(self, iTIndex: int) ORSModel.ors.Capsule
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.Capsule) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() VisualCapsule
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualCapsule) –
- setCapsule(self, aCapsule: ORSModel.ors.Capsule, iTIndex: int)
- Parameters:
aCapsule (ORSModel.ors.Capsule) –
iTIndex (int) –
VisualChannel¶
- class ORSModel.ors.VisualChannel(*args, **kwargs)
Bases:
DatasetPresenterRepresents a high quality visual volume in the view.
See also
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
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:
aChannel1 (ORSModel.ors.Channel) –
aChannel2 (ORSModel.ors.Channel) –
aChannel3 (ORSModel.ors.Channel) –
aChannel4 (ORSModel.ors.Channel) –
- Returns:
output (bool) – true if attach operation succeeded, false otherwise
- copyShapeFromChannel(self, pISourceChannel: ORSModel.ors.Channel)
- Parameters:
pISourceChannel (ORSModel.ors.Channel) –
- detachChannel(self, anIChannel: ORSModel.ors.Channel) bool
Note
A standard detachChild() from the channel is also performed by this method.
- Parameters:
anIChannel (ORSModel.ors.Channel) –
- Returns:
output (bool) – true if detach was successful, false otherwise
- eraseWindowLevelDataForView(self, IDisplay: ORSModel.ors.View)
Erases the window level data specific to a given view.
- Parameters:
IDisplay (ORSModel.ors.View) –
- executeGPGPUCommand(self, outputChannel: ORSModel.ors.Channel, shaderFilename: str, Slabsize: int, iNbIteration: int, numericArguments: dict, iKernelSize: int)
- Parameters:
outputChannel (ORSModel.ors.Channel) –
shaderFilename (str) –
Slabsize (int) –
iNbIteration (int) –
numericArguments (dict) –
iKernelSize (int) –
- get2DColorRangeModeForView(self, pDisplay: ORSModel.ors.View) int
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (int) –
- 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, pDisplay: 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:
pDisplay (ORSModel.ors.View) – the view (a View)
- Returns:
output (float) – the opacity value (a double, between 0 and 1)
- get2DOpacityModeForView(self, pDisplay: ORSModel.ors.View) int
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (int) –
- get2DWindowLevel2ValuesNormalizedForAllViews(self, pWindowWidth: float, pWindowCenter: float)
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.
See also
get3DWindowLevelValuesNormalized(), get2DWindowLevelValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Parameters:
pWindowWidth (float) –
pWindowCenter (float) –
- get2DWindowLevel2ValuesNormalizedForView(self, IDisplay: ORSModel.ors.View, pWindowWidth: float, pWindowCenter: float)
- Parameters:
IDisplay (ORSModel.ors.View) –
pWindowWidth (float) –
pWindowCenter (float) –
- get2DWindowLevelValuesNormalizedForAllViews(self, pWindowWidth: float, pWindowCenter: float)
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.
See also
get2DWindowLevelValuesNormalized(), get2DWindowLevel2ValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Parameters:
pWindowWidth (float) –
pWindowCenter (float) –
- get2DWindowLevelValuesNormalizedForView(self, IDisplay: ORSModel.ors.View, pWindowWidth: float, pWindowCenter: float)
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.
See also
get3DWindowLevelValuesNormalized(), get2DWindowLevel2ValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Parameters:
IDisplay (ORSModel.ors.View) – the view (a View)
pWindowWidth (float) –
pWindowCenter (float) –
- get3DClassificationMode(self) int
- Returns:
output (int) –
- get3DColorRangeModeForView(self, pDisplay: ORSModel.ors.View) int
- Parameters:
pDisplay (ORSModel.ors.View) –
- 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, pDisplay: 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:
pDisplay (ORSModel.ors.View) – the view (a View)
- Returns:
output (float) – the opacity value (a double, between 0 and 1)
- get3DOpacityModeForView(self, pDisplay: ORSModel.ors.View) int
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (int) –
- get3DShadingModeForView(self, pDisplay: ORSModel.ors.View) int
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (int) –
- get3DSolidityFactorForView(self, pDisplay: ORSModel.ors.View) float
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- get3DWindowLevelValuesNormalizedForAllViews(self, pWindowWidth: float, pWindowCenter: float)
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.
See also
get2DWindowLevelValuesNormalized(), get2DWindowLevel2ValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Parameters:
pWindowWidth (float) –
pWindowCenter (float) –
- get3DWindowLevelValuesNormalizedForView(self, IDisplay: ORSModel.ors.View, pWindowWidth: float, pWindowCenter: float)
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.
See also
get3DWindowLevelValuesNormalized(), get2DWindowLevel2ValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
- Parameters:
IDisplay (ORSModel.ors.View) – the view (a View)
pWindowWidth (float) –
pWindowCenter (float) –
- getBox(self) ORSModel.ors.Box
- Returns:
output (ORSModel.ors.Box) –
- getCanCreateVolume(anIChannel: ORSModel.ors.Channel, nNbChannels: int) bool
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:
See also
createTextures(), CxvChannel_Data_Type
- 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) –
- getDiffuseFactorForAllViews(self) float
- Returns:
output (float) –
- getDiffuseFactorForView(self, pDisplay: ORSModel.ors.View) float
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- getEdgeContrastFactorForAllViews(self) float
- Returns:
output (float) –
- getEdgeContrastFactorForView(self, IDisplay: ORSModel.ors.View) float
- Parameters:
IDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- getEdgeContrastForAllViews(self) bool
- Returns:
output (bool) –
- getEdgeContrastForView(self, IDisplay: ORSModel.ors.View) bool
- Parameters:
IDisplay (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*)
- getFourQuadrantMode() bool
- Returns:
output (bool) –
- getGamma2DForView(self, pDisplay: ORSModel.ors.View) float
Gets the gamma 2D value of a specific view.
- Parameters:
pDisplay (ORSModel.ors.View) – the view (a View)
- Returns:
output (float) –
- getGamma3DForView(self, pDisplay: ORSModel.ors.View) float
Gets the gamma 3D value of a specific view.
- Parameters:
pDisplay (ORSModel.ors.View) – the view (a View)
- Returns:
output (float) –
- getGradientModeForAllViews(self) int
- Returns:
output (int) –
- getGradientModeForView(self, pDisplay: ORSModel.ors.View) int
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (int) –
- getHasSourceDataSameShapeAsChannel(self, pChannel: ORSModel.ors.Channel) bool
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
- getIs2DRangeSelectionEnabledForAllViews(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, pDisplay: ORSModel.ors.View) float
Gets the IsoValue of the volume for a given view.
- Parameters:
pDisplay (ORSModel.ors.View) – the view (a View)
- Returns:
output (float) – the iso value (a double, between 0 and 1)
- getMaterialIndex(self) int
- Returns:
output (int) –
- getOpacityGainForView(self, pDisplay: ORSModel.ors.View) float
Gets the opacity value of a specific view.
- Parameters:
pDisplay (ORSModel.ors.View) – the view (a View)
- Returns:
output (float) –
- getPixelIntensity(self, pDisplay: ORSModel.ors.View, pXPos: int, pYPos: int, pIntensity: float) bool
Gets the pixel intensity at any given screen coordinate, for a given view.
- Parameters:
pDisplay (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) – true if the point is part of the volume, false otherwise
- getProjectionMode(self) int
See also
CxvVolumeProjection_Mode,
ORSModel.ors.VisualChannel.setProjectionMode()- Returns:
output (int) –
- getRenderModeForAllViews(self) int
Gets the render mode for all views.
- Returns:
output (int) – current render mode value (a uint16_t, see ors_def.h)
- getRenderModeForView(self, aView: ORSModel.ors.View) int
Gets the render mode for the given view.
- Parameters:
aView (ORSModel.ors.View) – the view (a View)
- Returns:
output (int) – current render mode value (a uint16_t, see ors_def.h)
- getResetWindowLevelCenter(self) float
Gets the center value that will be used to reset the window level.
Note
If the volume’s channel has a suggested leveling value, it will be used, otherwise it will be according to the full range of data.
See also
ORSModel.ors.VisualChannel.getResetWindowLevelWidth(),ORSModel.ors.VisualChannel.reset2DWindowLevelForView(),ORSModel.ors.VisualChannel.reset3DWindowLevelForView()- Returns:
output (float) – the value of the window center for reset (a double)
- getResetWindowLevelWidth(self) float
Gets the width value that will be used to reset the window level.
Note
If the volume’s channel has a suggested leveling value, it will be used, otherwise it will be according to the full range of data.
See also
ORSModel.ors.VisualChannel.getResetWindowLevelCenter(),ORSModel.ors.VisualChannel.reset2DWindowLevelForView(),ORSModel.ors.VisualChannel.reset3DWindowLevelForView()- Returns:
output (float) – the value of the window width for reset (a double)
- getSourceDataPosition(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getSourceDataXSize(self) int
Gets the visual’s total X size.
See also
getSourceDataDisplayedXSize()
- 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.
See also
getSourceDataDisplayedYSize()
- 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.
See also
getSourceDataDisplayedZSize()
- 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)
- getSpecularFactorForAllViews(self) float
- Returns:
output (float) –
- getSpecularFactorForView(self, pDisplay: ORSModel.ors.View) float
- Parameters:
pDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- getSurfacenessThresholdForAllViews(self) float
- Returns:
output (float) –
- getSurfacenessThresholdForView(self, IDisplay: ORSModel.ors.View) float
- Parameters:
IDisplay (ORSModel.ors.View) –
- Returns:
output (float) –
- getTextureWrappingMode(self) int
- Returns:
output (int) –
- getUseHighQualityIn3D(self) bool
- Returns:
output (bool) –
- getUsePointFilteringIn3D(self) bool
- Returns:
output (bool) –
- getUseTriCubicFilteringIn2D(self) bool
- Returns:
output (bool) –
- getUseTriCubicFilteringIn3D(self) bool
- Returns:
output (bool) –
- getUseUnsharpIn3D(self) bool
- Returns:
output (bool) –
- none() VisualChannel
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualChannel) –
- reset2DWindowLevelForAllViews(self)
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, IDisplay: ORSModel.ors.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:
IDisplay (ORSModel.ors.View) – the view (a View)
- reset3DWindowLevelForAllViews(self)
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, IDisplay: ORSModel.ors.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:
IDisplay (ORSModel.ors.View) – the view (a View)
- set2DColorRangeModeForView(self, pDisplay: ORSModel.ors.View, aValue: int)
- Parameters:
pDisplay (ORSModel.ors.View) –
aValue (int) –
- set2DLODEnabled(self, value: bool)
- Parameters:
value (bool) –
- set2DLODSlabEnabled(self, value: bool)
- Parameters:
value (bool) –
- set2DOpacityFactorForAllViews(self, value: float)
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, pDisplay: ORSModel.ors.View, value: float)
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:
pDisplay (ORSModel.ors.View) – the view (a View)
value (float) – the opacity value (a double, between 0 and 1)
- set2DOpacityModeForView(self, pDisplay: ORSModel.ors.View, aValue: int)
- Parameters:
pDisplay (ORSModel.ors.View) –
aValue (int) –
- set2DWindowLevel2ToShowFullRangeForAllViews(self)
- set2DWindowLevel2ToShowFullRangeForView(self, IDisplay: ORSModel.ors.View)
Sets the rendering effect to modify the 2d shader.
- Parameters:
IDisplay (ORSModel.ors.View) – the effect (a RenderingEffect)
- set2DWindowLevelToShowFullRangeForAllViews(self)
- set2DWindowLevelToShowFullRangeForView(self, IDisplay: ORSModel.ors.View)
Note
Volumes support two leveling modes, one for 3D views and the other for 2D views.
- Parameters:
IDisplay (ORSModel.ors.View) – the view (a View)
- set3DClassificationMode(self, aMode: int)
- Parameters:
aMode (int) –
- set3DColorRangeModeForView(self, pDisplay: ORSModel.ors.View, aValue: int)
- Parameters:
pDisplay (ORSModel.ors.View) –
aValue (int) –
- set3DOpacityFactorForAllViews(self, value: float)
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, pDisplay: ORSModel.ors.View, value: float)
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:
pDisplay (ORSModel.ors.View) – the view (a View)
value (float) – the opacity value (a double, between 0 and 1)
- set3DOpacityModeForView(self, pDisplay: ORSModel.ors.View, aValue: int)
- Parameters:
pDisplay (ORSModel.ors.View) –
aValue (int) –
- set3DShadingModeForView(self, pDisplay: ORSModel.ors.View, aMode: int)
- Parameters:
pDisplay (ORSModel.ors.View) –
aMode (int) –
- set3DSolidityFactorForView(self, pDisplay: ORSModel.ors.View, value: float)
- Parameters:
pDisplay (ORSModel.ors.View) –
value (float) –
- set3DWindowLevelToShowFullRangeForAllViews(self)
- set3DWindowLevelToShowFullRangeForView(self, IDisplay: ORSModel.ors.View)
Note
Volumes support two leveling modes, one for 3D views and the other for 2D views.
- Parameters:
IDisplay (ORSModel.ors.View) – the view (a View)
- setDiffuseFactorForAllViews(self, value: float)
- Parameters:
value (float) –
- setDiffuseFactorForView(self, pDisplay: ORSModel.ors.View, value: float)
- Parameters:
pDisplay (ORSModel.ors.View) –
value (float) –
- setEdgeContrastFactorForAllViews(self, value: float)
- Parameters:
value (float) –
- setEdgeContrastFactorForView(self, IDisplay: ORSModel.ors.View, value: float)
method setEdgeContrastFactorForView
Dirty flags: OrsPropertyDirty
- Parameters:
IDisplay (ORSModel.ors.View) –
value (float) –
- setEdgeContrastForAllViews(self, value: bool)
- Parameters:
value (bool) –
- setEdgeContrastForView(self, IDisplay: ORSModel.ors.View, value: bool)
method setEdgeContrastForView
Dirty flags: OrsPropertyDirty
- Parameters:
IDisplay (ORSModel.ors.View) –
value (bool) –
- setFilteringMode(self, iMode: int)
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*)
- setFourQuadrantMode(bEnabled: bool)
- Parameters:
bEnabled (bool) –
- setGamma2DForView(self, pDisplay: ORSModel.ors.View, dVal: float)
Sets the gamma 2D value for a specific view.
- Parameters:
pDisplay (ORSModel.ors.View) – the view (a View)
dVal (float) – the gamma value (a double)
- setGamma3DForView(self, pDisplay: ORSModel.ors.View, dVal: float)
Sets the gamma 3D value for a specific view.
- Parameters:
pDisplay (ORSModel.ors.View) – the view (a View)
dVal (float) – the gamma value (a double)
- setGradientModeForAllViews(self, aValue: int)
- Parameters:
aValue (int) –
- setGradientModeForView(self, pDisplay: ORSModel.ors.View, aValue: int)
- Parameters:
pDisplay (ORSModel.ors.View) –
aValue (int) –
- setIs2DRangeSelectionEnabledForAllViews(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setIsoValueForAllViews(self, value: float)
Sets the IsoValue of the volume for all views.
- Parameters:
value (float) – the iso value (a double, between 0 and 1)
- setIsoValueForView(self, pDisplay: ORSModel.ors.View, value: float)
Sets the IsoValue of the volume for a given view.
- Parameters:
pDisplay (ORSModel.ors.View) – the view (a View)
value (float) – the iso value (a double, between 0 and 1)
- setMaterialIndex(self, index: int)
- Parameters:
index (int) –
- setOpacityGainForView(self, pDisplay: ORSModel.ors.View, dVal: float)
Sets the opacity gain value for a specific view.
Dirty flags: OrsPropertyDirty
- Parameters:
pDisplay (ORSModel.ors.View) – the view (a View)
dVal (float) – the gain value (a double)
- setPlaneChannelForView(self, pDisplay: ORSModel.ors.View, pChannel: ORSModel.ors.Channel)
- Parameters:
pDisplay (ORSModel.ors.View) –
pChannel (ORSModel.ors.Channel) –
- setProjectionMode(self, iMode: int)
See also
CxvVolumeProjection_Mode,
ORSModel.ors.VisualChannel.getProjectionMode()- Parameters:
iMode (int) –
- setRenderModeForAllViews(self, mode: int)
sets the render mode for all views
Dirty flags: OrsPropertyDirty
- Parameters:
mode (int) – new render mode value (a uint16_t, see ors_def.h)
- setRenderModeForView(self, aView: ORSModel.ors.View, mode: int)
sets the render mode for the given view
Dirty flags: OrsPropertyDirty
- Parameters:
aView (ORSModel.ors.View) – the view (a View)
mode (int) – new render mode value (a uint16_t, see ors_def.h)
- setRenderingEffect(self, effect: ORSModel.ors.RenderingEffect)
- Parameters:
effect (ORSModel.ors.RenderingEffect) –
- setSpecularFactorForAllViews(self, value: float)
- Parameters:
value (float) –
- setSpecularFactorForView(self, pDisplay: ORSModel.ors.View, value: float)
- Parameters:
pDisplay (ORSModel.ors.View) –
value (float) –
- setSurfacenessThresholdForAllViews(self, value: float)
- Parameters:
value (float) –
- setSurfacenessThresholdForView(self, IDisplay: ORSModel.ors.View, value: float)
- Parameters:
IDisplay (ORSModel.ors.View) –
value (float) –
- setTextureWrappingMode(self, aValue: int)
- Parameters:
aValue (int) –
- setUseHighQualityIn3D(self, value: bool)
- Parameters:
value (bool) –
- setUsePointFilteringIn3D(self, value: bool)
- Parameters:
value (bool) –
- setUseTriCubicFilteringIn2D(self, value: bool)
- Parameters:
value (bool) –
- setUseTriCubicFilteringIn3D(self, value: bool)
- Parameters:
value (bool) –
- setUseUnsharpIn3D(self, aValue: bool)
- Parameters:
aValue (bool) –
VisualColorBar¶
- class ORSModel.ors.VisualColorBar(*args, **kwargs)
Bases:
VisualUsed to present a ColorBar on the renderer.
See also
LookupTable
- getAllViewsUsingLookupTable(self, aLUT: ORSModel.ors.LookupTable) ORSModel.ors.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 unsigned short)
- getDimensionUnitForAllViews(self) ORSModel.ors.DimensionUnit
- Returns:
output (ORSModel.ors.DimensionUnit) –
- getDimensionUnitForView(self, pView: ORSModel.ors.View) ORSModel.ors.DimensionUnit
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.DimensionUnit) –
- 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) ORSModel.ors.LookupTable
Gets the lookup table associated to all views.
Note
this is the lookup table kept internally by the VisualColorBar.
See also
ORSModel.ors.VisualColorBar.getLookupTableForView(),ORSModel.ors.VisualColorBar.setLookupTableForAllViews()- Returns:
output (ORSModel.ors.LookupTable) – the LookupTable (a LookupTable)
- getLookupTableForView(self, pView: ORSModel.ors.View) ORSModel.ors.LookupTable
Gets the lookup table associated to a specific view.
Note
this is the lookup table kept internally by the VisualColorBar.
See also
ORSModel.ors.VisualColorBar.getLookupTableForAllViews(),ORSModel.ors.VisualColorBar.setLookupTableForView()- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (ORSModel.ors.LookupTable) – the LookupTable (a LookupTable)
- getMaxAnchorHighlighted(self) bool
- Returns:
output (bool) –
- getMinAnchorHighlighted(self) bool
- Returns:
output (bool) –
- getOffset(self) float
Gets the color bar offset.
See also
ORSModel.ors.VisualColorBar.setOffset(),ORSModel.ors.VisualColorBar.setSlope(),ORSModel.ors.VisualColorBar.getSlope()- Returns:
output (float) – the offset (a double)
- getPositionForAllViews(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getPositionForView(self, pView: ORSModel.ors.View) ORSModel.ors.Vector3
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.Vector3) –
- 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.
See also
ORSModel.ors.VisualColorBar.getOffset(),ORSModel.ors.VisualColorBar.setOffset(),ORSModel.ors.VisualColorBar.setSlope()- Returns:
output (float) – the slope (a double)
- getTextColor(self) ORSModel.ors.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) ORSModel.ors.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 unsigned short)
- getTransparent(self) bool
Gets the transparency status of the color bar.
See also
ORSModel.ors.VisualColorBar.getBold(),ORSModel.ors.VisualColorBar.getItalic(),ORSModel.ors.VisualColorBar.getBorder()- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (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)
Sets the color bar to be bold or not.
- Parameters:
value (bool) – TRUE to be in bold, FALSE otherwise
- setBorder(self, value: bool)
Sets the color bar to have a border or not.
- Parameters:
value (bool) – true to have a border, false otherwise
- setCanBeVisibleForAllViews(self, aValue: bool)
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)
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) –
- setDecimalPrecision(self, value: int)
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)
Sets the default position of the color bar.
- Parameters:
x (float) – the X coordinate (a double)
y (float) – the Y coordinate (a double)
- setDimensionUnitForAllViews(self, pDimensionUnit: ORSModel.ors.DimensionUnit)
- Parameters:
pDimensionUnit (ORSModel.ors.DimensionUnit) –
- setDimensionUnitForView(self, pView: ORSModel.ors.View, pDimensionUnit: ORSModel.ors.DimensionUnit)
- Parameters:
pView (ORSModel.ors.View) –
pDimensionUnit (ORSModel.ors.DimensionUnit) –
- setDrawTextShadow(self, bFlag: bool)
Toggles displaying shadows for the text.
- Parameters:
bFlag (bool) – true to show text shadows, false otherwise
- setHeightAsViewFractionForAllViews(self, aValue: float)
- Parameters:
aValue (float) –
- setHeightAsViewFractionForView(self, pView: ORSModel.ors.View, aValue: float)
- Parameters:
pView (ORSModel.ors.View) –
aValue (float) –
- setIsEnabledForAllViews(self, aValue: bool)
- Parameters:
aValue (bool) –
- setIsEnabledForView(self, pView: ORSModel.ors.View, aValue: bool)
- Parameters:
pView (ORSModel.ors.View) –
aValue (bool) –
- setIsHorizontal(self, bHorizontal: bool)
- Parameters:
bHorizontal (bool) –
- setItalic(self, value: bool)
Sets the color bar to be italic or not.
- Parameters:
value (bool) – true to be italic, false otherwise
- setLineThickness(self, value: float)
- Parameters:
value (float) –
- setLookupTableForAllViews(self, aLUT: ORSModel.ors.LookupTable)
Sets the lookup table associated to all views.
Note
the contents of the provided lookup table are copied into the one kept internally by the VisualColorBar.
See also
ORSModel.ors.VisualColorBar.setLookupTableForView(),ORSModel.ors.VisualColorBar.getLookupTableForAllViews()- Parameters:
aLUT (ORSModel.ors.LookupTable) – the LookupTable (a LookupTable)
- setLookupTableForView(self, pView: ORSModel.ors.View, aLUT: ORSModel.ors.LookupTable)
Sets the lookup table associated to a specific view.
Note
the contents of the provided lookup table are copied into the one kept internally by the VisualColorBar.
See also
ORSModel.ors.VisualColorBar.setLookupTableForAllViews(),ORSModel.ors.VisualColorBar.getLookupTableForView()- Parameters:
pView (ORSModel.ors.View) – a view (a View)
aLUT (ORSModel.ors.LookupTable) – the LookupTable (a LookupTable)
- setMaxAnchorHighlighted(self, aFlag: bool)
- Parameters:
aFlag (bool) –
- setMinAnchorHighlighted(self, aFlag: bool)
- Parameters:
aFlag (bool) –
- setOffset(self, anOffset: float)
Sets the color bar offset.
See also
ORSModel.ors.VisualColorBar.getOffset(),ORSModel.ors.VisualColorBar.setSlope(),ORSModel.ors.VisualColorBar.getSlope()- Parameters:
anOffset (float) – the offset (a double)
- setOrientationToHorizontalForAllViews(self)
- setOrientationToHorizontalForView(self, pView: ORSModel.ors.View)
- Parameters:
pView (ORSModel.ors.View) –
- setOrientationToVerticalForAllViews(self)
- setOrientationToVerticalForView(self, pView: ORSModel.ors.View)
- Parameters:
pView (ORSModel.ors.View) –
- setPositionForAllViews(self, aPoint: ORSModel.ors.Vector3)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setPositionForView(self, pView: ORSModel.ors.View, aPoint: ORSModel.ors.Vector3)
Set the color bar position in view.
- Parameters:
pView (ORSModel.ors.View) – the view
aPoint (ORSModel.ors.Vector3) –
- setPositionVerticalForAllViews(self, aPoint: ORSModel.ors.Vector3)
- Parameters:
aPoint (ORSModel.ors.Vector3) –
- setRangeAndDimensionUnitForAllViews(self, min: float, max: float, pDimensionUnit: ORSModel.ors.DimensionUnit)
- Parameters:
min (float) –
max (float) –
pDimensionUnit (ORSModel.ors.DimensionUnit) –
- setRangeAndDimensionUnitForView(self, pView: ORSModel.ors.View, min: float, max: float, pDimensionUnit: ORSModel.ors.DimensionUnit)
- Parameters:
pView (ORSModel.ors.View) –
min (float) –
max (float) –
pDimensionUnit (ORSModel.ors.DimensionUnit) –
- setRangeDimensionUnitForAllViews(self, value: int)
method setRangeDimensionUnitForAllViews
Deprecated since version (unknown): use setDimensionUnitForAllViews instead
- Parameters:
value (int) –
- setRangeDimensionUnitForView(self, pView: ORSModel.ors.View, value: int)
method setRangeDimensionUnitForView
Deprecated since version (unknown): use setDimensionUnitForView instead
- Parameters:
pView (ORSModel.ors.View) –
value (int) –
- setRangeForAllViews(self, min: float, max: float, unit: int)
method setRangeForAllViews
Deprecated since version (unknown): use setRangeAndDimensionUnitForAllViews instead
- Parameters:
min (float) –
max (float) –
unit (int) –
- setRangeForView(self, pView: ORSModel.ors.View, min: float, max: float, unit: int)
method setRangeForView
Deprecated since version (unknown): use setRangeAndDimensionUnitForView instead
- Parameters:
pView (ORSModel.ors.View) –
min (float) –
max (float) –
unit (int) –
- setSlope(self, aSlope: float)
Sets the color bar slope.
See also
ORSModel.ors.VisualColorBar.getOffset(),ORSModel.ors.VisualColorBar.setOffset(),ORSModel.ors.VisualColorBar.getSlope()- Parameters:
aSlope (float) – the slope (a double)
- setTextColor(self, IColor: ORSModel.ors.Color)
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)
Sets the text font name.
- Parameters:
sFontName (str) – the font name (a string)
- setTextFontSize(self, fontSize: float)
Sets the text font size, in screen one thousandths.
- Parameters:
fontSize (float) – the font size (a double between 0 and 1)
- setTextMinimumFontSize(self, iVal: int)
Sets the minimum font size, in font points.
- Parameters:
iVal (int) – the font size
- setTextShadowColor(self, IColor: ORSModel.ors.Color)
Sets the text shadow color of the color bar.
- Parameters:
IColor (ORSModel.ors.Color) – a color object (an Color)
- setTickCount(self, value: int)
Sets the number of visible ticks on the color bar.
See also
setRange()
- Parameters:
value (int) – the number of ticks (an unsigned short)
- setTransparent(self, value: bool)
Sets the color bar to be transparent or not.
See also
ORSModel.ors.VisualColorBar.setItalic(),ORSModel.ors.VisualColorBar.setBold(),ORSModel.ors.VisualColorBar.setBorder()- Parameters:
value (bool) – true to be transparent, false otherwise
- setWidthAsViewFractionForAllViews(self, aValue: float)
- Parameters:
aValue (float) –
- setWidthAsViewFractionForView(self, pView: ORSModel.ors.View, aValue: float)
- Parameters:
pView (ORSModel.ors.View) –
aValue (float) –
- updateRampForAllViews(self)
- updateRampForView(self, pView: ORSModel.ors.View)
- Parameters:
pView (ORSModel.ors.View) –
VisualCylinder¶
- class ORSModel.ors.VisualCylinder(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualShape3D- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualCylinder.__init__(self)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getCylinder(self, iTIndex: int) ORSModel.ors.Cylinder
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.Cylinder) –
- none() VisualCylinder
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualCylinder) –
- setCylinder(self, aCylinder: ORSModel.ors.Cylinder, iTIndex: int)
- Parameters:
aCylinder (ORSModel.ors.Cylinder) –
iTIndex (int) –
VisualGraph¶
- class ORSModel.ors.VisualGraph(*args, **kwargs)
Bases:
VisualA visual that represents a VisualGraph.
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getCurrentEdgeScalarValueMappingForAllViews(self) str
- Returns:
output (str) –
- getCurrentEdgeScalarValueMappingForView(self, IView: ORSModel.ors.View) str
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (str) –
- getCurrentEdgeScalarValuesSlotForRadiusForAllViews(self) int
- Returns:
output (int) –
- getCurrentEdgeScalarValuesSlotForRadiusForView(self, IView: ORSModel.ors.View) int
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (int) –
- getCurrentVertexScalarValueMappingForAllViews(self) str
- Returns:
output (str) –
- getCurrentVertexScalarValueMappingForView(self, IView: ORSModel.ors.View) str
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (str) –
- getCurrentVertexScalarValuesSlotForRadiusForAllViews(self) int
- Returns:
output (int) –
- getCurrentVertexScalarValuesSlotForRadiusForView(self, IView: ORSModel.ors.View) int
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (int) –
- getEdgesVisibleMaxForAllViews(self) float
- Returns:
output (float) –
- getEdgesVisibleMaxForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getEdgesVisibleMinForAllViews(self) float
- Returns:
output (float) –
- getEdgesVisibleMinForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getEdgesWidthForAllViews(self) float
- Returns:
output (float) –
- getEdgesWidthForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getEffectiveInRangeOpacityForAllViews(self) float
- Returns:
output (float) –
- getEffectiveInRangeOpacityForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getEffectiveOutRangeOpacityForAllViews(self) float
- Returns:
output (float) –
- getEffectiveOutRangeOpacityForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getLODOnMotion(self) bool
- Returns:
output (bool) –
- getOpacitiesZerosForAllViews(self) bool
- Returns:
output (bool) –
- getOpacitiesZerosForView(self, IView: ORSModel.ors.View) bool
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getOpacityForAllViews(self) float
- Returns:
output (float) –
- getOpacityForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getOpacityInRangeForAllViews(self) float
- Returns:
output (float) –
- getOpacityInRangeForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getOpacityOutRangeForAllViews(self) float
- Returns:
output (float) –
- getOpacityOutRangeForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getUseConstantVertexRadiusForAllViews(self) bool
- Returns:
output (bool) –
- getUseConstantVertexRadiusForView(self, IView: ORSModel.ors.View) bool
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getUseEdgeScalarRealScaleForRadiusForAllViews(self) bool
- Returns:
output (bool) –
- getUseEdgeScalarRealScaleForRadiusForView(self, IView: ORSModel.ors.View) bool
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getUseVertexScalarRealScaleForRadiusForAllViews(self) bool
- Returns:
output (bool) –
- getUseVertexScalarRealScaleForRadiusForView(self, IView: ORSModel.ors.View) bool
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getVertexSizeFactorForAllViews(self) float
- Returns:
output (float) –
- getVertexSizeFactorForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getVertexVisibleMaxForAllViews(self) float
- Returns:
output (float) –
- getVertexVisibleMaxForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getVertexVisibleMinForAllViews(self) float
- Returns:
output (float) –
- getVertexVisibleMinForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- none() VisualGraph
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualGraph) –
- setCurrentEdgeScalarValueMappingForAllViews(self, aScalarMapping: str)
- Parameters:
aScalarMapping (str) –
- setCurrentEdgeScalarValueMappingForView(self, IView: ORSModel.ors.View, aScalarMapping: str)
- Parameters:
IView (ORSModel.ors.View) –
aScalarMapping (str) –
- setCurrentEdgeScalarValuesSlotForRadiusForAllViews(self, slotIndex: int)
- Parameters:
slotIndex (int) –
- setCurrentEdgeScalarValuesSlotForRadiusForView(self, IView: ORSModel.ors.View, slotIndex: int)
- Parameters:
IView (ORSModel.ors.View) –
slotIndex (int) –
- setCurrentVertexScalarValueMappingForAllViews(self, aScalarMapping: str)
- Parameters:
aScalarMapping (str) –
- setCurrentVertexScalarValueMappingForView(self, IView: ORSModel.ors.View, aScalarMapping: str)
- Parameters:
IView (ORSModel.ors.View) –
aScalarMapping (str) –
- setCurrentVertexScalarValuesSlotForRadiusForAllViews(self, slotIndex: int)
- Parameters:
slotIndex (int) –
- setCurrentVertexScalarValuesSlotForRadiusForView(self, IView: ORSModel.ors.View, slotIndex: int)
- Parameters:
IView (ORSModel.ors.View) –
slotIndex (int) –
- setEdgesVisibleMaxForAllViews(self, pValue: float)
- Parameters:
pValue (float) –
- setEdgesVisibleMaxForView(self, IView: ORSModel.ors.View, pValue: float)
- Parameters:
IView (ORSModel.ors.View) –
pValue (float) –
- setEdgesVisibleMinForAllViews(self, pValue: float)
- Parameters:
pValue (float) –
- setEdgesVisibleMinForView(self, IView: ORSModel.ors.View, pValue: float)
- Parameters:
IView (ORSModel.ors.View) –
pValue (float) –
- setEdgesWidthForAllViews(self, value: float)
- Parameters:
value (float) –
- setEdgesWidthForView(self, IView: ORSModel.ors.View, width: float)
- Parameters:
IView (ORSModel.ors.View) –
width (float) –
- setLODOnMotion(self, flag: bool)
- Parameters:
flag (bool) –
- setOpacityForAllViews(self, value: float)
- Parameters:
value (float) –
- setOpacityForView(self, IView: ORSModel.ors.View, value: float)
- Parameters:
IView (ORSModel.ors.View) –
value (float) –
- setOpacityInRangeForAllViews(self, value: float)
- Parameters:
value (float) –
- setOpacityInRangeForView(self, IView: ORSModel.ors.View, value: float)
- Parameters:
IView (ORSModel.ors.View) –
value (float) –
- setOpacityOutRangeForAllViews(self, value: float)
- Parameters:
value (float) –
- setOpacityOutRangeForView(self, IView: ORSModel.ors.View, value: float)
- Parameters:
IView (ORSModel.ors.View) –
value (float) –
- setUseConstantVertexRadiusForAllViews(self, useConstantRadius: bool)
- Parameters:
useConstantRadius (bool) –
- setUseConstantVertexRadiusForView(self, IView: ORSModel.ors.View, useConstantRadius: bool)
- Parameters:
IView (ORSModel.ors.View) –
useConstantRadius (bool) –
- setUseEdgeScalarRealScaleForRadiusForAllViews(self, useRealScale: bool)
- Parameters:
useRealScale (bool) –
- setUseEdgeScalarRealScaleForRadiusForView(self, IView: ORSModel.ors.View, useRealScale: bool)
- Parameters:
IView (ORSModel.ors.View) –
useRealScale (bool) –
- setUseVertexScalarRealScaleForRadiusForAllViews(self, useRealScale: bool)
- Parameters:
useRealScale (bool) –
- setUseVertexScalarRealScaleForRadiusForView(self, IView: ORSModel.ors.View, useRealScale: bool)
- Parameters:
IView (ORSModel.ors.View) –
useRealScale (bool) –
- setVertexSizeFactorForAllViews(self, value: float)
- Parameters:
value (float) –
- setVertexSizeFactorForView(self, IView: ORSModel.ors.View, factor: float)
- Parameters:
IView (ORSModel.ors.View) –
factor (float) –
- setVertexVisibleMaxForAllViews(self, pValue: float)
- Parameters:
pValue (float) –
- setVertexVisibleMaxForView(self, IView: ORSModel.ors.View, pValue: float)
- Parameters:
IView (ORSModel.ors.View) –
pValue (float) –
- setVertexVisibleMinForAllViews(self, pValue: float)
- Parameters:
pValue (float) –
- setVertexVisibleMinForView(self, IView: ORSModel.ors.View, pValue: float)
- Parameters:
IView (ORSModel.ors.View) –
pValue (float) –
VisualGrid¶
- class ORSModel.ors.VisualGrid(*args, **kwargs)
Bases:
VisualRepresents a grid in a display.
See also
View
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() VisualGrid
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualGrid) –
VisualLabel¶
- class ORSModel.ors.VisualLabel(*args, **kwargs)
Bases:
AnnotationRepresents a label, which is used to associate text to other objects.
- getBindedNode(self) ORSModel.ors.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 unsigned short)
- getLabelTextFontName(self) str
- Returns:
output (str) –
- getLabelTextFontSize(self) int
Gets the font size.
See also
getTextFontName()
- 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.
See also
setTextFontName()
- Returns:
output (bool) – TRUE if lines are shown, FALSE otherwise
- moveLabelToCursorPositionInDisplay(self, pDisplay: ORSModel.ors.View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int)
Moves the label to the current cursor position in a given display.
- Parameters:
pDisplay (ORSModel.ors.View) –
pixelXPositionInDisplay (int) –
pixelYPositionInDisplay (int) –
- none() VisualLabel
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualLabel) –
- setForBWRendering(self)
Sets the Label to be rendered in Black & White.
- setForNormalRendering(self)
Sets the Label to be rendered normally.
- setHasBindedNode(self, bValue: bool)
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)
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)
Note
3 modes are currently supported:
- Parameters:
iMode (int) – the sort mode (an unsigned short)
- setLabelTextFontName(self, sName: str)
Sets the text font name of the label.
See also
setTextFontSize()
- Parameters:
sName (str) – the font name (a string)
- setLabelTextFontSize(self, pValue: int)
Sets the font size.
See also
setTextFontName()
- Parameters:
pValue (int) – the font size (a short)
- setPositionInDisplay(self, IDisplay: ORSModel.ors.View, xPos: float, yPos: float)
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)
Sets the label lines visibility.
Note
This controls the line between the label and the object it points to.
See also
setTextFontName()
- Parameters:
value (bool) – TRUE to show the line, FALSE to hide them
VisualLegend¶
- class ORSModel.ors.VisualLegend(*args, **kwargs)
Bases:
VisualColorBarUsed to present a legend on the renderer.
See also
LookupTable
- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualLegend) –
- setLabelAtIndex(self, index: int, label: str)
- Parameters:
index (int) –
label (str) –
- setLabelCount(self, labelCount: int)
- Parameters:
labelCount (int) –
- setViewOrderAtIndex(self, index: int, viewOrder: int)
- Parameters:
index (int) –
viewOrder (int) –
- setViewOrderSize(self, iNewSize: int)
- Parameters:
iNewSize (int) –
VisualMesh¶
- class ORSModel.ors.VisualMesh(*args, **kwargs)
Bases:
VisualA visual that represents a VisualMesh.
- get3DThicknessForView(self, pView: ORSModel.ors.View) float
Gets the thickness of lines in 3D mode.
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) – the thickness, in screen proportion (a double between 0 and 1)
- 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
- getDiffuseFactorForAllViews(self) float
- Returns:
output (float) –
- getDiffuseFactorForView(self, pView: ORSModel.ors.View) float
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- getEffectiveInRangeOpacityForAllViews(self) float
- Returns:
output (float) –
- getEffectiveInRangeOpacityForView(self, pView: ORSModel.ors.View) float
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- getEffectiveOutRangeOpacityForAllViews(self) float
- Returns:
output (float) –
- getEffectiveOutRangeOpacityForView(self, pView: ORSModel.ors.View) float
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- getFillModeForAllViews(self) int
Note
See the enum CxvMeshFill_Mode in ORS_def.h for valid values.
See also
ORSModel.ors.VisualMesh.getIsFillModeSolid(),ORSModel.ors.VisualMesh.getIsFillModeWireFrame(),ORSModel.ors.VisualMesh.getIsFillModePoint(),ORSModel.ors.VisualMesh.getFillModeForView(),ORSModel.ors.VisualMesh.setFillModeForView(),ORSModel.ors.VisualMesh.setFillModeForAllViews()- Returns:
output (int) –
- getFillModeForView(self, pView: ORSModel.ors.View) int
Note
See the enum CxvMeshFill_Mode in ORS_def.h for valid values.
See also
ORSModel.ors.VisualMesh.getIsFillModeSolid(),ORSModel.ors.VisualMesh.getIsFillModeWireFrame(),ORSModel.ors.VisualMesh.getIsFillModePoint(),ORSModel.ors.VisualMesh.setFillModeForView(),ORSModel.ors.VisualMesh.getFillModeForAllViews(),ORSModel.ors.VisualMesh.setFillModeForAllViews()- 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.
See also
ORSModel.ors.VisualMesh.getIsFillModeSolid(),ORSModel.ors.VisualMesh.getIsFillModeWireFrame()- 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.
See also
ORSModel.ors.VisualMesh.getIsFillModePoint(),ORSModel.ors.VisualMesh.getIsFillModeWireFrame()- 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
Note
If this setting is used, make sure that each vertex has a color defined as RGBA.
- Returns:
output (bool) –
- getIsTransparent(self) bool
Gets the transparency state of the mesh.
- Returns:
output (bool) – true if mesh is transparent, false otherwise
- getLUTForView(self, pView: ORSModel.ors.View) ORSModel.ors.LookupTable
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.LookupTable) –
- getOpacitiesZerosForAllViews(self) bool
- Returns:
output (bool) –
- getOpacitiesZerosForView(self, pView: ORSModel.ors.View) bool
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getOpacityForAllViews(self) float
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Returns:
output (float) –
- getOpacityForView(self, pView: ORSModel.ors.View) float
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (float) – the opacity (a double)
- getOpacityInRangeForAllViews(self) float
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Returns:
output (float) –
- getOpacityInRangeForView(self, pView: ORSModel.ors.View) float
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (float) – the opacity (a double)
- getOpacityOutRangeForAllViews(self) float
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Returns:
output (float) –
- getOpacityOutRangeForView(self, pView: ORSModel.ors.View) float
Gets the opacity for unselected area of the mesh.
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (float) – the opacity (a double)
- getOutlineGridColor(self) ORSModel.ors.Color
Get the outline grid color when in outline mode.
- Returns:
output (ORSModel.ors.Color) – a color (an Color)
- getScalarValueTypeForColorForAllViews(self) int
Gets the scalar value type the mesh is using (Vertex, Face or Label) scalar value, for all views.
- Returns:
output (int) – int
- getScalarValueTypeForColorForView(self, pView: ORSModel.ors.View) int
Gets the scalar value type the mesh is using (Vertex, Face or Label) scalar value, for a specific view.
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (int) – int
- getSearchLength(self) float
Get the search disdtance (in meter) of the mesh.
- Returns:
output (float) – double
- getSearchLengthOpacity(self) float
Get the opacity of the search distance while rendering.
- Returns:
output (float) – double
- getShowColorIn2D(self) bool
- Returns:
output (bool) –
- getShowIn2DDuringMotion(self) bool
Gets the visibility of the mesh in 2D views during mouse motion.
See also
ORSModel.ors.Visual.setShowIn2D(),ORSModel.ors.Visual.getShowIn3D(),ORSModel.ors.Visual.getShowIn2D(),ORSModel.ors.Visual.setShowIn3D()- Returns:
output (bool) – true if the mesh is visible in 2D views during mouse movement, false otherwise
- getShowSearchLength(self) bool
Get if the search distance will be shown during rendering of the mesh.
- Returns:
output (bool) – bool
- getSnapTolerance(self) float
Gets the relative Snap tolerance to snap annotations to the mesh.
- Returns:
output (float) – the snap tolerance, in pourcentage of the screen (a double)
- getSpecularFactorForAllViews(self) float
- Returns:
output (float) –
- getSpecularFactorForView(self, pView: ORSModel.ors.View) float
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- getThickness(self) float
Gets the thickness of lines in 2D mode.
- Returns:
output (float) – the thickness, in pixel units (a double)
- getUseDefaultMeshColorForView(self, pView: ORSModel.ors.View) bool
Tell if the mesh use default color or not, for a specific view.
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (bool) – bool
- getUseFaceScalarValueForColorForAllViews(self) bool
Tell if the mesh use face scalar value for color, if false the mesh uses vertex scalar value, for all views.
Deprecated since version (unknown): use getScalarValueTypeForColorForAllViews instead
- Returns:
output (bool) – bool
- getUseFaceScalarValueForColorForView(self, pView: ORSModel.ors.View) bool
Tell if the mesh use face scalar value for color, if false the mesh uses vertex scalar value, for a specific view.
Deprecated since version (unknown): use getScalarValueTypeForColorForView instead
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (bool) – bool
- getUseLighting(self) bool
Gets the mesh lighting mode.
- Returns:
output (bool) – true if lighting is on, false otherwise
- getUseMeshAsMask(self) bool
Gets if the mesh will be used a a mask for DVR.
- Returns:
output (bool) – -true to use as mask, false otherwise (a bool)
- getWireframeDensity(self) float
Get the wireframe density when in outline mode.
- Returns:
output (float) – double
- getWorldTransform(timestep=0)
Get the Matrix4x4 for transforming from local to world coordinates
- Parameters:
timestep (int) –
- Return:
- Rtype:
- none() VisualMesh
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualMesh) –
- set3DThicknessForView(self, pView: ORSModel.ors.View, value: float)
Sets the thickness of lines in 3D mode.
- Parameters:
pView (ORSModel.ors.View) – the thickness, in pixel units (a double between 0 and 1)
value (float) –
- setBuildOctree(self, value: bool)
- Parameters:
value (bool) –
- setCullMode(self, iMode: int)
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)
- Parameters:
value (int) –
- setDiffuseFactorForAllViews(self, pValue: float)
- Parameters:
pValue (float) –
- setDiffuseFactorForView(self, pView: ORSModel.ors.View, pValue: float)
- Parameters:
pView (ORSModel.ors.View) –
pValue (float) –
- setFillModeForAllViews(self, pFillMode: int)
Note
See the enum CxvMeshFill_Mode in ORS_def.h for valid values.
See also
ORSModel.ors.VisualMesh.getIsFillModeSolid(),ORSModel.ors.VisualMesh.getIsFillModeWireFrame(),ORSModel.ors.VisualMesh.getIsFillModePoint(),ORSModel.ors.VisualMesh.getFillModeForView(),ORSModel.ors.VisualMesh.setFillModeForView(),ORSModel.ors.VisualMesh.getFillModeForAllViews()- Parameters:
pFillMode (int) –
- setFillModeForView(self, pView: ORSModel.ors.View, pFillMode: int)
Note
See the enum CxvMeshFill_Mode in ORS_def.h for valid values.
See also
ORSModel.ors.VisualMesh.getIsFillModeSolid(),ORSModel.ors.VisualMesh.getIsFillModeWireFrame(),ORSModel.ors.VisualMesh.getIsFillModePoint(),ORSModel.ors.VisualMesh.getFillModeForView(),ORSModel.ors.VisualMesh.getFillModeForAllViews(),ORSModel.ors.VisualMesh.setFillModeForAllViews()- Parameters:
pView (ORSModel.ors.View) – a view (a View)
pFillMode (int) – the fill mode (a int32_t*)
- setIsPerVertexTransparent(self, value: bool)
Note
If this setting is used, make sure that each vertex has a color defined as RGBA.
See also
setColors()
- Parameters:
value (bool) –
- setIsTransparent(self, value: bool)
Sets the transparency of the mesh.
- Parameters:
value (bool) – true to make it transparent, false otherwise
- setOpacityForAllViews(self, value: float)
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
value (float) –
- setOpacityForView(self, pView: ORSModel.ors.View, value: float)
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
value (float) –
- setOpacityInRangeForAllViews(self, value: float)
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
value (float) –
- setOpacityInRangeForView(self, pView: ORSModel.ors.View, value: float)
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
value (float) –
- setOpacityOutRangeForAllViews(self, value: float)
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
value (float) –
- setOpacityOutRangeForView(self, pView: ORSModel.ors.View, value: float)
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
value (float) –
- setOutlineGridColor(self, IColor: ORSModel.ors.Color)
Set the outline grid color when in outline mode.
- Parameters:
IColor (ORSModel.ors.Color) – a color (an Color)
- setScalarValueTypeForColorForAllViews(self, aVal: int)
Sets the scalar value type the mesh is using (Vertex, Face or Label) instead, for all views.
- Parameters:
aVal (int) – int
- setScalarValueTypeForColorForView(self, pView: ORSModel.ors.View, aVal: int)
Sets the scalar value type the mesh is using (Vertex, Face or Label) instead, for a specific view.
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
aVal (int) – int
- setSearchLength(self, length: float)
Specifies the distance (in meter) for the search distance.
- Parameters:
length (float) – double
- setSearchLengthOpacity(self, opacity: float)
Specifies the opacity for the search distance.
- Parameters:
opacity (float) – double
- setShowColorIn2D(self, value: bool)
- Parameters:
value (bool) –
- setShowIn2DDuringMotion(self, pValue: bool)
See also
ORSModel.ors.Visual.setShowIn2D(),ORSModel.ors.Visual.getShowIn3D(),ORSModel.ors.Visual.getShowIn2D(),ORSModel.ors.Visual.setShowIn3D()- Parameters:
pValue (bool) –
- setShowSearchLength(self, bShow: bool)
True if the mesh should show its search distance.
- Parameters:
bShow (bool) – bool
- setSnapTolerance(self, value: float)
Sets the relative Snap tolerance to snap annotations to the mesh.
- Parameters:
value (float) – the snap tolerance, in pourcentage of the screen (a double)
- setSpecularFactorForAllViews(self, pValue: float)
- Parameters:
pValue (float) –
- setSpecularFactorForView(self, pView: ORSModel.ors.View, pValue: float)
- Parameters:
pView (ORSModel.ors.View) –
pValue (float) –
- setThickness(self, value: float)
Sets the thickness of lines in 2D mode.
- Parameters:
value (float) – the thickness, in pixel units (a double)
- setUseFaceScalarValueForColorForAllViews(self, aVal: bool)
Tell the mesh to use face scalar value for color, if false use vertex scalar value instead, for all views.
Deprecated since version (unknown): use setScalarValueTypeForColorForAllViews instead
- Parameters:
aVal (bool) – bool
- setUseFaceScalarValueForColorForView(self, pView: ORSModel.ors.View, aVal: bool)
Tell the mesh to use face scalar value for color, if false use vertex scalar value instead, for a specific view.
Deprecated since version (unknown): use setScalarValueTypeForColorForView instead
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
aVal (bool) – bool
- setUseLighting(self, useLighting: bool)
Sets the mesh lighting mode.
- Parameters:
useLighting (bool) – true to use lighting, false otherwise
- setUseMeshAsMask(self, iValue: bool)
Sets if the mesh will be used a a mask for DVR.
Dirty flags: OrsPropertyDirty
- Parameters:
iValue (bool) – true to use as mask, false otherwise (a bool)
- setWireframeDensity(self, dValue: float)
Specifies the wireframe density when in outline mode.
- Parameters:
dValue (float) – double
VisualOverlay¶
- class ORSModel.ors.VisualOverlay(*args, **kwargs)
Bases:
VisualRepresents a 2D image as a visual in the 3D space.
See also
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.
- getBackgroundBorderColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getBackgroundColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getBackgroundOpacity(self) float
Gets the background opacity of the overlay.
- Returns:
output (float) – A value between 0 (fully transparent) and 1 (fully opaque) (a double)
- getBorderColor(self) ORSModel.ors.Color
Gets the overlay border color.
- Returns:
output (ORSModel.ors.Color) – the border color (a Color)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getExtent(self) ORSModel.ors.Vector3
Gets the extent of the overlay.
- Returns:
output (ORSModel.ors.Vector3) – an extent (an Vector3)
- getExtentInBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle) ORSModel.ors.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) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getMinimumPixelSize(self) ORSModel.ors.Vector3
- Returns:
output (ORSModel.ors.Vector3) –
- getOpacity(self) float
Gets the opacity of the overlay.
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
See also
setIsTransparent(), getIsTransparent()
- Returns:
output (float) – the opacity (a double)
- getOverlayMode(self) int
- Returns:
output (int) –
- getPosition(self) ORSModel.ors.Vector3
Gets the position of the overlay.
- Returns:
output (ORSModel.ors.Vector3) – a position (an Vector3)
- getPositionInBoundedPlane(self, aBoundedPlane: ORSModel.ors.Rectangle) ORSModel.ors.Vector3
- Parameters:
aBoundedPlane (ORSModel.ors.Rectangle) –
- Returns:
output (ORSModel.ors.Vector3) –
- getPreserveGeometry(self) bool
- Returns:
output (bool) –
- getRenderingRectangleInPixel(self, aView: ORSModel.ors.View) ORSModel.ors.Rectangle
- Parameters:
aView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.Rectangle) –
- getSelectedColor(self) ORSModel.ors.Color
Gets the selected color of the overlay.
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- getShapeAndPositionEditionAssociatedState(self) str
- Returns:
output (str) –
- getShowBackground(self) bool
Gets if the overlay shows a background.
- Returns:
output (bool) – true if background is shown, false otherwise
- getShowBorder(self) bool
Gets if the overlay shows a border.
- Returns:
output (bool) – true if border is shown, false otherwise
- none() VisualOverlay
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (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) –
- setBackgroundBorderColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setBackgroundColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setBackgroundOpacity(self, value: float)
Sets the background opacity of the overlay.
- Parameters:
value (float) – A value between 0 (fully transparent) and 1 (fully opaque) (a double)
- setBorderColor(self, IColor: ORSModel.ors.Color)
Sets the overlay border color.
- Parameters:
IColor (ORSModel.ors.Color) – the border color (a Color)
- setExtent(self, aVect: ORSModel.ors.Vector3)
Sets the extent of the overlay.
- Parameters:
aVect (ORSModel.ors.Vector3) – an extent (an Vector3)
- setHighlightedAnchor(self, anchorIndex: int)
- Parameters:
anchorIndex (int) –
- setHighlightedBorder(self, borderIndex: int)
- Parameters:
borderIndex (int) –
- setIsShapeAndPositionEditable(self, value: bool)
- Parameters:
value (bool) –
- setIsShapeAndPositionEditionEnabled(self, value: bool)
- Parameters:
value (bool) –
- setKeepAspectRatio(self, aValue: bool)
- Parameters:
aValue (bool) –
- setMaximumPixelSize(self, aVect: ORSModel.ors.Vector3)
- Parameters:
aVect (ORSModel.ors.Vector3) –
- setMinimumPixelSize(self, aVect: ORSModel.ors.Vector3)
- Parameters:
aVect (ORSModel.ors.Vector3) –
- setOpacity(self, value: float)
Sets the opacity of the overlay.
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
value (float) – an opacity value (a double)
- setOverlayMode(self, aMode: int)
- Parameters:
aMode (int) –
- setPosition(self, pPosition: ORSModel.ors.Vector3)
Sets the position of the overlay.
- Parameters:
pPosition (ORSModel.ors.Vector3) – a position (an Vector3)
- setPreserveGeometry(self, aValue: bool)
- Parameters:
aValue (bool) –
- setSelectedColor(self, IColor: ORSModel.ors.Color)
Sets the selected color of the overlay.
- Parameters:
IColor (ORSModel.ors.Color) – the color (a Color)
- setShapeAndPositionEditionAssociatedState(self, aState: str)
- Parameters:
aState (str) –
- setShowBackground(self, showBG: bool)
Shows or hides the overlay background.
- Parameters:
showBG (bool) – true to show a background, false to hide it
- setShowBorder(self, showBorder: bool)
Shows or hides the overlay border.
- Parameters:
showBorder (bool) – true to show a border, false to hide it
- unHighlightAllAnchor(self)
- unHighlightAllBorder(self)
VisualPath¶
- class ORSModel.ors.VisualPath(*args, **kwargs)
Bases:
AnnotationRepresents a path. A path is composed of a series of points.
- addPathMarker(self, parameter: float, iTIndex: int)
- Parameters:
parameter (float) –
iTIndex (int) –
- addPoint(self, pPoint: ORSModel.ors.Vector3, iTIndex: int)
Note
Any change to a primitive should be followed by update() to reflect the changes visually.
- Parameters:
pPoint (ORSModel.ors.Vector3) –
iTIndex (int) –
- addPointForAllTimeSteps(self, pPoint: ORSModel.ors.Vector3)
- Parameters:
pPoint (ORSModel.ors.Vector3) –
- addPointForControlPoint(self, controlPointIndex: int, iTIndex: int, aPoint: ORSModel.ors.Vector3)
- Parameters:
controlPointIndex (int) –
iTIndex (int) –
aPoint (ORSModel.ors.Vector3) –
- applyConvolution(self, aKernel: ORSModel.ors.ConvolutionKernel, timeStep: int)
Apply the kernel to the path position.
- Parameters:
aKernel (ORSModel.ors.ConvolutionKernel) – a one dimension kernel
timeStep (int) – timestep
- clearAll(self, iTIndex: int)
Note
Any change to a primitive should be followed by update() to reflect the changes visually.
- Parameters:
iTIndex (int) –
- clearAllForAllTimeSteps(self)
- closestPointOnPathInCurvedOnScreen(self, pView: ORSModel.ors.View, pixelXPositionInView: int, pixelYPositionInView: int) int
- Parameters:
pView (ORSModel.ors.View) –
pixelXPositionInView (int) –
pixelYPositionInView (int) –
- Returns:
output (int) –
- 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:
iTIndex (int) –
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) –
- 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) ORSModel.ors.ArrayDouble
Note
Control point indicies are zero based.
Note
If indices array is NULL, this method assumes an array of all indices.
- Parameters:
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pIndicesArray (ORSModel.ors.ArrayLong) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- 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:
s0 (float) –
s1 (float) –
iTIndex (int) –
pMatrix (ORSModel.ors.Matrix4x4) –
- 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:
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pointToCompareTo (ORSModel.ors.Vector3) –
iTIndex (int) –
- Returns:
output (int) –
- getIndexOfFarthestPoint(self, aTransformationMatrix: ORSModel.ors.Matrix4x4, pointToCompareTo: ORSModel.ors.Vector3, iTIndex: int) int
- Parameters:
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pointToCompareTo (ORSModel.ors.Vector3) –
iTIndex (int) –
- 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) ORSModel.ors.OrderedCollectionDouble
- Parameters:
aBP (ORSModel.ors.Rectangle) –
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pfOutputPoints (ORSModel.ors.OrderedCollectionDouble) –
- 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:
iTIndex (int) –
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (float) – the length of the path (a double)
- getParameterAtControlPointIndex(self, index: int, iTIndex: int) float
Note
Control point indicies are zero based.
- Parameters:
index (int) –
iTIndex (int) –
- Returns:
output (float) –
- getParameterAtPointIndex(self, index: int, iTIndex: int) float
Note
Point indicies are zero based.
- Parameters:
index (int) –
iTIndex (int) –
- Returns:
output (float) –
- getPathMarkerCaption(self, index: int, iTIndex: int) str
- Parameters:
index (int) –
iTIndex (int) –
- Returns:
output (str) –
- getPathMarkerColor(self, index: int, iTIndex: int) ORSModel.ors.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) ORSModel.ors.Vector3
- Parameters:
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Vector3) –
- getPathPointGlobalOrientation(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) ORSModel.ors.Vector3
- Parameters:
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Vector3) –
- getPathPoints(self, iTIndex: int) ORSModel.ors.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) ORSModel.ors.Vector3
Note
Point indicies are zero based.
- Parameters:
index (int) –
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.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) ORSModel.ors.ArrayDouble
- Parameters:
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pnIndexes (ORSModel.ors.ArrayLong) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getPositionOnPath(self, parameter: float, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) ORSModel.ors.Vector3
- Parameters:
parameter (float) –
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (ORSModel.ors.Vector3) –
- getPositionOnPathNearestTo(self, aLocation: ORSModel.ors.Vector3, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4) float
- Parameters:
aLocation (ORSModel.ors.Vector3) –
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (float) –
- getPositionOnViewForCurvedChannel(self, pNormalizedPositionOnPath: float, aView: ORSModel.ors.View, aCurvedChannel: ORSModel.ors.Channel) ORSModel.ors.Vector3
- Parameters:
pNormalizedPositionOnPath (float) –
aView (ORSModel.ors.View) –
aCurvedChannel (ORSModel.ors.Channel) –
- Returns:
output (ORSModel.ors.Vector3) –
- getPositionOnViewOfControlPointForCurvedChannel(self, controlPointIndex: int, aView: ORSModel.ors.View, aCurvedChannel: ORSModel.ors.Channel) ORSModel.ors.Vector3
- Parameters:
controlPointIndex (int) –
aView (ORSModel.ors.View) –
aCurvedChannel (ORSModel.ors.Channel) –
- 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)
Note
This method allows one to find the exact location and direction at any given portion of the path.
- Parameters:
parameter (float) –
position (ORSModel.ors.Vector3) –
up (ORSModel.ors.Vector3) –
right (ORSModel.ors.Vector3) –
tangent (ORSModel.ors.Vector3) –
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
- getPositionsOnPath(self, pPositions: ORSModel.ors.ArrayDouble, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pfOutputPoints: ORSModel.ors.ArrayDouble) ORSModel.ors.ArrayDouble
- Parameters:
pPositions (ORSModel.ors.ArrayDouble) –
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pfOutputPoints (ORSModel.ors.ArrayDouble) –
- Returns:
output (ORSModel.ors.ArrayDouble) –
- getShowAllIn2D(self) bool
- Returns:
output (bool) –
- getShowPathMarkerReferenceLine(self) bool
- Returns:
output (bool) –
- getTortuosity(self, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4) float
Returns the tortuosity of the path. Returns 1 if distance between points is 0.
- Parameters:
iTIndex (int) –
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (float) – the tortuosity of the path (a double)
- getTubularMeshFromControlPoints(self, nbPtsCircle: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, offset: float, iTIndex: int, inoutMesh: ORSModel.ors.Mesh) ORSModel.ors.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) ORSModel.ors.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) ORSModel.ors.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 (a uint16_t)
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) ORSModel.ors.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) –
- insertControlPointForAllTimeSteps(self, index: int, pPoint: ORSModel.ors.Vector3)
- Parameters:
index (int) –
pPoint (ORSModel.ors.Vector3) –
- insertPathMarker(self, index: int, iTIndex: int, parameter: float, canPassOver: bool)
- Parameters:
index (int) –
iTIndex (int) –
parameter (float) –
canPassOver (bool) –
- movePathMarker(self, pView: ORSModel.ors.View, index: int, pixelXPositionInView: int, pixelYPositionInView: int, canPassOver: bool)
- Parameters:
pView (ORSModel.ors.View) –
index (int) –
pixelXPositionInView (int) –
pixelYPositionInView (int) –
canPassOver (bool) –
- none() VisualPath
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualPath) –
- rebuildBezier(self, iTIndex: int)
Rebuilds the Bezier curve.
- Parameters:
iTIndex (int) –
- rebuildBezierForAllTimeSteps(self)
- rebuildNonBezier(self, iTIndex: int)
- Parameters:
iTIndex (int) –
- rebuildNonBezierForAllTimeSteps(self)
- removeAllPathMarkers(self, iTIndex: int)
- Parameters:
iTIndex (int) –
- removeAllPointsBetweenControlPoint(self, controlPointIndex1: int, controlPointIndex2: int, iTIndex: int)
- Parameters:
controlPointIndex1 (int) –
controlPointIndex2 (int) –
iTIndex (int) –
- removePathMarker(self, index: int, iTIndex: int)
- Parameters:
index (int) –
iTIndex (int) –
- reorderPathPointsForWinding(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, bCounterClockWise: bool)
- 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)
- Parameters:
numberOfTime (int) –
newPointsCount (int) –
iTIndex (int) –
- setBezierSamplingLength(self, value: float)
- Parameters:
value (float) –
- setBuildOctree(self, value: bool)
- Parameters:
value (bool) –
- setControlPointCount(self, aSize: int, iTIndex: int)
Sets the number of control points.
- Parameters:
aSize (int) – the control points count (an uint32_t)
iTIndex (int) – the T index (a uint32_t)
- setControlPointCountForAllTimeSteps(self, aSize: int)
- Parameters:
aSize (int) –
- setControlPointPositionsList(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pIndicesArray: ORSModel.ors.ArrayLong, pfPoints: ORSModel.ors.ArrayDouble)
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:
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pIndicesArray (ORSModel.ors.ArrayLong) –
pfPoints (ORSModel.ors.ArrayDouble) –
- setControlPointRadiusAtIndex(self, index: int, iTIndex: int, radius: float)
- Parameters:
index (int) –
iTIndex (int) –
radius (float) –
- setControlPointRadiusAtIndexForAllTimeSteps(self, index: int, radius: float)
- Parameters:
index (int) –
radius (float) –
- setFirstUpVector(self, anIVector: ORSModel.ors.Vector3, iTIndex: int)
- Parameters:
anIVector (ORSModel.ors.Vector3) –
iTIndex (int) –
- setHideLine(self, value: bool)
- Parameters:
value (bool) –
- setIsBezier(self, value: bool)
Note
Any change to a primitive should be followed by update() to reflect the changes visually.
- Parameters:
value (bool) –
- setIsClosed(self, value: bool)
Sets the path to be closed or not.
- Parameters:
value (bool) – TRUE to close the path, FALSE otherwise
- setIsNormalsInward(self, value: bool)
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)
- Parameters:
flag (bool) –
- setPathMarkerCaption(self, index: int, iTIndex: int, caption: str)
- Parameters:
index (int) –
iTIndex (int) –
caption (str) –
- setPathMarkerColor(self, index: int, iTIndex: int, IColor: ORSModel.ors.Color)
- Parameters:
index (int) –
iTIndex (int) –
IColor (ORSModel.ors.Color) –
- setPathMarkerPosition(self, index: int, iTIndex: int, parameter: float, canPassOver: bool)
- Parameters:
index (int) –
iTIndex (int) –
parameter (float) –
canPassOver (bool) –
- setPathMarkerReferenceLineIsHightlighted(self, value: bool)
- Parameters:
value (bool) –
- setPathMarkerReferenceLineOffsetForView(self, pView: ORSModel.ors.View, value: int)
- Parameters:
pView (ORSModel.ors.View) –
value (int) –
- setPathMarkerRegionID(self, index: int, iTIndex: int, regionID: int)
- Parameters:
index (int) –
iTIndex (int) –
regionID (int) –
- setPathMarkerRegionMode(self, index: int, iTIndex: int, regionMode: int)
- Parameters:
index (int) –
iTIndex (int) –
regionMode (int) –
- setPathMarkerScalar(self, index: int, scalarIndex: int, iTIndex: int, s: float)
- Parameters:
index (int) –
scalarIndex (int) –
iTIndex (int) –
s (float) –
- setPathMarkerScalarCount(self, s: int)
- Parameters:
s (int) –
- setPathMarkerVisible(self, index: int, iTIndex: int, s: bool)
- Parameters:
index (int) –
iTIndex (int) –
s (bool) –
- setPointAtIndex(self, index: int, iTIndex: int, pPoint: ORSModel.ors.Vector3)
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) –
iTIndex (int) –
pPoint (ORSModel.ors.Vector3) –
- setPointAtIndexForAllTimeSteps(self, index: int, pPoint: ORSModel.ors.Vector3)
- Parameters:
index (int) –
pPoint (ORSModel.ors.Vector3) –
- setPointPositionsList(self, iTIndex: int, aTransformationMatrix: ORSModel.ors.Matrix4x4, pnIndexes: ORSModel.ors.ArrayLong, pfPoints: ORSModel.ors.ArrayDouble)
- Parameters:
iTIndex (int) –
aTransformationMatrix (ORSModel.ors.Matrix4x4) –
pnIndexes (ORSModel.ors.ArrayLong) –
pfPoints (ORSModel.ors.ArrayDouble) –
- setShowAllIn2D(self, value: bool)
- Parameters:
value (bool) –
- setShowPathMarkerReferenceLine(self, value: bool)
- Parameters:
value (bool) –
VisualPlane¶
- class ORSModel.ors.VisualPlane(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualShape2D- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualPlane.__init__(self)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDrawSolid(self) bool
- Returns:
output (bool) –
- getEnabled(self) bool
- Returns:
output (bool) –
- getExplosionEnabled(self) bool
- Returns:
output (bool) –
- getExplosionFactor(self) float
- Returns:
output (float) –
- getExplosionInverted(self) bool
- Returns:
output (bool) –
- getExplosionLeft(self) bool
- Returns:
output (bool) –
- getExplosionRight(self) bool
- Returns:
output (bool) –
- getExplosionType(self) int
- Returns:
output (int) –
- getGrayscaleCenterValue(self) float
- Returns:
output (float) –
- getGrayscaleWidthValue(self) float
- Returns:
output (float) –
- getIsClipping(self) bool
- Returns:
output (bool) –
- getIsEditable(self) bool
- Returns:
output (bool) –
- getOrientedPlane(self, iTIndex: int) ORSModel.ors.OrientedPlane
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.OrientedPlane) –
- getShowBorder(self) bool
- Returns:
output (bool) –
- getShowGrayscale(self) bool
- Returns:
output (bool) –
- none() VisualPlane
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualPlane) –
- setDrawSolid(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setEnabled(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setExplosionEnabled(self, bEnabled: bool)
- Parameters:
bEnabled (bool) –
- setExplosionFactor(self, value: float)
- Parameters:
value (float) –
- setExplosionInverted(self, bInverted: bool)
- Parameters:
bInverted (bool) –
- setExplosionLeft(self, bEnabled: bool)
- Parameters:
bEnabled (bool) –
- setExplosionRight(self, bEnabled: bool)
- Parameters:
bEnabled (bool) –
- setExplosionType(self, type: int)
- Parameters:
type (int) –
- setGrayscaleCenterValue(self, value: float)
- Parameters:
value (float) –
- setGrayscaleWidthValue(self, value: float)
- Parameters:
value (float) –
- setIsClipping(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setIsEditable(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setOrientedPlane(self, aPlane: ORSModel.ors.OrientedPlane, iTIndex: int)
- Parameters:
aPlane (ORSModel.ors.OrientedPlane) –
iTIndex (int) –
- setShowBorder(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setShowGrayscale(self, bEnabled: bool)
- Parameters:
bEnabled (bool) –
VisualPoints¶
- class ORSModel.ors.VisualPoints(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Annotation- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualPoints.__init__(self)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() VisualPoints
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualPoints) –
VisualRBFRectangle¶
- class ORSModel.ors.VisualRBFRectangle(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualSurfaceControlPoints- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualRBFRectangle.__init__(self)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getRBFRectangle(self, iTIndex: int) ORSModel.ors.RBFRectangle
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.RBFRectangle) –
- none() VisualRBFRectangle
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualRBFRectangle) –
- setRBFRectangle(self, aBezierPatch: ORSModel.ors.RBFRectangle, iTIndex: int)
- Parameters:
aBezierPatch (ORSModel.ors.RBFRectangle) –
iTIndex (int) –
VisualROI¶
- class ORSModel.ors.VisualROI(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Visual- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualROI.__init__(self)
- fillLookupTableWithLabelColors(self, IStructuredGrid: ORSModel.ors.MultiROI, IView: ORSModel.ors.View, pLUT: ORSModel.ors.LookupTable, labelOffset: int)
- Parameters:
IStructuredGrid (ORSModel.ors.MultiROI) –
IView (ORSModel.ors.View) –
pLUT (ORSModel.ors.LookupTable) –
labelOffset (int) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getColorForAllViews(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getColorForView(self, IView: ORSModel.ors.View) ORSModel.ors.Color
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.Color) –
- getContourThicknessForAllViews(self) float
- Returns:
output (float) –
- getContourThicknessForView(self, IView: ORSModel.ors.View) float
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (float) –
- getDiffuseFactor(self) float
- Returns:
output (float) –
- 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) ORSModel.ors.Color
- Parameters:
IStructuredGrid (ORSModel.ors.MultiROI) –
IView (ORSModel.ors.View) –
label (int) –
- Returns:
output (ORSModel.ors.Color) –
- getLookupTableForAllViews(self) ORSModel.ors.LookupTable
- Returns:
output (ORSModel.ors.LookupTable) –
- getLookupTableForView(self, IView: ORSModel.ors.View) ORSModel.ors.LookupTable
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.LookupTable) –
- getMaterialIndex(self) int
- Returns:
output (int) –
- getPlaneChannelForGUID(self, aGUID: str, createIfAbsent: bool) ORSModel.ors.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) –
- getSpecularFactor(self) float
- Returns:
output (float) –
- getUseLUTForAllViews(self) bool
- Returns:
output (bool) –
- getUseLUTForView(self, IView: ORSModel.ors.View) bool
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getVisualChannelForLUTForAllViews(self) ORSModel.ors.VisualChannel
- Returns:
output (ORSModel.ors.VisualChannel) –
- getVisualChannelForLUTForView(self, IView: ORSModel.ors.View) ORSModel.ors.VisualChannel
- Parameters:
IView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.VisualChannel) –
- none() VisualROI
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualROI) –
- presentInChannel(self, aChannel: ORSModel.ors.Channel, aView: ORSModel.ors.View)
- Parameters:
aChannel (ORSModel.ors.Channel) –
aView (ORSModel.ors.View) –
- presentInImage(self, anImage: ORSModel.ors.Image, aView: ORSModel.ors.View) bool
- Parameters:
anImage (ORSModel.ors.Image) –
aView (ORSModel.ors.View) –
- Returns:
output (bool) –
- setColorForAllViews(self, color: ORSModel.ors.Color)
- Parameters:
color (ORSModel.ors.Color) –
- setColorForView(self, IView: ORSModel.ors.View, color: ORSModel.ors.Color)
- Parameters:
IView (ORSModel.ors.View) –
color (ORSModel.ors.Color) –
- setContourThicknessForAllViews(self, value: float)
- Parameters:
value (float) –
- setContourThicknessForView(self, IView: ORSModel.ors.View, value: float)
- Parameters:
IView (ORSModel.ors.View) –
value (float) –
- setDiffuseFactor(self, pValue: float)
- Parameters:
pValue (float) –
- setHighlightOpacityForAllViews(self, opacity: float)
- Parameters:
opacity (float) –
- setHighlightOpacityForView(self, IView: ORSModel.ors.View, opacity: float)
- Parameters:
IView (ORSModel.ors.View) –
opacity (float) –
- setHighlightOpacityInRangeForAllViews(self, opacity: float)
- Parameters:
opacity (float) –
- setHighlightOpacityInRangeForView(self, IView: ORSModel.ors.View, opacity: float)
- Parameters:
IView (ORSModel.ors.View) –
opacity (float) –
- setHighlightOpacityOutRangeForAllViews(self, opacity: float)
- Parameters:
opacity (float) –
- setHighlightOpacityOutRangeForView(self, IView: ORSModel.ors.View, opacity: float)
- Parameters:
IView (ORSModel.ors.View) –
opacity (float) –
- setIsVisibleIn2DForAllViews(self, bValue: bool)
- Parameters:
bValue (bool) –
- setIsVisibleIn2DForView(self, IView: ORSModel.ors.View, bValue: bool)
- Parameters:
IView (ORSModel.ors.View) –
bValue (bool) –
- setIsVisibleIn3DForAllViews(self, bValue: bool)
- Parameters:
bValue (bool) –
- setIsVisibleIn3DForView(self, IView: ORSModel.ors.View, bValue: bool)
- Parameters:
IView (ORSModel.ors.View) –
bValue (bool) –
- setLookupTableForAllViews(self, aLUT: ORSModel.ors.LookupTable)
- Parameters:
aLUT (ORSModel.ors.LookupTable) –
- setLookupTableForView(self, IView: ORSModel.ors.View, aLUT: ORSModel.ors.LookupTable)
- Parameters:
IView (ORSModel.ors.View) –
aLUT (ORSModel.ors.LookupTable) –
- setMaterialIndex(self, index: int)
- Parameters:
index (int) –
- setROIOpacityForAllViews(self, opacity: float)
- Parameters:
opacity (float) –
- setROIOpacityForView(self, IView: ORSModel.ors.View, opacity: float)
- Parameters:
IView (ORSModel.ors.View) –
opacity (float) –
- setROIOpacityInRangeForAllViews(self, opacity: float)
- Parameters:
opacity (float) –
- setROIOpacityInRangeForView(self, IView: ORSModel.ors.View, opacity: float)
- Parameters:
IView (ORSModel.ors.View) –
opacity (float) –
- setROIOpacityOutRangeForAllViews(self, opacity: float)
- Parameters:
opacity (float) –
- setROIOpacityOutRangeForView(self, IView: ORSModel.ors.View, opacity: float)
- Parameters:
IView (ORSModel.ors.View) –
opacity (float) –
- setShowContourForAllViews(self, bValue: bool)
- Parameters:
bValue (bool) –
- setShowContourForView(self, IView: ORSModel.ors.View, bValue: bool)
- Parameters:
IView (ORSModel.ors.View) –
bValue (bool) –
- setSpecularFactor(self, pValue: float)
- Parameters:
pValue (float) –
- setUseLUTForAllViews(self, bUse: bool)
- Parameters:
bUse (bool) –
- setUseLUTForView(self, IView: ORSModel.ors.View, bUse: bool)
- Parameters:
IView (ORSModel.ors.View) –
bUse (bool) –
- setVisualChannelForLUTForAllViews(self, volume: ORSModel.ors.VisualChannel)
- Parameters:
volume (ORSModel.ors.VisualChannel) –
- setVisualChannelForLUTForView(self, IView: ORSModel.ors.View, volume: ORSModel.ors.VisualChannel)
- Parameters:
IView (ORSModel.ors.View) –
volume (ORSModel.ors.VisualChannel) –
- updateChannel(self, aChannel: ORSModel.ors.Channel, aContourLabelChannel: ORSModel.ors.Channel, aContourChannel: ORSModel.ors.Channel, IView: ORSModel.ors.View, haveToDoAll: bool) bool
- Parameters:
aChannel (ORSModel.ors.Channel) –
aContourLabelChannel (ORSModel.ors.Channel) –
aContourChannel (ORSModel.ors.Channel) –
IView (ORSModel.ors.View) –
haveToDoAll (bool) –
- Returns:
output (bool) –
- updateChannel2DForGUIDFromPlane(self, aGUID: str, aBplane: ORSModel.ors.Rectangle, currentTimeStep: int, haveToDoAll: bool) bool
- Parameters:
aGUID (str) –
aBplane (ORSModel.ors.Rectangle) –
currentTimeStep (int) –
haveToDoAll (bool) –
- Returns:
output (bool) –
VisualRectangle¶
- class ORSModel.ors.VisualRectangle(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualShape3D- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualRectangle.__init__(self)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getRectangle(self, iTIndex: int) ORSModel.ors.Rectangle
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.Rectangle) –
- none() VisualRectangle
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualRectangle) –
- setRectangle(self, aRectangle: ORSModel.ors.Rectangle, iTIndex: int)
- Parameters:
aRectangle (ORSModel.ors.Rectangle) –
iTIndex (int) –
VisualRegion¶
- class ORSModel.ors.VisualRegion(*args, **kwargs)
Bases:
AnnotationRepresents a user-selected 2D region of a view.
See also
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, bRemove: bool)
- Parameters:
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) –
bRemove (bool) –
- 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)
- Parameters:
pCamera (ORSModel.ors.Camera) –
inside (bool) –
outputROI (ORSModel.ors.ROI) –
currentTimeStep (int) –
intersectingMultiROI (ORSModel.ors.MultiROI) –
fHightlightOpacity (float) –
fHightlightOpacityOutRange (float) –
clipBox (ORSModel.ors.Box) –
- addRegionIn3DOrthoProjectionToROIIntersectingROI(self, pCamera: ORSModel.ors.Camera, inside: bool, outputROI: ORSModel.ors.ROI, currentTimeStep: int, intersectingROI: ORSModel.ors.ROI, clipBox: ORSModel.ors.Box)
- Parameters:
pCamera (ORSModel.ors.Camera) –
inside (bool) –
outputROI (ORSModel.ors.ROI) –
currentTimeStep (int) –
intersectingROI (ORSModel.ors.ROI) –
clipBox (ORSModel.ors.Box) –
- 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, bRemove: bool)
- Parameters:
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) –
bRemove (bool) –
- 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)
- Parameters:
pCamera (ORSModel.ors.Camera) –
inside (bool) –
outputROI (ORSModel.ors.ROI) –
currentTimeStep (int) –
intersectingMultiROI (ORSModel.ors.MultiROI) –
fHightlightOpacity (float) –
fHightlightOpacityOutRange (float) –
clipBox (ORSModel.ors.Box) –
- addRegionIn3DPerspectiveProjectionToROIIntersectingROI(self, pCamera: ORSModel.ors.Camera, inside: bool, outputROI: ORSModel.ors.ROI, currentTimeStep: int, intersectingROI: ORSModel.ors.ROI, clipBox: ORSModel.ors.Box)
- Parameters:
pCamera (ORSModel.ors.Camera) –
inside (bool) –
outputROI (ORSModel.ors.ROI) –
currentTimeStep (int) –
intersectingROI (ORSModel.ors.ROI) –
clipBox (ORSModel.ors.Box) –
- fitFromPoints(self, count: int, points: float, iTIndex: int)
See also
fitFromVector3(), fitFromPointList()
- Parameters:
count (int) –
points (float) –
iTIndex (int) –
- getArea(self, timeStep: int, worldTransform: ORSModel.ors.Matrix4x4) float
- Parameters:
timeStep (int) –
worldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (float) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDirection0Size(self, timeStep: int, worldTransform: ORSModel.ors.Matrix4x4) float
- Parameters:
timeStep (int) –
worldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (float) –
- getDirection1Size(self, timeStep: int, worldTransform: ORSModel.ors.Matrix4x4) float
- Parameters:
timeStep (int) –
worldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (float) –
- getHistogramData(self, aChannel: ORSModel.ors.Channel, currentTimeStep: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4, inside: bool, numberOfBins: int) ORSModel.ors.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 (a uint32_t)
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 (a uint16_t)
- 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:
timeStep (int) –
worldTransform (ORSModel.ors.Matrix4x4) –
- Returns:
output (float) –
- getRemoveAll() bool
- Returns:
output (bool) –
- 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)
- insertControlPointForAllTimeSteps(self, pPoint: ORSModel.ors.Vector3)
- Parameters:
pPoint (ORSModel.ors.Vector3) –
- none() VisualRegion
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualRegion) –
- setControlPoints(self, pfPoints: ORSModel.ors.ArrayDouble, iTIndex: int)
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.
See also
addPoint()
- Parameters:
pfPoints (ORSModel.ors.ArrayDouble) – the number of triplets in the array (a int32_t*)
iTIndex (int) – an array of point triplets (a double*)
- setIsOn3DView(self, value: bool)
Note
Any change to a primitive should be followed by update() to reflect the changes visually.
See also
setPoints()
- Parameters:
value (bool) –
- setPlane(self, a: float, b: float, c: float, d: float, iTIndex: int)
Sets the plane coefficient.
Note
Planes are expressed by the general equation ax + by + cz + dw = 0.
- Parameters:
a (float) – the a member (a double)
b (float) – the b member (a double)
c (float) – the c member (a double)
d (float) – the d member (a double)
iTIndex (int) –
- setRemoveAll(flag: bool)
- Parameters:
flag (bool) –
- setShape(self, shape: int)
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(*args, **kwargs)
Bases:
AnnotationRepresents a ruler, used to take measures.
- getCaliperMode(self) bool
- Returns:
output (bool) –
- 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.
See also
View::getValueInMeterConvertedToCurrentUnit();
- Parameters:
iTIndex (int) –
aWorldTransformMatrix (ORSModel.ors.Matrix4x4) –
- Returns:
output (float) – the length of the ruler (a double)
- getOrientedText(self) bool
- Returns:
output (bool) –
- 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
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualRuler) –
- setCaliperMode(self, value: bool)
Sets if the ruler is using the caliper mode.
Dirty flags: OrsPropertyDirty
- Parameters:
value (bool) –
- setOrientedText(self, value: bool)
Sets if the ruler’s text is oriented with the line.
Dirty flags: OrsPropertyDirty
- Parameters:
value (bool) –
- setShowTicks(self, value: bool)
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)
Sets the number of visible ticks on the ruler.
Dirty flags: OrsPropertyDirty
- Parameters:
value (int) – the number of ticks (an uint32_t)
VisualScaleBar¶
- class ORSModel.ors.VisualScaleBar(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Visual- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualScaleBar.__init__(self)
- getAutoAdjustFloatingLength(self) bool
Gets if the scalebar auto-adjusts or not.
- Returns:
output (bool) – TRUE if scale bar auto-adjusts, FALSE otherwise
- getAutoAdjustUnits(self) bool
- Returns:
output (bool) –
- getBackgroundBorderColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getBackgroundColor(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getBackgroundOpacity(self) float
- Returns:
output (float) –
- getBorderPadding(self) float
- Returns:
output (float) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getColor(self) ORSModel.ors.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
- getFloatingDimensionUnitForView(self, pView: ORSModel.ors.View) ORSModel.ors.DimensionUnit
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.DimensionUnit) –
- 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)
- getFloatingLineWidth(self) float
- Returns:
output (float) –
- getHorizontalJustify(self) int
- Returns:
output (int) –
- getIsFloating(self) bool
Gets if the scalebar is floating.
- Returns:
output (bool) – TRUE if the scale bar is floating, FALSE otherwise
- getPrecision(self) int
Note
The precision is only used during displaying values, internally full precision is preserved.
- Returns:
output (int) – a number of decimals (a uint16_t)
- getRenderVertical(self) bool
- Returns:
output (bool) –
- getScaleBarPositionInView(self, pView: ORSModel.ors.View) ORSModel.ors.Vector3
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.Vector3) –
- getScalebarHashType(self) int
- Returns:
output (int) –
- getShowBackground(self) bool
- Returns:
output (bool) –
- getShowBorder(self) bool
- Returns:
output (bool) –
- getShowOutline(self) bool
- Returns:
output (bool) –
- getShowText(self) bool
- Returns:
output (bool) –
- getTemporaryLengthDimensionUnit(self) ORSModel.ors.DimensionUnit
Gets the temporary length dimension unit.
- Returns:
output (ORSModel.ors.DimensionUnit) – a dimension unit (a DimensionUnit)
- getTextColor(self) ORSModel.ors.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) ORSModel.ors.Color
Gets the text shadow color of the scale bar.
- Returns:
output (ORSModel.ors.Color) – a color object (an Color)
- getVerticalJustify(self) int
- Returns:
output (int) –
- none() VisualScaleBar
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualScaleBar) –
- setAutoAdjustFloatingLength(self, value: bool)
Sets if the scalebar auto-adjusts or not.
- Parameters:
value (bool) – TRUE to have the scale bar auto-adjust, FALSE otherwise
- setAutoAdjustUnits(self, value: bool)
- Parameters:
value (bool) –
- setBackgroundBorderColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setBackgroundColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setBackgroundOpacity(self, value: float)
- Parameters:
value (float) –
- setBorderPadding(self, value: float)
- Parameters:
value (float) –
- setColor(self, IColor: ORSModel.ors.Color)
Sets the scale bar color.
- Parameters:
IColor (ORSModel.ors.Color) – a color object (a Color)
- setDrawTextShadow(self, bFlag: bool)
Toggles displaying shadows for the text.
- Parameters:
bFlag (bool) – TRUE to show text shadows, FALSE otherwise
- setFloatingLength(self, floatLength: float)
Sets the scalebar’s length when floating.
Note
The length is always expressed in meters.
- Parameters:
floatLength (float) – the scale bar length (a double)
- setFloatingLineWidth(self, width: float)
- Parameters:
width (float) –
- setHorizontalJustify(self, value: int)
- Parameters:
value (int) –
- setIsFloating(self, value: bool)
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)
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)
- setRenderVertical(self, value: bool)
- Parameters:
value (bool) –
- setScaleBarPositionInView(self, pView: ORSModel.ors.View, aPoint: ORSModel.ors.Vector3)
- Parameters:
pView (ORSModel.ors.View) –
aPoint (ORSModel.ors.Vector3) –
- setScalebarHashType(self, value: int)
- Parameters:
value (int) –
- setShowBackground(self, showBG: bool)
- Parameters:
showBG (bool) –
- setShowBorder(self, showBorder: bool)
- Parameters:
showBorder (bool) –
- setShowOutline(self, showOutline: bool)
- Parameters:
showOutline (bool) –
- setShowText(self, value: bool)
- Parameters:
value (bool) –
- setTemporaryLengthDimensionUnit(self, unit: ORSModel.ors.DimensionUnit)
Sets the temporary length dimension unit.
- Parameters:
unit (ORSModel.ors.DimensionUnit) – a dimension unit (a DimensionUnit)
- setTextColor(self, IColor: ORSModel.ors.Color)
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)
Sets the font name.
- Parameters:
sFontName (str) – the font name (a string)
- setTextFontSize(self, fontSize: float)
Sets the font size, in screen one thousandths.
- Parameters:
fontSize (float) – the font size (a double between 0 and 1)
- setTextMinimumFontSize(self, iVal: int)
Sets the minimum font size, in font points.
- Parameters:
iVal (int) – the font size
- setTextShadowColor(self, IColor: ORSModel.ors.Color)
Sets the text shadow color of the scale bar.
- Parameters:
IColor (ORSModel.ors.Color) – a color object (an Color)
- setVerticalJustify(self, value: int)
- Parameters:
value (int) –
VisualShape¶
- class ORSModel.ors.VisualShape(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
Visual- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
- addAffectedVisual(self, pObject: ORSModel.ors.Managed)
- Parameters:
pObject (ORSModel.ors.Managed) –
- addShapeIsInvertedForVisual(self, pObject: ORSModel.ors.Managed)
- Parameters:
pObject (ORSModel.ors.Managed) –
- getAffectedVisualAtIndex(self, index: int) str
- Parameters:
index (int) –
- Returns:
output (str) –
- getAffectedVisualsGUID(self) str
- Returns:
output (str) –
- getAnchorNames(self) List[str]
Returns the list of anchor names known to the receiver.
- Returns:
output (List[str]) – anchor names (a list of strings)
- getAnchorVisible(self, sAnchorName: str) bool
Gets if a given anchor is visible or not.
- Parameters:
sAnchorName (str) – anchor name (a string)
- Returns:
output (bool) – visible state (a bool)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getColorForAllViews(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getColorForView(self, aView: ORSModel.ors.View) ORSModel.ors.Color
- Parameters:
aView (ORSModel.ors.View) –
- Returns:
output (ORSModel.ors.Color) –
- getDensityForAllViews(self) float
- Returns:
output (float) –
- getDensityForView(self, pView: ORSModel.ors.View) float
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- getDepthWriteDisabled(self) bool
Gets if the shape will write in the depth buffer.
- Returns:
output (bool) – -(a bool)
- 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) –
- getInvertedVisualsGUID(self) str
Returns the list of inverted visuals for this shape.
- Returns:
output (str) – guids (a list of strings)
- getIsEditable(self) bool
- Returns:
output (bool) –
- getIsHighlightableAnchor(self, anchorIndex: int, iTIndex: int) bool
- Parameters:
anchorIndex (int) –
iTIndex (int) –
- Returns:
output (bool) –
- getIsHighlightableBorder(self, borderIndex: int, iTIndex: int) bool
- Parameters:
borderIndex (int) –
iTIndex (int) –
- Returns:
output (bool) –
- getKeepClipBoxForAllViews(self) bool
- Returns:
output (bool) –
- getKeepClipBoxForView(self, aView: ORSModel.ors.View) bool
- Parameters:
aView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getSelectedColor(self) ORSModel.ors.Color
Gets the selected color of the shape.
- Returns:
output (ORSModel.ors.Color) – the color (a Color)
- getShaderCode(self, aView: ORSModel.ors.View, bInverted: bool) str
get the evaluated shader code (in glsl)
- Parameters:
aView (ORSModel.ors.View) – the view (a View)
bInverted (bool) – true of false
- Returns:
output (str) –
- getShape(self, timestep: int) ORSModel.ors.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) –
- getShapeIsInvertedForVisual(self, pObject: ORSModel.ors.Managed) bool
- Parameters:
pObject (ORSModel.ors.Managed) –
- Returns:
output (bool) –
- getThicknessForAllViews(self) float
- Returns:
output (float) –
- getThicknessForView(self, pView: ORSModel.ors.View) float
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- none() VisualShape
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (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)
- Parameters:
pObject (ORSModel.ors.Managed) –
- removeShapeIsInvertedForVisual(self, pObject: ORSModel.ors.Managed)
- Parameters:
pObject (ORSModel.ors.Managed) –
- setAffectedVisualsGUID(self, guids: str)
- Parameters:
guids (str) –
- setAnchorVisible(self, sAnchorName: str, visible: bool)
Sets if a given anchor is visible or not.
- Parameters:
sAnchorName (str) – anchor name (a string)
visible (bool) – visible state (a bool)
- setColorForAllViews(self, color: ORSModel.ors.Color)
- Parameters:
color (ORSModel.ors.Color) –
- setColorForView(self, aView: ORSModel.ors.View, color: ORSModel.ors.Color)
- Parameters:
aView (ORSModel.ors.View) –
color (ORSModel.ors.Color) –
- setDensityForAllViews(self, pValue: float)
- Parameters:
pValue (float) –
- setDensityForView(self, pView: ORSModel.ors.View, pValue: float)
- Parameters:
pView (ORSModel.ors.View) –
pValue (float) –
- setDepthWriteDisabled(self, isDisabled: bool)
Sets if the shape will write in the depth buffer.
- Parameters:
isDisabled (bool) – isDisabled, (a bool)
- setHighlightedAnchor(self, anchorIndex: int, iTIndex: int)
- Parameters:
anchorIndex (int) –
iTIndex (int) –
- setHighlightedBorder(self, borderIndex: int, iTIndex: int)
- Parameters:
borderIndex (int) –
iTIndex (int) –
- setInvertedVisualsGUID(self, guids: str)
Sets the list of inverted visuals for this shape.
- Parameters:
guids (str) – guids (a string)
- setIsEditable(self, pFlag: bool)
- Parameters:
pFlag (bool) –
- setIsHighlightableAnchor(self, anchorIndex: int, iTIndex: int, isHighlightable: bool)
- Parameters:
anchorIndex (int) –
iTIndex (int) –
isHighlightable (bool) –
- setIsHighlightableBorder(self, borderIndex: int, iTIndex: int, isHighlightable: bool)
- Parameters:
borderIndex (int) –
iTIndex (int) –
isHighlightable (bool) –
- setKeepClipBoxForAllViews(self, keepClipBox: bool)
- Parameters:
keepClipBox (bool) –
- setKeepClipBoxForView(self, aView: ORSModel.ors.View, keepClipBox: bool)
- Parameters:
aView (ORSModel.ors.View) –
keepClipBox (bool) –
- setSelectedColor(self, IColor: ORSModel.ors.Color)
Sets the selected color of the shape.
- Parameters:
IColor (ORSModel.ors.Color) – the color (a Color)
- setShape(self, aShape: ORSModel.ors.Shape, timestep: int)
- Parameters:
aShape (ORSModel.ors.Shape) –
timestep (int) –
- setShapeIndex(self, iIndex: int)
- Parameters:
iIndex (int) –
- setThicknessForAllViews(self, value: float)
setThicknessForAllViews
Dirty flags: OrsPropertyDirty
- Parameters:
value (float) –
- setThicknessForView(self, pView: ORSModel.ors.View, pValue: float)
setThicknessForView
Dirty flags: OrsPropertyDirty
- Parameters:
pView (ORSModel.ors.View) –
pValue (float) –
- unHighlightAllAnchor(self, iTIndex: int)
- Parameters:
iTIndex (int) –
- unHighlightAllBorder(self, iTIndex: int)
- Parameters:
iTIndex (int) –
VisualShape2D¶
- class ORSModel.ors.VisualShape2D(*args, **kwargs)
Bases:
VisualShapeVisual 2D Shape manipulation services.
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() VisualShape2D
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualShape2D) –
VisualShape3D¶
- class ORSModel.ors.VisualShape3D(*args, **kwargs)
Bases:
VisualShapeVisual 3D Shape manipulation services.
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() VisualShape3D
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualShape3D) –
VisualSphere¶
- class ORSModel.ors.VisualSphere(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualShape3D- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
VisualSphere.__init__(self)
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getSphere(self, iTIndex: int) ORSModel.ors.Sphere
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.Sphere) –
- none() VisualSphere
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualSphere) –
- setSphere(self, aSphere: ORSModel.ors.Sphere, iTIndex: int)
- Parameters:
aSphere (ORSModel.ors.Sphere) –
iTIndex (int) –
VisualSurfaceControlPoints¶
- class ORSModel.ors.VisualSurfaceControlPoints(self, buffer: bytes, nBytes: int, bPreserveIdentity: bool = False)
Bases:
VisualShape3D- Parameters:
buffer (bytes) –
nBytes (int) –
bPreserveIdentity (bool) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getFirstHighlightedAnchor(self, iTIndex: int) int
- Parameters:
iTIndex (int) –
- Returns:
output (int) –
- getSurfaceControlPoints(self, iTIndex: int) ORSModel.ors.SurfaceControlPoints
- Parameters:
iTIndex (int) –
- Returns:
output (ORSModel.ors.SurfaceControlPoints) –
- none() VisualSurfaceControlPoints
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualSurfaceControlPoints) –
- setSurfaceControlPoints(self, aSurface: ORSModel.ors.SurfaceControlPoints, iTIndex: int)
- Parameters:
aSurface (ORSModel.ors.SurfaceControlPoints) –
iTIndex (int) –
VisualText¶
- class ORSModel.ors.VisualText(*args, **kwargs)
Bases:
VisualTo display text on the renderer.
- 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) ORSModel.ors.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) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) –
- getType(self) str
- Returns:
output (str) –
- getU(self) float
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.
See also
setAlignment()
- Returns:
output (float) –
- getV(self) float
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) –
- none() VisualText
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualText) –
- setDrawShadow(self, bFlag: bool)
- Parameters:
bFlag (bool) –
- setHorizontalAlignment(self, pValue: int)
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)
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)
Sets the text of the item.
- Parameters:
sText (str) – some text (a string)
- setTextColor(self, IColor: ORSModel.ors.Color)
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)
Sets the text font name of the item.
- Parameters:
sName (str) – the font name (a string)
- setTextFontSize(self, iValue: float)
Sets the text font size, in screen one thousandths.
- Parameters:
iValue (float) – the size (a double between 0 and 1)
- setTextMinimumFontSize(self, iVal: int)
Sets the minimum font size, in font points.
- Parameters:
iVal (int) – the font size
- setTextShadowColor(self, IColor: ORSModel.ors.Color)
- Parameters:
IColor (ORSModel.ors.Color) –
- setType(self, aType: str)
- Parameters:
aType (str) –
- setU(self, fValue: float)
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.
See also
setAlignment()
- Parameters:
fValue (float) –
- setV(self, fValue: float)
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) –
VisualVectorField¶
- class ORSModel.ors.VisualVectorField(*args, **kwargs)
Bases:
VisualA visual that represents a VisualVectorField.
- getCenterAtOrigin(self) bool
- Returns:
output (bool) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDirection0Color(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) – the color as an ORS::Color object
- getDirection1Color(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) – the color as an ORS::Color object
- getDirection2Color(self) ORSModel.ors.Color
- Returns:
output (ORSModel.ors.Color) – the color as an ORS::Color object
- getEffectiveInRangeOpacityForAllViews(self) float
- Returns:
output (float) –
- getEffectiveInRangeOpacityForView(self, pView: ORSModel.ors.View) float
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- getEffectiveOutRangeOpacityForAllViews(self) float
- Returns:
output (float) –
- getEffectiveOutRangeOpacityForView(self, pView: ORSModel.ors.View) float
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- getIncreasedDensity(self) bool
- Returns:
output (bool) – a bool
- getMaxVectorMagnitude(self) float
- Returns:
output (float) –
- getNormalizedModulus(self) bool
- Returns:
output (bool) – a bool
- getOpacitiesZerosForAllViews(self) bool
- Returns:
output (bool) –
- getOpacitiesZerosForView(self, pView: ORSModel.ors.View) bool
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getOpacityForAllViews(self) float
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Returns:
output (float) –
- getOpacityForView(self, pView: ORSModel.ors.View) float
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (float) – the opacity (a double)
- getOpacityInRangeForAllViews(self) float
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Returns:
output (float) –
- getOpacityInRangeForView(self, pView: ORSModel.ors.View) float
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (float) – the opacity (a double)
- getOpacityOutRangeForAllViews(self) float
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Returns:
output (float) –
- getOpacityOutRangeForView(self, pView: ORSModel.ors.View) float
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
- Returns:
output (float) – the opacity (a double)
- getRenderingColor(self) ORSModel.ors.Color
Gets the rendering color of the vector field.
- Returns:
output (ORSModel.ors.Color) – the color as an ORS::Color object
- getShowArrowHeadForAllViews(self) bool
- Returns:
output (bool) –
- getShowArrowHeadForView(self, pView: ORSModel.ors.View) bool
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getThickness(self) float
Gets the thickness of lines in 2D mode.
- Returns:
output (float) – the thickness, in pixel units (a double)
- getUseDirectionAsColorForAllViews(self) bool
- Returns:
output (bool) –
- getUseDirectionAsColorForView(self, pView: ORSModel.ors.View) bool
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (bool) –
- getVectorLengthForAllViews(self) float
Gets the visual length of the vectors.
- Returns:
output (float) – a double value
- getVectorLengthForView(self, pView: ORSModel.ors.View) float
Gets the visual length of the vectors.
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) – a double value
- getVectorTransform(self) ORSModel.ors.Matrix4x4
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getVectorVisibleMaxForAllViews(self) float
Gets the maximum modulus that will be visible in the field the value is a double.
- Returns:
output (float) –
- getVectorVisibleMaxForView(self, pView: ORSModel.ors.View) float
Gets the maximum modulus that will be visible in the field the value is a double.
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- getVectorVisibleMinForAllViews(self) float
Gets the minimum modulus that will be visible in the field the value is a double.
- Returns:
output (float) –
- getVectorVisibleMinForView(self, pView: ORSModel.ors.View) float
Gets the minimum modulus that will be visible in the field the value is a double.
- Parameters:
pView (ORSModel.ors.View) –
- Returns:
output (float) –
- none() VisualVectorField
Returns a none object, equivalent to a non-existent object (or null).
- Returns:
output (VisualVectorField) –
- setCenterAtOrigin(self, bCenter: bool)
- Parameters:
bCenter (bool) –
- setDirection0Color(self, aColor: ORSModel.ors.Color)
- Parameters:
aColor (ORSModel.ors.Color) –
- setDirection1Color(self, aColor: ORSModel.ors.Color)
- Parameters:
aColor (ORSModel.ors.Color) –
- setDirection2Color(self, aColor: ORSModel.ors.Color)
- Parameters:
aColor (ORSModel.ors.Color) –
- setIncreasedDensity(self, aBool: bool)
- Parameters:
aBool (bool) –
- setNormalizedModulus(self, bNormalize: bool)
- Parameters:
bNormalize (bool) –
- setOpacityForAllViews(self, value: float)
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
value (float) –
- setOpacityForView(self, pView: ORSModel.ors.View, value: float)
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
value (float) –
- setOpacityInRangeForAllViews(self, value: float)
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
value (float) –
- setOpacityInRangeForView(self, pView: ORSModel.ors.View, value: float)
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
value (float) –
- setOpacityOutRangeForAllViews(self, value: float)
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
value (float) –
- setOpacityOutRangeForView(self, pView: ORSModel.ors.View, value: float)
Note
Ranges from 0.0 (no opacity) to 1.0 (100% opacity).
Note
The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
See also
setIsTransparent(), getIsTransparent()
- Parameters:
pView (ORSModel.ors.View) – a view (a View)
value (float) –
- setRenderingColor(self, aColor: ORSModel.ors.Color)
set rendering color
- Parameters:
aColor (ORSModel.ors.Color) –
- setShowArrowHeadForAllViews(self, bShow: bool)
- Parameters:
bShow (bool) –
- setShowArrowHeadForView(self, pView: ORSModel.ors.View, bShow: bool)
- Parameters:
pView (ORSModel.ors.View) –
bShow (bool) –
- setThickness(self, value: float)
Sets the thickness of lines in 2D mode.
- Parameters:
value (float) – the thickness, in pixel units (a double)
- setUseDirectionAsColorForAllViews(self, bUse: bool)
- Parameters:
bUse (bool) –
- setUseDirectionAsColorForView(self, pView: ORSModel.ors.View, bUse: bool)
- Parameters:
pView (ORSModel.ors.View) –
bUse (bool) –
- setVectorLengthForAllViews(self, value: float)
Sets the visual length of the vectors the value is a double.
- Parameters:
value (float) –
- setVectorLengthForView(self, pView: ORSModel.ors.View, value: float)
Sets the visual length of the vectors the value is a double.
- Parameters:
pView (ORSModel.ors.View) –
value (float) –
- setVectorTransform(self, aMatrix: ORSModel.ors.Matrix4x4)
- Parameters:
aMatrix (ORSModel.ors.Matrix4x4) –
- setVectorVisibleMaxForAllViews(self, pValue: float)
Sets the maximum modulus that will be visible in the field the value is a double.
- Parameters:
pValue (float) –
- setVectorVisibleMaxForView(self, pView: ORSModel.ors.View, pValue: float)
Sets the maximum modulus that will be visible in the field the value is a double.
- Parameters:
pView (ORSModel.ors.View) –
pValue (float) –
- setVectorVisibleMinForAllViews(self, pValue: float)
Sets the minimum modulus that will be visible in the field the value is a double.
- Parameters:
pValue (float) –
- setVectorVisibleMinForView(self, pView: ORSModel.ors.View, pValue: float)
Sets the minimum modulus that will be visible in the field the value is a double.
- Parameters:
pView (ORSModel.ors.View) –
pValue (float) –
Watershed¶
- class ORSModel.ors.Watershed(self)
Bases:
Unmanaged- compute(self, watershedDistance: ORSModel.ors.Channel, lOutputChannelLabel: ORSModel.ors.Channel)
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)
- computeAdaptiveSeedsFromROI(self, roiOfMax: ORSModel.ors.ROI, euclidDistance: ORSModel.ors.Channel, aTimeStep: int, IProgress: ORSModel.ors.Progress) ORSModel.ors.MultiROI
From providedROI containing local maxima and distance map, seeds for watershed are computed.
- Parameters:
roiOfMax (ORSModel.ors.ROI) –
euclidDistance (ORSModel.ors.Channel) –
aTimeStep (int) –
IProgress (ORSModel.ors.Progress) –
- Returns:
output (ORSModel.ors.MultiROI) –
- 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 unsigned 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 unsigned char)
- getVolumeROI(self, index: int) ORSModel.ors.ROI
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) –
- Returns:
output (ORSModel.ors.ROI) –
- resetVolumeROIs(self)
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)
Note
The min and max boundaries must not describe a space bigger than the input channel.
- Parameters:
inputChannel (ORSModel.ors.Channel) –
minX (int) –
minY (int) –
minZ (int) –
maxX (int) –
maxY (int) –
maxZ (int) –
currentT (int) –
- setInputLabelsChannel(self, aInputLabelsChannel: ORSModel.ors.Channel)
- Parameters:
aInputLabelsChannel (ORSModel.ors.Channel) –
- setInputMultiROI(self, anInputMultiROI: ORSModel.ors.MultiROI)
- Parameters:
anInputMultiROI (ORSModel.ors.MultiROI) –
- setMaskROI(self, IMaskROI: ORSModel.ors.ROI)
- Parameters:
IMaskROI (ORSModel.ors.ROI) –
- setNeighborCountTo18(self)
Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).
- setNeighborCountTo26(self)
Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).
- setNeighborCountTo6(self)
Sets the number of neighbors used by theDijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)).
- setProgressObject(self, IProgress: ORSModel.ors.Progress)
- Parameters:
IProgress (ORSModel.ors.Progress) –
- setVolumeROI(self, index: int, aVolROI: ORSModel.ors.ROI)
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) –
aVolROI (ORSModel.ors.ROI) –
WatershedOnGrid¶
- class ORSModel.ors.WatershedOnGrid(self)
Bases:
Watershed- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- none() WatershedOnGrid
- Returns:
output (WatershedOnGrid) –
- setGridSize(self, xSize: int, ySize: int, zSize: int)
- 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__.orsCircle(center, normal, radius)¶
- ORSModel.__init__.orsCapsule(cap1Center, cap2Center, radius)¶
- ORSModel.__init__.orsCylinder(cap1Center, cap2Center, radius, thetaOffset=0)¶
- ORSModel.__init__.orsSphere(center=orsVect(0, 0, 0), radius=0, thetaOffset=0, phiOffset=0, projectionType=1)¶
- 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)¶
- ORSModel.__init__.orsBezierPatch(uCount, vCount, controlPoints)¶
- ORSModel.__init__.orsRBFRectangle(uCount, vCount, controlPoints, rectangle)¶
- ORSModel.__init__.orsDimensionUnit(registrationKey='', unitName='', unitAbbreviation='', unitType=CxvUniverse_Dimension_Type.CXV_DIMENSION_CONTINUOUS_VARIABLE, conversionFactor=1.0, isImperial=False, calibrationValues=None, description='')¶
orsObj¶
- ORSModel.__init__.orsObj(guid)¶