ORSModel¶
Classes¶
Annotation¶
-
class
ORSModel.ors.Annotation¶ Bases:
ORSModel.ors.Visual- /** interface Annotation
- brief Represents image annotations.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Aug 2006
- Represents image annotations, like Ruler, Angle, Path, etc.
*/
Annotation.__init__(self, anXML: str) -> None /* brief create a Annotation from an xml */
-
addControlPoint(self, pPoint: Vector3, iTIndex: int, aWorldTransformMatrix: Matrix4x4) → None¶ - /**
- brief Adds a control point.
- param - a point (an Vector3)
- note
- Any change to a annotation should be followed by update() to reflect the changes visually.
*/
-
addControlPointForAllTimeStep(self, pPoint: Vector3, aWorldTransformMatrix: Matrix4x4) → None¶ /* brief method addControlPointForAllTimeStep */
-
addControlPointToHighlighted(self, controlPointIndex: int, iTIndex: int) → None¶ /* brief method addControlPointToHighlighted */
-
addControlPointToSelection(self, controlPointIndex: int, iTIndex: int) → None¶ /* brief method addControlPointToSelection */
-
applyTransformation(self, aTransformationMatrix: Matrix4x4, iTIndex: int) → None¶ /* brief method applyTransformation */
-
applyTransformationOnAllTimeStep(self, aTransformationMatrix: Matrix4x4) → None¶ /* brief method applyTransformationOnAllTimeStep */
-
copyControlPointFrom(self, aControlPointCollection: OrderedCollectionDouble, iTIndex: int) → None¶ /* brief method copyControlPointFrom */
-
duplicateTimeStepDataAcrossAllTimeSteps(self, iTIndex: int) → None¶ /* brief Duplicate Time Step Data Across All Time Steps. */
-
getAsROI(self, iTIndex: int, worldTransform: Matrix4x4, pOutputROI: ROI) → None¶ /* brief Makes a Region of Interest from the annotation. */
-
getAsROIForAllTimeStep(self, worldTransform: Matrix4x4, pOutputROI: ROI) → None¶ /* brief Makes a VisualRegion of Interest from the mesh. */
-
getCaptionTextFontSize(self) → float¶ /** * brief Gets the font size of text captions, in screen one thousandths.
- return - the font size (a double between 0 and 1)
*/
-
getCaptionTextMinimumFontSize(self) → int¶ /** * brief Gets the minimum font size of text captions, in font points. * return - the font size */
-
getCentroid(self, iTIndex: int, worldTransform: Matrix4x4) → Vector3¶ /** * brief Gets the World centroid of the annotation. * return - The centroid vector */
-
getControlPointAppearance(self) → int¶ /** * brief Gets the control point appearance. * return - The appearance (an int) * 0:Circle * 1:Sphere * 2:Square * 3:Triangle * 4:+ * 5:x */
-
getControlPointCaptionAtIndex(self, index: int, iTIndex: int) → str¶ /* brief method getControlPointCaptionAtIndex */
-
getControlPointCount(self, iTIndex: int) → int¶ /** * brief Gets the number of control points. * return - the number of control points (an unsigned long) * note * - Control point indicies are zero based. */
-
getControlPointPositionAtIndex(self, index: int, iTIndex: int, aTransformationMatrix: Matrix4x4) → Vector3¶ /* brief method getControlPointPositionAtIndex */
-
getCreationOrientedPlane(self) → OrientedPlane¶ /** * brief Retrieve the oriented plane on which the annotation is created, if it was set.
- return - an Oriented Plane (an OrientedPlane)
- sa setCreationOrientedPlane()
*/
-
getCreationOrientedPlaneInView(self, aView: View) → OrientedPlane¶ /* brief getCreationOrientedPlaneInView */
-
getDistanceFromLineSegment(self, aStartPoint: Vector3, aEndPoint: Vector3, iTIndex: int, aTransformationMatrix: Matrix4x4) → float¶ /** * brief Gets the distance between this annotation and a given Line Segment. * param - the start and end point (Vector3) * param - the t index (an unsigned short) * param - a transformation matrix (a Matrix4x4) * return - the distance (a double) */
-
getDistanceFromPlane(self, aPlane: Plane, iTIndex: int, aTransformationMatrix: Matrix4x4) → float¶ /** * brief Gets the distance between this priannotationmitive and a given Plane. * param - the a b c and d plane parameter (doubles) * return - the distance (a double) */
-
getDistanceFromPoint(self, aPoint: Vector3, iTIndex: int, aTransformationMatrix: Matrix4x4) → float¶ /** * brief Gets the distance between this annotation and a given Point. * param - a point (a Vector3) * param - the T index (an unsigned short) * param - an optional transformation matrix (a Matrix4x4) * return - the distance (a double) */
-
getDrawTextShadow(self) → bool¶ /** * brief Gets the view text shadows status.
- return - true if text shadows are visible, false otherwise
*/
-
getHighlightedControlPointsArray(self, iTIndex: int) → OrderedCollectionUnsignedLong¶ /* brief method getHighlightedControlPointsArray */
-
getHighlightedControlPointsCount(self, iTIndex: int) → int¶ /* brief method getHighlightedControlPointsCount */
-
getIsEditable(self) → bool¶ /** * brief Sees if the annotation is editable or not.
- return - true if the annotation is editable, false otherwise
- note
- Non editable annotations appear to be “locked”, i.e. they do not react to user modifications.
*/
-
getNormalColor(self) → Color¶ /** * brief Gets the normal color of the annotation.
- return - the color (a 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().
- sa getSelectedColor(), setToNormalColor(), setToSelectedColor()
*/
-
getProjectionIn(self, worldTransform: Matrix4x4) → "Annotation"¶ /** * brief Projects the annotation in a channel’s space, returning a new annotation.
- param - the channel in which to project (a Channel)
- return - a new annotation (an Annotation)
*/
-
getSelectedColor(self) → Color¶ /** * brief Gets the selected color of the annotation.
- return - the color (a 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().
- sa getNormalColor(), setToNormalColor(), setToSelectedColor()
*/
-
getSelectedControlPointArray(self, iTIndex: int) → OrderedCollectionUnsignedLong¶ /* brief method getSelectedControlPointArray */
-
getSelectedControlPointColor(self) → Color¶ /** * brief Gets the control point selected color of the annotation.
- return - the color (a Color)
*/
-
getSelectedControlPointCount(self, iTIndex: int) → int¶ /* brief method getSelectedControlPointCount */
-
getShowCaption(self) → bool¶ /** * brief get the view status of the annotation caption. * return - true if caption are displayed, false otherwise */
-
getShowControlPoints(self) → bool¶ /** * brief Sees if control points are visible.
- return - true if control points are visible, false otherwise
*/
-
getTextColor(self) → Color¶ /** * brief Gets the text color of the annotation.
- return - the color (a Color)
- note
- The text color is used for the caption.
*/
-
getTextShadowColor(self) → Color¶ /** * brief Gets the text shadow color of the annotation.
- return - the color (a Color)
*/
-
getThickness(self) → float¶ /** * brief Gets the thickness of lines in 2D mode.
- return - the thickness, in screen proportion (a double between 0 and 1)
*/
-
insertControlPoint(self, index: int, pPoint: Vector3, iTIndex: int, aWorldTransformMatrix: Matrix4x4) → None¶ /** * brief Insert a control point. * param - a point (an Vector3) * note * - Any change to a annotation should be followed by update() to reflect the changes visually. */
-
none()¶
-
removeControlPoint(self, index: int, iTIndex: int) → None¶ /** * brief Removes a single control point.
-
removeControlPointForAllTimeStep(self, index: int) → None¶ /* brief Removes a single control point. */
-
removeControlPointFromHighlighted(self, controlPointIndex: int, iTIndex: int) → None¶ /* brief method removeControlPointFromHighlighted */
-
removeControlPointFromSelection(self, controlPointIndex: int, iTIndex: int) → None¶ /* brief method removeControlPointFromSelection */
-
setCaption(self, text: str) → None¶ /** * brief Sets the caption of the annotation. * param - a caption (a string) * note * - Any modification to annotation properties must be followed by an update() to be shown on the view. */
-
setCaptionTextFontName(self, sFontName: str) → None¶ /** * brief Sets the font name of text captions.
- param - the font name (a string)
*/
-
setCaptionTextFontSize(self, fontSize: float) → None¶ /** * brief Sets the font size of text captions, in screen one thousandths.
- param - the font size (a double between 0 and 1)
*/
-
setCaptionTextMinimumFontSize(self, fontSize: int) → None¶ /** * brief Sets the minimum font size of text captions, in font points. * param - the font size */
-
setControlPointAppearance(self, nValue: int) → None¶ /** * brief Sets the control point appearance. * param - The appearance (an int) * 0:Circle * 1:Sphere * 2:Square * 3:Triangle * 4:+ * 5:x */
-
setControlPointCaptionAtIndex(self, index: int, iTIndex: int, sCaption: str) → None¶ /* brief method setControlPointCaptionAtIndex */
-
setControlPointPositionAtIndex(self, index: int, iTIndex: int, anIVector: Vector3, aTransformationMatrix: Matrix4x4) → None¶ /* brief method setControlPointPositionAtIndex */
-
setControlPointPositionAtIndexForAllTimeStep(self, index: int, anIVector: Vector3, aTransformationMatrix: Matrix4x4) → None¶ /* brief method setControlPointPositionAtIndexForAllTimeStep */
-
setCreationOrientedPlane(self, anOrientedPlane: OrientedPlane) → None¶ /** * brief Set the oriented plane on which the annotation is created.
- param - an Oriented Plane (an anOrientedPlanePtr)
- sa setCreationOrientedPlane()
*/
-
setCreationOrientedPlaneFromView(self, aView: View) → None¶ /* brief setCreationOrientedPlaneFromView */
-
setDrawTextShadow(self, bFlag: bool) → None¶ /** * brief Toggles displaying shadows for the text.
- param - true to show text shadows, false otherwise
- sa setTextShadowColor()
*/
-
setHighlightControlPointColor(self, IColor: Color) → None¶ /* brief method setHighlightControlPointColor */
-
setIsEditable(self, pFlag: bool) → None¶ /** * brief Sets the annotation to be editable or not.
- param - true to make the annotation editable, false otherwise
- note
- Non editable annotations appear to be “locked”, i.e. they do not react to user modifications.
*/
-
setNormalColor(self, IColor: Color) → None¶ /** * brief Sets the normal color of the annotation.
- param - the color (an 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().
- sa setSelectedColor(), setToNormalColor(), setToSelectedColor()
*/
-
setSelectedColor(self, IColor: Color) → None¶ /** * brief Sets the selected color of the annotation.
- param - the color (a 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().
- sa setNormalColor(), setToNormalColor(), setToSelectedColor()
*/
-
setSelectedControlPointColor(self, IColor: Color) → None¶ /** * brief Sets the control point selected color of the annotation.
- param - the color (a Color)
- sa setTextColor(), setDrawTextShadow()
*/
-
setShowCaption(self, bShow: bool) → None¶ /** * brief Toggles the displaying of the annotation caption. * param - true to display the caption, false to hide it * note * - Any modification to annotation properties must be followed by an update() to be shown on the view. */
-
setShowControlPoints(self, value: bool) → None¶ /** * brief Toggles the displaying of the annotation control points. * param - true to display the control points, false to hide them * note * - Any modification to annotation properties must be followed by an update() to be shown on the view. */
-
setTextColor(self, IColor: Color) → None¶ /** * brief Sets the text color of the annotation.
- param - the color (a Color)
- note
- The text color is used for the caption.
*/
-
setTextShadowColor(self, IColor: Color) → None¶ /** * brief Sets the text shadow color of the annotation.
- param - the color (a Color)
- sa setTextColor()
*/
Array¶
-
class
ORSModel.ors.Array¶ Bases:
ORSModel.ors.SequenceableCollection/** interface Array * brief Array abstraction class. * * author Normand Mongeau. * version 1.0 * * Array abstraction class. ORS arrays can shrink and grow while preserving their contents. / Array.__init__(self, anXML: str) -> None / brief create a Array from an xml */
-
copyFromMemory(self, pSource: int, iByteCount: int, iInsertionIndex: int) → None¶ /** * brief Copies a memory buffer in the array.
- param - the source (a unsigned char*)
- param - the size of the source, in bytes (a unsigned long long)
- param - the insertion index into the array (a unsigned long long, zero based)
- note
- The array will grow to accommodate the copied data, if required.
*/
-
copyIntoMemory(self, pOutput: int, iStartIndex: int, iNbElementsToCopy: int) → None¶ /** * brief Copies the array to a memory buffer.
- param - the target memory buffer (a unsigned char*)
- param - the starting index of the source array (a unsigned long long, zero based)
- param - the number of array elements to copy (a unsigned long long)
- note
- The memory buffer needs to be big enough to accommodate the input.
*/
-
getPacketCount(self) → int¶ /** * brief Gets the number of packets currently in the array.
- return - the packet count (an unsigned long)
- note
- Arrays are composed of packets, this method return the number of packets.
*/
-
getPacketSize(self) → int¶ /** * brief Gets the packet size used by the array.
- return - the packet size (an unsigned long)
- note
- Arrays are composed of packets, this method return the packet size used. The packet size represents the number of items in the packet, not the byte size.
*/
-
none()¶
-
setInitialSize(self, iPacketSize: int, initialSize: int) → None¶ /** * brief Sets the initial size of the array.
- param - the packet size (an unsigned short)
- param - the initial array size (an unsigned long long)
- note
- This should be the first method invoked after instantiating the array. If the array has been used (items added/deleted) then this method can be costly if
- the array has many elements, as changing the internal storage implies that the data can co-exist momentarily.
- note
- Arrays are composed of packets, this method controls the packet size used. Default values are 64 and 64.
*/
-
ArrayChar¶
-
class
ORSModel.ors.ArrayChar¶ Bases:
ORSModel.ors.Array/** interface ArrayChar * brief Array for numeric values of type char (1 byte per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type char (1 byte per value). / ArrayChar.__init__(self, anXML: str) -> None / brief create a ArrayChar from an xml */
-
at(self, index: int) → int¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (a signed char)
*/
-
atPut(self, index: int, pValue: int) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (a signed char)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayChar", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayCharPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (a signed char)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (a signed char)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (a signed short) */
-
getMin(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (a signed short) */
-
getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (a signed char*)
- param[out] - the largest value found (a signed char*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: int) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (a signed char)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayDouble¶
-
class
ORSModel.ors.ArrayDouble¶ Bases:
ORSModel.ors.Array/** interface ArrayDouble * brief Array for numeric values of type double (8 bytes per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type double (8 bytes per value). / ArrayDouble.__init__(self, anXML: str) -> None / brief create a ArrayDouble from an xml */
-
at(self, index: int) → float¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (a double)
*/
-
atPut(self, index: int, pValue: float) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (a double)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayDouble", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayDoublePtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: float) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (a double)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: float) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (a double)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → float¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (a double) */
-
getMin(self, startIndex: int, endIndex: int) → float¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (a double) */
-
getMinMax(self, startIndex: int, endIndex: int, min: float, max: float) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (a double*)
- param[out] - the largest value found (a double*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: float) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (a double)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayFloat¶
-
class
ORSModel.ors.ArrayFloat¶ Bases:
ORSModel.ors.Array/** interface ArrayFloat * brief Array for numeric values of type float (4 bytes per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type float (4 bytes per value). / ArrayFloat.__init__(self, anXML: str) -> None / brief create a ArrayFloat from an xml */
-
at(self, index: int) → float¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (a float)
*/
-
atPut(self, index: int, pValue: float) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (a float)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayFloat", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayFloatPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: float) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (a float)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: float) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (a float)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → float¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (a float) */
-
getMin(self, startIndex: int, endIndex: int) → float¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (a float) */
-
getMinMax(self, startIndex: int, endIndex: int, min: float, max: float) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (a float*)
- param[out] - the largest value found (a float*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: float) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (a float)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayLONGLONG¶
-
class
ORSModel.ors.ArrayLONGLONG¶ Bases:
ORSModel.ors.Array/** interface ArrayLONGLONG * brief Array for numeric values of type long long (8 bytes per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type long long (8 bytes per value). / ArrayLONGLONG.__init__(self, anXML: str) -> None / brief create a ArrayLONGLONG from an xml */
-
at(self, index: int) → int¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (a long long)
*/
-
atPut(self, index: int, pValue: int) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (a long long)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayLONGLONG", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayLONGLONGPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (a long long)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (a long long)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (a long long) */
-
getMin(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (a long long) */
-
getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (a long long*)
- param[out] - the largest value found (a long long*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: int) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (a long long)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayLong¶
-
class
ORSModel.ors.ArrayLong¶ Bases:
ORSModel.ors.Array/** interface ArrayLong * brief Array for numeric values of type long (4 bytes per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type long (4 bytes per value). / ArrayLong.__init__(self, anXML: str) -> None / brief create a ArrayLong from an xml */
-
at(self, index: int) → int¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (a long)
*/
-
atPut(self, index: int, pValue: int) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (a long)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayLong", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayLongPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (a long)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (a long)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (a long) */
-
getMin(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (a long) */
-
getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (a long*)
- param[out] - the largest value found (a long*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: int) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (a long)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayShort¶
-
class
ORSModel.ors.ArrayShort¶ Bases:
ORSModel.ors.Array/** interface ArrayShort * brief Array for numeric values of type short (2 bytes per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type short (2 bytes per value). / ArrayShort.__init__(self, anXML: str) -> None / brief create a ArrayShort from an xml */
-
at(self, index: int) → int¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (a short)
*/
-
atPut(self, index: int, pValue: int) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (a short)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayShort", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayShortPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (a short)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (a short)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (a signed short) */
-
getMin(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (a signed short) */
-
getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (a short*)
- param[out] - the largest value found (a short*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: int) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (a short)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayUnsignedChar¶
-
class
ORSModel.ors.ArrayUnsignedChar¶ Bases:
ORSModel.ors.Array/** interface ArrayUnsignedChar * brief Array for numeric values of type unsigned char (1 byte per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type unsigned char (1 byte per value). / ArrayUnsignedChar.__init__(self, anXML: str) -> None / brief create a ArrayUnsignedChar from an xml */
-
at(self, index: int) → int¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (an unsigned char)
*/
-
atPut(self, index: int, pValue: int) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (an unsigned char)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayUnsignedChar", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayUnsignedCharPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (an unsigned char)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (an unsigned char)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (an unsigned short) */
-
getMin(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (an unsigned short) */
-
getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (an unsigned char*)
- param[out] - the largest value found (an unsigned char*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: int) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (an unsigned char)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayUnsignedLONGLONG¶
-
class
ORSModel.ors.ArrayUnsignedLONGLONG¶ Bases:
ORSModel.ors.Array/** interface ArrayUnsignedLONGLONG * brief Array for numeric values of type unsigned long long (8 bytes per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type unsigned long long (8 bytes per value). / ArrayUnsignedLONGLONG.__init__(self, anXML: str) -> None / brief create a ArrayUnsignedLONGLONG from an xml */
-
at(self, index: int) → int¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (a unsigned long long)
*/
-
atPut(self, index: int, pValue: int) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (a unsigned long long)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayUnsignedLONGLONG", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayUnsignedLONGLONGPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (a unsigned long long)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (a unsigned long long)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (an unsigned long long) */
-
getMin(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (an unsigned long long) */
-
getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (an unsigned long long*)
- param[out] - the largest value found (an unsigned long long*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: int) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (a unsigned long long)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayUnsignedLong¶
-
class
ORSModel.ors.ArrayUnsignedLong¶ Bases:
ORSModel.ors.Array/** interface ArrayUnsignedLong * brief Array for numeric values of type unsigned long (4 bytes per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type unsigned long (4 bytes per value). / ArrayUnsignedLong.__init__(self, anXML: str) -> None / brief create a ArrayUnsignedLong from an xml */
-
at(self, index: int) → int¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (an unsigned long)
*/
-
atPut(self, index: int, pValue: int) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (an unsigned long)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayUnsignedLong", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayUnsignedLongPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (an unsigned long)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (an unsigned long)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (an unsigned long) */
-
getMin(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (an unsigned long) */
-
getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (an unsigned long*)
- param[out] - the largest value found (an unsigned long*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: int) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (an unsigned long)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
ArrayUnsignedShort¶
-
class
ORSModel.ors.ArrayUnsignedShort¶ Bases:
ORSModel.ors.Array/** interface ArrayUnsignedShort * brief Array for numeric values of type unsigned short (2 bytes per value). * * author Normand Mongeau. * version 1.0 * * Array for numeric values of type unsigned short (2 bytes per value). / ArrayUnsignedShort.__init__(self, anXML: str) -> None / brief create a ArrayUnsignedShort from an xml */
-
at(self, index: int) → int¶ /** * brief Retrieves a single value from the array.
- param - the index of the item to retrieve (an unsigned long long, zero based)
- return - the value (an unsigned short)
*/
-
atPut(self, index: int, pValue: int) → None¶ /** * brief Puts a single value into the array.
- param - the index of the item to modify (an unsigned long long, zero based)
- param - the value to put (an unsigned short)
- note
- Any previous value at the given position is lost.
*/
-
copyInto(self, anArray: "ArrayUnsignedShort", iInsertionIndex: int, iStartIndex: int, iEndIndex: int) → None¶ /** * brief Copies portions of the source array in another array.
- param - the destination array (an ORSArrayUnsignedShortPtr)
- param - the insertion index into the destination array (a unsigned long long, zero based)
- param - the start index of the source (a unsigned long long, zero based)
- param - the end index of the source (a unsigned long long, zero based)
- note
- The destination array will grow to accommodate the copied data, if required.
*/
-
findFirst(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index 0.
- param - the value to search for (an unsigned short)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
findLast(self, pValue: int) → int¶ /** * brief Searches the array for a given value, starting at index getSize() - 1 (the end of the array).
- param - the value to search for (an unsigned short)
- return - the index of the value (an unsigned long long, zero based), or ULLONG_MAX if not found
*/
-
getMax(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the max value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the largest value found (an unsigned short) */
-
getMin(self, startIndex: int, endIndex: int) → int¶ /** * brief Returns the min value within the array. * param - the start index where to search (a unsigned long long, zero based, inclusive) * param - the end index where to search (a unsigned long long, zero based, inclusive) * return - the smallest value found (an unsigned short) */
-
getMinMax(self, startIndex: int, endIndex: int, min: int, max: int) → None¶ /** * brief Returns the min and max values within the array.
- param - the start index where to search (a unsigned long long, zero based, inclusive)
- param - the end index where to search (a unsigned long long, zero based, inclusive)
- param[out] - the smallest value found (an unsigned short*)
- param[out] - the largest value found (an unsigned short*)
- note
- Return values are written to the supplied arguments.
*/
-
insertAt(self, index: int, pValue: int) → None¶ /** * brief Inserts a single item into the array.
- param - the index of the item to insert (an unsigned long long, zero based)
- param - the value to insert (an unsigned short)
- note
- All items after the insertion index are shifted down. The last element of the array is thus lost.
*/
-
none()¶
-
Box¶
-
class
ORSModel.ors.Box¶ Bases:
ORSModel.ors.Unmanaged/** interface Box * brief Box manipulation services * * author Nicolas Piche. * author All other members of ORS participated. * version 1.0 * date January 2010 * *
*/-
atomicLoad(self, aFilename: str) → None¶ /** * brief Loads an object from a file. * param - a file path (a string) * * note * - Objects are saved in XML format. * note * - The file should contain only one object. If it contains more than one object, use atomicLoadSpecificNode(). * sa atomicSave() */
-
atomicSave(self, aFilename: str) → None¶ /** * brief Saves the object to a file. * param - a file path (a string) * note * - Objects are saved in XML format. * note * - The file will be overwritten if it exists. * sa atomicLoad() */
-
clip(self, pBox: "Box") → None¶ /* brief Clip the box with the given box if both box are aligned, do nothing otherwise. */
-
getBoundedPlaneOfSlice()¶
-
getBoxInBoxReferential(self, inRefBox: "Box") → "Box"¶ /** *brief Gets a copy of the receiver in the argument referential. * param - a box, the destination referential (an Box) * return - a box, a copy of the receiver in the argument referential (an Box) */
-
getBoxToWorld(self, intVect: Vector3) → Vector3¶ /** * brief Transforms the given point (which is expressed in the box referential) in the world referential. * param - a point (an Vector3) * return - a point (an Vector3) * note * - Here the spacing is not considered. */
-
getCenter(self) → Vector3¶ /** *brief Gets the geometrical middle of the box. * return - a box center position (an Vector3) */
-
getCenterHalfVoxel(self) → Vector3¶ /** *brief Gets the middle of the voxel in the middle of the box. * return - a box center position (an Vector3) */
-
getContainsBox(self, aBox: "Box") → bool¶ /* brief Gets if the given box is totally contained in the receiver. */
-
getDirection(self, index: int) → Vector3¶ /** * brief Gets the box direction0. * return - a vector (an Vector3) * note * - The direction0 vector is normalized. */
-
getDirection0(self) → Vector3¶ /** * brief Gets the box direction0. * return - a vector (an Vector3) * note * - The direction0 vector is normalized. */
-
getDirection0Size(self) → float¶ /** * brief Gets the box direction0 side length. * return - the side 0 length (a double) * note * - This is the size in meters of the box side 0. */
-
getDirection0Spacing(self) → float¶ /** * brief Gets the box direction0 spacing. * return - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
getDirection1(self) → Vector3¶ /** * brief Gets the box direction0. * return - a vector (an Vector3) * note * - The direction0 vector is normalized. */
-
getDirection1Size(self) → float¶ /** * brief Gets the box direction0 side length. * return - the side 0 length (a double) * note * - This is the size in meters of the box side 0. */
-
getDirection1Spacing(self) → float¶ /** * brief Gets the box direction0 spacing. * return - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
getDirection2(self) → Vector3¶ /** * brief Gets the box direction0. * return - a vector (an Vector3) * note * - The direction0 vector is normalized. */
-
getDirection2Size(self) → float¶ /** * brief Gets the box direction0 side length. * return - the side 0 length (a double) * note * - This is the size in meters of the box side 0. */
-
getDirection2Spacing(self) → float¶ /** * brief Gets the box direction0 spacing. * return - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
getDirectionSize(self, index: int) → float¶ /** * brief Gets the box direction0 side length. * return - the side 0 length (a double) * note * - This is the size in meters of the box side 0. */
-
getDirectionSpacing(self, index: int) → float¶ /** * brief Gets the box direction0 spacing. * return - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
getEnclosingBox()¶
-
getFirstIntersectingFace(self, aLine: Line) → int¶ /* brief the face of intersection that is the closest to the origin on the line argument */
-
getHasSameOrientation(self, pBox: "Box") → bool¶ /* brief Gets if the receiver has the same orientation as the given box. */
-
getHasSameOrthonormalBase(self, pBox: "Box") → bool¶ /* brief Gets if the receiver has the same orthonormal base as the given box. */
-
getIntersectionWithLine(self, aLine: Line, resultLineSegment: LineSegment) → bool¶ /* brief Gets if the receiver intersects the given line. */
-
getIsEqualTo(self, aBox: "Box") → bool¶ /** * brief Checks for equality to another box. * param - a box (an Box) * return - TRUE if the boxes are equal, FALSE otherwise */
-
getIsIntersectingBox(self, aBox: "Box") → bool¶ /* brief Gets if the receiver intersects the given box. */
-
getIsIntersectingLineSegment(self, inputLineSegment: LineSegment) → bool¶ /* brief Gets if the receiver intersects the given line segment. */
-
getIsIntersectingPlane(self, aPlane: Plane) → bool¶ /* brief Gets if the receiver intersects the given plane. */
-
getIsIntersectingRectangle(self, aBplane: Rectangle) → bool¶ /* brief Gets if the receiver intersects the given bounded plane. */
-
getIsPointInside(self, aPosition: Vector3) → bool¶ /** * brief Verifies if a point is inside the box. * param - a point (an Vector3) * return - TRUE if the point is inside the box, FALSE otherwise */
-
getMostSimilarDirectionIndex(self, pVect: Vector3) → int¶ /* brief Gets the direction vector closest to the vector given. */
-
getNearestPointOnBoxSurfaceFromLineOnPlane(self, aPlane: Plane, aLine: Line, insideDeep: float) → Vector3¶ /* brief Gets the closest point located on the box surface to the given line on the given plane. */
-
getNearestPointOnBoxSurfaceFromPointOnPlane(self, aPlane: Plane, aPoint: Vector3, insideDeep: float) → Vector3¶ /* brief Gets the closest point located on the box surface to the given point on the given plane. */
-
getOrigin(self) → Vector3¶ /** * brief Gets the box origin position. * return - the origin (an Vector3) * note * - The origin is in world coordinates. */
-
getOriginOpposite(self) → Vector3¶ /* brief Gets the position of the corner opposite to the origin. */
-
getOutwardFacePlane(self, faceIndex: int) → Plane¶ /* brief Returns the given face index plane with outward normal. */
-
getPlaneInBoxReferential(self, pPlane: Plane) → Plane¶ /** *brief Transforms the plane provided in the receiver referential. * param - a plane (an Plane) * return - a plane in the box referential (an Plane) */
-
getPlaneTranslatedSoThatItIntersect(self, aPlane: Plane) → Plane¶ /* brief Gets a translated plane intersecting the box at its closest location. */
-
getRectangleOfIntersection(self, cutPlane: Plane, upVector: Vector3) → Rectangle¶ /** * brief Computes the bounded plane (with direction 1 vector equal to the up vector provided) of the intersection of the receiver with a plane. * param - a plane (an Plane) * param - an up vector (an Vector3) * return - a Rectangle (a Rectangle) * note * - The bounded plane will have an area of zero if the plane does not intersect the box. */
-
getSpacingInDirection(self, aDirection: Vector3) → float¶ /* brief Gets the spacing of the box in the given direction. */
-
getSubBoxForIndex(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int) → "Box"¶ /* brief Get a subbox for the given index */
-
getSummit(self, maxDirection0: bool, maxDirection1: bool, maxDirection2: bool) → Vector3¶ /** *brief Gets the position of one of the summits of the box. * param - TRUE to get maxDirection0, FALSE to get minDirection0 * param - TRUE to get maxDirection1, FALSE to get minDirection1 * param - TRUE to get maxDirection2, FALSE to get minDirection2 * return - a summit position (an Vector3) */
-
getSummitmmm(self) → Vector3¶ /** *brief Gets the (minDirection0, minDirection1, minDirection2) summit position. * return - a summit position (an Vector3) */
-
getSummitmmp(self) → Vector3¶ /** *brief Gets the (minDirection0, minDirection1, maxDirection2) summit position. * return - a summit position (an Vector3) */
-
getSummitmpm(self) → Vector3¶ /** *brief Gets the (minDirection0, maxDirection1, minDirection2) summit position. * return - a summit position (an Vector3) */
-
getSummitmpp(self) → Vector3¶ /** *brief Gets the (minDirection0, maxDirection1, maxDirection2) summit position. * return - a summit position (a Vector3) */
-
getSummitpmm(self) → Vector3¶ /** *brief Gets the (maxDirection0, minDirection1, minDirection2) summit position. * return - a summit position (an Vector3) */
-
getSummitpmp(self) → Vector3¶ /** *brief Gets the (maxDirection0, minDirection1, maxDirection2) summit position. * return - a summit position (an Vector3) */
-
getSummitppm(self) → Vector3¶ /** *brief Gets the (maxDirection0, maxDirection1, minDirection2) summit position. * return - a summit position (an Vector3) */
-
getSummitppp(self) → Vector3¶ /** *brief Gets the (maxDirection0, maxDirection1, maxDirection2) summit position. * return - a summit position (an Vector3) */
-
getTransformationToGoTo(self, pIBox: "Box") → Matrix4x4¶ /** *brief Gets the 4x4 matrix transforming the receiver into the argument. * param - a box (an Box) * return - a transformation matrix (an Matrix4x4) * note * - The transformation can include: translation, rotation and scaling.
*/
-
getVolume(self) → float¶ /** *brief Gets the volume of the receiver. * return - a volume (a double) */
-
getVoxelToWorldCoordinates(self, anIndex: Vector3) → Vector3¶ /** *brief Gets the position of a given voxel. * param - a voxel position (an Vector3) * return - the position in world coordinates (an Vector3) * note * - Only useful if the spacing of the direction vectors have been defined.
*/
-
getWorldToBox(self, inVect: Vector3) → Vector3¶ /** * brief Transforms the given point in the box referential. * param - a point (an Vector3) * return - a point (an Vector3) * note * - Here the spacing is not considered. */
-
getWorldToVoxelCoordinates(self, pPointInWorld: Vector3) → Vector3¶ /** *brief Gets the position of a given world coordinate. * param - a world coordinate position vector (an Vector3) * return - the position in local coordinates (an Vector3) * note * - Only useful if the spacing of the direction vectors have been defined.
*/
-
getWorldTranformation(self) → Matrix4x4¶ /* brief Gets the transformation from the unit box to the receiver. */
-
grow(self, growSize: Vector3) → None¶ /** *brief Grows or shrinks the receiver, arount its center. * param - a vector with the amount of growth of each direction vector length (an Vector3) */
-
growToContain(self, pBox: "Box") → None¶ /** * brief Grows to include a given box. * param - a box (an Box) * note * - The receiver will grow to contain the provided box, but it will never shrink. */
-
makeAbleToContain(self, pBox: "Box") → None¶ /** * brief Makes the box able to contain a given box. * param - a box (an Box) * note * - The receiver will grow or shrink to fit on the provided box. */
-
moveFaceSoThatPlaneIncludesPoint(self, faceIndex: int, pVect: Vector3) → None¶ /* brief Moves the face at the given index so that the given point lie on the face plane. */
-
none()¶
-
rotate(self, axisInWorld: Vector3, aroundPointInWorld: Vector3, angleInRadian: float) → None¶ /** *brief Applies a rotation to the receiver. * param - a rotation axis (an Vector3) * param - a center of rotation (an Vector3) * param - an angle in radiant (a double) * note * - The box is a right handed bounded referential.
*/
-
setDirection(self, index: int, pVect: Vector3) → None¶ /** * brief Sets the box direction2. * param - a vector (an Vector3) * note * - The direction2 vector will be normalized. */
-
setDirection0(self, pVect: Vector3) → None¶ /** * brief Sets the box direction2. * param - a vector (an Vector3) * note * - The direction2 vector will be normalized. */
-
setDirection0Size(self, aSize: float) → None¶ /** * brief Sets the box direction2 vector length. * param - the side 2 length (a double) * note * - This is the size in meters of the box side 2. */
-
setDirection0Spacing(self, aSpacing: float) → None¶ /** * brief Sets the box direction1 spacing. * param - the side 1 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
setDirection1(self, pVect: Vector3) → None¶ /** * brief Sets the box direction2. * param - a vector (an Vector3) * note * - The direction2 vector will be normalized. */
-
setDirection1Size(self, aSize: float) → None¶ /** * brief Sets the box direction2 vector length. * param - the side 2 length (a double) * note * - This is the size in meters of the box side 2. */
-
setDirection1Spacing(self, aSpacing: float) → None¶ /** * brief Sets the box direction1 spacing. * param - the side 1 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
setDirection2(self, pVect: Vector3) → None¶ /** * brief Sets the box direction2. * param - a vector (an Vector3) * note * - The direction2 vector will be normalized. */
-
setDirection2Size(self, aSize: float) → None¶ /** * brief Sets the box direction2 vector length. * param - the side 2 length (a double) * note * - This is the size in meters of the box side 2. */
-
setDirection2Spacing(self, aSpacing: float) → None¶ /** * brief Sets the box direction1 spacing. * param - the side 1 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
setDirectionSize(self, index: int, aSize: float) → None¶ /** * brief Sets the box direction2 vector length. * param - the side 2 length (a double) * note * - This is the size in meters of the box side 2. */
-
setDirectionSizeVector(self, pVect: Vector3) → None¶ /* brief Sets the direction size as a vector. */
-
setDirectionSpacing(self, index: int, aSpacing: float) → None¶ /** * brief Sets the box direction1 spacing. * param - the side 1 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
setDirectionSpacingVector(self, pVect: Vector3) → None¶ /* brief Sets the direction spacing as a vector. */
-
setOrigin(self, pVect: Vector3) → None¶ /** * brief Sets the box origin position. * param - a vector (an Vector3) * note * - The origin should be in world coordinates. */
-
shape¶
-
Camera¶
-
class
ORSModel.ors.Camera¶ Bases:
ORSModel.ors.Unmanaged/** interface Camera * brief The camera object, i.e. the view point from which we look at objects. * * author Nicolas Piché. * author All other members of ORS participated. * version 1.0 * date May 2010 * * */
-
getIsEqualTo(self, aCamera: "Camera") → bool¶ /* brief Tests if the cameras have the same parameters. */
-
getLineOfSight(self, positionOnView: Vector3) → Line¶ /** * brief Get the line of sight of the camera from position on screen. * return - the line of sigth (an Line) * note * - Origin of the line of sight is the camera position. */
-
getLineOfSightOrtho(self) → Line¶ /** * brief Get the line of sight of the camera. * return - the line of sigth (an Line) * note * - Origin of the line of sight is the camera position. */
-
getRotatedAroundAxis(self, rotationAxis: Vector3, rotationPivot: Vector3, angle: float) → "Camera"¶ /* brief Gets a new camera rotated around an axis around a specified location by an angle */
-
getSceneNormalizationTranslationMatrix(self) → Matrix4x4¶ /* brief Get scene normalization matrix. */
-
getScreenToWorldCoordinate(self, xCoordinate: float, yCoordinate: float) → Vector3¶ /* brief Gets screen to world coordinate */
-
getScreenToWorldDirection(self, xCoordinate: float, yCoordinate: float) → Vector3¶ /* brief Gets screen to world direction */
-
none()¶
-
rotateAroundAxis(self, rotationAxis: Vector3, rotationPivot: Vector3, angle: float) → None¶ /* brief Rotates the camera around an axis around a specified location by an angle. */
-
setFromViewMatrix(self, aMatrix: Matrix4x4) → None¶ /* brief Sets the parameters from a left-handed view matrix. */
-
setSceneNormalizationRotationMatrix(self, aMatrix: Matrix4x4) → None¶ /* brief Set scene normalization matrix. */
-
setSceneNormalizationScaleMatrix(self, aMatrix: Matrix4x4) → None¶ /* brief Set scene normalization matrix. */
-
Channel¶
-
class
ORSModel.ors.Channel¶ Bases:
ORSModel.ors.StructuredGrid- /** interface Channel
- brief A container for channel data.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- sa CxvChannel_Description, CxvChannel_Data_Type
- This is used as a channel data container.
- Channels are used as 4D data containers, that have a depth, a description, a type, and some spacing for representation.
- Depth value is directly related to the channel type.
- To create a channel the XYZT sizes and type must be set before initializing the channel data.
- The channel must be initialized before the data array is set.
*/
Channel.__init__(self, anXML: str) -> None /* brief create a Channel from an xml */
-
addSlice(self, pSliceData: Array) → None¶ /** * brief Adds a slice of data to the channel.
- param - the slice data (an Array), see note below
- 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.
- sa removeSlice()
*/
-
addSuggestedWindowLevelValues(self, pWidth: float, pCenter: float) → None¶ /** * brief Adds a pair of suggested window width and center values (for leveling).
- param - a window width (a double)
- param - a window center (a double)
- note
- The window width should be >= 1.
- note
- The suggested leveling values are only used to present suitable values to end users.
- sa getSuggestedWindowLevelWidthAt(), getSuggestedWIndowLevelCenterAt(), getNumberOfSuggestedWindowLevelValues()
*/
-
applyLevelingTransformationToData(self, minValue: float, maxValue: float) → None¶ /* brief applyLevelingTransformationToData */
-
applyLinearTransformationToData(self, slope: float, offset: float) → None¶ /* brief applyLinearTransformationToData */
-
convertToType(self, datatype: int, bNormalize: bool, iLowNormalizationRange: float, iHighNormalizationRange: float, bFilter: bool, iLowFilterRange: float, iHighFilterRange: float, iReplacementValue: float, outputChannel: "Channel", IProgress: Progress) → "Channel"¶ /** * brief Converts the data type of the receiver.
- param - the target data type (an unsigned short, see note below)
- param - true to normalize the output
- param - lower bound of normalization range (a double)
- param - higher bound of normalization range (a double)
- param - true to filter the output
- param - lower bound of filter range (a double)
- param - higher bound of filter range (a double)
- param - replacement value for the filter (a double)
- param - 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.
- param - a progress object, NULL for no progress (an Progress)
- return - a new converted channel (a Channel)
- note
- The first argument should be one of CxvChannel_Data_Type (see ors_def.h for valid values).
*/
-
copyDICOMAttributesFrom(self, pInputChannel: "Channel", bCopyPrivateAttributes: bool) → None¶ /** * brief Copies the DICOM attributes from another channel.
- param - the source channel (an Channel)
- param - true to copy also private attributes, false to exclude them
- sa setDICOMAttribute(), getDICOMAttribute(), getDICOMAttributeFromSequence()
*/
-
copyDICOMDatasetForSlice(self, pInputChannel: "Channel", iTSource: int, iZSource: int, iTTarget: int, iZTarget: int) → None¶ /** * brief Copies the DICOM attributes of a given slice to another channel.
- param - the destination channel (an Channel)
- param - T source index (an unsigned short)
- param - Z source index (an unsigned short)
- param - T target index (an unsigned short)
- param - Z target index (an unsigned short)
- note
- If any index is invalid no copy occurs.
*/
-
copyDataFromCommonRegionInto(self, pAChannel: "Channel", tOffset: int, nearest: bool, IProgress: Progress) → None¶ /** * brief Copies the data common with another channel into that channel.
- param - the companion channel (an Channel)
- param - the time step to use in the channel (an unsigned short)
- param - true to sample to nearest value, false to sample linearly
- param - a progress object (an 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.
*/
-
copyInto(self, aDestinationChannel: "Channel") → None¶ /** * brief Copies the receiver channel into another channel.
- param - a destination channel (an Channel)
*/
-
copyShapeFromChannelSubset(self, pISourceChannel: "Channel", xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int) → None¶ /** * brief Initializes the channel’s shape based on a subset of another channel.
- param - a source channel (an Channel)
- param - the X lower range (an unsigned short)
- param - the Y lower range (an unsigned short)
- param - the Z lower range (an unsigned short)
- param - the T lower range (an unsigned short)
- param - the X upper range (an unsigned short)
- param - the Y upper range (an unsigned short)
- param - the Z upper range (an unsigned short)
- param - the T upper range (an unsigned short)
- note
- Shape includes size, spacing, type, description, position and location.
- note
- This method does not handle the channel data array.
*/
-
dtype¶
-
emptySuggestedWindowLevelValues(self) → None¶ /** * brief Cleans the suggested window leveling values.
- sa addSuggestedWindowLevelValues(),
*/
-
classmethod
fromNDArray(data, channelGUID='', ZAxis=True, TimeAxis=False) → ORSModel.ors.Channel¶
-
getAllSliceIntersectionLength(self, arrayOfIntersectionLengthPerSlice: float, timeStep: int) → float¶ /* brief getAllSliceIntersectionLength */
-
getAllSlicesHaveSameOrientation(self, pTIndex: int) → bool¶ /** * brief Verifies if the channel is consistent in its slice orientations.
- return - true if all slices have identical orientations, false otherwise
- 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.
- sa setIsData3D(), getOrientationComparisonEpsilon()
*/
-
getAllSlicesHaveSameSize(self) → bool¶ /** * brief Verifies if the channel has uniform slice sizes.
- return - true if all slices have the same width and height, false otherwise
- note
- Normally all slices have the same sizes, but the channel can support having slices of different sizes.
- sa getSliceSize(), setSliceSize()
*/
-
getAreAllZSlicesDataAvailable(self) → bool¶ /** * brief Gets the availability of all the Z slices’ data.
- return - true if all the Z slices’ data is available, false otherwise
- 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().
- sa getIsZSliceDataAvailable()
*/
-
getAsAbsoluteDifferenceChannel(self, pCompareChannel: "Channel", pOutputChannel: "Channel", IProgress: Progress) → None¶ /** * brief Gets a channel of the same type as the receiver containing the absolute difference between the two.
- param - the channel to compare with (an Channel)
- param - the output channel (an Channel)
- param - a progress object (an Progress)
- note
- The provided channel serves as the reference grid and the receiver is linearly interpolated.
*/
-
getAsChannelClosedWithKernel(self, pKernel: ConvolutionKernel, IProgress: Progress, pOutChannel: "Channel") → "Channel"¶ /** * brief Creates a new channel wich is the receiver dialted and afterward eroded with the provided kernel
- param - the closing kernel made of 0 or 1 (an ConvolutionKernel)
- param - a progress object (an Progress), or NULL for no progress
- param -the channel to put the result in (can be the receiver) (an Channel)
- return - a result channel (an Channel)
- sa getAsChannelDilatedWithKernel(),getAsChannelErodedWithKernel()
- note
- -If no channel is provided to put the result in, a new channel is created
*/
-
getAsChannelCrossSection(self, path: VisualPath, iTIndex: int, aTransformationMatrix: Matrix4x4, x: int, y: int, pInChannel: "Channel") → "Channel"¶ /** * brief Samples the channel data for a given path.
- param - the path to sample (an VisualPath)
- param - an X size (an unsigned short), see note below
- param - a Y size (an unsigned short), see note below
- param - The T index to be processed (an unsigned short)
- param - an optional output channel (an Channel)
- return - a result channel (an 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.
*/
-
getAsChannelCurved(self, pIInputChannel: "Channel", path: VisualPath, aTransformationMatrix: Matrix4x4, forTimeStep: int, xAxisDirectionX: float, xAxisDirectionY: float, xAxisDirectionZ: float, xSize: int, ySize: int, xSpacing: float, bestYSizeAndSpacing: bool, bNearest: bool) → "Channel"¶ /* brief method getAsChannelCurved */
-
getAsChannelCurvedProjected(self, pIInputChannel: "Channel", path: VisualPath, aTransformationMatrix: Matrix4x4, forTimeStep: int, upVect: Vector3, rightVect: Vector3, xSize: int, ySize: int, optimalXSizeAndSpacing: bool, optimalYSizeAndSpacing: bool, zSliceTickness: float, minProjection: bool, maxProjection: bool, averageProjection: bool, stretch: bool, bNearest: bool) → "Channel"¶ /* brief getAsChannelCurvedProjected */
-
getAsChannelCurvedProjectedRotational(self, pIInputChannel: "Channel", path: VisualPath, aTransformationMatrix: Matrix4x4, forTimeStep: int, upVect: Vector3, rightVect: Vector3, xSize: int, numberOfStep: int, bNearest: bool, IProgress: Progress) → "Channel"¶ /* brief getAsChannelCurvedProjectedRotational */
-
getAsChannelCurvedRotational(self, pIInputChannel: "Channel", path: VisualPath, aTransformationMatrix: Matrix4x4, forTimeStep: int, normalX: float, normalY: float, normalZ: float, downX: float, downY: float, downZ: float, xSize: int, ySize: int, numberOfStep: int, xSpacing: float, bestYSizeAndSpacing: bool) → "Channel"¶ /* brief method getAsChannelCurvedRotational */
-
getAsChannelCutAlongZWithNormal(self, normal: Vector3, timeStep: int, outXSizeInworld: float, nearest: bool, inputChannel: "Channel") → "Channel"¶ /* brief method getAsChannelCutAlongZWithNormal */
-
getAsChannelCutAlongZWithNormalCurved(self, InputPath: VisualPath, aTransformationMatrix: Matrix4x4, normal: Vector3, timeStep: int, outXSizeInworld: float, nearest: bool, inputChannel: "Channel") → "Channel"¶ /* brief method getAsChannelCutAlongZWithNormalCurved */
-
getAsChannelDilatedWithKernel(self, pKernel: ConvolutionKernel, IProgress: Progress, pOutChannel: "Channel") → "Channel"¶ /** * brief Creates a new channel wich is the receiver dilated with the provided kernel
- param - the dilatation kernel made of 0 or 1 (an ConvolutionKernel)
- param - a progress object (an Progress), or NULL for no progress
- param -the channel to put the result in (can be the receiver) (an Channel)
- return - a result channel (an Channel)
- note
- the simple tone of grey dilatation is a convolution operation selecting the maximum value in the kernel
- note
- -If no channel is provided to put the result in, a new channel is created
*/
-
getAsChannelDilatedWithKernelInRange(self, pKernel: ConvolutionKernel, zmin: int, zmax: int, zOffsetInputToOutput: int, IProgress: Progress, pOutChannel: "Channel") → "Channel"¶ /** * brief Computes the dilation of the input channel in a range of slices
- param - the dilatation kernel made of 0 or 1 (an ConvolutionKernel)
- param - the index of the first slice to compute the dilation on
- param - the index of the last slice to compute the dilation on
- param - 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)
- param - a progress object (an Progress), or NULL for no progress
- param - the channel to put the result in (cannot be the receiver) (an Channel)
- return - a result channel (an Channel)
- sa getAsChannelDilatedWithKernel()
- 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.
*/
-
getAsChannelEmptyCrossSection(self, path: VisualPath, aTransformationMatrix: Matrix4x4, x: int, y: int, z: int, timeStep: int, pInChannel: "Channel") → "Channel"¶ /** * brief Samples the channel data for a given path.
- param - the path to sample (an VisualPath)
- param - an X size (an int), see note below
- param - a Y size (an int), see note below
- param - true to have the channel contain the voxel indicies, false to contain the voxel themselves
- param - an optional output channel (an Channel)
- return - a result channel (an 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.
*/
-
getAsChannelErodedWithKernel(self, pKernel: ConvolutionKernel, IProgress: Progress, pOutChannel: "Channel") → "Channel"¶ /** * brief Creates a new channel wich is the receiver eroded with the provided kernel
- param - the erosion kernel made of 0 or 1 (an ConvolutionKernel)
- param - a progress object (an Progress), or NULL for no progress
- param -the channel to put the result in (can be the receiver) (an Channel)
- return - a result channel (an Channel)
- note
- the simple tone of grey erosion is a convolution operation selecting the minimum value in the kernel
- note
- -If no channel is provided to put the result in, a new channel is created
*/
-
getAsChannelErodedWithKernelInRange(self, pKernel: ConvolutionKernel, zmin: int, zmax: int, zOffsetInputToOutput: int, IProgress: Progress, pOutChannel: "Channel") → "Channel"¶ /** * brief Computes the erosion of the input channel in a range of slices
- param - the erosion kernel made of 0 or 1 (an ConvolutionKernel)
- param - the index of the first slice to compute the erosion on
- param - the index of the last slice to compute the erosion on
- param - 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)
- param - a progress object (an Progress), or NULL for no progress
- param - the channel to put the result in (cannot be the receiver) (an Channel)
- return - a result channel (an Channel)
- sa getAsChannelErodedWithKernel()
- 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.
*/
-
getAsChannelFromMean(self, pBoxSize: int, pOutChannel: "Channel") → "Channel"¶ /** * brief Finds the mean in a box surrounding each voxel and writes it to the channel.
- param - the box size (an unsigned short)
- param - an optional output channel (an ORSChannelPtr)
- return - the result channel (an ORSChannelPtr)
- 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.
*/
-
getAsChannelFromROI(self, pInputROI: ROI, pOutChannel: "Channel") → "Channel"¶ /** * brief Creates a new channel from a given Region of Interest.
- param - a region of interest (an ROI)
- param[out] - an optional output channel (an Channel)
- return - a result channel (an 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.
*/
-
getAsChannelGaussianSmoothed(self, kernelSize: int, pOutChannel: "Channel") → "Channel"¶ /** * brief Applies a 2 sigma gaussian convolution. * param - the kernel size (an unsigned char, should be an odd number) * param - an optional output channel (an ORSChannelPtr) * return - the resulting channel (an ORSChannelPtr) * note * - If a channel is supplied as the last argument, the results are written to it, * otherwise a new channel is created. */
-
getAsChannelObliqueAverageFromRectangleBetweenPlanes(self, pIInputChannel: "Channel", forTimeStep: int, aBoundedPlane: Rectangle, startPlane: Plane, endPlane: Plane, xSize: int, ySize: int, nbZSlice: int, zSliceThickness: float, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, nearest: bool, IProgress: Progress) → "Channel"¶ /* brief method getAsChannelObliqueAverageFromRectangleBetweenPlanes */
-
getAsChannelObliqueFromRectangleBetweenPlanes(self, pIInputChannel: "Channel", forTimeStep: int, aBoundedPlane: Rectangle, startPlane: Plane, endPlane: Plane, xSize: int, ySize: int, nbZSlice: int, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, nearest: bool, IProgress: Progress) → "Channel"¶ /* brief method getAsChannelObliqueFromRectangleBetweenPlanes */
-
getAsChannelObliqueMaxIntensityProjectionFromRectangleBetweenPlanes(self, pIInputChannel: "Channel", forTimeStep: int, aBoundedPlane: Rectangle, startPlane: Plane, endPlane: Plane, xSize: int, ySize: int, nbZSlice: int, zSliceThickness: float, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, nearest: bool, IProgress: Progress) → "Channel"¶ /* brief method getAsChannelObliqueMaxIntensityProjectionFromRectangleBetweenPlanes */
-
getAsChannelObliqueMinIntensityProjectionFromRectangleBetweenPlanes(self, pIInputChannel: "Channel", forTimeStep: int, aBoundedPlane: Rectangle, startPlane: Plane, endPlane: Plane, xSize: int, ySize: int, nbZSlice: int, zSliceThickness: float, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, nearest: bool, IProgress: Progress) → "Channel"¶ /* brief method getAsChannelObliqueMinIntensityProjectionFromRectangleBetweenPlanes */
-
getAsChannelOpenWithKernel(self, pKernel: ConvolutionKernel, IProgress: Progress, pOutChannel: "Channel") → "Channel"¶ /** * brief Creates a new channel wich is the receiver eroded and afterward dialted with the provided kernel
- param - the opening kernel made of 0 or 1 (an ConvolutionKernel)
- param - a progress object (an Progress), or NULL for no progress
- param -the channel to put the result in (can be the receiver) (an Channel)
- return - a result channel (an Channel)
- sa getAsChannelDilatedWithKernel(),getAsChannelErodedWithKernel()
- note
- -If no channel is provided to put the result in, a new channel is created
*/
-
getAsChannelPadded(self, xPadd: int, yPadd: int, zPadd: int, pValue: float, pOutChannel: "Channel") → "Channel"¶ /** * brief Pads the channel with a normalized value. * param - the X padding in pixels (an unsigned short, see note below) * param - the Y padding in pixels (an unsigned short, see note below) * param - the Z padding in pixels (an unsigned short, see note below) * param - the padding value, normalized (a double) * param - an optional output channel (an ORSChannelPtr) * return - the resulting channel (an ORSChannelPtr) * 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. */
-
getAsChannelSampled(self, samplingMethod: int, newXSize: int, newYSize: int, newZSize: int, IProgress: Progress, pOutChannel: "Channel") → "Channel"¶ /** * brief Samples the channel according to a sampling method.
- param - a CxvSamplingMethod (an unsigned short)
- param - the new X size (an unsigned short)
- param - the new Y size (an unsigned short)
- param - the new Z size (an unsigned short)
- param - progress object (NULL for no progress bar)
- param - a target channel (an Channel)
- return - the resulting channel (an 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.
- sa getAsChannelSampledInterpolatedFromPlane(), getAsChannelCrossSection()
*/
-
getAsChannelSampledConverted(self, samplingMethod: int, newXSize: int, newYSize: int, newZSize: int, datatype: int, bNormalize: bool, iLowNormalizationRange: float, iHighNormalizationRange: float, IProgress: Progress, pOutChannel: "Channel") → "Channel"¶ /** * brief Samples the channel according to a sampling method, and converts its type.
- param - a CxvSamplingMethod (an unsigned char)
- param - the new X size (an unsigned short)
- param - the new Y size (an unsigned short)
- param - the new Z size (an unsigned short)
- param - the target data type (an unsigned char, see note below)
- param - true to normalize the output
- param - lower bound of normalization range (a double)
- param - higher bound of normalization range (a double)
- param - progress object (NULL for no progress bar)
- param - a target channel (an Channel)
- return - the resulting channel (an 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.
- sa getAsChannelSampledInterpolatedFromPlane(), getAsChannelCrossSection()
*/
-
getAsChannelSampledInterpolatedFromPlane(self, a: float, b: float, c: float, d: float, upX: float, upY: float, upZ: float, timeStep: int, pInChannel: "Channel") → "Channel"¶ /** * brief Samples the channel data for a given plane, interpolating the voxels.
- param - The bounded plane
- param - true to have the channel contain the voxel indicies, false to contain the voxel themselves
- param - an optional output channel (an Channel)
- return - a result channel (an Channel)
- 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.
- sa getAsChannelCrossSection(), getAsChannelSampledInterpolatedFromPlane()
*/
-
getAsChannelSampledInterpolatedFromPlane2(self, aBoundedPlane: Rectangle, nearest: bool, timeStep: int, pInChannel: "Channel") → "Channel"¶ /** * brief Samples the channel data for a given plane, interpolating the voxels.
- param - The bounded plane
- param - true to have the channel contain the voxel indicies, false to contain the voxel themselves
- param - an optional output channel (an Channel)
- return - a result channel (an Channel)
- 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.
- sa getAsChannelCrossSection(), getAsChannelSampledInterpolatedFromPlane()
*/
-
getAsChannelWithEqualizedHistogram(self, anHistogram: HistogramData, normalizeData: bool, zmin: int, zmax: int, zOffsetInputToOutput: int, pIOutputChannel: "Channel") → "Channel"¶ /** * brief Creates a new channel with the data of the receiver transformed to equalize its histogram.
- param - histogram to be used for the equalization (OPTIONAL)
- param - 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])
- param - the channel to be filled with the result (can be the receiver ) (an Channel)
- return - a result channel (an Channel)
- note
- algorithm to be descibed later
*/
-
getAsChannelWithinRange(self, minValue: float, maxValue: float, lowerReplacementValue: float, upReplacementValue: float, pIInputChannel: "Channel") → "Channel"¶ /** * brief Creates a new channel within a given range.
- param - the lower boundary of the range (a double)
- param - the upper boundary of the range (a double)
- param - the lower replacement value (a double, see note)
- param - the upper replacement value (a double, see note)
- param[out] - an optional output channel (an Channel)
- return - a result channel (an 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.
*/
-
getAsMarchingCubeMesh(self, isovalue: float, bSnapToContour: bool, flipNormal: bool, timeStep: int, xSample: int, ySample: int, zSample: int, pNearest: bool, pWorld: bool, pProgress: Progress, pMesh: Mesh) → Mesh¶ /** * brief Creates a marching cube from the channel.
- param - an isovalue (a double)
- param - true to snap vertices to contour, false to interpolate
- param - true flips normals, false doesn’t
- param - the time step to use in the channel (an unsigned short)
- param - the X sampling (an unsigned short, 1 means no sampling)
- param - the Y sampling (an unsigned short, 1 means no sampling)
- param - the Z sampling (an unsigned short, 1 means no sampling)
- param - true to sample to nearest value, false to sample linearly (if sampling is 1 this flag is ignored)
- param - true to have the resulting mesh in world coordinates, false in local
- param - a progress object (an ORSProgressPtr) to show a progress bar, NULL doesn’t show one
- param[out] - an optional output mesh model (an ORSMeshPtr)
- return - the resulting mesh model (an ORSMeshPtr)
- 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.
*/
-
getAsMultiROIInArea(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, IProgress: Progress, pInputMultiROI: MultiROI) → MultiROI¶ /** * brief Creates a labeled region of interest (MultiROI) from a specified channel area, within supplied ranges.
- param - an X minimum coordinate, in pixel size (an unsigned short)
- param - a Y minimum coordinate, in pixel size (an unsigned short)
- param - a Z minimum coordinate, in pixel size (an unsigned short)
- param - an X maximum coordinate, in pixel size (an unsigned short)
- param - a Y maximum coordinate, in pixel size (an unsigned short)
- param - a Z maximum coordinate, in pixel size (an unsigned short)
- param - a progress object (an Progress) or NULL for no progress
- param - a target ROI (an ROI)
- return - the resulting ROI (an ROI)
- 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.
- sa unsigned short()
*/
-
getAsROIWithinRange(self, minValue: float, maxValue: float, IProgress: Progress, pInputROI: ROI) → ROI¶ /** * brief Creates a region of interest (ROI) from all the channel data within a given range.
- param - the lower range, a normalized value (a double)
- param - the upper range, a normalized value (a double)
- param - a progress object (an Progress) or NULL for no progress
- param - a target ROI (an ROI)
- return - the resulting ROI (an 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.
- sa getAsROIWithinRangeInArea()
*/
-
getAsROIWithinRangeInArea(self, minValue: float, maxValue: float, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, IProgress: Progress, pOutputROI: ROI) → ROI¶ /** * brief Creates a region of interest (ROI) from a specified channel area, within a range.
- param - the lower range, a normalized value (a double)
- param - the upper range, a normalized value (a double)
- param - an X minimum coordinate, in pixel size (an unsigned short)
- param - a Y minimum coordinate, in pixel size (an unsigned short)
- param - a Z minimum coordinate, in pixel size (an unsigned short)
- param - an X maximum coordinate, in pixel size (an unsigned short)
- param - a Y maximum coordinate, in pixel size (an unsigned short)
- param - a Z maximum coordinate, in pixel size (an unsigned short)
- param - a progress object (an Progress) or NULL for no progress
- param - a target ROI (an ROI)
- return - the resulting ROI (an 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.
- sa getAsROIWithinRange()
*/
-
getAsROIWithinRanges(self, rangeDuplets: float, nbRangeDuplets: int, IProgress: Progress, pInputROI: ROI) → ROI¶ /** * brief Creates a region of interest (ROI) from all the channel data within the given ranges.
- param - the pairs of ranges (a double*)
- param - number of pairs (an unsigned short), so rangeDuplet size should be nbRangeDuplet*2
- param - a target ROI (an ROI)
- param - a progress object (an Progress) or NULL for no progress
- return - the resulting ROI (an 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.
- sa getAsROIWithinRangesInArea()
*/
-
getAsROIWithinRangesInArea(self, rangeDuplet: float, nbRangeDuplet: int, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, IProgress: Progress, pInputROI: ROI) → ROI¶ /** * brief Creates a region of interest (ROI) from a specified channel area, within supplied ranges.
- param - the pairs of ranges (a double*)
- param - number of pairs (an unsigned short), so rangeDuplet size should be nbRangeDuplet*2
- param - an X minimum coordinate, in pixel size (an unsigned short)
- param - a Y minimum coordinate, in pixel size (an unsigned short)
- param - a Z minimum coordinate, in pixel size (an unsigned short)
- param - an X maximum coordinate, in pixel size (an unsigned short)
- param - a Y maximum coordinate, in pixel size (an unsigned short)
- param - a Z maximum coordinate, in pixel size (an unsigned short)
- param - a progress object (an Progress) or NULL for no progress
- param - a target ROI (an ROI)
- return - the resulting ROI (an 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.
- sa unsigned short()
*/
-
getBitCount(self) → int¶ /** * brief Gets the number of bits used to represent one pixel.
- return - the bit count (an unsigned char)
- note
- It can be 8, 16 or 32.
- sa getDataType(), setDataType()
*/
-
getChannelLocalMaxAsROI(self, pKernel: ConvolutionKernel, fMinValue: float, fMaxValue: float, pOutROI: ROI) → ROI¶ /** * brief Find the local maximum of a dataset and returns it into a volumeROI. * param - a minimum thresholdValue under which the localMax found are ignored (double) * param - a maximum thresholdValue over which the localMax found are ignored (double) * param - an output ROI */
-
getChannelLocalMinAsROI(self, pKernel: ConvolutionKernel, fMinValue: float, fMaxValue: float, pOutROI: ROI) → ROI¶ /** * brief Find the local minimum of a dataset and returns it into a volumeROI. * param - a minimum thresholdValue under which the localMin found are ignored (double) * param - a maximum thresholdValue over which the localMin found are ignored (double) * param - an output ROI */
-
getClassicalStandardDeviation(self) → float¶ /** * brief Computes the standard deviation.
- return - 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¶ /* brief Retrieves a string DICOM attribute. */
-
getDICOMAttributeAsDouble(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → float¶ /* brief method getAsChannelMedianWith3DKernel //* * brief Retrieves a DICOM attribute as a double.
- param - the T index (an unsigned short)
- param - the slice index (an unsigned short)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to search sequences, false otherwise
- return - the value (a double)
- note
- Applicable to the following VRs: DS, FD.
- note
- To distinguish between a return value of 0 because the attribute is absent, check for the presence of the attribute with
- hasDICOMAttribute().
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
getDICOMAttributeAsFloat(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → float¶ /** * brief Retrieves a DICOM attribute as a float.
- param - the T index (an unsigned short)
- param - the slice index (an unsigned short)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to search sequences, false otherwise
- return - the value (a float)
- note
- Applicable to the following VRs: FL, OF.
- note
- To distinguish between a return value of 0 because the attribute is absent, check for the presence of the attribute with
- hasDICOMAttribute().
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
getDICOMAttributeAsInt(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → int¶ /** * brief Retrieves a DICOM attribute as a signed 32 bit number.
- param - the T index (an unsigned short)
- param - the slice index (an unsigned short)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to search sequences, false otherwise
- return - the value (an 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().
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
getDICOMAttributeAsShort(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → int¶ /** * brief Retrieves a DICOM attribute as a signed 16 bit number.
- param - the T index (an unsigned short)
- param - the slice index (an unsigned short)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to search sequences, false otherwise
- return - the value (a short)
- 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().
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
getDICOMAttributeAsUnsignedChar(self, iTIndex: int, iZIndex: int, pGroup: int, pElement: int, iIndex: int, bSearchSubs: bool) → int¶ /** * brief Retrieves a DICOM attribute as an unsigned 8 bit number.
- param - the T index (an unsigned short)
- param - the slice index (an unsigned short)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to search sequences, false otherwise
- return - the value (an unsigned char)
- note
- Applicable to the following VRs: OB.
- note
- To distinguish between a return value of 0 because the attribute is absent, check for the presence of the attribute with
- hasDICOMAttribute().
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
getDICOMAttributeAsUnsignedInt(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → int¶ /** * brief Retrieves a DICOM attribute as an unsigned 32 bit number.
- param - the T index (an unsigned short)
- param - the slice index (an unsigned short)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to search sequences, false otherwise
- return - the value (an unsigned 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.
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
getDICOMAttributeAsUnsignedShort(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bSearchSubs: bool) → int¶ /** * brief Retrieves a DICOM attribute as an unsigned 16 bit number.
- param - the T index (an unsigned short)
- param - the slice index (an unsigned short)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to search sequences, false otherwise
- return - the value (an unsigned short)
- 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().
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes(), hasDICOMAttribute()
*/
-
getDICOMAttributeFromSequence(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iItemNo: int, iElementGroup: int, iElementElement: int) → str¶ /* brief Retrieves a DICOM attribute from a given sequence. */
-
getDataDescription(self) → int¶ /** * brief Gets the channel description.
- return - a description index (a long)
- note
- enum CxvChannel_Description (in ORS_def.h) is used to categorize channels.
- sa CxvChannel_Description, setDataDescription()
*/
-
getDataRange(self) → float¶ /** * brief Gets the size of the spread of data.
- return - a value (a double)
- 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).
- sa setDataRange()
*/
-
getDataType(self) → int¶ /** * brief Gets the channel data type.
- param - a type (a long)
- note
- See CxvChannel_Data_Type (in ORS_def.h) for supported types.
- sa CxvChannel_Data_Type, setDataType(), getBitCount(), getTypeDescription()
*/
-
getHasDICOMAttributes(self) → bool¶ /** * brief Checks to see if the channel has DICOM attributes.
- return - true if DICOM attributes exist, false otherwise
*/
-
getHasOverlayData(self, iTIndex: int, iZIndex: int) → bool¶ /** * brief Checks to see if overlay data exists at a given Z slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- return - true if overlay data exists, false otherwise
- note
- An overlay is a bitmask that results in an image superimposed over the original channel data. Overlay data is expressed in bits, where 1s
- indicate that the pixel is to be “lit” up.
*/
-
getHasSliceOrientationAndPosition(self) → bool¶ /** * brief Queries the channel to know if it has slice orientation and position.
- return - true if it does, false otherwise
- 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.
*/
-
getInterpolatedLineSegment(self, pLineSegment: LineSegment, nTIndex: int, fSpacing: float, nInterpolationMethod: int, values: Array) → Array¶ /* brief method getInterpolatedLineSegment */
-
getInterpolatedPositionOnSlice(self, pTIndex: int, pZSlice: float, xPos: float, yPos: float) → Vector3¶ /** * brief Gets the interpolated position of a point on a given slice.
- param - the T index (an unsigned short)
- param - the Z slice index (a double)
- param - the X voxel position (a double)
- param - the Y voxel position (a double)
- return - a vector (a Vector3)
- note
- The X and Y positions can be outside the channel.
- sa setChannelOrientation(), getChannelOrientation(), setSliceOrientation(), setSlicePosition(), getSlicePosition()
*/
-
getInterpolatedValuesAtPositions(self, aWorldCoordinate: ArrayDouble, tIndex: int, nInterpolationMethod: int, values: Array) → Array¶ /* brief method getInterpolatedValuesAtPositions */
-
getInterpolatedValuesAtPositionsConvertedToPhysicalUnits(self, aWorldCoordinate: ArrayDouble, tIndex: int, nInterpolationMethod: int, values: ArrayDouble) → ArrayDouble¶ /* brief method getInterpolatedValuesAtPositionsConvertedToPhysicalUnits */
-
getIsClipped(timestep=0, display=None)¶ Gets to know if the clip box of the channel is active
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¶ /** * brief Verifies if the channel holds 3D data or not.
- return - true if data is 3D, false otherwise
- 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.
- sa setIsData3D()
*/
-
getIsDataInitialized(self) → bool¶ /** * brief Checks if the internal data is initialized.
- return - true if initialized correctly, false otherwise
- note
- The channel must be initialized before you start using the channel.
- sa initializeData()
*/
-
getIsLossy(self) → bool¶ /** * brief Verifies if the channel is lossy or not.
- return - true if data is lossy, false otherwise
- note
- A channel can be lossy for two different reasons:
- the data was lossy jpeg compressed
- some slices were interpolated because of missing data
- sa setIsLossy()
*/
-
getIsMarkedSlice(self, pTIndex: int, pZSlice: int) → bool¶ /** * brief Checks to see if a slice is marked or not.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- return - true if the slice’s marker is on, false otherwise
*/
-
getIsZSliceDataAvailable(self, pTIndex: int, pZSlice: int) → bool¶ /** * brief Gets the availability of a Z slice’s data.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- return - true if the Z slice’s data is available, false otherwise
- 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().
- sa getAreAllZSlicesDataAvailable(), setIsZSliceDataAvailable()
*/
-
getLabelization(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, iTIndex: int, min: float, max: float, considerDiagonal: bool, IProgress: Progress, pInVolumeROI: ROI, pOutData: MultiROI) → MultiROI¶ /** * brief Labels the channel data.
- param - the minimum X range (an unsigned short)
- param - the minimum Y range (an unsigned short)
- param - the minimum Z range (an unsigned short)
- param - the maximum X range (an unsigned short)
- param - the maximum Y range (an unsigned short)
- param - the maximum Z range (an unsigned short)
- param - the T index (an unsigned short)
- param - the minimum data range (a double)
- param - the maximum data range (a double)
- param - true to consider diagonals, false otherwise
- param - a progress object (an Progress), or NULL for no progress
- param - an optional input mask (an ROI)
- param - an optional output object (an MultiROI)
- return - the resulting object (an MultiROI)
- note
- This method labels areas of the channel by finding adjacent voxels and
- labelling them with sequential numbering.
- note
- If a multi ROI object is supplied as the last argument, the results are written to it,
- otherwise a new one is created.
*/
-
getLineBoundedDoublePlane(self, pT: int, iZSlice: int, iYLine: int) → Rectangle¶ /* brief getLineBoundedDoublePlane */
-
getMarkedSlicesCount(self) → int¶ /** * brief Gets the count of marked slices.
- param - the count of marked slices (an unsigned int)
- note
- Gets the total marked slices count, across all T dimensions.
*/
-
getMaximumValue(self) → float¶ /** * brief Gets the maximum value found in the data array, always returned as a double.
- return - the maximum value (a double)
- note
- Min, max and mean are kept statically and are recomputed when the channel data changes.
- sa getMinimumValue() ,getMeanValue()
*/
-
getMeanValue(self) → float¶ /** * brief Gets the mean value computed with the data array, always returned as a double.
- return - the mean value (a double)
- note
- Min, Max and Mean are kept statically and are recomputed when the channel data changes.
- sa getMinimumValue(), getMaximumValue()
*/
-
getMinMaxSubsetAsVector(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int) → Vector3¶ /* brief getMinMaxSubsetAsVector */
-
getMinimumValue(self) → float¶ /** * brief Gets the minimum value found in the channel, always returned as a double.
- return - the minimum value (a double)
- note
- Min, max and mean are kept statically and are recomputed when the channel data changes.
- sa getMaximumValue() ,getMeanValue()
*/
-
getNDArray(timestep=0)¶
-
getNormalizedMaxPossibleValue(self) → float¶ /** * brief Gets the normalized maximum possible value, according to the channel’s data type.
- return - max value (a double)
*/
-
getNormalizedMinPossibleValue(self) → float¶ /* brief method getKernelEvaluationAtIndex //* * brief Gets the normalized minimum possible value, according to the channel’s data type.
- return - min value (a double)
*/
-
getNormalizedValueAt(self, x: int, y: int, z: int, t: int) → float¶ /** * brief Gets the normalized data value at the specified coordinate.
- param - X coordinate (an unsigned short)
- param - Y coordinate (an unsigned short)
- param - Z coordinate (an unsigned short)
- param - T coordinate (an unsigned short)
- return - value (a double)
- 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.
*/
-
getNumberOfSuggestedWindowLevelValues(self) → int¶ /** * brief Returns the number of known pairs of suggested window width and center values (for leveling).
- return - the number of pairs (an unsigned char)
- sa addSuggestedWindowLevelValues(), getSuggestedWindowLevelWidthAt(), getSuggestedWindowLevelCenterAt()
*/
-
getOffset(self) → float¶ /** * brief Gets the channel offset.
- return - the offset (a double)
- sa setOffset(), setSlope(), getSlope()
*/
-
getOrientationComparisonPrecision(self) → float¶ /** * brief Gets the channel’s orientation comparison precision.
- return - a double (see note)
- 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.
- sa getAllSlicesHaveSameOrientation()
*/
-
getOverlayData(self, iTIndex: int, iZIndex: int, pStartRow: int, pStartCol: int, pOverlayRows: int, pOverlayCols: int) → ArrayUnsignedChar¶ /** * brief Gets the overlay data for a given Z slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param[out] - the starting row of the overlay data (a short, see note)
- param[out] - the starting column of the overlay data (a short, see note)
- param[out] - the number of rows of overlay data (a short)
- param[out] - the number of colums of overlay data (a short)
- return - the overlay data (an ArrayUnsignedChar)
- note
- An overlay is a bitmask that results in an image superimposed over the original channel data. Overlay data is expressed in bits, where 1s
- indicate that the pixel is to be “lit” up.
- note
- The starting row and column indicate where the overlay data begins in relation to the channel data. 0/0 mean that the overlay data
- begins at the starting row and column of the channel data. Both positive and negative values are supported. If negative values are given,
- portions of the overlay data that fall “out” of the channel’s range will be disregarded.
*/
-
getPhysicalMax(self) → float¶ /** * brief Gets the maximum value found in the data array, always returned as a float.
- return - the maximum value (a float)
- note
- Min and max are kept statically and are recomputed when the channel data changes.
- note
- The return value is not normalized, but it is always typecast to a float.
- sa getPhysicalMin()
*/
-
getPhysicalMin(self) → float¶ /** * brief Gets the minimum value found in the data array, always returned as a float.
- return - the minimum value (a float)
- note
- Min and max are kept statically and are recomputed when the channel data changes.
- note
- The return value is not normalized, but it is always typecast to a float.
- sa getPhysicalMax()
*/
-
getPositionOnLine(self, pT: int, iZSlice: int, iYLine: int, xIndex: float) → Vector3¶ /* brief method getPositionOnLine */
-
getPositionOnSlice(self, pTIndex: int, pZSlice: int, xPos: int, yPos: int) → Vector3¶ /** * brief Gets the position of a point on a given slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param - the X voxel position (an unsigned short)
- param - the Y voxel position (an unsigned short)
- return - a position (an Vector3)
- note
- The X and Y positions can be outside the channel.
- sa setChannelOrientation(), getChannelOrientation(), setSliceOrientation(), setSlicePosition(), getSlicePosition()
*/
-
getRawDataChunk(self, iLevel1: int, iLevel2: int) → None¶ /** * brief Gets a portion of the channel’s data.
- param - the T index (an unsigned short)
- param - the Z index (an unsigned short)
- return - an array of bytes (unsigned char*)
- 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.
- sa getTotalByteCount()
*/
-
getSampledLine(self, pPoint1: Vector3, pPoint2: Vector3, timeStep: int) → ArrayDouble¶ /** * brief Samples the channel data between two points.
- param - a starting coordinate (an ORSVector3Ptr)
- param - an ending coordinate (an ORSVector3Ptr)
- param - the T index (an unsigned short)
- return - an array of double values (an 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.
*/
-
getSampledLineOfNPoints(self, pPoint1: Vector3, pPoint2: Vector3, timeStep: int, nbOutputPoint: int) → ArrayDouble¶ /** * brief Samples the channel data between two points.
- param - a starting coordinate (an ORSVector3Ptr)
- param - an ending coordinate (an ORSVector3Ptr)
- param - the timestep (an unsigned short)
- param - the number of points required (an int)
- return - an array containing the results (an 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.
*/
-
getSavePixelDataWhileSavingNode(self) → int¶ /** * brief Gets if and how the channel should save its pixel data to XML.
- return - the current save mode (a short between 0 and 2, see below)
- note
- The save mode has these meanings:
- 0 does not save the pixel data (the default),
- 1 saves uncompressed (results in large files)
- 2 saves compressed (results in smaller files, but runs slower)
*/
-
getSliceDirection0Size(self, timeStep: int, sliceIndex: int) → float¶ /* brief getSliceDirection0Size */
-
getSliceDirection0Spacing(self, timeStep: int, sliceIndex: int) → float¶ /* brief getSliceDirection0Spacing */
-
getSliceDirection1Size(self, timeStep: int, sliceIndex: int) → float¶ /* brief getSliceDirection1Size */
-
getSliceDirection1Spacing(self, timeStep: int, sliceIndex: int) → float¶ /* brief getSliceDirection1Spacing */
-
getSliceIntersectionLength(self, timeStep: int, sliceIndex: int) → float¶ /* brief getSliceIntersectionLength */
-
getSliceOrientation(self, pTIndex: int, pZSlice: int, index: int) → float¶ /* brief method getAsChannelMedianWith2DKernel //* * brief Gets the orientation of a given slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param - an index (from 0 to 9)
- return - the orientation value (a double)
- note
- First three indicies indicate X orientation, next three indicate Y orientation and last three are for Z.
- sa setChannelOrientation(), getChannelOrientation(), setSliceOrientation(), setSlicePosition(), getSlicePosition()
*/
-
getSlicePosition(self, pTIndex: int, pZSlice: int) → Vector3¶ /** * brief Gets the position of a given slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- return - the position (an Vector3)
- sa setPosition(), getPosition(), setSlicePosition(), setSliceOrientation(), getSliceOrientation()
*/
-
getSliceSize(self, pTIndex: int, pZSlice: int, iXSize: int, iYSize: int) → None¶ /** * brief Gets the size of a given slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param[out] - slice X size (an unsigned short)
- param[out] - slice Y size (an unsigned short)
- note
- Normally all slices have the same sizes, but the channel can support having slices of different sizes. In that case,
- size the channel to the largest slice, and size each slice individually.
*/
-
getSlope(self) → float¶ /** * brief Gets the channel slope.
- return - the slope (a double)
- sa setOffset(), setSlope(), getOffset()
*/
-
getSpacingXValidity(self) → bool¶ /** * brief Checks if X spacing is valid.
- return - true if X spacing is valid, false otherwise
*/
-
getSpacingYValidity(self) → bool¶ /** * brief Checks if Y spacing is valid.
- return - true if Y spacing is valid, false otherwise
*/
-
getSpacingZValidity(self) → bool¶ /** * brief Checks if Z spacing is valid.
- return - true if Z spacing is valid, false otherwise
*/
-
getSuggestedWindowLevelCenterAt(self, pIndex: int) → float¶ /** * brief Gets the Nth suggested window venter value (for leveling).
- param - the index (an unsigned short)
- return - the window center (a double)
- note
- The suggested leveling values are only used to present suitable values to end users.
- sa getSuggestedWIndowLevelCenterAt(), getNumberOfSuggestedWindowLevelValues()
*/
-
getSuggestedWindowLevelWidthAt(self, pIndex: int) → float¶ /** * brief Gets the Nth suggested window width value (for leveling).
- param - the index (an unsigned char)
- return - the window width (a double)
- note
- The suggested leveling values are only used to present suitable values to end users.
- sa getSuggestedWIndowLevelCenterAt(), getNumberOfSuggestedWindowLevelValues()
*/
-
getTRawDataChunk(self, iLevel1: int) → int¶ /** * brief Gets a T portion of the channel’s data.
- param - the T index (an unsigned short)
- return - an array of array of bytes (unsigned char**)
- 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.
- sa getTotalByteCount()
*/
-
getTimeFrame(self, pTimeStep: int, pYear: int, pMonth: int, pDay: int, pHour: int, pMinutes: int, pSeconds: int, pMicroSeconds: int) → None¶ /** * brief Gets the value of a time frame.
- param - the T index (an unsigned short)
- param[out] - the year (an unsigned short*)
- param[out] - the month (an unsigned short*)
- param[out] - the day (an unsigned short*)
- param[out] - the hour (an unsigned short*)
- param[out] - the minutes (an unsigned short*)
- param[out] - the seconds (an unsigned short*)
- param[out] - the microseconds (an unsigned 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.
*/
-
getTotalByteCount(self) → int¶ /** * brief Gets the total number of bytes in the internal data.
- return - number of bytes (a long long)
- note
- The size in bytes is represented by the formula: X size * Y size * Z size * T size * bit depth.
*/
-
getTotalSliceIntersectionLength(self, timeStep: int) → float¶ /* brief getTotalSliceIntersectionLength */
-
getTransformationFromOriginalReferential(self) → Matrix4x4¶ /* brief method getTransformationFromOriginalReferential */
-
getTransformationToGoTo(self, pInChannel: "Channel") → Matrix4x4¶ /* brief method getTransformationToGoTo */
-
getValueAsDoubleAtIndex(self, xIndex: int, yIndex: int, zIndex: int, tIndex: int) → float¶ /* brief method getValueAsDoubleAtIndex */
-
getValueAsDoubleAtWorldCoordinateNearest(self, aWorldCoordinate: Vector3, tIndex: int) → float¶ /* brief method getValueAsDoubleAtWorldCoordinateNearest */
-
getValueConvertedFromPhysicalUnits(self, pInput: float) → float¶ /** * brief Converts a value from physical units to channel units.
- param - the value to convert (a double)
- return - the result (a double)
- note
- Slope and offset are applied to convert to physical units.
- sa getValueConvertedToPhysicalUnits()
*/
-
getValueConvertedToPhysicalUnits(self, pInput: float) → float¶ /** * brief Converts a value from channel units to physical units.
- param - the value to convert (a double)
- return - the result (a double)
- note
- Slope and offset are applied to convert from physical units.
- sa getValueConvertedFromPhysicalUnits()
*/
-
hasDICOMAttribute(self, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, bSearchSubs: bool) → bool¶ /** * brief Verifies the existence of a DICOM attribute. * param - the T index (an unsigned short) * param - the slice index (an unsigned short) * param - the group number (an unsigned short) * param - the element number (an unsigned short) * param - true to search sequences, false otherwise * return - true if item was found, false otherwise * sa getDICOMAttribute(), removeAllPrivateDICOMAttributes() */
-
initializeData(self) → bool¶ /** * brief Initializes the channel’s internal data.
- return - true if initialization was successful, false otherwise
- note
- The memory required by the internal data is represented by the formula: X size * Y size * Z size * T size * bitSize.
- note
- The channel must be initialized before you start using the channel.
- note
- The XYZT sizes, and the data type must be set prior to initializing the channel.
- note
- A false result means that a memory allocation error occurred.
- sa getTotalByteCount(), setXSize(), setYSize(), setZSize(), setTSize()
*/
-
initializeDataForFLOAT(self) → bool¶ /** * brief Initializes the channel data array for 32 bit float data.
- return - true if initialization was successful, false otherwise
- 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.
- sa getTotalByteCount(), setXSize(), setYSize(), setZSize(), setTSize()
*/
-
initializeDataForUCHAR(self) → bool¶ /** * brief Initializes the channel data array for 8 bit unsigned data.
- return - true if initialization was successful, false otherwise
- note
- The size in bytes of the data array is represented by the formula: X * Y * Z * T.
- note
- The channel must be initialized before you set the channel data array.
- note
- The XYZT sizes must be set prior to initializing the channel.
- note
- A false result means that a memory allocation error occurred.
- sa getTotalByteCount(), setXSize(), setYSize(), setZSize(), setTSize()
*/
-
initializeDataForUINT(self) → bool¶ /** * brief Initializes the channel data array for 32 bit unsigned int data.
- return - true if initialization was successful, false otherwise
- 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.
- sa getTotalByteCount(), setXSize(), setYSize(), setZSize(), setTSize()
*/
-
initializeDataForUSHORT(self) → bool¶ /** * brief Initializes the channel data array for 16 bit unsigned integer data.
- return - true if initialization was successful, false otherwise
- 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.
- sa getTotalByteCount(), setXSize(), setYSize(), setZSize(), setTSize()
*/
-
invert(self, invertX: bool, invertY: bool, invertZ: bool, invertData: bool, axisTransformation: int, IProgress: Progress, IOutputChannel: "Channel") → "Channel"¶ /** * brief Inverts the receiver.
- param - true to invert the X axis
- param - true to invert the Y axis
- param - true to invert the Z axis
- param - true to invert the data
- param - an axis transformation code (an unsigned short), between 0 and 5 (see note)
- param - a progress object, NULL for no progress (an Progress)
- param - an optional output channel (an Channel)
- return - the inverted channel (an 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.
*/
-
iterateDICOMAttributes(self, iTIndex: int, iZIndex: int, callbackFunction: int, userdata: int) → None¶ - /**
- brief Iterates through the DICOM attributes, calling a callback function.
- param - the T index (an unsigned short)
- param - the slice index (an unsigned short) * param - a callback function (the address of a ORSCHANNELDICOMATTRIBUTESITERATOR function) * param - any user data to be supplied to the callback function * note * - The callback function is called with the group and element numbers, the attribute as a string, and any user data supplied to this * method. Note that PixelData and OverlayData attributes are excluded from the enumeration. The callback function should return * true to continue iterating, but can return false to interrupt the iterating. */
-
mergeWithBAndProjectInC(self, channelB: "Channel", channelC: "Channel", IProgress: Progress) → None¶ /** * brief Merges the channel with another channel, feeding a third channel.
- param - a source channel (an Channel)
- param - a target channel (an Channel)
- param - a progress object (an Progress)
- note
- Merging respects both channels’ orientation, size, spacing, etc.
*/
-
moveChannelDataInto(self, otherChannel: "Channel") → None¶ /**
- brief move the data from the left channel to the right channel channel
- param - the other channel to move data into
*/
-
moveSlicedata(self, zIndex: int, timeStep: int, xTranslation: int, yTranslation: int) → None¶ /* brief method moveSlicedata */
-
none()¶
-
ones(aShape, dtype=<class 'numpy.uint8'>)¶
-
overwriteRangeWithValue(self, minValue: float, maxValue: float, replacementValue: float) → None¶ /** * brief Overwrites data within a range with a given value.
- param - the minimum range value (a double, see note below), non-inclusive
- param - the maximum range value (a double, see note below), non-inclusive
- param - the replacement value (a double, see note below)
- note
- All three arguments are supplied in double for convenience only, and are converted into the native type of the channel. For each pixel of
- the channel, if its value is > minimum range and < maximum range, then its pixel is replaced with the replacement value.
- sa setAllData()
*/
-
overwriteValueAtIndicies(self, indices: int, indicesSize: int, repValue: float) → None¶ /** * brief Overwrites the channel data at the specified indicies with a supplied (normalized) value.
- param - an array of data indicies (an array of long long)
- param - the array element count (an unsigned long)
- param - the replacement value (a double)
- 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.
*/
-
overwriteValueAtWorldCoordinates(self, positionTriplets: float, nbTriplet: int, tIndex: int, replacementValue: float) → None¶ /** * brief Overwrites the values at positions specified by world triplets and time T.
- param - An array of world coordinates triplets (a double*)
- param - The number of triplets in the above array (an unsigned long)
- param - The T index to be processed (an unsigned short)
- param - The replacement value (a double)
- note
- The replacement value must be supplied in normalized format, no matter the data type of the channel.
- sa overwriteRangeWithValue(), overwriteValueAtIndicies(), overwriteValueWithROI()
*/
-
overwriteValueWithMultiROI(self, aMultiROI: MultiROI, labelOffset: int) → None¶ /** * brief Overwrites the channel data at a given MultiROI. * param - a MultiROI (an MultiROI) * param - the label offset (an unsigned long) * note * - The channel and multiROI doesn’t need to have the same shape * note * - This method overwrites the channel data according to a MultiROI. * note * - The new value needs to be a normalized value, and will be converted to the native channel type. */
-
overwriteValueWithMultiROIConsideringOpacity(self, aMultiROI: MultiROI, labelOffset: int, fHightlightOpacity: float, fHightlightOpacityOutRange: float, fROIOpacity: float, fROIOpacityOutRange: float) → None¶ /** * brief Overwrites the channel data at a given MultiROI. * param - a MultiROI (an MultiROI) * param - the label offset (an unsigned long) * note * - The channel and multiROI doesn’t need to have the same shape * note * - This method overwrites the channel data according to a MultiROI. * note * - The new value needs to be a normalized value, and will be converted to the native channel type. */
-
overwriteValueWithMultiROIOnSubBox(self, aVolumeROI: MultiROI, labelOffset: int, subBox: Box) → None¶ /** * brief Overwrites the channel data at a given MultiROI included in the given box. * param - a MultiROI (an MultiROI) * param - the label offset (an unsigned long) * param - the box (a Box) * note * - The channel and multiROI doesn’t need to have the same shape * note * - The box must have orthonormal base with the channel box. * note * - This method overwrites the channel data according to a MultiROI. * note * - The new value needs to be a normalized value, and will be converted to the native channel type. */
-
overwriteValueWithMultiROIOnSubBoxConsideringOpacity(self, aVolumeROI: MultiROI, labelOffset: int, subBox: Box, fHightlightOpacity: float, fHightlightOpacityOutRange: float, fROIOpacity: float, fROIOpacityOutRange: float) → None¶ /** * brief Overwrites the channel data at a given MultiROI included in the given box. * param - a MultiROI (an MultiROI) * param - the label offset (an unsigned long) * param - the box (a Box) * note * - The channel and multiROI doesn’t need to have the same shape * note * - The box must have orthonormal base with the channel box. * note * - This method overwrites the channel data according to a MultiROI. * note * - The new value needs to be a normalized value, and will be converted to the native channel type. */
-
overwriteValueWithROI(self, aVolumeROI: ROI, pReplacementValue: float) → None¶ /** * brief Overwrites the channel data at a given Region of Interest.
- param - a ROI (an ROI)
- param - the new value (a double)
- note
- The channel and ROI doesn’t need to have the same shape
- note
- This method overwrites the channel data according to a Region of Interest.
- note
- The new value needs to be a normalized value, and will be converted to the native channel type.
*/
-
overwriteValueWithROIOnSubBox(self, aVolumeROI: ROI, pReplacementValue: float, subBox: Box) → None¶ /** * brief Overwrites the channel data at a given Region of Interest included in the given box. * param - a ROI (an ROI) * param - the new value (a double) * param - the box (a Box) * note * - The channel and ROI doesn’t need to have the same shape * note * - The box must have orthonormal base with the channel box. * note * - This method overwrites the channel data according to a Region of Interest. * note * - The new value needs to be a normalized value, and will be converted to the native channel type. */
-
prepareForObliqueExtractionFromRectangleBetweenPlanes(self, aBoundedPlane: Rectangle, startPlane: Plane, endPlane: Plane, xSize: int, ySize: int, nbZSlice: int, fitOnData: bool, uniformSpacing: bool, bOptimalSizeAndSpacingInXY: bool, bOptimalSizeAndSpacingInZ: bool, IOutChannel: "Channel") → "Channel"¶ /* brief method prepareForObliqueExtractionFromRectangleBetweenPlanes */
-
removeAllPrivateDICOMAttributes(self) → None¶ /** * brief Removes all private DICOM attributes.
- sa setDICOMAttribute(), getDICOMAttributeFromSequence()
*/
-
removeSlice(self, pSliceIndex: int) → None¶ /** * brief Removes a slice of data from the channel.
- param - the slice number (an unsigned short, 0 based)
- note
- Note that the same slice index will be removed in all T dimensions of the channel.
- sa addSlice()
*/
-
resize(shape, dtype=<class 'numpy.uint8'>)¶
-
setAllData(self, aValue: float) → None¶ /** * brief Sets the entire channel data to a single value.
- param - the new value (a double)
- note
- The new value needs to be a normalized value, and will be converted to the native channel type.
- sa overwriteRangeWithValue()
*/
-
setAllDataOnSubBox(self, aValue: float, subBox: Box) → None¶ /** * brief Sets the channel data included in a box to a single value. * param - the new value (a double) * param - the subBox (a Box) * 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. * sa overwriteRangeWithValue() */
-
setAllMarkedSlices(self, pValue: bool) → None¶ /** * brief Sets the boolean marker of all slices.
- param - true to set the entire slices’ marker on, false otherwise
- note
- Each slice has a BOOLEAN marker associated to it.
*/
-
setAreAllZSlicesDataAvailable(self, pValue: bool) → None¶ /** * brief Sets the availability of all Z slices’ data.
- param - true to set the entire Z slices’ data as available, false otherwise
- note
- The channel can be set to work in “lazy” mode, where slices are made available as they are read.
- sa setIsZSliceDataAvailable()
*/
-
setDICOMAttribute(self, sValue: str, iTIndex: int, iZIndex: int, pGroup: int, pElement: int, bReplaceExisting: bool) → bool¶ /** * brief Sets a string DICOM attribute.
- param - the string value (a string)
- param - the T index (an int, see note)
- param - the slice index (an int, see note)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - true to replace an existing value, false otherwise
- return - true if successful, false otherwise
- note
- To apply to all slices, set the T and Z index to -1. The T and Z values’ true type is unsigned short.
- 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.
- sa setDICOMAttribute(), getDICOMAttributeFromSequence(), removeAllPrivateDICOMAttributes()
*/
-
setDICOMAttributeDouble(self, iValue: float, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool¶ /** * brief Sets a double DICOM attribute.
- param - the value (a double)
- param - the T index (an int, see note)
- param - the slice index (an int, see note)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to replace an existing value, false otherwise
- return - true if successful, false otherwise
- 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 unsigned short.
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
setDICOMAttributeFloat(self, iValue: float, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool¶ /** * brief Sets a float DICOM attribute.
- param - the value (a float)
- param - the T index (an int, see note)
- param - the slice index (an int, see note)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to replace an existing value, false otherwise
- return - true if successful, false otherwise
- 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 unsigned short.
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
setDICOMAttributeInt(self, iValue: int, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool¶ /** * brief Sets a signed 32 bit DICOM attribute.
- param - the value (an int)
- param - the T index (an int, see note)
- param - the slice index (an int, see note)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to replace an existing value, false otherwise
- return - true if successful, false otherwise
- 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 unsigned short.
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
setDICOMAttributeShort(self, iValue: int, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool¶ /** * brief Sets a signed 16 bit DICOM attribute.
- param - the value (a short)
- param - the T index (an int, see note)
- param - the slice index (an int, see note)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to replace an existing value, false otherwise
- return - true if successful, false otherwise
- 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 unsigned short.
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
setDICOMAttributeUnsignedChar(self, iValue: int, iTIndex: int, iZIndex: int, pGroup: int, pElement: int, iIndex: int, bReplaceExisting: bool) → bool¶ /** * brief Sets an unsigned 8 bit DICOM attribute.
- param - the value (an short char)
- param - the T index (an int, see note)
- param - the slice index (an int, see note)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to replace an existing value, false otherwise
- return - true if successful, false otherwise
- 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 unsigned short.
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
setDICOMAttributeUnsignedInt(self, iValue: int, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool¶ /** * brief Sets an unsigned 32 bit DICOM attribute.
- param - the value (an unsigned int)
- param - the T index (an int, see note)
- param - the slice index (an int, see note)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to replace an existing value, false otherwise
- return - true if successful, false otherwise
- 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 unsigned short.
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
setDICOMAttributeUnsignedShort(self, iValue: int, iTIndex: int, iZIndex: int, iGroup: int, iElement: int, iIndex: int, bReplaceExisting: bool) → bool¶ /** * brief Sets an unsigned 16 bit DICOM attribute.
- param - the value (an unsigned short)
- param - the T index (an int, see note)
- param - the slice index (an int, see note)
- param - the group number (an unsigned short)
- param - the element number (an unsigned short)
- param - index of the item in case of multi-valued elements (0..vm-1)
- param - true to replace an existing value, false otherwise
- return - true if successful, false otherwise
- 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 unsigned short.
- sa getDICOMAttribute(), removeAllPrivateDICOMAttributes()
*/
-
setDataDescription(self, pChannelDescriptionEnumValue: int) → None¶ /** * brief Sets the channel description.
- param - a description index (a long)
- note
- Channel description is used to categorize channels.
- note
- See the constants defined in ORS_def.h, enum CxvChannel_Description, for valid values.
- sa CxvChannel_Description, getDataDescription()
*/
-
setDataRange(self, pValue: float) → None¶ /** * brief Sets the size of the spread of data.
- param - a value (a double)
- 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.
- sa getDataRange()
*/
-
setDataType(self, pDataType: int) → None¶ /** * brief Sets the channel data type.
- return - a type (a long)
- note
- See CxvChannel_Data_Type (in ORS_def.h) for supported data types.
- sa CxvChannel_Data_Type, getDataType(), getBitCount(), getTypeDescription()
*/
-
setDataUnit(self, bDimensionalUnit: str) → None¶ /** * brief Sets the channel data unit description.
- param - a _bstr_t
*/
-
setInitialWindowLevelValues(self, pWidth: float, pCenter: float) → None¶ /** * brief Sets the initial window leveling value.
- param - the window width (a double)
- param - the window center (a double)
- note
- This leveling will only be applied when the channel is first shown in a volume.
- note
- note
- Two special values are accepted: -1 means to normalize from the channel data spread, and
- 0 means to use no leveling at all.
*/
-
setIsData3D(self, pValue: bool) → None¶ /** * brief Sets the channel to be true 3D data or not.
- param - true if data is 3D, false otherwise
- 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.
- sa getIsData3D()
*/
-
setIsLossy(self, pValue: bool) → None¶ /** * brief Sets the channel to be lossy or not.
- param - true if data is lossy, false otherwise
- note
- A channel can be lossy for two different reasons:
- the data was lossy jpeg compressed
- some slices were interpolated because of missing data
- sa getIsLossy()
*/
-
setIsMarkedSlice(self, pTIndex: int, pZSlice: int, pValue: bool) → None¶ /** * brief Sets a slice to be marked or not.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param - true to set the slice to be marked, false otherwise
- note
- Each slice has a BOOLEAN marker associated to it.
*/
-
setIsZSliceDataAvailable(self, pTIndex: int, pZSlice: int, pValue: bool) → None¶ /* brief method getKernelEvaluationAtPosition //* * brief Sets the availability of a Z slice’s data.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param - true to set the Z slice’s data available, false otherwise
- note
- The channel can be set to work in “lazy” mode, where slices are made available as they are read.
*/
-
setOffset(self, pOffset: float) → None¶ /** * brief Sets the channel offset.
- param - the offset (a double)
- sa getOffset(), setSlope(), getSlope()
*/
-
setOverlayData(self, iTIndex: int, iZIndex: int, pStartRow: int, pStartCol: int, pOverlayRows: int, pOverlayCols: int, pOverlayData: int) → None¶ /** * brief Sets the overlay data for a given Z slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param - the starting row of the overlay data (a short, see note)
- param - the starting column of the overlay data (a short, see note)
- param - the number of rows of overlay data (a short)
- param - the number of colums of overlay data (a short)
- param - the overlay data (an unsigned char*, see note)
- note
- An overlay is a bitmask that results in an image superimposed over the original channel data. Overlay data is expressed in bits, where 1s
- indicate that the pixel is to be “lit” up.
- note
- The starting row and column indicate where the overlay data begins in relation to the channel data. 0/0 mean that the overlay data
- begins at the starting row and column of the channel data. Both positive and negative values are supported. If negative values are given,
- portions of the overlay data that fall “out” of the channel’s range will be disregarded.
- note
- The overlay data array is copied internally, so it can be safely released.
*/
-
setSavePixelDataWhileSavingNode(self, pFlag: int) → None¶ /** * brief Controls if and how the channel should save its pixel data to XML.
- param - the save mode (a short between 0 and 2, see below)
- note
- The save mode has these meanings:
- 0 does not save the pixel data (the default),
- 1 saves uncompressed (results in large files)
- 2 saves compressed (results in smaller files, but runs slower)
*/
-
setSerieHasBeenModified(self, seriesHasBeenChangedFlag: bool) → None¶ /* brief setSerieHasBeenModified */
-
setSliceDirection0Size(self, timeStep: int, sliceIndex: int, direction0Size: float) → None¶ /* brief setSliceDirection0Spacing */
-
setSliceDirection0Spacing(self, timeStep: int, sliceIndex: int, direction0Spacing: float) → None¶ /* brief setSliceDirection0Spacing */
-
setSliceDirection1Size(self, timeStep: int, sliceIndex: int, direction1Size: float) → None¶ /* brief setSliceDirection0Spacing */
-
setSliceDirection1Spacing(self, timeStep: int, sliceIndex: int, direction1Spacing: float) → None¶ /* brief setSliceDirection0Spacing */
-
setSliceOrientation(self, pTIndex: int, pZSlice: int, index: int, value: float) → None¶ /** * brief Sets the orientation of a given slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param - an index (from 0 to 9)
- param - the orientation value (a double)
- note
- First three indicies indicate X orientation, next three indicate Y orientation and last three are for Z.
- sa getChannelOrientation(), setChannelOrientation(), getSliceOrientation(), setSlicePosition(), getSlicePosition()
*/
-
setSlicePosition(self, pTIndex: int, pZSlice: int, pPosition: Vector3) → None¶ /** * brief Sets the position of a given slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short
- param - a position (an Vector3)
- sa getPosition(), setPosition(), getSlicePosition(), setSliceOrientation(), getSliceOrientation()
*/
-
setSliceRectangle(self, timeStep: int, sliceIndex: int, pBoundedPlane: Rectangle) → None¶ /* brief setSliceRectangle */
-
setSliceSize(self, pTIndex: int, pZSlice: int, iXSize: int, iYSize: int) → None¶ /** * brief Sets the size of a given slice.
- param - the T index (an unsigned short)
- param - the Z slice index (an unsigned short)
- param - slice X size (an unsigned short)
- param - slice Y size (an unsigned short)
- note
- Normally all slices have the same sizes, but the channel can support having slices of different sizes. In that case,
- size the channel to the largest slice, and size each slice individually.
*/
-
setSlope(self, pSlope: float) → None¶ /** * brief Sets the channel slope.
- param - the slope (a double)
- sa setOffset(), getSlope(), getOffset()
*/
-
setSpacingValidity(self, bXSpacing: bool, bYSpacing: bool, bZSpacing: bool) → None¶ /** * brief Sets if the channel has valid spacing.
- param - validity of X spacing
- param - validity of Y spacing
- param - validity of Z spacing
- sa getSpacingXValidity(), getSpacingYValidity(), getSpacingZValidity()
*/
-
setSubset(self, pSourceChannel: "Channel", xMinSource: int, yMinSource: int, zMinSource: int, tMinSource: int, xSize: int, ySize: int, zSize: int, tSize: int, xMinDestination: int, yMinDestination: int, zMinDestination: int, tMinDestination: int) → None¶ /** * brief Writes a channel subset into the current channel data.
- param - the channel to read the data from (the “source”)
unsigned int xMinDestination, unsigned int yMinDestination, unsigned int zMinDestination, unsigned int tMinDestination * param - the first index in X to copy from the source channel (an unsigned int) * param - the first index in Y to copy from the source channel (an unsigned int) * param - the first index in Z to copy from the source channel (an unsigned int) * param - the first index in T to copy from the source channel (an unsigned int) * param - the number of pixels in X to copy from the source channel (an unsigned int) * param - the number of pixels in Y to copy from the source channel (an unsigned int) * param - the number of pixels in Z to copy from the source channel (an unsigned int) * param - the number of pixels in T to copy from the source channel (an unsigned int) * param - the index in X of the first pixel to copy into the current channel (an unsigned int) * param - the index in Y of the first pixel to copy into the current channel (an unsigned int) * param - the index in Z of the first pixel to copy into the current channel (an unsigned int) * param - the index in T of the first pixel to copy into the current channel (an unsigned int) */
-
setTimeFrame(self, pTimeStep: int, pYear: int, pMonth: int, pDay: int, pHour: int, pMinutes: int, pSeconds: int, pMicroSeconds: int) → None¶ /** * brief Sets the value of a time frame.
- param - the T index (an unsigned short)
- param - the year (an unsigned short)
- param - the month (an unsigned short)
- param - the day (an unsigned short)
- param - the hour (an unsigned short)
- param - the minutes (an unsigned short)
- param - the seconds (an unsigned short)
- param - the microseconds (an unsigned int)
- note
- Time frames represent the exact time at each T increment.
*/
-
shape¶
-
swapSliceData(self, iTSource: int, iZSource: int, iTTarget: int, iZTarget: int) → None¶ /** * brief Swap two slices.
- param - T source index (an unsigned short)
- param - Z source index (an unsigned short)
- param - T target index (an unsigned short)
- param - Z target index (an unsigned short)
- note
- If any index is invalid no swap occurs.
*/
-
updateCrossSection(self, path: VisualPath, aTransformationMatrix: Matrix4x4, timeStep: int, pInChannel: "Channel") → None¶ /* brief method updateCrossSection */
-
updateSliceMatricesWithGlobalMatrixValue(self) → None¶ /* brief updateSliceMatricesWithGlobalMatrixValue */
-
zeros(shape, dtype=<class 'numpy.uint8'>)¶
ChannelRegistrationHelper¶
-
class
ORSModel.ors.ChannelRegistrationHelper¶ Bases:
ORSModel.ors.Unmanaged-
applyTransformationDegreeOfFreedomOnChannel(self, kindOfDegreeOfFreedom: int, numeroDirection: int, backward: bool) → None¶ /* brief method applyTransformationDegreeOfFreedomOnChannel */
-
getCurrentSimilarity(self) → float¶ /* brief method return the current similarity*/
-
getMutualInformationFor(self, p_entropyA: float, p_entropyB: float, p_entropyAB: float, histoASize: int, histoBSize: int, fractionOfChannelConsidered: float) → float¶ /* brief method getMutualInformationFor */
-
getRegistration3DTransformation(self, bApplyTransformation: bool, IProgress: Progress) → Matrix4x4¶ /* brief method getRegistration3DTransformation */
-
getRotationScaleCenterAlwaysAtCenter(self) → bool¶ /* brief method getRotationScaleCenterAlwaysAtCenter */
-
getSuggestedHistogramSizesSturgesRule(self, pIChannelA: Channel, pIChannelB: Channel, pSuggestedSizeOfHistogram: int) → None¶ /* brief method getSuggestedHistogramSizesSturgesRule */
-
getXSampling()¶
-
getYSampling()¶
-
getZSampling()¶
-
none()¶
-
setChannelAB(self, pIChannelA: Channel, pIChannelB: Channel) → None¶ /* brief method setChannelAB */
-
setFactorOfCompressionHistogramA(self, factor: int) → None¶ /* brief method setFactorOfCompressionHistogramA */
-
setFactorOfCompressionHistogramB(self, factor: int) → None¶ /* brief method setFactorOfCompressionHistogramB */
-
setRotationScaleCenterAlwaysAtCenter(self, aFlag: bool) → None¶ /* brief method setRotationScaleCenterAlwaysAtCenter */
-
setSearchDeltaEpsilonRotation(self, pIInputChannel: Channel, searchDelta: float, epsilon: float) → None¶ /* brief method setSearchDeltaEpsilonRotation */
-
setSearchDeltaEpsilonScaleFactor(self, pIInputChannel: Channel, searchDelta: float, epsilon: float) → None¶ /* brief method setSearchDeltaEpsilonScaleFactor */
-
setSearchDeltaEpsilonTranslation(self, pIInputChannel: Channel, searchDelta: float, epsilon: float) → None¶ /* brief method setSearchDeltaEpsilonTranslation */
-
setSearchDeltaScaleFactor(self, pVector: Vector3) → None¶ /* brief method setSearchDeltaScaleFactor */
-
setSearchDeltaTranslation(self, pVector: Vector3) → None¶ /* brief method setSearchDeltaTranslation */
-
setSearchDirectionChannel(self, pIChannel: Channel) → None¶ /* brief method setSearchDirectionChannel */
-
setXSampling()¶
-
setYSampling()¶
-
setZSampling()¶
-
ChannelSliceRegistrationHelper¶
-
class
ORSModel.ors.ChannelSliceRegistrationHelper(self, anXML: str) → None¶ Bases:
ORSModel.ors.Node/* brief create a ChannelSliceRegistrationHelper from an xml */
-
addTranslation(self, zIndex: int, tIndex: int, aVect: Vector3) → None¶ /* brief method addTranslation */
-
applySliceRegistrationToChannel(self, pInputChannel: Channel, iTIndex: int, IProgress: Progress, pOutputChannel: Channel) → Channel¶ /* brief applySliceRegistrationToChannel */
-
composeMatrix(self, zIndex: int, tIndex: int, aMatrix: Matrix4x4) → None¶ /** * brief Compose the transformation matrix from slice (zIndex-1) registered position to slice zIndex registered position with thw given matrix. */
-
copyInto(self, aDestinationRegistration: "ChannelSliceRegistrationHelper") → None¶ /* brief method copyInto */
-
extractSliceChannel(self, pInputChannel: Channel, aCutPlane: Plane, IOutputSliceChannel: Channel, timeStep: int, IProgress: Progress) → Channel¶ /* brief method extractSliceChannel */
-
extractZSliceChannel(self, pInputChannel: Channel, aCutPlane: Plane, IOutputSliceChannel: Channel, timeStep: int, IProgress: Progress) → Channel¶ /* brief method extractZSliceChannel */
-
getComposeMatrixFromSliceIToJ(self, zIndexI: int, zIndexJ: int, tIndex: int) → Matrix4x4¶ /* brief method getComposeMatrixFromSliceIToJ */
-
getGlobalMatrix(self, zIndex: int, tIndex: int) → Matrix4x4¶ /** * brief Returns the transformation matrix from channel original position to slice zIndex registered position. */
-
getMatrix(self, zIndex: int, tIndex: int) → Matrix4x4¶ /** * brief Returns the transformation matrix from slice (zIndex-1) registered position to slice zIndex registered position. */
-
getOpticalFluxMaximalLevelGaussianPyramid(self, aChannel: Channel, nZIndex: int, nTIndex: int, pIBoundingBoxSearchArea: Box) → int¶ /* brief method getOpticalFluxMaximalLevelGaussianPyramid */
-
mergeSliceRegistrationHelper(self, pInputRegistrationHelper: "ChannelSliceRegistrationHelper", startZ: int, endZ: int, startT: int, endT: int, pOutputRegistrationHelper: "ChannelSliceRegistrationHelper") → "ChannelSliceRegistrationHelper"¶ /* brief mergeSliceRegistrationHelper */
-
none()¶
-
registerSliceMutualInfo(self, aChannel: Channel, startZ: int, endZ: int, tIndex: int, nbIteration: int, bResetRegistration: bool, IProgress: Progress) → None¶ /** * brief Voxel based slice registration using Mutual info algorithm * param - the channel to register (a Channel) * param - the slice start index (an unsigned short) * param - the slice end index (an unsigned short) * param - the channel T index (an unsigned short) * param - the maximum number of iteration(an unsigned short) * param - the progress bar (an Progress) * note * - Set the parameter with setSimilarityXSampling(), setSimilarityYSampling(), setMaximumXOffsetBetweenSlice(), setMaximumYOffsetBetweenSlice() */
-
registerSliceMutualInfoSubVoxel(self, aChannel: 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: Progress) → None¶ /** * brief Sub-Voxel based slice registration using Mutual info algorithm * param - the channel to register (a Channel) * param - the slice start index (an unsigned short) * param - the slice end index (an unsigned short) * param - the channel T index (an unsigned short) * param - the initial step on X axis is the first translation that will be applied and tested by the algorithm * param - the initial step on Y axis is the first translation that will be applied and tested by the algorithm * param - the smallest step on X axis is the minimum distance that could be tested by the algorithm * param - the smallest step on Y axis is the minimum distance that could be tested by the algorithm * param - the initial step is the first rotation that will be applied and tested by the algorithm * param - the smallest step is the is minimum rotation that could be tested by the algorithm * param - indicate if the registration matrix should be reseted (a bool) * param - indicate if we register on a fixed slice (a bool) * param - indicate the fixed slice index (if we register on a fixed slice) (an unsigned short) * param - the progress bar (an Progress) * * note * References. Refer to the following for more information about Mutual Info: * Medical Image Registration Using Mutual Information, Frederik Maes, Dirk * Maes, and Paul Suetens. Proceedings of the IEEE, Vol. 91, No. 10, 2003. */
-
registerSliceOpticalFlow(self, aChannel: 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: Box, ISearchBox: Box, bResetRegistration: bool, IProgress: Progress) → None¶ /** brief Sub - Voxel based slice registration using Optical Flow algorithm * param - the channel to register(a Channel) * param - the slice start index(an unsigned short) * param - the slice end index(an unsigned short) * param - the channel T index(an unsigned short) * param - indicate that the algorithm should use translation(a bool) * param - the smallest distance in translation(from the last iteration) that should be reached to stop the iterative process(a double) * param - indicate that the algorithm should use rotation(a bool) * param - smallest rotation (in radians) (from the last iteration) that should be reached to stop the iterative process(a double) * param - maximal number of iterations(an unsigned short) * param - 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) * param - indicate if the linear factor of brightness correction(for stabilization) should be used(a bool) * param - 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) * param - indicate if a pass of registration by mutual information should be performed after the pass of optical flow(a bool) * param - the section of the image of reference to be detected in the other image(an Box) * param - the area where the section of the image of reference should be found in the other image(an Box) * param - indicate if the registration matrix should be reset(a bool) * param - the progress bar(an Progress) * * note References: Refer to the following for more information about optical flow: * * Determining Optical Flow, Berthold K.P. Horn and Brian G. Schunck. MIT, * Artificial Intelligence Laboratory, April 1980. * * Relaxing the Brightness Constancy Assumption in Computing Optical Flow, * Michael A. Gennert and Shahriar Negahdaripour. MIT, Artificial Intelligence * Laboratory, June 1987. * * On Variable Brightness Optical Flow for Tagged MRI, Sandeep N. Gupta and * Jerry L. Prince. Information Processing in Medical Imaging, 1995. */
-
registerSliceSSD(self, aChannel: Channel, startZ: int, endZ: int, tIndex: int, nbIteration: int, bResetRegistration: bool, IProgress: Progress) → None¶ /** * brief Voxel based slice registration using SSD algorithm * param - the channel to register (a Channel) * param - the slice start index (an unsigned short) * param - the slice end index (an unsigned short) * param - the channel T index (an unsigned short) * param - the maximum number of iteration(an unsigned short) * param - the progress bar (an Progress) * note * - Set the parameter with setSimilarityXSampling(), setSimilarityYSampling(), setMaximumXOffsetBetweenSlice(), setMaximumYOffsetBetweenSlice() */
-
registerSliceSSDSubVoxel(self, aChannel: 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: Progress) → None¶ /** * brief Sub-Voxel based slice registration using SSD algorithm * param - the channel to register (a Channel) * param - the slice start index (an unsigned short) * param - the slice end index (an unsigned short) * param - the channel T index (an unsigned short) * param - the initial step on X axis is the first translation that will be applied and tested by the algorithm * param - the initial step on Y axis is the first translation that will be applied and tested by the algorithm * param - the smallest step on X axis is the minimum distance that could be tested by the algorithm * param - the smallest step on Y axis is the minimum distance that could be tested by the algorithm * param - the initial step is the first rotation that will be applied and tested by the algorithm * param - the smallest step is the is minimum rotation that could be tested by the algorithm * param - indicate if the registration matrix should be reseted (a bool) * param - indicate if we register on a fixed slice (a bool) * param - indicate the fixed slice index (if we register on a fixed slice) (an unsigned short) * param - the progress bar (an Progress) */
-
setIsSliceUnmovable(self, zIndex: int, tIndex: int, bUnmovable: bool) → None¶ /* brief method setIsSliceUnmovable */
-
setMatrix(self, zIndex: int, tIndex: int, aMatrix: Matrix4x4) → None¶ /** * brief Set the transformation matrix from slice (zIndex-1) registered position to slice zIndex registered position. */
-
setMaximumXOffsetBetweenSlice(self, maxOffset: int) → None¶ /* brief method setMaximumXOffsetBetweenSlice */
-
setMaximumYOffsetBetweenSlice(self, maxOffset: int) → None¶ /* brief method setMaximumYOffsetBetweenSlice */
-
setStartOfInterestZone(self, xStart: int, yStart: int) → None¶ /* brief method setStartOfInterestZone */
-
ChannelSliceReplacementHelper¶
-
class
ORSModel.ors.ChannelSliceReplacementHelper¶ Bases:
ORSModel.ors.Unmanaged-
none()¶
-
Collection¶
-
class
ORSModel.ors.Collection¶ Bases:
ORSModel.ors.Managed/** interface Collection * brief Abstraction class for collections. * * author Normand Mongeau. * version 1.0 * * Abstraction class for collections. The main difference between collections and arrays is that with collections, you do * not need to worry about the capacity, you can just add elements; while for arrays you need to manage the size yourself. */
-
applyLinearTransformation(self, slope: float, offset: float) → None¶ /* brief applyLinearTransformation */
-
none()¶
-
Color¶
-
class
ORSModel.ors.Color¶ Bases:
ORSModel.ors.Unmanaged/** interface Color * brief Wraps and defines colors * * author N Mongeau * author All other members of ORS participated. * version 1.0 * date December 2015 * * Defines a color. Colors are composed of components, each stored in the form of a double between 0 and 1. * Colors can have as many components as wanted, but slots 0 to 3 are reserved for red, green, blue and alpha. Any * additional component should thus be stored starting at index 4.
*/-
getAlpha(self) → float¶ /** * brief Gets the alpha component of the color.
- return - the alpha value (a double)
- note
- Color components are expressed as values between 0 and 1.
- sa getGreen(), getBlue(), getRed()
*/
-
getAsQColor()¶
-
getBlue(self) → float¶ /** * brief Gets the blue component of the color.
- return - the blue value (a double)
- note
- Color components are expressed as values between 0 and 1.
- sa getGreen(), getRed(), getAlpha()
*/
-
getComponentAtIndex(self, index: int) → float¶ /** * brief Gets a component of the color.
- param - the component index (an unsigned short)
- return - a double value
- note
- Color components are expressed as values between 0 and 1.
- note
- Color components indexes are zero-based.
*/
-
getComponentCount(self) → int¶ /** * brief Gets the number of component of the color. * return - the component count(an unsigned short) */
-
getComponents(self) → ArrayDouble¶ /** * brief Gets all the components of the color.
- return - a double array (an ArrayDouble)
- note
- Color components are expressed as values between 0 and 1.
*/
-
getGreen(self) → float¶ /** * brief Gets the green component of the color.
- return - the green value (a double)
- note
- Color components are expressed as values between 0 and 1.
- sa getRed(), getBlue(), getAlpha()
*/
-
getRed(self) → float¶ /** * brief Gets the red component of the color.
- return - the red value (a double)
- note
- Color components are expressed as values between 0 and 1.
- sa getGreen(), getBlue(), getAlpha()
*/
-
none()¶
-
setAlpha(self, alpha: float) → None¶ /** * brief Sets the alpha component of the color.
- param - the alpha value (a double)
- note
- Color components are expressed as values between 0 and 1.
- sa setGreen(), setBlue(), setRed()
*/
-
setBlue(self, blue: float) → None¶ /** * brief Sets the blue component of the color.
- param - the blue value (a double)
- note
- Color components are expressed as values between 0 and 1.
- sa setGreen(), setRed(), setAlpha()
*/
-
setComponentAtIndex(self, index: int, component: float) → None¶ /** * brief Sets a component of the color.
- param - the component index (an unsigned short)
- param - a double value
- note
- Color components are expressed as values between 0 and 1.
- note
- Color components indexes are zero-based.
*/
-
setComponents(self, components: ArrayDouble) → None¶ /** * brief Sets all the components of the color.
- param - a double array (an ArrayDouble)
- note
- Color components are expressed as values between 0 and 1.
*/
-
ConvolutionHelper¶
-
class
ORSModel.ors.ConvolutionHelper¶ Bases:
ORSModel.ors.Unmanaged-
fastGaussian2D(self, pInputChannel: Channel, nMinZ: int, nMaxZ: int, nMinT: int, nMaxT: int, pKernelSize: int, standarDeviation: float, nBoarderHandling: int, IProgress: Progress, pOutChannel: Channel) → Channel¶ /* brief method fastGaussian2D */
-
get1DConvolution(self, inputValues: Array, pKernel: ConvolutionKernel, nBorderHandling: int, values: Array) → Array¶ /** * brief Convolutes a given 1D kernel through a Float array. * * param - the input array (an ArrayFloat) * param - the kernel (a double*, see note below) * param - the convolution’s size (a short) * param - The border handling algorithm to use(an int). One of: * CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution. * CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. * CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. * CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then convolve the central image using portions of the adjacent tiles at the borders. * CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. * CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation. * param - an optional output array to fill (an Array) * * return - the resulting output array (an Array) * * note * - The convolution’s size needs to be an odd number. * note * - The kernel is a one dimension array where the dimension is of equal size to the * convolution. * note * - If a Float array is supplied as the last argument, the results are written to it, * otherwise a new array is created. */
-
get1DMedian(self, inputValues: Array, kernelSize: int, nBorderHandling: int, values: Array) → Array¶ /* brief method get1DMedian */
-
getConvolution(self, pInputChannel: Channel, nMinZ: int, nMaxZ: int, nMinT: int, nMaxT: int, pKernel: ConvolutionKernel, nBoarderHandling: int, nOutputChannelDatatype: int, bLeaveDataOfOutChannelOutsizeZRangeUnaffected: bool, IProgress: Progress, pOutChannel: Channel) → Channel¶ /** * brief Convolutes a given 2D kernel through the channel’s data. * * param - the input channel (an Channel) * param - the minimal z slice index (an int) * param - the maximal z slice index (an int) * param - the kernel (a double**, see note below) * param - the convolution’s size (a short) * param - The border handling algorithm to use(an int). One of: * CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution. * CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. * CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. * CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then convolve the central image using portions of the adjacent tiles at the borders. * CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. * CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation. * param - a progress object (an Progress) * param - an optional output channel to fill(an Channel) * * return - the resulting channel (an 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. */
-
getConvolutionSubsetOnOther(self, pInputChannel: 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: ConvolutionKernel, nBorderHandling: int, nOutputChannelDatatypeIfOutputChannelIsNull: int, IProgress: Progress, pOutChannel: Channel) → Channel¶ /** * brief Convolutes a given 1D, 2D or 3D kernel through the channel’s data. * * param - the input channel (an Channel) * param - the minimal x index of the input channel to compute the convolution on (an unsigned int) * param - the minimal y index of the input channel to compute the convolution on (an unsigned int) * param - the minimal z (slice) index of the input channel to compute the convolution on (an unsigned int) * param - the minimal t (time) index of the input channel to compute the convolution on (an unsigned int) * param - the number of pixels to compute in x (an unsigned int) * param - the number of pixels to compute in y (an unsigned int) * param - the number of pixels to compute in z (an unsigned int) * param - the number of time steps to compute (an unsigned int) * param - the minimal x index of the output channel to write the result in (an unsigned int) * param - the minimal y index of the output channel to write the result in (an unsigned int) * param - the minimal z index of the output channel to write the result in (an unsigned int) * param - the minimal t index of the output channel to write the result in (an unsigned int) * param - the kernel * param - The border handling algorithm to use(an int). One of: * CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution. * CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. * CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. * CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then convolve the central image using portions of the adjacent tiles at the borders. * CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. * CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation. * param - the data type of the output channel, if the output channel is not given * param - a progress object (an Progress) * param - an optional output channel to fill(an Channel) * * return - the resulting channel (an 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. */
-
getConvolutionSubsetOnSelf(self, pInputChannel: Channel, xMinInput: int, yMinInput: int, zMinInput: int, tMinInput: int, xSize: int, ySize: int, zSize: int, tSize: int, pKernel: ConvolutionKernel, nBorderHandling: int, IProgress: Progress) → None¶ /** * brief Convolutes a given 1D, 2D or 3D kernel through the channel’s data. * * param - the input channel (an Channel), in which the result is written * param - the minimal x index of the input channel to compute the convolution on (an unsigned int) * param - the minimal y index of the input channel to compute the convolution on (an unsigned int) * param - the minimal z (slice) index of the input channel to compute the convolution on (an unsigned int) * param - the minimal t (time) index of the input channel to compute the convolution on (an unsigned int) * param - the number of pixels to compute in x (an unsigned int) * param - the number of pixels to compute in y (an unsigned int) * param - the number of pixels to compute in z (an unsigned int) * param - the number of time steps to compute (an unsigned int) * param - the kernel * param - The border handling algorithm to use(an int). One of: * CXV_CONVOLUTION_BORDER_HANDLING_VALID: Use only the valid portion of the convolution. * CXV_CONVOLUTION_BORDER_HANDLING_PADDED_SURROUND The image is padded at the borders with extra pixels with a value given by m_fPaddedValue. * CXV_CONVOLUTION_BORDER_HANDLING_NEAREST_NEIGHBOR The nearest known pixel value is substituted for the unknown one. * CXV_CONVOLUTION_BORDER_HANDLING_CYCLIC Consider the extended image to be a tiled version of the original, and then convolve the central image using portions of the adjacent tiles at the borders. * CXV_CONVOLUTION_BORDER_HANDLING_MIRRORING A mirror image of the known image is created with the border for a mirroring axis. * CXV_CONVOLUTION_BORDER_HANDLING_INTERPOLATION Unknown values are estimated by polynomial interpolation. * param - a progress object (an Progress) * * return - nothing */
-
getMedian(self, pInputChannel: Channel, nMinZ: int, nMaxZ: int, nMinT: int, nMaxT: int, pKernel: ConvolutionKernel, nBoarderHandling: int, nOutputChannelDatatype: int, bLeaveDataOfOutChannelOutsizeZRangeUnaffected: bool, IProgress: Progress, pOutChannel: Channel) → Channel¶ /* brief method getMedian */
-
getZOffsetInputToOutputWithOutsideZRangeUnaffected(self) → int¶ /* brief method getZOffsetInputToOutputWithOutsideZRangeUnaffected */
-
none()¶
-
ConvolutionKernel¶
-
class
ORSModel.ors.ConvolutionKernel¶ Bases:
ORSModel.ors.Unmanaged-
getKernelStarPoint(self, pIndexX: int, pIndexY: int, pIndexZ: int) → None¶ /* brief method getKernelStarPoint */
-
initializeAs2DKernel(self, indexX: int, indexY: int) → None¶ /* brief method initializeAs2DKernel */
-
initializeAs3DKernel(self, indexX: int, indexY: int, indexZ: int) → None¶ /* brief method initializeAs3DKernel */
-
none()¶
-
setAsGaussianWithMinimumUnnormalizedSmallestValue(self, aValue: float) → None¶ /* brief method setAsGaussianWithMinimumUnnormalizedSmallestValue */
-
setAsGaussianWithStandarDeviation(self, sigma: float) → None¶ /* brief method setAsGaussianWithStandarDeviation */
-
Cursor3D¶
-
class
ORSModel.ors.Cursor3D¶ Bases:
ORSModel.ors.Visual- /** interface Cursor3D
- brief A visual artifact used to illustrate a position in a 3D referential.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- A visual artifact used to illustrate a position in a 3D referential.
*/
Cursor3D.__init__(self, anXML: str) -> None /* brief create a Cursor3D from an xml */
-
getActivePlaneColor(self) → Color¶ /** * brief Gets the active plane color of the 3D cursor.
- return - a color (an Color)
- note
- The color is expressed in RGB fashion.
- sa setActivePlaneColor(), setColor(), getColor()
*/
-
getAllHighlightedViewAnchorsInView(self, pCurrentDisplay: View) → List¶ /* brief method getAllHighlightedViewAnchorsInView */
-
getAllHighlightedViewLineInView(self, pCurrentDisplay: View) → List¶ /* brief method getAllHighlightedViewLineInView */
-
getAllHighlightedViewMIPLineInView(self, pCurrentDisplay: View) → List¶ /* brief method getAllHighlightedViewMIPLineInView */
-
getAllParentViewsExcludingCurrent(self, pCurrentDisplay: View) → List¶ /* brief method getAllParentViewsExcludingCurrent */
-
getAllParentViewsExcludingCurrentCount(self, pCurrentDisplay: View) → int¶ /* brief method getAllParentViewsExcludingCurrentCount */
-
getAllShownViewAnchorsInView(self, pCurrentDisplay: View) → List¶ /* brief method getAllShownViewAnchorsInView */
-
getAllShownViewMIPLineInView(self, pCurrentDisplay: View) → List¶ /* brief method getAllShownViewMIPLineInView */
-
getAnyHighlightedViewLineInView(self, pCurrentDisplay: View) → bool¶ /* brief method getAnyHighlightedViewLineInView */
-
getColor(self) → Color¶ /** * brief Gets the color of the 3D cursor.
- return - a color (an Color)
- note
- The color is expressed in RGB fashion.
- sa getActivePlaneColor(), setActivePlaneColor(), setColor()
*/
-
getCrossHairMode(self) → int¶ /** * brief Gets the crosshair mode of the 3D cursor.
- return - a crosshair mode (a long)
- note
- See the Cxv3DCursor_Crosshair enum in the ORS_def.h header file for valid crosshair modes.
*/
-
getHighlightedCircleInView(self, pCurrentDisplay: View) → bool¶ /* brief method getHighlightedCircleInView */
-
getHighlightedObliqueSliderInView(self, pCurrentDisplay: View) → bool¶ /* brief method getHighlightedObliqueSliderInView */
-
getIsHighlightedViewAnchorsInView(self, pCurrentDisplay: View, anotherDisplay: View) → bool¶ /* brief method getIsHighlightedViewAnchorsInView */
-
getIsHighlightedViewLineInView(self, pCurrentDisplay: View, anotherDisplay: View) → bool¶ /* brief method getIsHighlightedViewLineInView */
-
getIsHighlightedViewMIPLineInView(self, pCurrentDisplay: View, anotherDisplay: View) → bool¶ /* brief method getIsHighlightedViewMIPLineInView */
-
getIsShowViewAnchorsInView(self, pCurrentDisplay: View, anotherDisplay: View) → bool¶ /* brief method getIsShowViewAnchorsInView */
-
getIsShowViewMIPLineInView(self, pCurrentDisplay: View, anotherDisplay: View) → bool¶ /* brief method getIsShowViewMIPLineInView */
-
getMiddleHoleSize(self) → float¶ /* brief Gets the size of the blank hole in the middle of the 3D cursor (in screen one thousandths) */
-
getPickAnchor(self, pDisplay: View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → View¶ /** * brief Picks for an anchor in the given display.
- param - a display (an View)
- return - aView
*/
-
getPickMIPAnchor(self, pDisplay: View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → View¶ /* brief method getPickMIPAnchor */
-
getPickMPRAnchor(self, pDisplay: View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → View¶ /* brief method getPickMPRAnchor */
-
getPickObliqueCircleAnchor(self, pDisplay: View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → bool¶ /* brief getPickObliqueCircleAnchor */
-
getPickObliqueSliderAnchor(self, pDisplay: View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → int¶ /* brief getPickObliqueSliderAnchor */
-
getShowObliqueSliderForView(self, pCurrentDisplay: View) → bool¶ /* brief method getShowObliqueSliderForView */
-
getViewsDefineAValidCursorPosition(self, pCurrentDisplay: View) → bool¶ /* brief method getViewsDefineAValidCursorPosition */
-
none()¶
-
setActivePlaneColor(self, IColor: Color) → None¶ /** * brief Sets the active plane color of the 3D cursor.
- param - a color (an Color)
- note
- The color is expressed in RGB fashion.
- sa getActivePlaneColor(), setColor(), getColor()
*/
-
setColor(self, IColor: Color) → None¶ /** * brief Sets the color of the 3D cursor.
- param - a color (an Color)
- note
- The color is expressed in RGB fashion.
- sa getActivePlaneColor(), setActivePlaneColor(), getColor()
*/
-
setCrossHairMode(self, iMode: int) → None¶ /** * brief Sets the crosshair mode of the 3D cursor.
- param - a crosshair mode (a long)
- note
- See the Cxv3DCursor_Crosshair enum in the ORS_def.h header file for valid crosshair modes.
*/
-
setCursorPositionFromParentView(self, pDisplay: View) → bool¶ /* brief method setCursorPositionFromParentView */
-
setHighlightedCircleInView(self, pCurrentDisplay: View, highlight: bool) → None¶ /* brief method setHighlightedCircleInView */
-
setHighlightedObliqueSliderInView(self, pCurrentDisplay: View, highlight: bool) → None¶ /* brief method setHighlightedObliqueSliderInView */
-
setHighlightedViewAnchorsInView(self, pCurrentDisplay: View, anotherDisplay: View, highlight: bool) → None¶ /* brief method setHighlightedViewAnchorsInView */
-
setHighlightedViewLineInView(self, pCurrentDisplay: View, anotherDisplay: View, highlight: bool) → None¶ /* brief method setHighlightedViewLineInView */
-
setHighlightedViewMIPLineInView(self, pCurrentDisplay: View, anotherDisplay: View, highlight: bool) → None¶ /* brief method setHighlightedViewMIPLineInView */
-
setLineThickness(self, value: float) → None¶ /* brief Sets the line thickness (in screen one thousandths) */
-
setMiddleHoleSize(self, value: float) → None¶ /* brief Sets the size of the blank hole in the middle of the 3D cursor (in screen one thousandths) */
-
setPosition(self, pPosition: Vector3) → None¶ /** * brief Sets the position of the 3D cursor.
- param - a screen position (an Vector3)
- sa getPosition()
*/
-
setShowCircleInView(self, pCurrentDisplay: View, showC: bool) → None¶ /* brief method setShowCircleInView */
-
setShowObliqueSliderInView(self, pCurrentDisplay: View, showO: bool) → None¶ /* brief method setShowObliqueSliderInView */
-
setShowViewAnchorsInView(self, pCurrentDisplay: View, anotherDisplay: View, showA: bool) → None¶ /* brief method setShowViewAnchorsInView */
DatasetPresenter¶
-
class
ORSModel.ors.DatasetPresenter(self, anXML: str) → None¶ Bases:
ORSModel.ors.Visual/* brief create a DatasetPresenter from an xml */
-
get2DWindowLevel2Range(self, fMin: float, fMax: float) → None¶ /** * brief Gets the current second level 2D window level values range.
- param[out] - The lower range value (a double)
- param[out] - The upper range value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get2DWindowLevel2Values(self, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief 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.
- sa get3DWindowLevelValues(), get2DWindowLevelValues()
*/
-
get2DWindowLevelCenterForView(self, pDisplay: View) → float¶ /* brief get2DWindowLevelCenterForView */
-
get2DWindowLevelRangeForAllViews(self, pMin: float, pMax: float) → None¶ /** * brief Gets the current 2D window level range values, for all displays.
- param[out] - The current 2D window level range lower value (a double)
- param[out] - The current 2D window level range supper value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get2DWindowLevelRangeForView(self, pDisplay: View, pMin: float, pMax: float) → None¶ /** * brief Gets the current 2D window level range values.
- param[out] - The current 2D window level range lower value (a double)
- param[out] - The current 2D window level range supper value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get2DWindowLevelValuesForAllViews(self, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current 3D window level values (width and center) for all displays.
- param[out] - the window level width (a double*)
- param[out] - the window level center (a double*)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get2DWindowLevelValuesForView(self, pDisplay: View, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current 2D window level values (width and center) for a given display.
- param - the display (an View)
- param[out] - the window level width (a double*)
- param[out] - the window level center (a double*)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get2DWindowLevelWidthForView(self, pDisplay: View) → float¶ /* brief get2DWindowLevelWidthForView */
-
get3DWindowLevelCenterForView(self, pDisplay: View) → float¶ /* brief get3DWindowLevelCenterForView */
-
get3DWindowLevelRangeForAllViews(self, pMin: float, pMax: float) → None¶ /** * brief Gets the current 2D window level range values, for all displays.
- param[out] - The current 2D window level range lower value (a double)
- param[out] - The current 2D window level range supper value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get3DWindowLevelRangeForView(self, IDisplay: View, pMin: float, pMax: float) → None¶ /** * brief Gets the current 2D window level range values.
- param[out] - The current 2D window level range lower value (a double)
- param[out] - The current 2D window level range supper value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get3DWindowLevelValuesForAllViews(self, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current 3D window level values (width and center) for all views.
- param[out] - the window level width (a double*)
- param[out] - the window level center (a double*)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get3DWindowLevelValuesForView(self, pDisplay: View, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current 2D window level values (width and center) for a given display.
- param - the display (an View)
- param[out] - the window level width (a double*)
- param[out] - the window level center (a double*)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get3DWindowLevelWidthForView(self, pDisplay: View) → float¶ /* brief get3DWindowLevelWidthForView */
-
getUseLUTAlphaIn2DForAllViews(self) → bool¶ /** * brief Ask the dataset presenter to use the applied lut alpha component
- return - bool
- sa setUseLUTAlphaIn2D;
*/
-
getUseLUTAlphaIn2DForView(self, pDisplay: View) → bool¶ /** * brief Ask the dataset presenter to use the applied lut alpha component
- param - the view (an View)
- return - bool
- sa setUseLUTAlphaIn2D;
*/
-
none()¶
-
set2DIntensityRangeForViewLogged(view, minValue, maxValue, logging=True)¶
-
set2DWindowLevel2Range(self, fMin: float, fMax: float) → None¶ /** * brief Sets the current second level 2D window level values range.
- param - The lower range value (a double)
- param - The upper range value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
set2DWindowLevel2Values(self, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Sets the second 2D window level values for the double leveling mode.
- param - the window width (a float)
- param - the window center (a float)
- 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.
- sa set3DWindowLevelValues(), set2DWindowLevelValues()
*/
-
set2DWindowLevelRangeForAllViews(self, iMin: float, iMax: float) → None¶ /** * brief Sets the current 2D window level values via a range, for all displays.
- param - The lower range value (a double)
- param - The upper range value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
set2DWindowLevelRangeForView(self, pDisplay: View, iMin: float, iMax: float) → None¶ /** * brief Sets the current 2D window level values via a range, for a given display.
- param - The lower range value (a double)
- param - The upper range value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
set2DWindowLevelValuesForAllViews(self, iWindowWidth: float, iWindowCenter: float) → None¶ /** * brief Sets the current 2D window level values (width and center) for all displays.
- param - the window width (a double)
- param - the window center (a double)
- 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.
- sa set3DWindowLevelValues()
*/
-
set2DWindowLevelValuesForView(self, pDisplay: View, iWindowWidth: float, iWindowCenter: float) → None¶ /** * brief Sets the current 3D window level values (width and center).
- param - the display (an View)
- param - the window level width (a double)
- param - the window level center (a double)
- 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.
- sa set2DWindowLevelValues()
*/
-
set2DWindowLevelValuesForViewLogged(view, width, center, logging=True)¶
-
set3DIntensityRangeViewLogged(view, minValue, maxValue, logging=True)¶
-
set3DWindowLevelRangeForAllViews(self, iMin: float, iMax: float) → None¶ /** * brief Sets the current 2D window level values via a range, for all displays.
- param - The lower range value (a double)
- param - The upper range value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
set3DWindowLevelRangeForView(self, IDisplay: View, iMin: float, iMax: float) → None¶ /** * brief Sets the current 2D window level values via a range, for a given display.
- param - The lower range value (a double)
- param - The upper range value (a double)
- 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.
- sa get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
set3DWindowLevelValuesForAllViews(self, iWindowWidth: float, iWindowCenter: float) → None¶ /** * brief Sets the current 2D window level values (width and center) for all displays.
- param - the window width (a double)
- param - the window center (a double)
- 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.
- sa set3DWindowLevelValues()
*/
-
set3DWindowLevelValuesForView(self, pDisplay: View, iWindowWidth: float, iWindowCenter: float) → None¶ /** * brief Sets the current 3D window level values (width and center).
- param - the display (an View)
- param - the window level width (a double)
- param - the window level center (a double)
- 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.
- sa set2DWindowLevelValues()
*/
-
set3DWindowLevelValuesForViewLogged(view, width, center, logging=True)¶
-
setUseLUTAlphaIn2DForAllViews(self, aFlag: bool) → None¶ /** * brief Tell the dataset presenter to use the applied lut alpha componenet
- param - bool
- sa getUseLUTAlphaIn2DForView();
*/
-
setUseLUTAlphaIn2DForView(self, pDisplay: View, aFlag: bool) → None¶ /** * brief Tell the dataset presenter to use the applied lut alpha componenet
- param - the view (an View)
- param - bool
- sa getUseLUTAlphaIn2DForView();
*/
-
setUseLUTAlphaIn2DForViewLogged(view, value, logging=True)¶
-
Dijkstra¶
-
class
ORSModel.ors.Dijkstra¶ Bases:
ORSModel.ors.Unmanaged-
Dummy= <ORSModel.ors.Dijkstra object>¶
-
cleanDistanceMapChannel(self, outputChannel: Channel) → None¶ /** * brief Removes boundaries or non reached value from a distance map channel.
- param - a distance map channel (an Channel)
*/
-
createDistanceMap(self, lOutputChannelDistanceMap: Channel, lOutputChannelTraceBack: Channel, lOutputChannelLabel: Channel) → None¶ /** * brief Creates a distance map starting from all the provided ROI sources.
- param - the distance map generated by the Dijkstra algorithm (an Channel)
- param - a traceback channel, can be NULL (an Channel)
- param - a label channel, can be NULL (an Channel)
*/
-
createDistanceMapForMaxDistance(self, lOutputChannelDistanceMap: Channel, maxDistance: float, lOutputChannelTraceBack: Channel, lOutputChannelLabel: Channel, continueDijkstra: bool) → None¶ /** * brief Creates a distance map until a provided Dijkstra distance is reached, starting from all the provided ROI sources.
- param - the distance map generated by the Dijkstra algorithm (an Channel)
- param - the Dijkstra distance to reach before stopping to process new voxels (a double)
- param - a traceback channel, can be NULL (an Channel)
- param - a label channel, can be NULL (an Channel)
- param - 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: Channel, forNbIteration: int, lOutputChannelTraceBack: Channel, lOutputChannelLabel: Channel, autoUpdateROI: bool, continueDijkstra: bool) → None¶ /** * brief Creates a distance map for a given number of voxels, starting from all the provided ROI sources.
- param - the distance map generated by the Dijkstra algorithm (an Channel)
- param - the number of voxels to be processed by the Dijkstra algorithm (an unsigned int)
- param - a traceback channel, can be NULL (an Channel)
- param - a label channel, can be NULL (an Channel)
- param - TRUE if the source ROIs should be updated with their diffusion result, FALSE otherwise
- param - 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: Channel, aTargetVolumeROI: ROI, lOutputChannelTraceBack: Channel, continueDijkstra: bool) → None¶ /** * brief Creates a distance map until any stop point provided in a ROI are reached, starting from all the provided ROI sources.
- param - the distance map generated by the Dijkstra algorithm (an Channel)
- param - a collection of x,y,z triplets stop points in input channel referential (an unsigned long*)
- param - the number of triplets present in the collection of triplet stop points (an unsigned long)
- param - the number of voxels to be processed after the stop condition is matched (an unsigned long)
- param - a traceback channel, can be NULL (an Channel)
- param - a label channel, can be NULL (an Channel)
- param - 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: Channel, xStopPointInWorld: float, yStopPointInWorld: float, zStopPointInWorld: float, lOutputChannelTraceBack: Channel, lOutputChannelLabel: Channel, continueDijkstra: bool) → None¶ /** * brief Creates a distance map until a stop point provided in world coordinates is reached, starting from all the provided ROI sources.
- param - the distance map generated by the Dijkstra algorithm (an Channel)
- param - X position of a world coordinate
- param - Y position of a world coordinate
- param - Z position of a world coordinate
- param - the number of voxels to be processed after the stop condition is matched (an unsigned long)
- param - a traceback channel, can be NULL (an Channel)
- param - a label channel, can be NULL (an Channel)
- param - 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: Channel, positionTripleInSourceRef: int, nbPosition: int, waitForNIndex: int, lOutputChannelTraceBack: Channel, lOutputChannelLabel: Channel, breakForAny: bool, continueDijkstra: bool) → None¶ /** * brief Creates a distance map until any or all stop points provided are reached, starting from all the provided ROI sources.
- param - the distance map generated by the Dijkstra algorithm (an Channel)
- param - a collection of x,y,z triplets stop points in input channel referential (an unsigned long*)
- param - the number of triplets present in the collection of triplets stop points (an unsigned long)
- param - the number of voxels to be processed after the stop condition is matched (an unsigned long)
- param - a traceback channel, can be NULL (an Channel)
- param - a label channel, can be NULL (an Channel)
- param - TRUE if the algorithm has to stop for any points, FALSE if all the points have to be reached to stop
- param - 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¶ /** * brief Gets the alpha parameter for the metric == 1. * return - the alpha parameter (an double) * note * - Only useful when metric is set to 1. *sa getMetric() */
-
getEuclideanBias(self) → float¶ /** * brief Gets the Euclidean bias that will be the minimum Dijkstra distance between voxels. * return - the minimum distance between voxels (an double) * 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 */
-
getGaussianPeakCenterValue(self) → float¶ /** * brief Sets the peak position of the gaussian used if the metric == 1. * param - peak center of the gaussian (a double) * note * - Only useful when metric is set to 1. * sa setMetric() */
-
getIndexOfStopPointReach(self) → int¶ /** * brief Retrieve the index reached by the Dijkstra algorithm.
- return - index in the input channel (a long long)
- note
- Only useful when distance map was generated using methods createDistanceMapUntilAnyPointInTargetRoiIsReached, createDistanceMapUntilPointInWorldCoordinatesIsReached
- or createDistanceMapUntilPointsAreReached.
*/
-
getKappa(self) → float¶ /** * brief Gets the kappa parameter for the metric == 1. * return - the kappa parameter (an double) * note * - Only useful when metric is set to 1. *sa getMetric() */
-
getMetric(self) → int¶ /** * brief Gets the metric used by the Dijkstra algorithm. * return - 0 or 1 * note * - If the metric chosen is 0, the metric function will be: * DijkstraDistanceBetween(a,b) = (Ia-Ib)^2 + EuclideanBias*EuclideanDistance(a,b); * note * - If the metric chosen is 1, the metric function will be: * DijkstraDistanceBetween(a,b) = (Ia-Ib)^2 + EuclideanBias*EuclideanDistance(a,b) + alpha(1.0 - exp(-(b-gaussianPeakCenterValue)^2/kappa*sigmaPow2)); * where a and b are Neighbor, Ia and Ib are intensity at a and b */
-
getNeighborCount(self) → int¶ /** * brief Gets the number of neighbors used by the Dijkstra algorithm (the connectivity). * return - the number of neighbors (an unsigned char) * note * - Can be 6, 18 or 26 */
-
getROI(self, index: int) → ROI¶ /** * brief Retrieves a particular ROI from the index specified slot.
- param - the slot index (an unsigned char)
- return - the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
getROICount(self) → int¶ /** * brief Returns the number of ROIs that have been set as sources.
- return - the number of ROIs that have been provided (an unsigned char)
- note
- A maximum of 10 ROI can be provided.
*/
-
getSigmaPow2(self) → float¶ /** * brief Gets the variance used by the gaussian used if the metric == 1 * return - variance of the gaussian (an double) * note * - Only useful when metric is set to 1. * sa setMetric() */
-
none()¶
-
setAlphaParameter(self, alpha: float) → None¶ /** * brief Sets the alpha parameter for the metric == 1. * param - the alpha parameter (an double) * note * - Only useful when metric is set to 1. *sa getMetric() */
-
setEuclideanBias(self, EuclideanBias: float) → None¶ /** * brief Provides an Euclidean bias that will be the minimum Dijkstra distance between voxels. * param - the minimum distance between voxels (a double) * 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. */
-
setGaussianPeakCenterValue(self, aPeakCenter: float) → None¶ /** * brief Sets the peak position of the gaussian used if the metric == 1. * param - peak center of the gaussian (a double) * note * - Only useful when metric is set to 1. * sa setMetric() */
-
setInputChannelAndWorkingArea(self, inputChannel: Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None¶ /** * brief Sets the channel that will be used by the Dijkstra algorithm to calculate distance.
- param - the input channel (an Channel)
- param - the minimum X index in the input channel (an unsigned short)
- param - the minimum Y index in the input channel (an unsigned short)
- param - the minimum Z index in the input channel (an unsigned short)
- param - the maximum X index in the input channel (an unsigned short)
- param - the maximum Y index in the input channel (an unsigned short)
- param - the maximum Z index in the input channel (an unsigned short)
- note
- The min and max boundaries must not describe a space bigger than the input channel.
*/
-
setInputLabelsChannel(self, aInputLabelsChannel: Channel) → None¶ /* brief method setInputLabelsChannel */
-
setKappa(self, kappa: float) → None¶ /** * brief Sets the kappa parameter for the metric == 1. * param - the kappa parameter (an double) * note * - Only useful when metric is set to 1. *sa getMetric() */
-
setMetric(self, metricType: int) → None¶ /** * brief Selects the metric to be used by the Dijkstra algorithm. * param - 0 or 1 * note * - If the metric chosen is 0, the metric function will be: * DijkstraDistanceBetween(a,b) = (Ia-Ib)^2 + EuclideanBias*EuclideanDistance(a,b); * note * - If the metric chosen is 1, the metric function will be: * DijkstraDistanceBetween(a,b) = (Ia-Ib)^2 + EuclideanBias*EuclideanDistance(a,b) + alpha(1.0 - exp(-(b-gaussianPeakCenterValue)^2/kappa*sigmaPow2)); * where a and b are Neighbors, Ia and Ib are intensity at a and b */
-
setNeighborCountTo18(self) → None¶ /** * brief Sets the number of neighbors used by the Dijkstra algorithm to 6 ( Neighbor distance == 1). */
-
setNeighborCountTo26(self) → None¶ /** * brief Sets the number of neighbors used by the Dijkstra algorithm to 6 ( Neighbor distance == 1). */
-
setNeighborCountTo6(self) → None¶ /** * brief Sets the number of neighbors used by the Dijkstra algorithm to 6 ( Neighbor distance == 1). */
-
setROI(self, index: int, aVolROI: ROI) → None¶ /** * brief Fills a particular ROI slot to be used as a source for the Dijkstra algorithm
- param - the slot index (an unsigned char)
- param - the ROI associated with this slot index (an ROI)
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
setSigmaPow2(self, aLimit: float) → None¶ /** * brief Sets the variance used by the gaussian used if the metric == 1. * param - variance of the gaussian (an double) * note * - Only useful when metric is set to 1. * sa setMetric() */
-
tracebackCPU(self, aROI: ROI, linputChannelTraceBack: Channel, aPath: VisualPath) → None¶ /** * brief Uses a traceback channel to fill a path from a ROI to the nearest source ROI. * param - a trace back start (an ROI) * param - a trace back channel (an ROI) * return - the resulting path (an VisualPath) */
-
Dijkstra2D¶
-
class
ORSModel.ors.Dijkstra2D¶ Bases:
ORSModel.ors.Unmanaged-
cleanDistanceMapChannel(self, outputChannel: Channel) → None¶ /** * brief Removes boundaries or non reached value from a distance map channel.
- param - a distance map channel (an Channel)
*/
-
createDistanceMap(self, lOutputChannelDistanceMap: Channel, lOutputChannelLabel: Channel) → None¶ /* brief method createDistanceMap */
-
getEuclideanBias(self) → float¶ /** * brief Get the Euclidean bias that will be the minimum Dijkstra distance between voxels. * return - the minimum distance between voxel (an double) * 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. */
-
getROICount(self) → int¶ /** * brief Returns the number of ROIs that have been set as sources.
- return - the number of ROIs that have been provided (an unsigned char)
- note
- A maximum of 10 ROI can be provided.
*/
-
getVolumeROI(self, index: int) → ROI¶ /** * brief Retrieves a particular ROI from the index specified slot.
- param - the slot index (an unsigned char)
- return - the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
none()¶
-
setEuclideanBias(self, EuclideanBias: float) → None¶ /** * brief Provides an Euclidean bias that will be the minimum Dijkstra distance between voxels. * param - the minimum distance between voxels (a double) * 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. */
-
setInputChannelAndWorkingArea(self, inputChannel: Channel, minX: int, minY: int, maxX: int, maxY: int, currentT: int) → None¶ /** * brief Sets the channel that will be used by the 2D Dijkstra algorithm to calculate distance.
- param - the input channel (an Channel)
- param - the minimum X index in the input channel (an unsigned short)
- param - the minimum Y index in the input channel (an unsigned short)
- param - the minimum Z index in the input channel (an unsigned short)
- param - the maximum X index in the input channel (an unsigned short)
- param - the maximum Y index in the input channel (an unsigned short)
- param - the maximum Z index in the input channel (an unsigned short)
- note
- The min and max boundaries must not describe a space bigger than the input channel.
*/
-
setNeighborCountTo4(self) → None¶ /** * brief Sets the number of neighbors used by the 2D Dijkstra algorithm to 8. */
-
setNeighborCountTo8(self) → None¶ /** * brief Sets the number of neighbors used by the 2D Dijkstra algorithm to 8. */
-
setVolumeROI(self, index: int, aVolROI: ROI) → None¶ /** * brief Fills a particular ROI slot to be used as a source for the Dijkstra algorithm
- param - the slot index (an unsigned char)
- param - the ROI associated with this slot index (an ROI)
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
DijkstraOnGraph¶
DimensionUnit¶
-
class
ORSModel.ors.DimensionUnit¶ Bases:
ORSModel.ors.Managed/** interface DimensionUnit * brief An entity describing a unit of measure used by ORS. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date august 2005 * * An entity describing a unit of measure used by the SDK. Units are predefined in the SDK. */
-
convertToUnit(self, aVolume: float, anIDimensionUnit: "DimensionUnit") → float¶ /* brief Converts from a unit to another unit. */
-
getDefault(self, dimensionType: int) → "DimensionUnit"¶ /** * brief Gets the default system unit. * return - a DimensionUnit* */
-
getDimensionID(self) → int¶ /** * brief Gets the unit dimension ID. * return - a CxvUniverse_Dimension * note * - See the CxvUniverse_Dimension enum in ORS_def.h to know the supported values. */
-
getDimensionType(self) → int¶ /* brief Returns a CxvUniverse_Dimension_Type describing the dimensionality of the dimension unit. 1: length; 2: surface; 3: volume; 4: angle. */
-
getReferenceUnitConvertedToUnit(self, aVolume: float) → float¶ /* brief Converts from MKS to another unit. */
-
getReferenceUnitToUnitFactor(self) → float¶ /** * brief Gets the unit factor. * return - a multiplying factor (a double) * note * - All factors are expressed in relation to 1 meter (the base unit). */
-
getUnitConvertedToReferenceUnit(self, aVolume: float) → float¶ /* brief Converts to MKS from another unit */
-
getUnitForID(self, pDimension: int) → "DimensionUnit"¶ /** * brief Gets the unit for the specified index. * param - a dimension index (an int) * return - a DimensionUnit* * note * - See the CxvUniverse_Dimension enum in ORS_def.h to know the supported values. */
-
getUnitWithAbbreviation(self, sAbbreviation: str) → "DimensionUnit"¶ /** * brief Gets the unit that has the specified abbreviation. * param - a text abbreviation (a string) * return - a DimensionUnit or none */
-
none()¶
-
DistanceChannelAnalyzer¶
-
class
ORSModel.ors.DistanceChannelAnalyzer¶ Bases:
ORSModel.ors.Unmanaged-
climbFromROI(self, lDistanceChannel: Channel, inputROI: ROI, outputROI: ROI) → ROI¶ /* brief method climbFromROI */
-
descentPathTowardMinimum(self, lDistanceChannel: Channel, inputROI: ROI, InputPath: VisualPath) → VisualPath¶ /* brief method descentPathTowardMinimum */
-
descentTowardMinimum(self, lDistanceChannel: Channel, inputROI: ROI, outputROI: ROI) → ROI¶ /* brief method descentTowardMinimum */
-
none()¶
-
EuclideanDistanceMapGenerator¶
-
class
ORSModel.ors.EuclideanDistanceMapGenerator¶ Bases:
ORSModel.ors.Unmanaged/** interface EuclideanDistanceMapGenerator * brief Exact euclidean distance map generator * * author N Piche * author All other members of ORS participated. * version 1.0 * date December 2015 * * Object used to generate euclidean distance map
*/-
createDistanceMap(self, seedChannel: Channel, outputChannel: Channel, timeStep: int, IProgress: Progress, bShowProgress: bool) → Channel¶ /* brief method createDistanceMap */
-
createDistanceMapFromROI(self, seedVolumeROI: ROI, outputChannel: Channel, timeStep: int, IProgress: Progress, bShowProgress: bool) → Channel¶ /* brief method createDistanceMapFromVolumeROI */
-
none()¶
-
FaceVertexMesh¶
FastMarching¶
-
class
ORSModel.ors.FastMarching¶ Bases:
ORSModel.ors.Unmanaged-
Dummy= <ORSModel.ors.FastMarching object>¶
-
cleanSpeedMapChannel(self, outputChannel: Channel) → None¶ /** * brief Remove boundary or non reached value from a speed map Channel
- param - a distance map Channel (an Channel)
*/
-
continueDistanceMapForNBIteration(self, lOutputChannelSpeedMap: Channel, forNbIteration: int, autoUpdateROI: bool) → None¶ /* brief method continueDistanceMapForNBIteration */
-
createDistanceMap(self, inChannelDistanceMap: Channel, positionTripleInSourceRef: int, nbPosition: int, lMaskChannel: Channel, traceBackChannel: Channel) → Channel¶ /* brief method createDistanceMap */
-
createDistanceMapForNBIteration(self, lOutputChannelSpeedMap: Channel, forNbIteration: int, autoUpdateROI: bool, lMaskChannel: Channel) → None¶ /* brief method createDistanceMapForNBIteration */
-
createDistanceMapWithMask(self, inChannelDistanceMap: Channel, lMaskChannel: Channel) → Channel¶ /* brief method createDistanceMap */
-
getEuclideanBias(self) → float¶ /** * brief get the Euclidean bias that will be the minimum Dijkstra distance between voxels * return - the minimum distance between voxel (an double) * note * - Neighbor of distance 1 will have a bias of spacialTerm * - Neighbor of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm * - Neighbor of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm */
-
getROI(self, index: int) → ROI¶ /** * brief Retrieves a particular ROI from the index specified slot.
- param - the slot index (an unsigned char)
- return - the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
getROICount(self) → int¶ /** * brief Returns the number of ROIs that have been set as sources.
- return - the number of ROIs that have been provided (an unsigned char)
- note
- A maximum of 10 ROI can be provided.
*/
-
none()¶
-
setEuclideanBias(self, EuclideanBias: float) → None¶ /** * brief Provides an Euclidean bias that will be the minimum Dijkstra distance between voxels. * param - the minimum distance between voxels (a double) * note * - Neighbors of distance 1 will have a bias of spacialTerm. * - Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm. * - Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm. */
-
setInputChannelAndWorkingArea(self, inputChannel: Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None¶ /** * brief Sets the channel that will be used by the FastMarching algorithm to calculate distance.
- param - the input channel (an Channel)
- param - the minimum X index in the input channel (an unsigned short)
- param - the minimum Y index in the input channel (an unsigned short)
- param - the minimum Z index in the input channel (an unsigned short)
- param - the maximum X index in the input channel (an unsigned short)
- param - the maximum Y index in the input channel (an unsigned short)
- param - the maximum Z index in the input channel (an unsigned short)
- note
- The min and max boundaries must not describe a space bigger than the input channel.
*/
-
setROI(self, index: int, aVolROI: ROI) → None¶ /** * brief Fills a particular ROI slot to be used as a source for the Dijkstra algorithm
- param - the slot index (an unsigned char)
- param - the ROI associated with this slot index (an ROI)
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
FastMarching2D¶
-
class
ORSModel.ors.FastMarching2D¶ Bases:
ORSModel.ors.Unmanaged/** interface FastMarching2D * brief * * author Benjamin Provencher. * author All other members of ORS participated. * version 1.0 * date June 2010 * */
-
Dummy= <ORSModel.ors.FastMarching2D object>¶
-
cleanSpeedMapChannel(self, outputChannel: Channel) → None¶ /** * brief Removes boundaries or non reached values from a speed map channel
- param - a distance map channel (an Channel)
*/
-
createDistanceMap(self, lOutputChannelDistanceMap: Channel, lMaskChannel: Channel) → None¶ /* brief method createDistanceMap */
-
createDistanceMapForNBIteration(self, lOutputChannelSpeedMap: Channel, forNbIteration: int, autoUpdateROI: bool, lMaskChannel: Channel) → None¶ /* brief method createDistanceMapForNBIteration */
-
getMeanValue(self) → float¶ /** * brief get the mean value used in the setian metric * retur - float a normalized value */
-
getROICount(self) → int¶ /** * brief Returns the number of ROIs that have been set as sources.
- return - the number of ROIs that have been provided (an unsigned char)
- note
- A maximum of 10 ROI can be provided.
*/
-
getVolumeROI(self, index: int) → ROI¶ /** * brief Retrieves a particular ROI from the index specified slot.
- param - the slot index (an unsigned char)
- return - the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
none()¶
-
setEuclideanBias(self, EuclideanBias: float) → None¶ /** * brief Provides an Euclidean bias that will be the minimum Dijkstra distance between voxels. * param - the minimum distance between voxels (a float) * note * - Neighbors of distance 1 will have a bias of spacialTerm. * - Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm. * - Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm. */
-
setInputChannelAndWorkingArea(self, inputChannel: Channel, minX: int, minY: int, maxX: int, maxY: int, currentT: int) → None¶ /** * brief Sets the channel that will be used by the 2D FastMarching algorithm to calculate distance.
- param - the input channel (an Channel)
- param - the minimum X index in the input channel (an unsigned short)
- param - the minimum Y index in the input channel (an unsigned short)
- param - the minimum Z index in the input channel (an unsigned short)
- param - the maximum X index in the input channel (an unsigned short)
- param - the maximum Y index in the input channel (an unsigned short)
- param - the maximum Z index in the input channel (an unsigned short)
- note
- The min and max boundaries must not describe a space bigger than the input channel.
*/
-
setMeanValue(self, mean: float) → None¶ /** * brief Set the mean value used in the setian metric * param - float a normalized value */
-
setVolumeROI(self, index: int, aVolROI: ROI) → None¶ /** * brief Fills a particular ROI slot to be used as a source for the Dijkstra algorithm
- param - the slot index (an unsigned char)
- param - the ROI associated with this slot index (an ROI)
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
FastMarchingWatershed2D¶
-
class
ORSModel.ors.FastMarchingWatershed2D¶ Bases:
ORSModel.ors.FastMarching2D/** interface FastMarchingWatershed2D * brief * * author Nicolas Piché. * author All other members of ORS participated. * version 1.0 * date July 2010 * */
-
none()¶
-
FordBellmanAutomata¶
-
class
ORSModel.ors.FordBellmanAutomata¶ Bases:
ORSModel.ors.Unmanaged-
cleanDistanceMapChannel(self, outputChannel: Channel) → None¶ /** * brief Remove boundary or non reached value from a distance map Channel
- param - a distance map Channel (an Channel)
*/
-
createDistanceMap(self, lOutputChannelDistanceMap: Channel, lOutputChannelTraceBack: Channel, lOutputChannelLabel: Channel, nbIteration: int) → None¶ /* brief method createDistanceMap */
-
getEuclideanBias(self) → float¶ /** * brief get the Euclidean bias that will be the minimum Dijkstra distance between voxels * return - the minimum distance between voxel (an float) * note * - Neighbor of distance 1 will have a bias of spacialTerm * - Neighbor of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm * - Neighbor of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm */
-
getROI(self, index: int) → ROI¶ /** * brief Retrieves a particular ROI from the index specified slot.
- param - the slot index (an unsigned char)
- return - the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
getROICount(self) → int¶ /** * brief Returns the number of ROIs that have been set as sources.
- return - the number of ROIs that have been provided (an unsigned char)
- note
- A maximum of 10 ROI can be provided.
*/
-
none()¶
-
setEuclideanBias(self, EuclideanBias: float) → None¶ /** * brief Provides an Euclidean bias that will be the minimum Dijkstra distance between voxels. * param - the minimum distance between voxels (a float) * note * - Neighbors of distance 1 will have a bias of spacialTerm. * - Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm. * - Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm. */
-
setInputChannelAndWorkingArea(self, inputChannel: Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None¶ /** * brief Sets the channel that will be used by the FordBellman algorithm to calculate distance.
- param - the input channel (an Channel)
- param - the minimum X index in the input channel (an unsigned short)
- param - the minimum Y index in the input channel (an unsigned short)
- param - the minimum Z index in the input channel (an unsigned short)
- param - the maximum X index in the input channel (an unsigned short)
- param - the maximum Y index in the input channel (an unsigned short)
- param - the maximum Z index in the input channel (an unsigned short)
- note
- The min and max boundaries must not describe a space bigger than the input channel.
*/
-
setVolumeROI(self, index: int, aVolROI: ROI) → None¶ /** * brief Fills a particular ROI slot to be used as a source for the Dijkstra algorithm
- param - the slot index (an unsigned char)
- param - the ROI associated with this slot index (an ROI)
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
GaussianPyramid¶
-
class
ORSModel.ors.GaussianPyramid¶ Bases:
ORSModel.ors.Unmanaged-
createGaussianPyramid(self, pIOutChannelsGaussianPyramid: Channel, pNumberOfLevels: int) → None¶ /* brief method createGaussianPyramid */
-
getGaussianPyramid(self, firstLevelChannel: Channel, secondLevelChannel: Channel, thirdLevelChannel: Channel, fourthLevelChannel: Channel) → None¶ /* brief method getGaussianPyramid */
-
getOriginSubsetPixels(self, x: int, y: int, z: int, t: int) → None¶ /* brief method getOriginSubsetPixels */
-
getSizeSubsetPixels(self, x: int, y: int, z: int, t: int) → None¶ /* brief method getSizeSubsetPixels */
-
none()¶
-
setLevelsGaussianPyramid(self, minLevel: int, maxLevel: int) → None¶ /* brief method setLevelsGaussianPyramid */
-
Graph¶
-
class
ORSModel.ors.Graph(self, anXML: str) → None¶ Bases:
ORSModel.ors.Node/* brief create a Graph from an xml */
-
getOutgoingEdgeCountForVertex(self, vertexIndex: int) → int¶ /* brief method getOutgoingEdgeCountForVertex */
-
getOutgoingEdgeForVertex(self, vertexIndex: int, index: int) → int¶ /* brief method getOutgoingEdgeForVertex */
-
none()¶
-
GraphBuilder¶
-
class
ORSModel.ors.GraphBuilder¶ Bases:
ORSModel.ors.Unmanaged-
addEdgesCollection(self, aCollection: int, collectionSize: int) → None¶ /* brief method addEdgesCollection */
-
none()¶
-
Group¶
-
class
ORSModel.ors.Group(self, anXML: str) → None¶ Bases:
ORSModel.ors.Node/* brief create a Group from an xml */
-
add(self, pObject: Managed) → None¶ /** * brief Adds an object to the group. * param - object to add (an Object) * note * - This container behaves like a set, i.e. objects can only appear once. */
-
addAll(self, IInputGroup: "Group") → None¶ /** * brief Appends the objects found in the supplied group to the group. * param - another group (an Group) * note * - This container behaves like a set, i.e. objects can only appear once. */
-
getAllContainedInstancesOf(self, pProgId: str) → List¶ /** * brief Returns all the objects of the supplied class found in the group. * param - a class name (a string) * return - a list of objects (an List) */
-
getAllContainedObjectsOfClassAndPrivateTitle(self, pProgId: str, pPrivateTitle: str) → List¶ /** * brief Returns all the objects of the supplied class and private title found in the group. * param - a class name (a string) * param - a private title (a string) * return - a list of objects (an List) */
-
getCount(self) → int¶ /** * brief Returns the count of objects in the group. * param - object count (an unsigned int) */
-
getIncludes(self, pObject: Managed) → bool¶ /** * brief Checks to see if an object is in the group. * param - object to check (an Object) * return - TRUE if object is in the group, FALSE otherwise */
-
getIndexOf(self, pObject: Managed) → int¶ /** * brief Returns the index of the supplied object in the group. * param - an object (an Object) * return - an index (an int), or -1 if the object is not in the group */
-
getIntersectionWith(self, IInputGroup: "Group", IInOutGroup: "Group") → "Group"¶ /** * brief Intersects the group with another group.
- param - the group to intersect with (an Group)
- param - the output group (an Group), see note below
- return - the intersected group
- note
- If a target group is supplied, data is written to it and returned, otherwise a new group is created.
- note
- The output group can be the same as the receiver group (i.e. can intersect with another group into itself).
*/
-
getObjectAt(self, pos: int) → Managed¶ /** * brief Returns the Nth object in the group. * param - an index (an unsigned int) * return - an object (an Object) */
-
getSubtractionFrom(self, IInputGroup: "Group", IInOutGroup: "Group") → "Group"¶ /** * brief Subtracts another group from the group.
- param - the group to subtract (an Group)
- param - the output group (an Group), see note below
- return - the subtracted group
- note
- If a target group is supplied, data is written to it and returned, otherwise a new group is created.
- note
- The output group can be the same as the receiver group (i.e. can subtract another group into itself), but the output
- group cannot be the subtraction group.
*/
-
getUnionWith(self, IInputGroup: "Group", IInOutGroup: "Group") → "Group"¶ /** * brief Merges the group with another group.
- param - the group to merge with (an Group)
- param - the output group (an Group), see note below
- return - the merged group
- note
- This container behaves like a set, i.e. objects can only appear once.
- note
- If a target group is supplied, data is written to it and returned, otherwise a new group is created.
- note
- The output group can be the same as the receiver group (i.e. can merge with another group into itself).
*/
-
none()¶
-
HalfEdgeMesh¶
-
class
ORSModel.ors.HalfEdgeMesh(self, anXML: str) → None¶ Bases:
ORSModel.ors.Mesh/* brief create a HalfEdgeMesh from an xml */
-
getAsFaceVertexModelCopy(self, pInOutMeshModel: FaceVertexMesh) → FaceVertexMesh¶ /* * brief Get a copy of this mesh in Face Vertex topology. */
-
getEdgesInFaceVertexTopology(self, iTIndex: int) → ArrayUnsignedLong¶ /* * brief Get the edges in Face Vertex Mesh Topology. */
-
getFacesAdjacencyArray(self, iTIndex: int) → ArrayUnsignedLong¶ /** * brief Get the Faces Adjacent Edge Array, containning, for each face f, the index e of an adjacent edge (i.e. pFaceAdjacentEdges->at(faceIdx) == edgeIdx) * param - the the time step (an unsigned short) * return - an array of long (an ArrayLong) */
-
getVerticesAdjacencyArray(self, iTIndex: int) → ArrayUnsignedLong¶ /** * brief Get the Vertices Outgoing Edge Array, containning, for each vertex v, the index e of a edge outgoing from v (i.e. pVerticesOutgoingEdges->at(vertexIdx) == outgoingEdgeIdx) * param - the the time step (an unsigned short) * return - an array of long (an ArrayLong) */
-
none()¶
-
HistogramAnalyzer¶
-
class
ORSModel.ors.HistogramAnalyzer¶ Bases:
ORSModel.ors.Unmanaged-
fillHistogram1DFromChannel(self, IHistogramData: HistogramData, IChannel1: Channel, tChannel: int, IROI: ROI, tROI: int) → None¶ /** * brief Fill a 1D histogram from the channel values, over the voxels specified by the ROI * param - the 1D histogram to fill (an HistogramData) * param - the channel (an Channel) * param - the t index of the channel (an unsigned int) * param - the ROI specifying what channel voxels to include (an ROI). If this parameter is given as nullptr, all channel voxels will be used. * param - the t index of the ROI (an unsigned int) * * note When a ROI is given, it should have the same shape as the channel (size, location, orientation, spacing). */
-
fillHistogram1DFromChannelSubset(self, IHistogramData: HistogramData, IChannel1: Channel, tChannel: int, xmin: int, ymin: int, zmin: int, xmax: int, ymax: int, zmax: int) → None¶ /** * brief Fill a 1D histogram from the channel values, over a subset of the volume * param - the 1D histogram to fill (an HistogramData) * param - the channel (an Channel) * param - the t index of the channel (an unsigned int) * param - the minimal x index of the channel to use (an unsigned int) * param - the minimal y index of the channel to use (an unsigned int) * param - the minimal z index of the channel to use (an unsigned int) * param - the maximal x index of the channel to use (an unsigned int) * param - the maximal y index of the channel to use (an unsigned int) * param - the maximal z index of the channel to use (an unsigned int) */
-
fillHistogram1DFromCollection(self, IHistogramData: HistogramData, ICollection1: SequenceableCollection, IFilterCollection: SequenceableCollection, IArrayBinIndexes: ArrayUnsignedLONGLONG) → None¶ /** * brief Fill a 1D histogram from the collection values, over the elements specified by the filter collection * param - the 1D histogram to fill (an HistogramData) * param - the collection values (a SequenceableCollection) * param - the filter collection (a SequenceableCollection). If this parameter is given as nullptr, all elements of the collection values will be used. * param - an array filled with the bin index of each element. If this parameter is given as nullptr, these indexes won’t be returned. * * note Any element different than 0 in the filter collection will be included in the histogram, if it is included in the range specified by the histogram. */
-
fillHistogram1DFromCollectionSubset(self, IHistogramData: HistogramData, ICollection1: SequenceableCollection, indexStart: int, indexEnd: int) → None¶ /** * brief Fill a 1D histogram from the collection values, over a subset of the collection * param - the 1D histogram to fill (an HistogramData) * param - the collection (a SequenceableCollection) * param - the first index of the collection to use (an unsigned long long) * param - the last index of the collection to use (an unsigned long long) */
-
fillHistogram2DFromChannels(self, IHistogramData: HistogramData, IChannel1: Channel, IChannel2: Channel, tChannel1: int, tChannel2: int, IROI: ROI, tROI: int, IProgress: Progress) → None¶ /** * brief Fill a 2D histogram from the channels values, over the voxels specified by the ROI * param - the 2D histogram to fill (an HistogramData) * param - the channel of the first dimension (an Channel) * param - the channel of the second dimension (an Channel) * param - the t index of the channel of the first dimension (an unsigned int) * param - the t index of the channel of the second dimension (an unsigned int) * param - the ROI specifying what channel voxels to include (an ROI). If this parameter is given as nullptr, all channel voxels will be used. * param - the t index of the ROI (an unsigned int) * note Both channels should have the same shape (size, location, orientation, spacing). * note When a ROI is given, it should have the same shape as the channels (size, location, orientation, spacing). */
-
fillHistogram2DFromChannelsSubset(self, IHistogramData: HistogramData, IChannel1: Channel, IChannel2: Channel, tChannel: int, xmin: int, ymin: int, zmin: int, xmax: int, ymax: int, zmax: int) → None¶ /** * brief Fill a 2D histogram from the channels values, over a subset of the volume * param - the 2D histogram to fill (an HistogramData) * param - the channel of the first dimension (an Channel) * param - the channel of the second dimension (an Channel) * param - the t index of the channels (an unsigned int) * param - the minimal x index of the channels to use (an unsigned int) * param - the minimal y index of the channels to use (an unsigned int) * param - the minimal z index of the channels to use (an unsigned int) * param - the maximal x index of the channels to use (an unsigned int) * param - the maximal y index of the channels to use (an unsigned int) * param - the maximal z index of the channels to use (an unsigned int) * * note Both channels should have the same shape (size, location, orientation, spacing). */
-
fillHistogram2DFromCollections(self, IHistogramData: HistogramData, ICollection1: SequenceableCollection, ICollection2: SequenceableCollection, IFilterCollection: SequenceableCollection, IArrayBinIndexes: ArrayUnsignedLONGLONG) → None¶ /** * brief Fill a 2D histogram from the collections values, over the elements specified by the filter collection * param - the 2D histogram to fill (an HistogramData) * param - the collection values of the first dimension (a SequenceableCollection) * param - the collection values of the second dimension (a SequenceableCollection) * param - the filter collection (a SequenceableCollection). If this parameter is given as nullptr, all elements of the collections values will be used. * param - an array filled with the linear bin index of each element. If this parameter is given as nullptr, these indexes won’t be returned. * * note All collections should have the same size * note Any element different than 0 in the filter collection will be included in the histogram, if it is included in the range specified by the histogram. */
-
fillHistogram2DFromCollectionsSubset(self, IHistogramData: HistogramData, ICollection1: SequenceableCollection, ICollection2: SequenceableCollection, indexStart: int, indexEnd: int) → None¶ /** * brief Fill a 2D histogram from the collections values, over a subset of the collection * param - the 2D histogram to fill (an HistogramData) * param - the collection of the first dimension (a SequenceableCollection) * param - the collection of the second dimension (a SequenceableCollection) * param - the first index of the collections to use (an unsigned long long) * param - the last index of the collections to use (an unsigned long long) * * note Both collections should have the same size */
-
getOtsuThreshold(self, IHistogramData: HistogramData, dimension: int) → float¶ /** * brief Computes the Otsu threshold value along a dimension * param - the ND histogram (an HistogramData) * param - the dimension along which the threshold is computed (an unsigned int) */
-
mapHistogram2DLabels(self, IHistogramData: HistogramData, ILMRHistogramLabels: MultiROI, IChannel1: Channel, IChannel2: Channel, tChannel1: int, tChannel2: int, IROI: ROI, tROI: int, ILMROutput: MultiROI, tLMR: int) → None¶ /** * brief Map labels of a LMR having the same shape as the 2D histogram into a LMR using the channels values * param - the 2D histogram (an HistogramData) * param - the LMR of labels (histogram classification) (an MultiROI) * param - the channel of the first dimension (an Channel) * param - the channel of the second dimension (an Channel) * param - the t index of the channel of the first dimension (an unsigned int) * param - the t index of the channel of the second dimension (an unsigned int) * param - the ROI specifying what channel voxels to include (an ROI). If this parameter is given as nullptr, all channel voxels will be used. * param - the t index of the ROI (an unsigned int) * param - the LMR receiving the labels (volume segmentation) (an MultiROI) * param - the t index of the LMR (an unsigned int) * note This method is called to segment a pair of channels from an histographic segmentation * note The LMR of labels should have the same size as the histogram * note Both channels should have the same shape (size, location, orientation, spacing). * note When a ROI is given, it should have the same shape as the channels (size, location, orientation, spacing). * note The output LMR should have the same shape as the channels (size, location, orientation, spacing). */
-
none()¶
-
HistogramData¶
-
class
ORSModel.ors.HistogramData¶ Bases:
ORSModel.ors.Node- /** interface HistogramData
- brief An object that contains histogram data.
- author Thierry Côté.
- author All other members of ORS participated.
- version 1.0
- date August 2005
- An object that contains histogram data. Histograms can contain multiple dimensions (ex: one dimension for each color in a multicolor volume, and another for all of them).
- And, it can be in 1D or 2D, based on intensity for the 1D, and on both intensity and gradient in 2D. Size of bins stays constant across dimensions, but it is possible to choose
- different bin sizes for 1D and 2D.
*/
HistogramData.__init__(self, anXML: str) -> None /* brief create a HistogramData from an xml */
-
addCountAtIndex1D(self, iIndex: int, countToAdd: int) → None¶ /** * brief Add a number of counts at the given indexes * param - bin index of the dimension 0 * param - bin index of the dimension 1 * param - number of counts to add * note - This method is to be used only when the number of dimensions is 2 */
-
addCountAtIndex2D(self, iIndex0: int, iIndex1: int, countToAdd: int) → None¶ /** * brief Add a number of counts at the given indexes * param - bin index of the dimension 0 * param - bin index of the dimension 1 * param - number of counts to add * note - This method is to be used only when the number of dimensions is 2 */
-
addCountAtIndexND(self, iIndex: ArrayUnsignedLong, countToAdd: int) → None¶ /** * brief Add a number of counts at the given indexes * param - array of the bin indexes (1 index for each dimension) * param - number of counts to add */
-
addCountAtValue1D(self, dValue: float, countToAdd: int, pBinIndex: int) → None¶ /** * brief Add a number of counts for the given values * param - value in dimension 0 * param - value in dimension 1 * param - number of counts to add * param - returned value of the linear bin index where the count is added * note - This method is to be used only when the number of dimensions is 2 * note - If the value is outside the range in any dimension, the count is added to no bin and the returned value of the linear bin index is 0 * sa isValueInsideRangeLimits() */
-
addCountAtValue2D(self, dValue0: float, dValue1: float, countToAdd: int, pLinearBinIndex: int) → None¶ /** * brief Add a number of counts for the given values * param - value in dimension 0 * param - value in dimension 1 * param - number of counts to add * param - returned value of the linear bin index where the count is added * note - This method is to be used only when the number of dimensions is 2 * note - If the value is outside the range in any dimension, the count is added to no bin and the returned value of the linear bin index is 0 * sa isValueInsideRangeLimits() */
-
addCountAtValueND(self, dValues: ArrayDouble, countToAdd: int, pLinearBinIndex: int) → None¶ /** * brief Add a number of counts for the given values * param - array of values (1 value for each dimension) * param - number of counts to add * param - returned value of the linear bin index where the count is added * note - If the value is outside the range in any dimension, the count is added to no bin and the returned value of the linear bin index is 0 * sa isValueInsideRangeLimits() */
-
copyInto(self, destination: "HistogramData") → None¶ /** * brief Copies the current histogram data in to the destination * param - destination Histogram * return void */
-
downSample(self, dimension: int, dStart: float, dEnd: float, nBins: int) → "HistogramData"¶ - /**
- brief Returns a downsampled histogram
- param - index of the dimension (starting at 0)
- param - start of the bin edge
- param - end of the bin edge
- param - number of bins for the new histogram
- return - HistogramData
- note - If the number of bins requested is greater than or equal to the current number, return a copy of the histogram
*/
HistogramData.downSample(self, dimension: int, nBins: int) -> “HistogramData” /**
- brief Returns a downsampled histogram
- param - index of the dimension (starting at 0)
- param - number of bins for the new histogram
- return - HistogramData
- note - If the number of bins requested is greater than or equal to the current number, return a copy of the histogram
*/
-
getBinCount(self, dimension: int) → int¶ /** * brief Get the number of bins in a given dimension. * param - index of the dimension (starting at 0) * return The number of bins * sa getBinCounts() */
-
getBinCounts(self) → ArrayUnsignedLong¶ /** * brief Get the number of bins in each dimension. * return An array with the number of bins in each dimension (an ArrayUnsignedLong) * sa getBinCount(), getDimensionCount() */
-
getBinEdges(self, dimension: int) → ArrayDouble¶ /** * brief Get the bin edges of the range in a given dimension * param - index of the dimension (starting at 0) * return An array with the bin edges (the number of edges is 1 more than the number of bins) */
-
getBinEdgesEnd(self, dimension: int) → float¶ /** * brief Get the ending value of the range in a given dimension * param - index of the dimension (starting at 0) * return The ending value of the range */
-
getBinEdgesStart(self, dimension: int) → float¶ /** * brief Get the starting value of the range in a given dimension * param - index of the dimension (starting at 0) * return The starting value of the range */
-
getCountAtIndex1D(self, iIndex: int) → int¶ /** * brief Get the number of counts at the given index * param - bin index * return Number of counts * note - This method is to be used only when the number of dimensions is 1 */
-
getCountAtIndex2D(self, iIndex0: int, iIndex1: int) → int¶ /** * brief Get the number of counts at the given index * param - bin index * return Number of counts * note - This method is to be used only when the number of dimensions is 1 */
-
getCountAtIndexND(self, iIndex: ArrayUnsignedLong) → int¶ /** * brief Get the number of counts at the given indexes * param - array of bin indexes (1 value for each dimension) * return Number of counts */
-
getCumulativeDistribution(self, dimension: int) → "HistogramData"¶ /** * brief Computes the cumulative distribution along one dimension * param - dimension along which the cumulation is made * return New histogramData */
-
getDimensionCount(self) → int¶ /** * brief Get the number of dimensions. * return The number of dimensions (an unsigned int) * sa setDimensionCount() */
-
getIndexAtValue1D(self, dValue: float) → int¶ /** * brief Determines the bin index for a given value * param - value * return - bin index * note - This method is to be used only when the number of dimensions is 1 * note - The same guidelines for the value of the bin index returned as specified in getIndexAtValueForDimension() applies * sa isValueInsideRangeLimits(), getIndexAtValueForDimension() */
-
getIndexAtValueForDimension(self, dimension: int, dValue: float) → int¶ /** * brief Determines the bin index for a given value in a given dimension * param - index of the dimension (starting at 0) * param - value * return - bin index * note - If the value is lower than the range start, the bin index returned is 0 * note - If the value is higher than the range end, the bin index returned is the bin index of the last bin * sa isValueInsideRangeLimits() */
-
getIndexAtValueND(self, dValues: ArrayDouble) → ArrayUnsignedLong¶ /** * brief Determines the bin indexes for a set of values * param - array of values (1 value for each dimension) * return - array of bin indexes (1 index for each dimension) * note - The same guidelines for the value of the bin index returned as specified in getIndexAtValueForDimension() applies * sa isValueInsideRangeLimits(), getIndexAtValueForDimension() */
-
getIsDataInitialized(self) → bool¶ /** * brief Get the status of the data * return - TRUE if the data is initialized, FALSE otherwise * sa initializeData() */
-
getIsHistogramDegenerated(self) → bool¶ /** * brief Get the degenerated state of the histogram * return TRUE if the histogram is degenerated, FALSE otherwise * note The histogram is degenerated when the “mathematical” number of dimensions is 0. It happens when a sum of counts is computed over a 1D histogram. In that case, this resulting histogram still contains 1 value. Internally, it is kept as a 1D histogram with a range having 1 bin, but this range is not representative. * sa getDimensionCount() */
-
getIsSparse(self) → bool¶ /** * brief Get the sparse representation state * return - TRUE if using a sparse represenation, FALSE if using a dense representation * sa setUseSparse() */
-
getTotalCount(self) → int¶ /** * brief Get the total number of counts * return Total number of counts */
-
initializeData(self) → bool¶ /** * brief Initialize the memory to contain the histogram data. If the data is already initialized, all values of the data are set to 0 * return - TRUE if successful, FALSE otherwise * note - The number of dimensions and the range of each dimension must be set before the initialization of the data can be made * sa getIsDataInitialized(), setDimensionCount(), setBinEdgesFromWidth() */
-
isValueInsideRangeLimits(self, dimension: int, dValue: float) → bool¶ /** * brief Determines if the given value is in the range * param - index of the dimension (starting at 0) * param - value to test * return - TRUE if the value is inside the range, FALSE otherwise */
-
none()¶
-
setBinEdgesFromArray(self, dimension: int, dValues: ArrayDouble) → None¶ /** * brief Set the range for a given dimension, with bin edges specified individually * param - array of bin edges (the number of bins is 1 less than the number of edges specified) */
-
setBinEdgesFromRange(self, dimension: int, dStart: float, dEnd: float, nbBins: int) → None¶ /** * brief Set the range for a given dimension, for equally spaced bins, using the starting value, the end value and the number of bins * param - index of the dimension (starting at 0) * param - range start * param - range end * param - number of bins * sa setBinEdgesFromWidth() */
-
setBinEdgesFromWidth(self, dimension: int, dStart: float, dWidth: float, nbBins: int) → None¶ /** * brief Set the range for a given dimension, for equally spaced bins, using the starting value, the bin width and the number of bins * param - index of the dimension (starting at 0) * param - range start * param - bin width * param - number of bins * sa setBinEdgesFromRange() */
-
setCountAtIndex1D(self, iIndex: int, countToSet: int) → None¶ /** * brief Set the number of counts at the given index * param - bin index in which the count should be set * param - number of counts to set * note - This method is to be used only when the number of dimensions is 1 */
-
setCountAtIndex2D(self, iIndex0: int, iIndex1: int, countToSet: int) → None¶ /** * brief Set the number of counts at the given index * param - bin index in which the count should be set * param - number of counts to set * note - This method is to be used only when the number of dimensions is 1 */
-
setCountAtIndexND(self, iIndex: ArrayUnsignedLong, countToSet: int) → None¶ /** * brief Set the number of counts at the given indexes * param - array of bin indexes (1 value for each dimension) * param - number of counts to set */
-
setDimensionCount(self, nbDimensions: int) → None¶ /** * brief Sets the number of dimensions. * param - number of dimensions (an unsigned int) * note Changing this value clears the histogram data and the ranges previously defined * sa getDimensionCount() */
-
setUseSparse(self, bUseSparse: bool) → None¶ /** * brief Specifies if a sparse representation should be used internally * param - TRUE to use a sparse represenation, FALSE to use a dense representation * sa getIsSparse() */
-
sumAlongDimension(self, dimension: int) → "HistogramData"¶ /** * brief Sum the counts along one dimension * param - dimension along which the sum is made * return New histogramData * note The returned histogramData have 1 dimension less than the current histogramData, except if the current histogramData have 1 dimension, in which case the returned histogramData will have also 1 dimension (but with a degenerated range) * sa getBinCounts() */
Image¶
-
class
ORSModel.ors.Image¶ Bases:
ORSModel.ors.Node-
copyDataFromChannel(self, aChannel: Channel, timeStep: int) → None¶ /* brief method copyDataFromChannel */
-
copyDataFromChannelWithLookupTable(self, aChannel: Channel, timeStep: int, levelingMinValue: float, levelingMaxValue: float, slabThickness: float, aLUT: LookupTable, alpha: float) → None¶ /* brief method copyDataFromChannel */
-
dtype¶
-
exportToFile(filename)¶ Exports an image to a file
Parameters: filename (file saving) – fully qualified file name Returns: exportSuccess (bool) – True if succeeded, False otherwise
-
flipImageDataHorizontally()¶
-
flipImageDataVertically()¶
-
getComponent(index)¶
-
getComponentCountPerPixel(self) → int¶ /** * brief Gets the number of components per pixel. * return - a count (an unsigned short) */
-
getComponents()¶
-
getDataOffsetForPixelComponent(self, componentIndex: int) → float¶ /* brief method getDataOffsetForPixelComponent */
-
getDataSlopeForPixelComponent(self, componentIndex: int) → float¶ /* brief method getDataSlopeForPixelComponent */
-
getDataType(self) → int¶ /** * brief Gets the image data type. * param - a type (a long) * note * - See CxvChannel_Data_Type (in ORS_def.h) for supported types. * sa CxvChannel_Data_Type, setDataType() * */
-
getIsDataInitialized(self) → bool¶ /** * brief Checks if the internal data is initialized. * return - true if initialized correctly, false otherwise * note * - The channel must be initialized before you start using the channel. * sa initializeData() * */
-
getNDArray()¶
-
getXSize(self) → int¶ /** * brief Gets the X size of the image. * return - the X size (an unsigned short) */
-
getYSize(self) → int¶ /** * brief Gets the Y size of the image. * return - the Y size (an unsigned short) */
-
initialize(self, aDataType: int, componentPerPixelCount: int, aBoundedPlane: Rectangle) → bool¶ /** * brief Initializes the image. * param - the datatype (a long, see note below) * param - the number of components per pixel (an unsigned short) * param - the image size (a Rectangle) * return - TRUE if successful, FALSE otherwise * note * - See CxvChannel_Data_Type (in ORS_def.h) for supported data types. */
-
loadFromFile(filename)¶ Loads an image from a file
Parameters: filename (file) – fully qualified file name Returns: exportSuccess (bool) – True if succeeded, False otherwise
-
none()¶
-
setDataOffsetForPixelComponent(self, offset: float, componentIndex: int) → None¶ /* brief method setDataOffsetForPixelComponent */
-
setDataSlopeForPixelComponent(self, slope: float, componentIndex: int) → None¶ /* TODO make a subclass [id(211), helpstring(“method getDICOMContainer”)] HRESULT getDICOMContainer( [out, retval] BSTR* sData); [id(212), helpstring(“method getHasDICOMAttributes”)] HRESULT getHasDICOMAttributes([out, retval] BOOL* pValue); [id(213), helpstring(“method setDICOMContainer”)] HRESULT setDICOMContainer( unsigned char* sData); [id(214), helpstring(“method getDICOMAttribute”)] HRESULT getDICOMAttribute( unsigned short iGroup, unsigned short iElement, BOOL bSearchSubs, long* pSuccess, [out, retval] BSTR* pValue); [id(215), helpstring(“method getDICOMAttributeAsUnsignedChar”)] HRESULT getDICOMAttributeAsUnsignedChar( unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bSearchSubs, long* pSuccess, [out, retval] unsigned char* pValue); [id(216), helpstring(“method getDICOMAttributeAsUnsignedShort”)] HRESULT getDICOMAttributeAsUnsignedShort( unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bSearchSubs, long* pSuccess, [out, retval] unsigned short* pValue); [id(217), helpstring(“method getDICOMAttributeAsUnsignedInt”)] HRESULT getDICOMAttributeAsUnsignedInt( unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bSearchSubs, long* pSuccess, [out, retval] unsigned int* pValue); [id(218), helpstring(“method getDICOMAttributeAsShort”)] HRESULT getDICOMAttributeAsShort( unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bSearchSubs, long* pSuccess, [out, retval] short* pValue); [id(219), helpstring(“method getDICOMAttributeAsInt”)] HRESULT getDICOMAttributeAsInt( unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bSearchSubs, long* pSuccess, [out, retval] int* pValue); [id(220), helpstring(“method getDICOMAttributeAsFloat”)] HRESULT getDICOMAttributeAsFloat( unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bSearchSubs, long* pSuccess, [out, retval] float* pValue); [id(221), helpstring(“method getDICOMAttributeAsDouble”)] HRESULT getDICOMAttributeAsDouble( unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bSearchSubs, long* pSuccess, [out, retval] double* pValue); [id(222), helpstring(“method setDICOMAttribute”)] HRESULT setDICOMAttribute(BSTR sValue, unsigned short iGroup, unsigned short iElement, BOOL bReplaceExisting, [out, retval] BOOL* pValue); [id(223), helpstring(“method setDICOMAttributeUnsignedChar”)] HRESULT setDICOMAttributeUnsignedChar(unsigned short iValue, unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bReplaceExisting, [out, retval] BOOL* pValue); [id(224), helpstring(“method setDICOMAttributeUnsignedShort”)] HRESULT setDICOMAttributeUnsignedShort(unsigned short iValue, unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bReplaceExisting, [out, retval] BOOL* pValue); [id(225), helpstring(“method setDICOMAttributeUnsignedInt”)] HRESULT setDICOMAttributeUnsignedInt(unsigned int iValue, unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bReplaceExisting, [out, retval] BOOL* pValue); [id(226), helpstring(“method setDICOMAttributeShort”)] HRESULT setDICOMAttributeShort(short iValue, unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bReplaceExisting, [out, retval] BOOL* pValue); [id(227), helpstring(“method setDICOMAttributeInt”)] HRESULT setDICOMAttributeInt(int iValue, unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bReplaceExisting, [out, retval] BOOL* pValue); [id(228), helpstring(“method setDICOMAttributeFloat”)] HRESULT setDICOMAttributeFloat(float iValue, unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bReplaceExisting, [out, retval] BOOL* pValue); [id(229), helpstring(“method setDICOMAttributeDouble”)] HRESULT setDICOMAttributeDouble(double iValue, unsigned short iGroup, unsigned short iElement, unsigned short iIndex, BOOL bReplaceExisting, [out, retval] BOOL* pValue);
[id(230), helpstring(“method iterateDICOMAttributes”)] HRESULT iterateDICOMAttributes( unsigned long long callbackFunction, unsigned short* userdata); [id(231), helpstring(“method copyDICOMAttributesFrom”)] HRESULT copyDICOMAttributesFrom(IORSImage* inputImage, BOOL bCopyPrivateAttributes); [id(232), helpstring(“method getDICOMAttributeFromSequence”)] HRESULT getDICOMAttributeFromSequence( unsigned short iGroup, unsigned short iElement, unsigned short iItemNo, unsigned short iElementGroup, unsigned short iElementElement, long* pSuccess, [out, retval] BSTR* pValue); [id(233), helpstring(“method removeAllPrivateDICOMAttributes”)] HRESULT removeAllPrivateDICOMAttributes(); */
-
setDirections(self, direction0: Vector3, direction1: Vector3) → None¶ /* brief method setDirections */
-
shape¶
-
ImageCollection¶
-
class
ORSModel.ors.ImageCollection(self, anXML: str) → None¶ Bases:
ORSModel.ors.Node/* brief create a ImageCollection from an xml */
-
getImageAtIndex(self, imageIndex: int) → Image¶ /** * brief Gets the image at an index position. * param - the image index (an unsigned long) * return - an image (an Image or NULL if index is invalid) */
-
getImageCount(self) → int¶ /** * brief Gets the image count. * return - the count of images (an unsigned long) */
-
getIndexOfImage(self, anImage: Image) → int¶ /** * brief Gets the index position of an image. * param - an image (an Image) * param - the image index (an int) * note * - Returns -1 if image is not present. */
-
insertImageAtIndex(self, imageIndex: int, anImage: Image) → None¶ /** * brief Inserts an image at a given index. * param - the image index (an unsigned long) * param - an image (an Image) */
-
insertImageFirst(self, anImage: Image) → None¶ /** * brief Inserts an image at start of list. * param - an image (an Image) */
-
insertImageLast(self, anImage: Image) → None¶ /** * brief Inserts an image at end of list. * param - an image (an Image) */
-
none()¶
-
ImageCollectionPresenter¶
-
class
ORSModel.ors.ImageCollectionPresenter(self, anXML: str) → None¶ Bases:
ORSModel.ors.DatasetPresenter/* brief create a ImageCollectionPresenter from an xml */
-
getNodeVisibleForImage(self, aNode: Node, anImage: Image) → bool¶ /* brief getNodeVisibleForImage */
-
none()¶
-
setNodeNotVisibleForImage(self, aNode: Node, anImage: Image) → None¶ /* brief setNodeNotVisibleForImage */
-
Intersection¶
-
class
ORSModel.ors.Intersection¶ Bases:
ORSModel.ors.Unmanaged/** interface Intersection * brief Represents a ray pick result. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date Jan 2005 * sa View::pick(), Node::pick() * * Used to represent a ray pick result. Note that Intersection * objects are purely transient and cannot be later retrieved. */
-
getClosestVisual(self) → Visual¶ /** * brief Returns the picked visual object closest to the pick point.
- return - a visual (an Visual), or NULL if no visual was picked
- note
- Since more than one visual can be found by the pick ray, either because visuals are superimposed
- or because they are found within the pick tolerance, this method returns the closest visual to
- the pick point.
- sa getHighlightedVisual(), getFarthestVisual()
*/
-
getClosestVisualOfClass(self, pProgId: str) → Visual¶ /** * brief Returns the visual object of a given class closest to the pick point.
- return - a visual (a Visual), or NULL if no visual was picked
- note
- Since more than one visual can be found by the pick ray, either because visuals are superimposed
- or because they are found within the pick tolerance, this method returns the closest visual to
- the pick point.
- sa getHighlightedVisual(), getFarthestVisual()
*/
-
getColor(self) → Color¶ /** * brief Returns the color value of the intersection.
- return - a color (a Color)
- sa getColorInPhysicalUnits()
*/
-
getColorInPhysicalUnits(self) → Color¶ /** * brief Gets the color value, adjusted to physical units (slope and offset).
- return - the color (a Color)
- sa getColor()
*/
-
getDistance(self) → float¶ /** * brief Returns the distance from the ray pick origin to the intersection.
- return - a double
- note
- Distances are calculated in pixels.
- sa
*/
-
getFarthestVisual(self) → Visual¶ /** * brief Returns the picked visual object farthest from the pick point.
- return - a visual (a Visual), or NULL if no visual was picked
- note
- Since more than one visual can be found by the pick ray, either because visuals are superimposed
- or because they are found within the pick tolerance, this method returns the farthest visual from
- the pick point.
- sa getHighlightedVisual(), getClosestVisual()
*/
-
getFarthestVisualOfClass(self, pProgId: str) → Visual¶ /** * brief Returns the visual object of a given class farthest from the pick point.
- return - a visual (a Visual), or NULL if no visual was picked
- note
- Since more than one visual can be found by the pick ray, either because visuals are superimposed
- or because they are found within the pick tolerance, this method returns the farthest visual from
- the pick point.
- sa getHighlightedVisual(), getClosestVisual()
*/
-
getHit(self) → bool¶ /** * brief Checks if the ray pick intersects something.
- return - true if the intersection is valid, false otherwise
*/
-
getMeshFace(self) → int¶ /** * brief When picking a mesh, returns the face index of the triangle being picked.
- return - a face index in the mesh (a long)
*/
-
getMeshFaceBary1(self) → float¶ /** * brief Returns the barycentric coordinate 1.
- return - a double between 0 and 1
- note - Barycentric coordinates indicate where an intersection is located within a polygon.
- sa getBary2()
*/
-
getMeshFaceBary2(self) → float¶ /** * brief Returns the barycentric coordinate 1.
- return - a double between 0 and 1
- note - Barycentric coordinates indicate where an intersection is located within a polygon.
- sa getBary2()
*/
-
getMeshVertexIndex0(self) → int¶ /** * brief When picking a mesh, returns the index 1 of the vertex being picked.
- return - a vertex index 1 (a long)
*/
-
getMeshVertexIndex1(self) → int¶ /** * brief When picking a mesh, returns the index 1 of the vertex being picked.
- return - a vertex index 1 (a long)
*/
-
getMeshVertexIndex2(self) → int¶ /** * brief When picking a mesh, returns the index 1 of the vertex being picked.
- return - a vertex index 1 (a long)
*/
-
getNearestMeshVertexIndex(self) → int¶ /** * brief When picking a mesh, returns the vertex index nearest to the point being picked.
- return - a vertex index in the mesh (a long)
*/
-
getNthPositionInLocalCoordinates(self, nth: int) → Vector3¶ /* brief method getNthPositionInLocalCoordinates */
-
getNthPositionInWorldCoordinates(self, nth: int) → Vector3¶ /* brief method getNthPositionInWorldCoordinates */
-
getOffset(self) → float¶ /** * brief Gets the intersection offset, which is the offset of the channel being picked.
- return - the offset (a double)
- sa getSlope()
*/
-
getPixelPositionInView(self) → Vector3¶ /** * brief Returns the position of the intersection in screen coordinates.
- return - a point (an Vector3)
*/
-
getPositionInLocalCoordinates(self) → Vector3¶ /** * brief Returns the position of the intersection in local coordinates.
- return - a point (a Vector3)
*/
-
getPositionInVoxelIndex(self) → Vector3¶ /** * brief Returns the position of the intersection as X/Y/Z indicies.
- return - a point (an Vector3)
- note
- The point vector will contain X/Y/Z indicies.
*/
-
getPositionInWorldCoordinates(self) → Vector3¶ /** * brief Returns the position of the intersection in world coordinates.
- return - a point (an Vector3)
*/
-
getScalarValue(self) → float¶ /** * brief Returns the scalar value of the picked triangle.
- return - the scalar value (a double)
*/
-
getSlope(self) → float¶ /** * brief Gets the intersection slope, which is the slope of the channel being picked.
- return - the slope (a double)
- sa getOffset()
*/
-
getStructuredGridAtIndex(self, iIndex: int) → StructuredGrid¶ /** * brief Returns the Nth picked structured grid object. * param - the structured grid index (an unsigned short, zero based) * return - a structured grid (a StructuredGrid), or NULL if the index given is invalid * * 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. * sa getHighlightedVisual(), getClosestVisual(), getVisualCount() */
-
getStructuredGridCount(self) → int¶ /** * brief Returns the number of structured grid objects that were intersected by the ray pick. * return - a structured grid object count (an unsigned short) * note * - Since more than one structured grid can be found at any given point, this method returns how many visual objects were touched by the ray pick. */
-
getTimeStep(self) → int¶ /** * brief Returns the T value of the intersection.
- return - an unsigned short
*/
-
getVisualAtIndex(self, iIndex: int) → Visual¶ /** * brief Returns the Nth picked visual object.
- param - the visual index (an unsigned short, zero based)
- return - a visual (a Visual), or NULL if the index given is invalid
- 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.
- sa getHighlightedVisual(), getClosestVisual(), getVisualCount()
*/
-
getVisualCount(self) → int¶ /** * brief Returns the number of visual objects that were intersected by the ray pick.
return - a visual object count (an unsigned short)
note
- Since more than one visual can be found at any given point, this method returns how
many visual objects were touched by the ray pick.
*/
-
getVoxelIndex(self) → int¶ /** * brief Returns the index of the voxel being picked.
- return - an index (a long long)
- note
- The index is computed as follows:
- (T value * zSize * ySize * xSize) + (Z value * xSize * ySize) + (Y value * xSize) + (X value)
*/
-
getWindowLeveledNormalizedValue(self) → float¶ /** * brief Returns the value with window leveling applied, normalized between 0 and 1.
- return - a double between 0 and 1
*/
-
none()¶
-
Layout¶
-
class
ORSModel.ors.Layout¶ Bases:
ORSModel.ors.Managed/** interface Layout * brief object used to describe a view layout * * author N Piche * author All other members of ORS participated. * version 1.0 * date December 2015 * * Object that represent a layout of views
*/-
getBottomRightPositionOfChildren(self, aLayout: "Layout") → Vector3¶ /* brief getBottomRightPositionOfChildren */
-
getContext()¶
-
getTopLeftPositionOfChildren(self, aLayout: "Layout") → Vector3¶ /* brief getTopLeftPositionOfChildren */
-
none()¶
-
Line¶
-
class
ORSModel.ors.Line¶ Bases:
ORSModel.ors.Unmanaged/** interface Line * brief Line manipulation services * * author Nicolas Piche. * author All other members of ORS participated. * version 1.0 * date January 2010 * *
*/-
fromOriginAndOrientation(self, origin: Vector3, orientation: Vector3) → None¶ /** * brief Sets the the origin and orientation of the line. * param - a point (an Vector3) * param - an orientation (an Vector3) * note * - The orientation vector will be normalized. */
-
fromTwoPoints(self, point0: Vector3, point1: Vector3) → None¶ /** * brief Sets the the origin and orientation of the line based on the two provided points. * param - a point (an Vector3) * param - a point (an Vector3) */
-
getClosestPointOnLineFromPoint(self, aPoint: Vector3) → Vector3¶ /* brief getClosestPointOnLineFromPoint */
-
getDistanceFromPoint(self, pVect: Vector3) → float¶ /** * brief Gets the distance from the receiver to the provided point. * param - a point (an Vector3) * return - the distance (a double) */
-
getOrientation(self) → Vector3¶ /** * brief Gets the receiver orientation. * return - a vector (an Vector3) * note * - The orientation vector is normalized. */
-
getOrigin(self) → Vector3¶ /** * brief Gets the receiver origin position. * return - the origin (an Vector3) * note * - The origin is in world coordinates. */
-
none()¶
-
LineSegment¶
-
class
ORSModel.ors.LineSegment¶ Bases:
ORSModel.ors.Unmanaged/** interface LineSegment * brief Line segment manipulation services * * author Nicolas Piche. * author All other members of ORS participated. * version 1.0 * date January 2010 * *
*/-
copy(self) → "LineSegment"¶ /** * brief Gets a copy of the receiver. * return - a box (an LineSegment) */
-
fromOriginAndDirectionAndLength(self, origin: Vector3, direction: Vector3, length: float) → None¶ /* brief fromOriginAndDirectionAndLength */
-
getDistanceFromPoint(self, pVect: Vector3) → float¶ /** * brief Gets the distance from the receiver to the provided point, * param - a point (an Vector3) * return - the distance (a double) */
-
getStart(self) → Vector3¶ /** * brief Gets the receiver start point. * return - a point (an Vector3) */
-
none()¶
-
List¶
-
class
ORSModel.ors.List¶ Bases:
ORSModel.ors.ORSBaseClass/** interface List * brief A list of Managed instances. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date Jan 2005 * sa 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: Managed) → None¶ /** * brief Adds an object to the list. * param - an object (an Object) * * sa getObjectAt(), remove() */
-
appendAllObjects(self, pList: "List") → None¶ /** * brief Appends a list to the list. * param - a list (a List) * * note * - All objects are taken from the appended list, whether or not they are already in the receiver list. * sa add() */
-
appendNonPresentObjects(self, pList: "List") → None¶ /** * brief Appends a list to the list, taking only the objects not present in the receiver. * param - a list (a List) * * note * - Only the objects not already in the receiver are taken from the appended list. * sa add() */
-
extend(iterable)¶
-
getAllElementsOfClass(self, sClassname: str) → "List"¶ /** * brief Gets all the elements that belong to a given class. * param - the class name of the class to test against (a string) * return - a list (a List) * */
-
getCount(self) → int¶ /** * brief Returns the count of objects in the list. * return - object count (an unsigned int) * */
-
getIncludes(self, pObject: Managed) → bool¶ /** * brief Verifies if an object is present in the list. * param - an object (an Object) * return - true if object is in the list, false otherwise * sa getObjectAt() * */
-
getIndexOf(self, pObject: Managed) → int¶ /* brief Return the index of an object in the list or -1 if not found. */
-
getIntersectionWith(self, pList: "List") → "List"¶ /** * brief Returns the intersection of the list with another list. * param - a list (a List) * return - a new list (a List) * note * - Objects duplicated in both lists only appear once in the intersected list. * sa getUnionWith(), getSubtractionFrom() */
-
getObjectAt(self, pos: int) → Managed¶ /** * brief Gets an object from the list at the specified index. * param - an index (an unsigned int) * return - an object (a Managed) * note * - Index starts at zero (zero-based). * note * - When the type of the object is known, you can pre-type it as it will * automatically typecast to the correct type, for example: * Channel IChan = someList->getObjectAt(0). * If the object at index 0 is not a channel, IChan will be none. * sa getIncludes() * */
-
getSubtractionFrom(self, pList: "List") → "List"¶ /** * brief Returns the subtraction of another list from the list. * param - a list (a List) * return - a new list (a 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)). * sa getIntersectionWith(), getUnionWith() */
-
getUnionWith(self, pList: "List") → "List"¶ /** * brief Returns the union of the list with another list. * param - a list (a List) * return - a new list (a List) * note * - Objects duplicated in both lists only appear once in the unionized list. * sa getIntersectionWith(), getSubtractionFrom() */
-
index(item)¶
-
loadFromFile(self, sFilename: str, preserveIdentity: bool) → None¶ /** * brief Loads all the objects found within the file and adds them to the list. * param - an input filename (a string) * param - true to preserve identity, false otherwise (see note) * 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). * sa saveToFile(), loadFromFileFiltered() */
-
loadFromFileFiltered(self, sFilename: str, preserveIdentity: bool, classNames: typing.List[str]) → None¶ /** * brief Loads all the objects found within the file and adds them to the list, keeping only specified classes. * param - an input filename (a string) * param - true to preserve identity, false otherwise (see note) * param - list of class names (see note) * 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(). * sa saveToFile(), loadFromFile() */
-
none()¶
-
remove(self, pObject: Managed) → bool¶ /** * brief Removes an object from the list. * param - an object (an Object) * return - true if object was removed, false otherwise (it wasn’t in the list) * sa getObjectAt(), add() * */
-
removeDuplicates()¶
-
Loader¶
-
class
ORSModel.ors.Loader¶ Bases:
ORSModel.ors.Managed/** interface Loader * brief Allows to load previously saved ORS objects. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date Jan 2005 * sa 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). */
-
getCurrentNodeAttributeValue(self, attributeName: str) → str¶ /* brief method getCurrentNodeAttributeValue */
-
getCurrentNodeBoolAttributeValue(self, sAttributeName: str) → bool¶ /** * brief Gets a boolean attribute from the current node in an XML tree being parsed. * param - the attribute name (a string) * return - the value (a bool) * note * - Return is false if attribute name is not found. */
-
getCurrentNodeBoolValue(self) → bool¶ /** * brief Gets the current node boolean value in an XML tree being parsed. * return - the node value (a bool) * sa pop(), getCurrentNodeName() */
-
getCurrentNodeDoubleAttributeValue(self, sAttributeName: str) → float¶ /** * brief Gets a double attribute from the current node in an XML tree being parsed. * param - the attribute name (a string) * return - the value (a double) * note * - Return is 0.0 if attribute name is not found. */
-
getCurrentNodeDoubleValue(self) → float¶ /** * brief Gets the current node double value in an XML tree being parsed. * return - the node value (a double) * sa pop(), getCurrentNodeName() */
-
getCurrentNodeFloatAttributeValue(self, sAttributeName: str) → float¶ /** * brief Gets a float attribute from the current node in an XML tree being parsed. * param - the attribute name (a string) * return - the value (a float) * note * - Return is 0.0f if attribute name is not found. */
-
getCurrentNodeFloatValue(self) → float¶ /** * brief Gets the current node float value in an XML tree being parsed. * return - the node value (a float) * sa pop(), getCurrentNodeName() */
-
getCurrentNodeIntAttributeValue(self, sAttributeName: str) → int¶ /** * brief Gets an int attribute from the current node in an XML tree being parsed. * param - the attribute name (a string) * return - the value (an int) * note * - Return is 0 if attribute name is not found. */
-
getCurrentNodeIntValue(self) → int¶ /** * brief Gets the current node int value in an XML tree being parsed. * return - the node value (an int) * sa pop(), getCurrentNodeName() */
-
getCurrentNodeLONGLONGValue(self) → int¶ /** * brief Gets the current node long long value in an XML tree being parsed. * return - the node value (a long long) * sa getCurrentNodeName() */
-
getCurrentNodeShortAttributeValue(self, sAttributeName: str) → int¶ /** * brief Gets a short attribute from the current node in an XML tree being parsed. * param - the attribute name (a string) * return - the value (a short) * note * - Return is 0 if attribute name is not found. */
-
getCurrentNodeShortValue(self) → int¶ /** * brief Gets the current node short value in an XML tree being parsed. * return - the node value (a short) * sa getCurrentNodeName() */
-
getCurrentNodeULONGLONGValue(self) → int¶ /** * brief Gets the current node unsigned long long value in an XML tree being parsed. * return - the node value (an unsigned long long) * sa getCurrentNodeName() */
-
getCurrentNodeUnsignedIntAttributeValue(self, sAttributeName: str) → int¶ /** * brief Gets an unsigned int attribute from the current node in an XML tree being parsed. * param - the attribute name (a string) * return - the value (an unsigned int) * note * - Return is 0 if attribute name is not found. */
-
getCurrentNodeUnsignedIntValue(self) → int¶ /** * brief Gets the current node unsigned int value in an XML tree being parsed. * return - the node value (an unsigned int) * sa pop(), getCurrentNodeName() */
-
getCurrentNodeUnsignedShortAttributeValue(self, sAttributeName: str) → int¶ /** * brief Gets an unsigned short attribute from the current node in an XML tree being parsed. * param - the attribute name (a string) * return - the value (an unsigned short) * note * - Return is 0 if attribute name is not found. */
-
getCurrentNodeUnsignedShortValue(self) → int¶ /** * brief Gets the current node unsigned short value in an XML tree being parsed. * return - the node value (an unsigned short) * sa getCurrentNodeName() */
-
getNodeBoolValueFromCurrentNode(self, sElementName: str) → bool¶ /** * brief Gets a boolean element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (a bool) * note * - Return is false if element name is not valid nor found. */
-
getNodeCount(self, pXpath: str) → int¶ /** * brief Returns the nodes count according to an XPATH. * param - the XPATH to search for (a string) * return - the number of nodes found (an int) */
-
getNodeDoubleValueFromCurrentNode(self, sElementName: str) → float¶ /** * brief Gets a double element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (a double) * note * - Return is 0.0f if element name is not valid nor found. */
-
getNodeFloatValueFromCurrentNode(self, sElementName: str) → float¶ /** * brief Gets a float element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (a float) * note * - Return is 0.0f if element name is not valid nor found. */
-
getNodeIntValueFromCurrentNode(self, sElementName: str) → int¶ /** * brief Gets an int element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (an int) * note * - Return is 0 if element name is not valid nor found. */
-
getNodeLONGLONGValueFromCurrentNode(self, sElementName: str) → int¶ /** * brief Gets a long long element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (a long long) * note * - Return is 0 if element name is not valid nor found. */
-
getNodeShortValueFromCurrentNode(self, sElementName: str) → int¶ /** * brief Gets a short element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (a short) * note * - Return is 0 if element name is not valid nor found. */
-
getNodeULONGLONGValueFromCurrentNode(self, sElementName: str) → int¶ /** * brief Gets a unsigned long long element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (an unsigned long long) * note * - Return is 0 if element name is not valid nor found. */
-
getNodeUnsignedIntValueFromCurrentNode(self, sElementName: str) → int¶ /** * brief Gets an unsigned int element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (an unsigned int) * note * - Return is 0 if element name is not valid nor found. */
-
getNodeUnsignedShortValueFromCurrentNode(self, sElementName: str) → int¶ /** * brief Gets an unsigned short element from the current node in an XML tree being parsed. * param - the element name (a string) * return - the value (an unsigned short) * note * - Return is 0 if element name is not valid nor found. */
-
getNodeValueFromCurrentNode(self, pXpath: str) → str¶ /* brief method getNodeValueFromCurrentNode */
-
getVersionFromFile(self, filename: str) → str¶ /** * brief Returns the version number stored in a session file. * param - the file name (a string) * return - the version number (a string) * sa loadObjectsFromFile() */
-
loadObjectsFromFile(self, filename: str) → None¶ /** * brief Loads objects from a file. * param - the file name (a string) * note * - All ORS objects can save themselves to file, in an XML format. * sa loadObjectsFromXML() */
-
loadObjectsFromXML(self, anXML: str) → None¶ /** * brief Loads objects from an XML string. * param - the XML (a string) * note * - All ORS objects can save themselves in an XML format. * sa loadObjectsFromFile() */
-
none()¶
-
setCurrentNode(self, pXpath: str) → bool¶ /** * brief Selects a node in an XML tree being parsed. * param - an XPath (a string) * return - true if successful, false otherwise */
-
setCurrentNodeFromCurrentNode(self, pXpath: str) → bool¶ /** * brief Selects a node in an XML tree, under the current node. * param - the node name (a string) * return - true if successful, false otherwise * note * - The node is only searched under the current node of the tree. * sa pop(), Saver::addAttributeToCurrentNode() */
-
setCurrentNodeToCurrentNodeNextSibling(self) → bool¶ /** * brief Moves to the next node equivalent to the current node, in an XML tree being parsed. * return - true if successful, false otherwise * sa pop() */
-
LookupTable¶
-
class
ORSModel.ors.LookupTable¶ Bases:
ORSModel.ors.Node- /** interface LookupTable
- brief A Lookup Table that can adopt predefined and/or custom looks.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date August 2005
- sa VisualMesh::setLookupTable(), Vector3::setLookupTable()
- A Lookup Table that can adopt predefined and/or custom looks.
- It contains the ambiant, power, diffuse, emissive and specular properties.
*/
LookupTable.__init__(self, anXML: str) -> None /* brief create a LookupTable from an xml */
-
build(self) → None¶ /** * brief Builds the LUT according to its settings. * sa setRampRainbow(), setRampGrayScale(), setRampUserDefined() */
-
copyFrom(self, ILookupTable: "LookupTable") → None¶ /* brief Copy internal parameters from the given lookup table. */
-
fillRGBAColorArray(self, startIndex: int, endIndex: int, colorsArray: int, subtractFactors: int) → None¶ /** * brief Dump the lut in arrays. * * param - startIndex * param - endIndex * param - colorsArray an unsigned char* array of size 4*getTableSize() * param - subtractFactors an unsigned char* array of size getTableSize() * * note * Used for performance purpose on big lut */
-
findControlPointIndexForPosition(self, pX: float) → int¶ /** * brief Searches for a control point according to its position. * param - the X coordinate of the control point (a float) * return - the index control point (an int) */
-
getColorAtIndex(self, inValue: int) → Color¶ /** * brief Get color at a given index. * param - the color index (in range [0, getTableSize()-1] ) (an int) * sa getTableSize() * */
-
getColorAtPosition(self, position: float) → Color¶ /** * brief Gets the color at a given position. * param - the position (a double, see note) * note * - This method returns a color at a position normalized between 0 and 1. If the position does not exactly match an * existing control point, the returned color will be an interpolation of the two closest colors. */
-
getColorFromPosition(self, position: float, aColor: Color) → None¶ /** * brief Gets the color at a given position. * param - the position (a double, see note) * param - a Color object * note * - This method fill the providedat a position normalized between 0 and 1. If the position does not exactly match an * existing control point, the returned color will be an interpolation of the two closest colors. */
-
getControlPointColor(self, index: int) → Color¶ /** * brief Retrieves the color of a control point. * param - the control point index (an unsigned int)
- return - the color (an Color)
*/
-
getControlPointCount(self) → int¶ /** * brief Retrieves the total number of control points in the LUT. * return - the number of control points (an int) */
-
getControlPointPositionX(self, index: int) → float¶ /** * brief Retrieves the X coordinate of a control point. * param - the control point index (an unsigned int) * return - the X coordinate of the control point (a float) */
-
getControlPointPositionY(self, index: int) → float¶ /** * brief Retrieves the Y coordinate of a control point. * param - the control point index (an unsigned int) * return - the Y coordinate of the control point (a float) */
-
getTableSize(self) → int¶ /** * brief Get the table size. * return - the table size (an int) * sa getDiscreteD3DColorAt() * */
-
insertControlPointAt(self, index: int, x: float, y: float, IColor: Color) → None¶ /** * brief Inserts a control point. * param - the control point index (an unsigned int) * param - the X coordinate of the control point (a float) * param - the Y coordinate of the control point (a float)
- param - the color (an Color)
- note
- Each color value goes between 0 (none) and 255 (full).
- sa insertControlPointAt()
*/
-
none()¶
-
removeControlPointAt(self, index: int) → None¶ /** * brief Removes a control point. * param - the control point index (an unsigned int) * sa getControlPointCount() * */
-
setColorAtIndex(self, nIndex: int, IColor: Color) → None¶ /* brief Sets the color at the given index. */
-
setColorAtPosition(self, position: float, IColor: Color) → None¶ /** * brief Sets the color at a given position. * param - the position (a double, see note) * note * - The position is normalized between 0 and 1. The color that will be changed will be the closest control point color. */
-
setColorForIndexRange(self, nStartIndex: int, nEndIndex: int, IColor: Color) → None¶ /** * brief Set color at a given index range. * param - the color start index (in range [0, getTableSize()-1] ) (an int) * param - the color end index (in range [0, getTableSize()-1] ) (an int) * sa getTableSize() * */
-
setControlPointColor(self, index: int, IColor: Color) → None¶ /** * brief Changes the color of a control point. * param - the control point index (an unsigned int)
- param - the color (an Color)
*/
-
setControlPointPosition(self, index: int, pX: float, pY: float) → None¶ /** * brief Changes the position of a control point. * param - the control point index (an unsigned int) * param - the new X coordinate of the control point (a float) * param - the new Y coordinate of the control point (a float) */
-
setGamma(self, value: float) → None¶ /** * brief Sets the gamma value. * param - the gamma value (a double) */
-
setRampGrayScale(self) → None¶ /** * brief Sets the LUT to be gray scale. * note * - Gray scale LUTs divide the color range in 255 gray tones. */
-
setRampRainbow(self) → None¶ /** * brief Sets the LUT to be rainbow. * note * - Rainbow LUTs divide the color range in 4 sections. */
Managed¶
-
class
ORSModel.ors.Managed¶ Bases:
ORSModel.ors.ORSBaseClass- /** interface Managed
- brief The “mother” of all ORS classes. It’s an abstract class that implements all the default behavior of managed objects.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- The “mother” of all ORS classes. It’s an abstract class that implements
- all the default behavior of managed objects. Managed objects are persistent objects that can be retrieved in several ways, but usually
- with their identifier (getGUID()).
*/
Managed.__init__(self, anXML: str) -> None /* brief create a Managed from an xml */
-
addCallbackToEvent(self, anEventName: str, sCallbackName: str, callbackData: int) → bool¶ /* brief Adds a callback subscription to an event. */
-
atomicLoadSpecificNode(self, aFilename: str, aXPathOfTheNodeToLoad: str) → bool¶ /* brief Loads an object from a file containing several objects. */
-
copy(self) → "Managed"¶ /** * brief Returns a copy of the node. * return - a new node (a Managed) * note * - Only the immediate attributes of the node are copied. The graph surrounding the new node is the * same one as the source node. * 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 NULL. */
-
deleteObject(self) → None¶ /* brief Explicitly deletes the core object wrapped by this COM object. */
-
deleteObjectAndAllItsChildren(self) → None¶ /* brief Explicitly deletes the core object wrapped by this COM object, along with all its children. */
-
getAllGroupsContaining(self, anIObject: "Managed") → List¶ /* brief Gets all the groups that contain the given object. */
-
classmethod
getAllInstances()¶
-
getAllInstancesOf(pProgId: str) → List¶ /* brief Gathers all existing objects of the specified class. */
-
classmethod
getAllObjectsOfClass(cls_name)¶
-
getAllObjectsOfClassAndPrivateTitle(pProgId: str, pPrivateTitle: str) → List¶ /* brief Gathers all existing objects of the specified class, that have a matching private title. */
-
getAllObjectsOfClassAndUserData(pProgId: str, userDataKey: str, userDataValue: str) → List¶ /* brief Gathers all existing objects of the specified class, that have a matching user data. */
-
classmethod
getAllSubclasses(outputCollection=None)¶
-
getAtomicTextRepresentation(self) → str¶ /* brief Retrieves the object’s atomic text representation. */
-
getBinaryUserInfo(self, pTag: str) → None¶ /* brief Retrieves a user defined binary value. Typed as void* for sip, but it’s in reality an unsigned char* */
-
getBinaryUserInfoAsBytes(name)¶
-
getBinaryUserInfoSize(self, pTag: str) → int¶ /* brief Retrieves the size of a user defined binary value. */
-
getCallbacksEnabled(self) → bool¶ /* brief Queries the object to know if its callbacks are enabled or disabled. */
-
static
getClassFromProgId(progId)¶
-
getClassName(self) → str¶ /* brief Retrieves the class name of the core object wrapped by this COM object. */
-
getCreationTime(self) → int¶ /** * brief Returns the time Number of seconds since Jan 1 2000 of creation of this object . * return - an unsigned int */
-
getDataDirtySignature()¶ Gets the current dirty signature for the flag OrsDataDirty
Returns: dataDirtySignature (int) – the dirty signature
-
getGUID(self) → str¶ /* brief Retrieves the GUID of the core object wrappped by the COM Interface. */
-
getGeometryDirtySignature()¶ Gets the current dirty signature for the flag OrsGeometryDirty
Returns: geometryDirtySignature (int) – the dirty signature
-
getHasCallbacksForEvent(self, anEventName: str) → bool¶ /* brief Checks if the receiver has any callbacks for an event. */
-
getIsInstanceOf(self, pProgId: str) → bool¶ /* brief Queries the object to know if it is an instance of a certain class. */
-
getIsInstanceOfAtLeastOneClasses(progIdList)¶
-
getIsModified(self, dirtyFlag: str) → bool¶ /* brief Gets if the object has been modified, relative to the loading or the saving of that object. */
-
getIsSameObjectAs(self, anObject: "Managed") → bool¶ /* brief Checks to see if the receiver wraps the same underlying object as the supplied argument. */
-
classmethod
getIsSubclassOf(parentClass)¶
-
getIsToBeKeptAliveUntilExit(self) → bool¶ /* brief Queries the object to know if it is permanent for the life of the application. */
-
getPropertyDirtySignature()¶ Gets the current dirty signature for the flag OrsPropertyDirty
Returns: propertyDirtySignature (int) – the dirty signature
-
getReferenceCount()¶
-
getVisibilityDirtySignature()¶ Gets the current dirty signature for the flag OrsVisibilityDirty
Returns: visibilityDirtySignature (int) – the dirty signature
-
isManaged()¶
-
none()¶
-
publish()¶
-
removeCallbackFromEvent(self, sEventName: str, sCallbackName: str) → bool¶ /* brief Removes a callback subscription to an event. */
-
removeFromDeleteSet(self, anIObject: "Managed") → None¶ /* brief Remove an object from the delete set. */
-
setBinaryUserInfo(self, pTag: str, pValue: int, iDataSize: int) → None¶ /* brief Sets a user defined binary value. */
-
setCallbacksEnabled(self, enabled: bool) → None¶ /* brief Sets the object’s callbacks to be enabled or not. */
-
setDataDirty()¶ Calls for a setDirty with the flag OrsDataDirty
-
setEventCallbackEnabled(self, sEventName: str, sCallbackName: str, bValue: bool) → bool¶ /* brief Enables/disables a callback subscription to an event. */
-
setGeometryDirty()¶ Calls for a setDirty with the flag OrsGeometryDirty
-
setIsNotModified(self) → None¶ /* brief Sets the object as not modified, relative to the loading or the saving of that object. */
-
setIsRepresentable(self, isRepresentable: bool) → None¶ /* brief Sets the object to be representable or not. */
-
setIsToBeKeptAliveUntilExit(self, pFlag: bool) → None¶ /* brief Sets the object to be permanent for the life of the application. */
-
setIsToBeSaved(self, pIsToBeSaved: bool) → None¶ /* brief Sets the object to be saved to XML or not. */
-
setPrivateTitle(self, newPrivateTitle: str) → None¶ /* brief Sets the private title of the object. */
-
setPropertyDirty()¶ Calls for a setDirty with the flag OrsPropertyDirty
-
setUserInfo(self, pTag: str, pValue: str) → None¶ /* brief //* * brief Sets a user defined value. * param - a key name (a string) * param - a value (a string) * note * - Stores the key/value pair in an internal dictionary. If the key already exists its previous value is overwritten. */
-
setVisibilityDirty()¶ Calls for a setDirty with the flag OrsVisibilityDirty
MassiveMarchingAutomata¶
-
class
ORSModel.ors.MassiveMarchingAutomata¶ Bases:
ORSModel.ors.Unmanaged-
cleanSpeedMapChannel(self, outputChannel: Channel) → None¶ /** * brief Removes boundaries or non reached value from a Speed map channel.
- param - a distance map channel (an Channel)
*/
-
createDistanceMap(self, lOutputChannelDistanceMap: Channel, lOutputChannelTraceBack: Channel, lOutputChannelLabel: Channel, nbIteration: int) → None¶ /* brief method createDistanceMap */
-
getEuclideanBias(self) → float¶ /** * brief Gets the Euclidean bias that will be the minimum Dijkstra distance between voxels. * return - the minimum distance between voxels (a double) * note * - Neighbors of distance 1 will have a bias of spacialTerm * - Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm * - Neighbors of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm */
-
getROICount(self) → int¶ /** * brief Returns the number of ROIs that have been set as sources.
- return - the number of ROIs that have been provided (an unsigned char)
- note
- A maximum of 10 ROI can be provided.
*/
-
getVolumeROI(self, index: int) → ROI¶ /** * brief Retrieves a particular ROI from the index specified slot.
- param - the slot index (an unsigned char)
- return - the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
none()¶
-
setEuclideanBias(self, EuclideanBias: float) → None¶ /** * brief Provides an Euclidean bias that will be the minimum Dijkstra distance between voxels. * param - the minimum distance between voxels (a double) * note * - Neighbors of distance 1 will have a bias of spacialTerm. * - Neighbors of distance sqrt(2) will have a bias of sqrt(2)*spacialTerm. * - Neighbor of distance sqrt(3) will have a bias of sqrt(3)*spacialTerm. */
-
setInputChannelAndWorkingArea(self, inputChannel: Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None¶ /** * brief Sets the channel that will be used by the MassiveMarching algorithm to calculate distance.
- param - the input channel (an Channel)
- param - the minimum X index in the input channel (an unsigned short)
- param - the minimum Y index in the input channel (an unsigned short)
- param - the minimum Z index in the input channel (an unsigned short)
- param - the maximum X index in the input channel (an unsigned short)
- param - the maximum Y index in the input channel (an unsigned short)
- param - the maximum Z index in the input channel (an unsigned short)
- note
- The min and max boundaries must not describe a space bigger than the input channel.
*/
-
setVolumeROI(self, index: int, aVolROI: ROI) → None¶ /** * brief Fills a particular ROI slot to be used as a source for the Dijkstra algorithm
- param - the slot index (an unsigned char)
- param - the ROI associated with this slot index (an ROI)
- note
- A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel.
*/
-
Material¶
-
class
ORSModel.ors.Material¶ Bases:
ORSModel.ors.Node- /** interface Material
- brief Represents the material of a visual (Visual).
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- sa Visual::setMaterial(), Visual::getMaterial()
- Represents a material that can be used with any Visual object.
- It contains the ambiant, power, diffuse, emissive and specular properties.
*/
Material.__init__(self, anXML: str) -> None /* brief create a Material from an xml */
-
getAmbiant(self) → Color¶ /** * brief Gets the ambiant color of the material. * return - ambiant (a Color) * sa setAmbiant() */
-
getDiffuse(self) → Color¶ /** * brief Gets the diffuse color of the material. * return - diffuse (a Color) * sa setDiffuse() */
-
getEmissive(self) → Color¶ /** * brief Gets the emissive color of the material. * return - an emissive (a Color) * sa setEmissive() */
-
getPower(self) → float¶ /** * brief Gets the power property of the material. * return - power value (a float) * sa setPower() */
-
getShadowIntensity(self) → float¶ /** * brief Gets the shadow intensity. * return - an intensity factor (a float) * note * - Should be between 0.0 and 1.0. */
-
getSpecular(self) → Color¶ /** * brief Gets the specular color of the material. * return - specular (a Color) * sa setSpecular() */
-
getTextureScale(self) → float¶ /** * brief Gets the texture scale factor. * return - the scale factor (a float) */
-
none()¶
-
setAmbiant(self, IColor: Color) → None¶ /** * brief Sets the ambiant color, in Red-Green-Blue. * param - a color object (a Color) * note * - Each color value goes between 0 (none) and 1 (full). * sa setAmbiant() */
-
setDiffuse(self, IColor: Color) → None¶ /** * brief Sets the diffuse color, in Red-Green-Blue. * param - a color object (a Color) * note * - Each color value goes between 0 (none) and 1 (full). * sa setDiffuse() */
-
setEmissive(self, IColor: Color) → None¶ /** * brief Sets the emissive color, in Red-Green-Blue. * param - a color object (a Color) * note * - Each color value goes between 0 (none) and 1 (full). * sa setEmissive() */
-
setPower(self, value: float) → None¶ /** * brief Sets the power property of the material. * param - a power value (a float) * sa getPower() */
-
setShadowIntensity(self, value: float) → None¶ /** * brief Sets the shadow intensity. * param - an intensity factor (a float) * note * - Should be between 0.0 and 1.0. */
-
setSpecular(self, IColor: Color) → None¶ /** * brief Sets the specular color, in Red-Green-Blue. * param - a color object (a Color) * note * - Each color value goes between 0 (none) and 1 (full). * sa setSpecular() */
Matrix4x4¶
-
class
ORSModel.ors.Matrix4x4¶ Bases:
ORSModel.ors.Unmanaged/** interface Matrix4x4 * brief A wrapper to a 3D matrix. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date Jan 2005 * * A wrapper to a 3D matrix. * */
-
asRotationMatrix(self, inputVector: Vector3) → None¶ /* brief As rotation matrix from quaternion. */
-
getInverted(self) → "Matrix4x4"¶ /** * brief Gets an inverted matrix. * return - an inverted matrix (an Matrix4x4) * note * - The receiver is not affected. */
-
getTransformedBoundedPlane(self, inputBoundedPlane: Rectangle) → Rectangle¶ /* brief Applies a matrix transformation to a bounded plane. */
-
getTransformedCoordinate(self, inputCoordinate: Vector3) → Vector3¶ /* brief Applies a matrix transformation to an augmented vector ([x, y, z, 1]). */
-
getTransformedLine(self, inputLine: Line) → Line¶ /* brief Applies a matrix transformation to a line. */
-
getTransformedLineSegment(self, inputLineSegment: LineSegment) → LineSegment¶ /* brief Applies a matrix transformation to a line segment. */
-
getTransformedOrientedPlane(self, inputOrientedPlane: OrientedPlane) → OrientedPlane¶ /* brief Applies a matrix transformation to an oriented plane. */
-
getTransformedPlane(self, inputPlane: Plane) → Plane¶ /* brief Applies a matrix transformation to a plane. */
-
getTransformedVector(self, inputVector: Vector3) → Vector3¶ /* brief Applies a matrix transformation to an augmented vector ([x, y, z, 0]). */
-
getValue(self, row: int, column: int) → float¶ /** * brief Gets a value from the matrix. * param - row (an int) * param - column (an int) * return - a float * note * - Row and column are both between 0 and 3. * sa setValue() * */
-
multiply(self, IMatrix: "Matrix4x4") → None¶ /** * brief Multiplies the matrix by another matrix. * param - a matrix to multiply with (an Matrix4x4) * note * - The receiver is modified. */
-
none()¶
-
setAsRotation(self, axisOfRotation: Vector3, angleInRadian: float) → None¶ /* brief As rotation matrix from rotation axis and angle. */
-
setValue(self, row: int, column: int, value: float) → None¶ /** * brief Sets a value in the matrix. * param - row (an int) * param - column (an int) * param - a float value * note * - Row and column are both between 0 and 3. * sa getValue() * */
-
Mesh¶
-
class
ORSModel.ors.Mesh(self, anXML: str) → None¶ Bases:
ORSModel.ors.UnstructuredGrid/* brief create a Mesh from an xml */
-
getArea(self, iTIndex: int, aWorldTransformMatrix: Matrix4x4, IProgress: Progress) → float¶ /** * brief Gets the one sided area from closed mesh.
- param - the T index to compute (an unsigned short)
- param - a transformation matrix (an Matrix4x4)
- param - a progress object (an Progress) or NULL for no progress
- return - the area (a double)
- note
- Result for an open mesh is undefined.
*/
-
getAsMeshProjectedOnPlane(self, aPlane: Plane, iTIndex: int, aWorldTransformMatrix: Matrix4x4, inMesh: "Mesh") → "Mesh"¶ /* brief method getAsMeshProjectedOnPlane */
-
getAsMeshWithEdgesDecimatedSmallerThan(self, value: float, IProgress: Progress, worldTransform: Matrix4x4, inoutMesh: "Mesh") → "Mesh"¶ /** * brief Decimates all edges with a length smaller than a threshold value. * param - the threshold value (a double) * note * - This method is recursive and will decimate edges until all edges length are greater than the supplied threshold value. */
-
getAsROI(self, iTIndex: int, worldTransform: Matrix4x4, pOutputROI: ROI, progress: Progress) → None¶ /* brief Makes a Region of Interest from the mesh. */
-
getColorAtIndex(self, iVertexIndex: int, iTIndex: int, IColor: Color) → bool¶ /** * brief Get the color of a vertex. * param - the vertex index (unsigned long) * param - the colors data(a Color) * return - TRUE if color is found, FALSE otherwise * * note * - The alpha value equals 0 if the vertex is out of range, 1 if vertex is in range. */
-
getColors(self, iTIndex: int) → ArrayDouble¶ /** * brief Gets the vertices colors. * param - the time step (an unsigned short) * return - the colors data (an ArrayUnsignedLong) * note * - Colors are expressed in RGB or RGBA fashion. Use RGBA when you want each vertex to have a transparency * note * - The array of colors should have the same number of elements as there are vertices, as each vertice has its own color. */
-
getContourAreaForPlane(self, nax: float, nby: float, ncz: float, nd: float, iTIndex: int) → float¶ /** * brief Gets area of contours of mesh for plane.
- param - the a value of the plane (a float)
- param - the b value of the plane (a float)
- param - the c value of the plane (a float)
- param - the d value of the plane (a float)
- return - the area (a 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.
*/
-
getContourMeshForPlane(self, nax: float, nby: float, ncz: float, nd: float, iTIndex: int, inoutMesh: "Mesh") → "Mesh"¶ /** * brief Returns a mesh representing the contour of the mesh intersecting the specifed plane.
- param - The a coefficient of the plane (a float)
- param - The b coefficient of the plane (a float)
- param - The c coefficient of the plane (a float)
- param - The d coefficient of the plane (a float)
- param - the target mesh (a Mesh, see note below)
- return - the resulting mesh (an VisualMesh)
- 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.
*/
-
getCurrentFaceScalarValuesSlot(self) → int¶ /** * brief gets the current face scalar. * param - the the time step (an unsigned short) * return - the scalar slot index (an unsigned long) * note * - The scalar index is zero-based, and thus should be less than getFaceScalarValuesSlotCount(). */
-
getDefaultColor(self) → Color¶ /** * brief Gets the mesh default color.
- return - a color (an Color)
- note
- Each color value goes between 0 (none) and 1 (full).
- sa setUseDefaultColor(), setColors()
*/
-
getDefaultMeshAlphaColor(self) → float¶ /** * brief Queries the mesh to get its default alpha color. * param - none * return - Default alpha color used for the mesh (a double) */
-
getEdgeCount(self, iTIndex: int) → int¶ /** * brief Returns the number of edges. * param - the the time step (an unsigned short) * return - an unsigned long long */
-
getEdges(self, iTIndex: int) → ArrayUnsignedLong¶ /** * brief Get the edge array * param - the the time step (an unsigned short) * return - an array of long (an ArrayLong) */
-
getExtractedSubMesh(self, IMeshROI: MeshFacesROI, IOutputMesh: "Mesh", bExtractSubMeshROI: bool) → "Mesh"¶ /* brief getExtractedSubMesh */
-
getFaceCount(self, iTIndex: int) → int¶ /** * brief Gets the number of faces. * param - the time step (an unsigned short) * return - an unsigned long long */
-
getFaceScalarValue(self, scalarValueSlotIndex: int, scalarValueFaceIndex: int, iTIndex: int) → float¶ /** * brief Gets the value of a face scalar. * param - the scalar slot index (an unsigned long) * param - the face index (an unsigned long) * param - the time step (an unsigned short) * return - the value of a face scalar (a float) */
-
getFaceScalarValueDescription(self, i: int, iTIndex: int) → str¶ /* brief method getFaceScalarValueDescription */
-
getFaceScalarValueOffset(self, scalarValueSlotIndex: int, iTIndex: int) → float¶ /** * brief Gets a face scalar offset value. * param - the scalar slot index (an unsigned long) * param - the time step (an unsigned short) * return - the scalar offset value (a float) */
-
getFaceScalarValueOffsets(self, iTIndex: int) → ArrayDouble¶ /** * brief Get the face scalar offset values. * param - the time step (an unsigned short) * return - the scalar offset value (a float) */
-
getFaceScalarValueSlope(self, scalarValueSlotIndex: int, iTIndex: int) → float¶ /** * brief Gets a face scalar slope value. * param - the scalar slot index (an unsigned long) * param - the time step (an unsigned short) * return - the scalar slope value (a float) */
-
getFaceScalarValueSlopes(self, iTIndex: int) → ArrayDouble¶ /** * brief Get the face scalar slope values. * param - the time step (an unsigned short) * return - the scalar slope value (a float) */
-
getFaceScalarValues(self, scalarValueSlotIndex: int, iTIndex: int) → Array¶ - /**
- brief Gets the values of a face scalar.
- param - the the time step (an unsigned short)
- return - an array of values (an ArrayFloat)
- 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.
- sa setFaceScalarValues(), getFaceCount(), getFaceScalarValuesSlotCount()
*/
-
getFaceScalarValuesAsPandaDataFrame()¶
-
getFaceScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int) → int¶ /* brief method getFaceScalarValuesDatatype */
-
getFaceScalarValuesSlotCount(self) → int¶ /** * brief Gets the number of slots for face scalar values. * return - the number of slots (an unsigned long) */
-
getMinMaxFaceScalarValue(self, scalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float) → None¶ /* brief method getMinMaxFaceScalarValue */
-
getTransformed(self, aTransformationMatrix: Matrix4x4, pInOutMesh: "Mesh") → "Mesh"¶ /* brief method getTransformed */
-
getUVs(self, iTIndex: int) → ArrayFloat¶ - /**
- brief Gets the UV values.
- param - the time step (an unsigned short)
- return - an array of float (an ORSArrayFloatPtr)
- sa setUVs()
*/
-
getUseDefaultMeshAlphaColor(self) → bool¶ /** * brief Queries the mesh to see if it uses its default alpha color. * param - none * return - TRUE if a default alpha color is used for the mesh, FALSE otherwise */
-
getUseDefaultMeshColor(self) → bool¶ /** * brief Queries the mesh to see if it uses its default color. * param - TRUE if the mesh uses its default color, FALSE otherwise */
-
getUseFaceScalarValues(self) → bool¶ /** * brief Sets the mesh to have face scalar values or not. * param - TRUE to use scalar values, FALSE otherwise */
-
getVertexScalarValuesAsPandaDataFrame()¶
-
getVerticesNormals(self, iTIndex: int) → ArrayFloat¶ /** * brief Gets the normals. * param - the time step (an unsigned short) * return - the normals data (an ArrayFloat) */
-
getVolume(self, aPlane: Plane, timeStep: int, aWorldTransformMatrix: Matrix4x4, IProgress: Progress) → float¶ /** * brief Gets the volume from closed mesh.
- param - a progress object (an Progress) or NULL for no progress
- return - the volume (a double)
- 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.
*/
-
labelizeMesh(self, pScalarIndex: int, iTIndex: int) → int¶ /** * brief Labelizes mesh vertices based on connectivity.
- param - the scalar index where to place labels (an unsigned long)
- return - the number of labels found (an unsigned long)
- note
- The scalar for the specified index should be already initialized.
*/
-
mapScalarValuesSlotToColors(self, iTIndex: int, anILUT: LookupTable, iScalarValueSlotIndex: int) → None¶ /** * brief Maps the scalar values to a lookup table.
- param - the time step (a unsigned short)
- param - the lookup table (an LookupTable)
- param - the scalar value slot index of the value to map (a short)
- Applies a coloring scheme to the mesh, according to its scalar values applied against a lookup table.
- sa setCurrentScalarValuesSlot()
*/
-
mapScalarValuesToColors(self, iTIndex: int, anILUT: LookupTable) → None¶ /** * brief Maps the scalar values to a lookup table. * param - the lookup table (an LookupTable) * note * - Applies a coloring scheme to the mesh, according to its scalar values applied against a lookup table. * sa setCurrentScalarValuesSlot() */
-
mapVertexScalarValuesToColorsWithRange(self, pData: Array, fMinDisplayableValue: float, fMaxDisplayableValue: float, fMinSelectionRangeValue: float, fMaxSelectionRangeValue: float, anILUT: LookupTable) → None¶ /** * brief Compute Mesh color table using vertex scalar value * param - the scalar value to use (an Array) * param - the minimum value used for the LUT range (a double) * param - the maximum value used for the LUT range (a double) * param - the minimum range value (a double) * param - the maximum range value (a double) * param - the LookUpTable (a LookupTable) */
-
none()¶
-
removeDuplicateVertices(self, fEpsilon: float, iTIndex: int, pInOutMesh: "Mesh") → "Mesh"¶ /** * brief Removes duplicate vertices of the mesh. * param - an epsilon value (a float) * param - the the time step (an unsigned short) * param - the output mesh (a Mesh) * return - the result mesh (a Mesh) * * note * - If a target mesh is supplied, data is written to it and returned, otherwise a new mesh is created. */
-
setColorAtIndex(self, iVertexIndex: int, iTIndex: int, pColors: Color) → None¶ /** * brief Set color of a vertex. * param - the vertex index (unsigned long) * param - the colors data(a Color) */
-
setCurrentFaceScalarValuesSlot(self, value: int) → None¶ /** * brief Sets the current face scalar. * param - the scalar slot index (an unsigned long) * param - the the time step (an unsigned short) * note * - The scalar index is zero-based, and thus should be less than getFaceScalarValuesSlotCount(). */
-
setDefaultColor(self, IColor: Color) → None¶ /** * brief Sets the mesh default color.
- param - a color (an 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.
- sa setUseDefaultColor(), setColors()
*/
-
setDefaultMeshAlphaColor(self, value: float) → None¶ /** * brief Sets the mesh its default alpha color. * param - Alpha color (double) */
-
setFaceScalarValue(self, scalarValueSlotIndex: int, scalarValueFaceIndex: int, aValue: float, iTIndex: int) → None¶ /** * brief Sets the value of a face scalar. * param - the scalar slot index (an unsigned long) * param - the face index (an unsigned long) * param - the value of a face scalar to set (a float) * param - the time step (an unsigned short) */
-
setFaceScalarValueDescription(self, i: int, value: str, iTIndex: int) → None¶ /* brief method setFaceScalarValueDescription */
-
setFaceScalarValueMax(self, i: int, value: float, iTIndex: int) → None¶ /* brief method setFaceScalarValueMax */
-
setFaceScalarValueMaxs(self, pScalarValues: ArrayDouble, iTIndex: int) → None¶ /* brief method setFaceScalarValueMaxs */
-
setFaceScalarValueMin(self, i: int, value: float, iTIndex: int) → None¶ /* brief method setFaceScalarValueMin */
-
setFaceScalarValueMins(self, pScalarValues: ArrayDouble, iTIndex: int) → None¶ /* brief method setFaceScalarValueMins */
-
setFaceScalarValueOffset(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /** * brief Sets a face scalar offset value. * param - the scalar slot index (an unsigned long) * param - the scalar offset value (a float) * param - the time step (an unsigned short) */
-
setFaceScalarValueOffsets(self, pScalarValues: ArrayDouble, iTIndex: int) → None¶ /** * brief Set the face scalar offset values. * param -the scalar offset value (a float) * param -the time step (an unsigned short) */
-
setFaceScalarValueSlope(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /** * brief Gets a face scalar slope value. * param -the scalar slot index (an unsigned long) * param -the scalar slope value (a float) * param -the time step (an unsigned short) */
-
setFaceScalarValueSlopes(self, pScalarValues: ArrayDouble, iTIndex: int) → None¶ /** * brief Set the face scalar slope values. * param -the scalar slope value (a float) * param -the time step (an unsigned short) */
-
setFaceScalarValueUnit(self, i: int, value: int, iTIndex: int) → None¶ /* brief method setFaceScalarValueUnit */
-
setFaceScalarValues(self, pScalarValues: Array, scalarValueSlotIndex: int, iTIndex: int) → None¶ - /**
- brief Sets the values of a face scalar.
- param - an array of values (an ArrayFloat)
- param - the the time step (an unsigned short)
- 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.
- sa getFaceScalarValues(), getFaceCount(), getFaceScalarValuesSlotCount()
*/
-
setFaceScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int, nFaceScalarValuesDatatype: int) → None¶ /* brief method setFaceScalarValuesDatatype */
-
setFaceScalarValuesFromPandaDataFrame(dataFrame, iTIndex=0)¶
-
setFaceScalarValuesSlotCount(self, value: int) → None¶ /** * brief Sets the number of slots for face scalar values. * param - the number of slots (an unsigned long) */
-
setOutOfRangeScalarValue(self, value: float) → None¶ /** * brief Sets a scalar out or range value. * param - the value (a float) */
-
setUseDefaultMeshAlphaColor(self, value: bool) → None¶ /** * brief Sets the mesh to use its default alpha color. * param - TRUE for using a default alpha color for the mesh, FALSE otherwise (bool) */
-
setUseDefaultMeshColor(self, value: bool) → None¶ /** * brief Sets the mesh to use its default color. * param - TRUE to use the mesh default color, FALSE otherwise */
-
setUseFaceScalarValues(self, value: bool) → None¶ /** * brief Gets the status of face scalar values usage. * return - TRUE if mesh uses scalar values, FALSE otherwise * sa getScalarValues(), getScalarValuesSlotCount() */
-
setVertexScalarValuesFromPandaDataFrame(dataFrame, iTIndex=0)¶
-
MeshFacesROI¶
-
class
ORSModel.ors.MeshFacesROI¶ Bases:
ORSModel.ors.Node- /** interface MeshFacesROI
- brief Represents a region of interest for a mesh (Mesh).
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- warning Not currently supported.
- sa ROI
- Represents a region of interest for a Mesh.
*/
MeshFacesROI.__init__(self, anXML: str) -> None /* brief create a MeshFacesROI from an xml */
-
addFacesIndexes(self, indexes: ArrayUnsignedLong, nNbIndex: int, nTIndex: int) → None¶ /* brief method addFacesIndexes */
-
getFaceIndexAtPosition(self, pos: int, nTIndex: int) → int¶ /* brief method getFaceIndexAtPosition */
-
getFaceIndexes(self, nTimeStep: int, IInputFaceIndexes: ArrayUnsignedLong) → ArrayUnsignedLong¶ /* brief method getFaceIndexes */
-
getIntersectionWithMeshFacesROI(self, IInputMeshROI: "MeshFacesROI", nTimeStep: int, IOutputMeshROI: "MeshFacesROI") → "MeshFacesROI"¶ /* brief method getIntersectionWithMeshFacesROI */
-
getInverseMeshFacesROI(self, nTimeStep: int, IOutputMeshROI: "MeshFacesROI") → "MeshFacesROI"¶ /* brief method getInverseMeshFacesROI */
-
getIsVisibleForAllDisplays(self) → bool¶ /** * brief Gets the visibility of the receiver in all displays.
- return - TRUE if the receiver is visible is all displays, FALSE otherwise
- sa getIsVisibleForDisplay(), getIsVisibleForDisplay(), setIsVisibleForAllDisplays()
*/
-
getIsVisibleForDisplay(self, IDisplay: View) → bool¶ /** * brief Gets the visibility of the receiver in a given display.
- param - the display (an View)
- return - TRUE if the receiver is visible, FALSE otherwise
- sa setIsVisibleForDisplay(), setIsVisibleForAllDisplays(), getIsVisibleForAllDisplays()
*/
-
getSubtractionFromMeshFacesROI(self, IInputMeshROI: "MeshFacesROI", nTimeStep: int, IOutputMeshROI: "MeshFacesROI") → "MeshFacesROI"¶ /* brief method getSubtractionFromMeshFacesROI */
-
getUnionWithMeshFacesROI(self, IInputMeshROI: "MeshFacesROI", nTimeStep: int, IOutputMeshROI: "MeshFacesROI") → "MeshFacesROI"¶ /* brief method getUnionWithMeshFacesROI */
-
none()¶
-
removeFaceIndexAtPosition(self, pos: int, nTimeStep: int) → int¶ /* brief method removeFaceIndexAtPosition */
-
setIsVisibleForAllDisplays(self, bValue: bool) → None¶ /** * brief Sets the visibility of the receiver in all displays.
- param - TRUE to make the receiver visible in all displays, FALSE to hide it
- note
- This API overrides all prior calls to setIsVisibleForDisplay(), or in other words, any display specific setting is erased.
- sa getIsVisibleForDisplay(), getIsVisibleForDisplay(), getIsVisibleForAllDisplays()
*/
-
setIsVisibleForDisplay(self, IDisplay: View, bValue: bool) → None¶ /** * brief Sets the visibility of the receiver in a given display.
- param - the display (an View)
- param - TRUE to make the receiver visible, FALSE to hide it
- note
- This API overrides a prior call to setIsVisibleForAllDisplays(), for a given display.
- sa getIsVisibleForDisplay(), setIsVisibleForAllDisplays(), getIsVisibleForAllDisplays()
*/
Model¶
-
class
ORSModel.ors.Model¶ Bases:
sip.wrapper/** interface Model * brief Main gateway into the ORS Core library. * * author Normand Mongeau. * author All other members of ORS participated. * version 1.2 * date September 2006 * * Main gateway into the ORS Core library. Used for general functionality of the ORS Core library. */
-
addCallbackToClassEvent(aClassName: str, anEventName: str, sCallbackName: str, callbackInfo: int, permanent: bool) → bool¶ /** * brief Adds a callback subscription to a class event. * param - the class name (a string) * param - the event name (a string) * param - the callback name (a string) * param - a pointer to a ORS_EVENT_CALLBACK_INFO struct * param - true to make the callback permanent (will survive a new session), false for a normal callback * return - true if operation was successful, false otherwise (the callback already existed) */
-
addCallbackToGlobalEvent(anEventName: str, sCallbackName: str, callbackInfo: int, permanent: bool) → bool¶ /** * brief Adds a callback subscription to a global event. * param - the event name (a string) * param - the callback name (a string) * param - a pointer to a ORS_EVENT_CALLBACK_INFO struct * param - true to make the callback permanent (will survive a new session), false for a normal callback * return - true if operation was successful, false otherwise (the callback already existed) */
-
getActiveWorkerThreadsCount() → int¶ /** * brief Returns the number of active worker threads. * return - a count of active worker threads (an unsigned int) */
-
getAvailableCPUCount() → int¶ /** * brief Returns how many CPUs are available. * return - a CPU count (an unsigned short) * note * - In order to prepare some computations to be multi-threaded, this method returns how many CPUs are * available. * sa * setAvailableCPUCount() */
-
getBuildNumber() → str¶ /** * brief Returns the Core library internal build number. * return - a build number text (a string) */
-
getDLLFilename() → str¶ /** * brief Returns the Core library file name. * return - a fully qualified file path (a string) */
-
getDLLVersion() → str¶ /** * brief Returns the Core library internal version. * return - a version text (a string) */
-
getDebugMode() → bool¶ /** * brief Checks if the Core library is in debug mode. * return - true if in debug mode, false otherwise */
-
getMajorVersion() → str¶ /** * brief Returns the Core library internal major version. * return - a version text (a string) */
-
getMaximumViewportHeight()¶
-
getMaximumViewportWidth()¶
-
getWasLicenseDowngraded()¶
-
isNotNone()¶
-
loadSessionFromFile(aFilename: str) → bool¶ /** * brief Loads a session file. * param - a fully qualified file path (a string) * return - true if operation was successful, false otherwise */
-
removeCallbackFromClassEvent(aClassName: str, sEventName: str, sCallbackName: str) → bool¶ /** * brief Removes a callback subscription to a class event. * param - the class name (a string) * param - the event name (a string) * param - the callback name (a string) * return - true if operation was successful, false otherwise (the callback was not found) */
-
removeCallbackFromGlobalEvent(sEventName: str, sCallbackName: str) → bool¶ /** * brief Removes a callback subscription to a global event. * param - the event name (a string) * param - the callback name (a string) * return - true if removal was successful, false otherwise (the callback did not exist) */
-
saveSessionToFile(pSessionName: str, aFilename: str) → int¶ /** * brief Saves the current session to a file. * param - a session name (a string) * param - a fully qualified file path (a string) * return - 0 if operation was successful, otherwise an error code */
-
setAvailableCPUCount(pNbCPUs: int) → None¶ /** * brief Tells the Core library to limit the number of CPUs it should use. * param - a count (an unsigned short) * note * - Many algorithms are multi-threaded, use this method if you want to limit the number of CPUs used internally, to * allow other applications to be responsive for example. * note * - Setting this value to 0 means to use all CPUs. */
-
setClassEventCallbackEnabled(aClassName: str, sEventName: str, sCallbackName: str, bValue: bool) → bool¶ /** * brief Enables/disables a callback subscription to a class event. * param - the event name (a string) * param - the callback name (a string) * param - true to enable the callback, false to disable it * return - true if operation was successful, false otherwise (the callback was not found) */
-
setGlobalEventCallbackEnabled(sEventName: str, sCallbackName: str, bValue: bool) → bool¶ /** * brief Enables/disables a callback subscription to a global event. * param - the event name (a string) * param - the callback name (a string) * param - true to enable the callback, false to disable it * return - true if operation was successful, false otherwise (the callback was not found) */
-
setLoggerFunction(funct: None) → None¶ /* brief Sets the logging function, i.e. how the library logs. */
-
MultiROI¶
-
class
ORSModel.ors.MultiROI¶ Bases:
ORSModel.ors.StructuredGrid- /** interface MultiROI
- brief Container for multiple ROIs
- author Normand Mongeau.
- author All other members of ORS participated.
- version 1.0
- date February 2010
- */
MultiROI.__init__(self, anXML: str) -> None /* brief create a MultiROI from an xml */
-
addToVolumeROI(self, pOutputROI: ROI, pLabel: int) → None¶ /** * brief Extract a label and adds it to a Volume ROI.
- param - the output Volume ROI (an ROI)
- param - the label to extract (an unsigned int)
- sa getAsROI(), removeROI()
- note
- The ROI is not cleared prior to adding.
*/
-
addToVolumeROILabelAtIndex(self, pOutputROI: ROI, pIndex: int) → None¶ /** * brief Finds the label at a given index, then extracts the label data and adds it to a Volume ROI.
- param - the output Volume ROI (an ROI)
- param - the index (a long long)
- sa addToROI(), removeROI(),
*/
-
addToVolumeROILabelAtPosition(self, pOutputROI: ROI, tIndex: int, pVector: Vector3) → None¶ /** * brief Finds the label at a given position, then extracts the label data and adds it to a Volume ROI.
- param - the output Volume ROI (an ROI)
- param - the T value (an unsigned short)
- param - the position (an Vector3)
- sa addToROI(), removeROI(),
*/
-
appendLabeledMultiROI(self, pLabeledMultiROI: "MultiROI", pLabelArray: ArrayUnsignedLong) → None¶ /* brief appendLabeledMultiROI */
-
clearLabel(self, pLabel: int) → None¶ /** * brief Clears a label.
- param - the label to clear (an unsigned int)
*/
-
clearLabels(self, pLabelArray: ArrayUnsignedLong) → None¶ /** * brief Clears a set of labels. * param - an array of labels to clear (an ArrayUnsignedLong) */
-
copyInto(self, aMultiROI: "MultiROI") → None¶ /** * brief Copies the receiver into another ROI. * param - a destination multiROI (an MultiROI) */
-
generateAnalyzer(self, inputChannel: Channel, pROI: ROI, aTimeStep: int, pStats: int, pCompute2DStats: bool, IProgress: Progress) → MultiROIAnalyzer¶ /* brief generateAnalyzer */
-
getAsArray(self, tIndex: int, pOutputArray: ArrayUnsignedLong) → ArrayUnsignedLong¶ /** * brief Extracts the labels and adds them all to an Array.
- param - time index (an unsigned short)
- param - an optional output Array (an ArrayUnsignedLong)
- return - the resulting Array (an ArrayUnsignedLong)
- 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.
- sa getAsROI(), asChannel()
*/
-
getAsChannelWithLabelOffset(self, labelOffset: int, pOutputChannel: Channel) → Channel¶ /** * brief Extracts the labels and adds them all to a channel. * param - a label offset to add to output channel values (a unsigned int) * param - an optional output channel (an Channel) * return - the resulting channel (an 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: * - 255 labels or less: UNSIGNED CHAR * - 65535 labels or less: UNSIGNED SHORT * - otherwise UNSIGNED INT * sa asROI() */
-
getAsCubicMesh(self, bWorld: bool, IProgress: Progress, IInMesh: Mesh) → Mesh¶ /* brief getAsCubicMesh */
-
getAsCubicMeshSubset(self, IEnabledLabel: ArrayChar, bWorld: bool, IProgress: Progress, IInMesh: Mesh) → Mesh¶ /* brief getAsCubicMeshSubset */
-
getBoundingBoxOfLabel(self, pTIndex: int, iLabel: int) → Box¶ /* brief method getBoundingBoxOfLabel */
-
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
-
getCurrentScalarValuesSlot(self) → int¶ /** * brief gets the current scalar. * param - the the time step (an unsigned short) * return - the scalar slot index (an unsigned long) * note * - The scalar index is zero-based, and thus should be less than getScalarValuesSlotCount(). */
-
getIntersectionWithLabeledMultiROI(self, pInputLabeledMultiROI: "MultiROI", anOutputLabeledMultiROI: "MultiROI") → "MultiROI"¶ /** * brief Intersects the MultiROI with another MultiROI. * param - the MultiROI to intersect with (a MultiROI) * param - the output MultiROI (a MultiROI), see note below * return - the intersection result * note * - If a target MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created. */
-
getIntersectionWithROI(self, aROI: ROI, anOutputMultiROI: "MultiROI") → "MultiROI"¶ /** * brief Intersects the MultiROI with a ROI. * param - the ROI to intersect with (an ROI) * param - the output MultiROI (a MultiROI), see note below * return - the intersection result * note * - If a target MultiROI is supplied, data is written to it and returned, otherwise a new MultiROI is created. */
-
getIsClipped(timestep=0, display=None)¶ Gets to know if the clip box of the ROI or MultiROI is active
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¶ /** * brief Verifies to see if all labels are empty or not.
- return - TRUE if no labels within, FALSE otherwise
- sa getLabelCount()
*/
-
getLabelAtIndex(self, pIndex: int) → int¶ /** * brief Gets the label value at a given index.
- param - the index (a long long)
- return - the resulting label (an unsigned int)
- note
- If no label exists at the given index 0 is returned.
- sa getLabelAtPosition()
*/
-
getLabelAtPosition(self, tIndex: int, pVector: Vector3) → int¶ /** * brief Gets the label value at a given World position.
- param - the T value (an unsigned short)
- param - the position (an Vector3)
- return - the resulting label (an unsigned int)
- note
- If no label exists at the given position, 0 is returned.
- sa getLabelAtIndex()
*/
-
getLabelCount(self) → int¶ /** * brief Gets the number of distinct labels within.
- return - the number of labels (an unsigned int)
- sa getLabelSize()
*/
-
getLabelSize(self, pLabel: int) → int¶ /** * brief Gets the size of a given label.
- param - the label value (an unsigned int)
- return - the size of the label (a unsigned long long)
- sa getLabelCount(), getTotalVoxelCount()
*/
-
getNonEmptyLabels(self, pOutputArray: ArrayUnsignedLong) → ArrayUnsignedLong¶ /** * brief Returns an array of all non empty labels. * param - an optional output array (an ArrayUnsignedLong) * return - the resulting array (an ArrayUnsignedLong) * 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. */
-
getProjectionIn(self, aLabeledMultiROI: "MultiROI", sourceTimeOffset: int, pProgress: Progress) → "MultiROI"¶ /* brief getProjectionIn */
-
getScalarValueDescription(self, iScalarValueSlotIndex: int, iTIndex: int) → str¶ /* brief method getScalarValueDescription */
-
getScalarValueMax(self, iScalarValueSlotIndex: int, iTIndex: int) → float¶ /** * brief Gets a scalar max value. * param - the scalar slot index (an unsigned long) * param - the time step (an unsigned short) * return - the scalar max value (a float) */
-
getScalarValueMin(self, iScalarValueSlotIndex: int, iTIndex: int) → float¶ /** * brief Gets a scalar min value. * param - the scalar slot index (an unsigned long) * param - the time step (an unsigned short) * return - the scalar min value (a float) */
-
getScalarValueOffset(self, iScalarValueSlotIndex: int, iTIndex: int) → float¶ /** * brief Gets a scalar offset value. * param - the scalar slot index (an unsigned long) * param - the time step (an unsigned short) * return - the scalar offset value (a float) */
-
getScalarValueSlope(self, iScalarValueSlotIndex: int, iTIndex: int) → float¶ /** * brief Get a scalar slope value. * param - the scalar slot index (an unsigned long) * param - the time step (an unsigned short) * return - the scalar slope value (a float) */
-
getScalarValueUnit(self, iScalarValueSlotIndex: int, iTIndex: int) → int¶ /* brief method getScalarValueUnit */
-
getScalarValues(self, iSlotIndex: int, iTIndex: int) → OrderedCollection¶ /** * brief Gets the values of a scalar. * * param - the the time step (an unsigned short) * return - an array of values (an OrderedCollection) * note * - The scalar value in the slot s of the v is located at the index (getScalarValuesSlotCount() * v) + s of the array. * sa setScalarValues(), getScalarValuesSlotCount() */
-
getScalarValuesAsPandaDataFrame(iTIndex=0)¶
-
getScalarValuesSlotCount(self) → int¶ /** * brief Gets the number of slots for scalar values. * return - the number of slots (an unsigned long) */
-
getTotalVoxelCount(self) → int¶ /** * brief Gets the total size of all labels. * return - the total size (a long long) * sa getLabelSize(), getVoxelCount() */
-
getUseScalarValues()¶
-
getVoxelCount(self, iTIndex: int) → int¶ /** * brief Gets the size of all labels for a given T value. * return - the number of voxels in the MultiROI (a long long) * sa getLabelSize(), getTotalVoxelCount() */
-
insertLabeledMultiROI(self, pLabeledMultiROI: "MultiROI", insertionLabel: int) → bool¶ /** * brief Insert all the labels of a MultiROI starting at an insertion label. * param - the MultiROI to insert (a MultiROI) * param - the label at which the insertion begins (an unsigned int) * return - TRUE if the operation succeeded, FALSE otherwise */
-
mapScalarValuesToColors(self, pData: Array, pHightlightOpacityValue: ArrayFloat, pLMROpacityValue: ArrayFloat, fMinDisplayableValue: float, fMaxDisplayableValue: float, anILUT: LookupTable) → None¶ /* brief mapScalarValuesToColors */
-
mapScalarValuesToColorsWithRange(self, pData: Array, fMinDisplayableValue: float, fMaxDisplayableValue: float, fMinSelectionRangeValue: float, fMaxSelectionRangeValue: float, anILUT: LookupTable) → None¶ /** * brief Compute MultiROI color table using scalar value * param - the scalar value to use (an Array) * param - the minimum value used for the LUT range (a double) * param - the maximum value used for the LUT range (a double) * param - the minimum range value (a double) * param - the maximum range value (a double) * param - the in range highlight opacity (a double) * param - the out range highlight opacity (a double) * param - the in range ROI opacity (a double) * param - the out range ROI opacity (a double) * param - the LookUpTable (a LookupTable) */
-
mapScalarValuesToDiscreteColors(self, pData: Array, pHightlightOpacityValue: ArrayFloat, pLMROpacityValue: ArrayFloat, nMinDisplayableValue: int, nMaxDisplayableValue: int, anILUT: LookupTable) → None¶ /* brief mapScalarValuesToDiscreteColors */
-
mergeLabels(self, targetLabel: int, sourceLabel: int) → bool¶ /** * brief Merge a label into another one. * param - the receiving label (an unsigned int) * param - the source label (an unsigned int) * return - TRUE if the operation succeeded, FALSE otherwise */
-
none()¶
-
removeEmptyLabelsAndRenumber(self) → None¶ /** * brief Removes all empty labels and renumber the remaining labels in the same order. */
-
removeFromVolumeROI(self, pOutputROI: ROI, pLabel: int) → None¶ /** * brief Extract a label and remove it from a Volume ROI.
- param - the output Volume ROI (an ROI)
- param - the label to extract (an unsigned int)
- sa getAsROI(), removeROI()
- note
*/
-
removeLabelAndRenumber(self, pLabel: int) → None¶ /** * brief Removes the specified label and renumber the remaining labels in the same order. * param - the label to remove (an unsigned int) */
-
removeLabeledMultiROI(self, pInputLabeledMultiROI: "MultiROI") → None¶ /** * brief Removes a MultiROI. * param - the MultiROI to remove (a MultiROI) */
-
removeLabelsAndRenumber(self, pLabelArray: ArrayUnsignedLong) → None¶ /** * brief Removes the specified labels and renumber the remaining labels in the same order. * param - an array of labels to remove (an ArrayUnsignedLong) */
-
removeVolumeROI(self, pInputROI: ROI) → None¶ /** * brief Removes a Volume ROI.
- param - the Volume ROI to remove (an ROI)
- sa getAsROI(), addToROI()
*/
-
setCurrentScalarValuesSlot(self, iScalarValueSlotIndex: int) → None¶ /** * brief Sets the current scalar. * param - the scalar slot index (an unsigned long) * param - the the time step (an unsigned short) * note * - The scalar index is zero-based, and thus should be less than getScalarValuesSlotCount(). */
-
setLabelCount(self, aCount: int) → None¶ /** * brief Sets the label count. * param - the label count to set (an unsigned int) */
-
setScalarValueDescription(self, iScalarValueSlotIndex: int, sDesc: str, iTIndex: int) → None¶ /* brief method setScalarValueDescription */
-
setScalarValueMax(self, iScalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /** * brief Sets a scalar max value. * param - the scalar slot index (an unsigned long) * param - the scalar max value (a float) * param - the time step (an unsigned short) */
-
setScalarValueMin(self, iScalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /** * brief Sets a scalar min value. * param - the scalar slot index (an unsigned long) * param - the scalar min value (a float) * param - the time step (an unsigned short) */
-
setScalarValueOffset(self, iScalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /** * brief Sets a scalar offset value. * param - the scalar slot index (an unsigned long) * param - the scalar offset value (a float) * param - the time step (an unsigned short) */
-
setScalarValueSlope(self, iScalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /** * brief Set a scalar slope value. * param -the scalar slot index (an unsigned long) * param -the scalar slope value (a float) * param -the time step (an unsigned short) */
-
setScalarValueUnit(self, iScalarValueSlotIndex: int, iUnit: int, iTIndex: int) → None¶ /* brief method setScalarValueUnit */
-
setScalarValues(self, pScalarValues: OrderedCollection, iScalarValueSlotIndex: int, iTIndex: int) → None¶ /** * brief Sets the values of a scalar. * * param - an array of values (an ArrayFloat) * param - the the time step (an unsigned short) * * sa getScalarValues(), getCount(), getScalarValuesSlotCount() */
-
setScalarValuesFromPandaDataFrame(dataFrame, iTIndex=0)¶
-
setScalarValuesSlotCount(self, value: int) → None¶ /** * brief Sets the number of slots for scalar values. * param - the number of slots (an unsigned long) */
-
sortAndRenumberLabelsOnSize(self, bAscending: bool, bRemoveEmptyLabels: bool) → None¶ /** * brief Sorts and renumbers the labels based on their sizes (number of labels).
- param - TRUE to sort in ascending order, FALSE to sort in descending order
- param - TRUE to remove empty labels, FALSE to keep them
*/
MultiROIAnalyzer¶
-
class
ORSModel.ors.MultiROIAnalyzer¶ Bases:
ORSModel.ors.Unmanaged/** interface MultiROIAnalyzer * brief Analyzer for multi-ROIs * * author Nicolas Piché. * author All other members of ORS participated. * version 1.0 * date May 2010 * * */
-
computeStatisticsFor()¶
-
getCenterOfMassMinMax(self, pXMin: float, pYMin: float, pZMin: float, pXMax: float, pYMax: float, pZMax: float) → None¶ /* brief getCenterOfMassMinMax */
-
getDataHistogramInRangeForLabels(self, IChannel: Channel, IMultiROI: MultiROI, IListOfLabels: ArrayUnsignedLong, tChannel: int, tLMR: int, bins: int, pMinRange: float, pMaxRange: float) → ArrayUnsignedLONGLONG¶ /* brief getDataHistogramInRangeForLabels */
-
getEquivalentRadiusMinMax(self, pMin: float, pMax: float) → None¶ /* brief getEquivalentRadiusMinMax */
-
getLabelInertiaEigenValue(self, pLabel: int, vectorIndex: int) → float¶ /* brief getLabelInertiaEigenValue */
-
getLabelInertiaEigenVector(self, pLabel: int, vectorIndex: int) → Vector3¶ /* brief getLabelInertiaEigenVector */
-
getLabelInertiaEigenVectorWithMaxEigenValue(self, pLabel: int) → Vector3¶ /* brief getLabelInertiaEigenVectorWithMaxEigenValue */
-
getLabelInertiaEigenVectorWithMinEigenValue(self, pLabel: int) → Vector3¶ /* brief getLabelInertiaEigenVectorWithMinEigenValue */
-
getLabelInertiaEigenVectorWithMinEigenValuePhiAngle(self, pLabel: int) → float¶ /* brief getLabelInertiaEigenVectorWithMinEigenValuePhiAngle */
-
getLabelInertiaEigenVectorWithMinEigenValueThetaAngle(self, pLabel: int) → float¶ /* brief getLabelInertiaEigenVectorWithMinEigenValueThetaAngle */
-
getLabelStandardDeviationVoxel(self, pLabel: int) → float¶ /* brief getLabelStandardDeviationVoxel */
-
getLabelsInertiaEigenValueMax()¶
-
getLabelsInertiaEigenValueMin()¶
-
getLabelsInertiaEigenVectorWithMinEigenValuePhiAngle(self) → ArrayDouble¶ /* brief getLabelsInertiaEigenVectorWithMinEigenValuePhiAngle */
-
getLabelsInertiaEigenVectorWithMinEigenValueThetaAngle(self) → ArrayDouble¶ /* brief getLabelsInertiaEigenVectorWithMinEigenValueThetaAngle */
-
getNumberOfROIIndiciesInLabelsMinMax(self, pMin: int, pMax: int) → None¶ /* brief getNumberOfROIIndiciesInLabelsMinMax */
-
getStandardDeviationVoxelMinMax(self, pMin: float, pMax: float) → None¶ /* brief getStandardDeviationVoxelMinMax */
-
getWeightedCenterOfMassMinMax(self, pXMin: float, pYMin: float, pZMin: float, pXMax: float, pYMax: float, pZMax: float) → None¶ /* brief getWeightedCenterOfMassMinMax */
-
initializeFor()¶
-
none()¶
-
Node¶
-
class
ORSModel.ors.Node¶ Bases:
ORSModel.ors.Managed/** interface Node * brief An abstract class for any object that can be a node in the visualization flow. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date Jan 2005 * * An abstract class for any object that can be a node in the visualization flow. * It implements tree-like services, to handle parent and child relationships. */
-
attachChild(self, anINode: "Node") → bool¶ /** * brief Attaches a child node. * param - the node to attach (an Node) * return - TRUE if child was attached, FALSE otherwise * 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. */
-
attachChildAtPosition(self, anINode: "Node", position: int) → bool¶ /** * brief Attaches a child node at a given position. * param - the node to attach (an Node) * param - the position index (an unsigned int) * return - TRUE if child was attached, FALSE otherwise * 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. */
-
copyGraph(self) → "Node"¶ /** * brief Returns a copy of the node, including its graph. * return - a new node (an Node) * 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 NULL. */
-
detachChild(self, anINode: "Node") → bool¶ /** * brief Detaches a child node. * param - the node to detach (an Node) * return - TRUE if child was detached, FALSE otherwise */
-
getAllChildrenNodes(self) → List¶ /** * brief Returns a flattened list of the child hierarchy of the node. * return - a list of all nodes below the node (an List) * note * - The child hierarchy is flattened. * note * - Expect no particular ordering of the nodes. * sa getIsNodeOneOfMyDescendants() */
-
getAllChildrenOfClass(self, pProgId: str) → List¶ /** * brief Returns all the nodes of the specified class found in the child hierarchy. * param - the ProgId of the class to test against (a string) * return - a list of nodes (an List) * note * - Result can be NULL or an empty list if no match is found. * note * - The search is done breadth-first. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). */
-
getAllChildrenOfClassReachableByRenderer(self, pProgId: str) → List¶ /** * brief Returns a flattened list of all the child nodes, of the given class, that are renderable. * param - the ProgId of the class to test against (a string) * return - a list of all child nodes that can be rendered (an List) * note * - The list contains only Managed objects (they will need to be typecast to the appropriate class). */
-
getAllParentNodes(self) → List¶ /** * brief Returns a flattened list of the parent hierarchy of the node. * return - a list of all nodes above the node (an List) * note * - The parent hierarchy is flattened. * note * - Expect no particular ordering of the nodes. * sa getIsNodeOneOfMyAscendants() */
-
getAllParentsOfClass(self, pProgId: str) → List¶ /** * brief Returns all the nodes of the specified class found in the parent hierarchy. * param - the ProgId of the class to test against (a string) * return - a list of nodes (an List) * note * - Result can be NULL or an empty list if no match is found. * note * - The search is done breadth-first. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). */
-
getChildWithGUID(self, aGUID: str) → "Node"¶ /** * brief Gets an immediate child node with the given GUID. * param - a GUID (a string) * return - a child node if found (an Node), NULL otherwise * 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 NULL. */
-
getChildWithTitle(self, aTitle: str) → "Node"¶ /** * brief Gets an immediate child node with the given title. * param - a string (a string) * return - a child node if found (an Node), NULL otherwise * 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 NULL. */
-
getChildrenNodes(self) → List¶ /** * brief Returns the list of immediate child nodes. * return - a list of nodes (an List) */
-
getChildrenOfClass(self, pProgId: str) → List¶ /** * brief Returns the nodes of the specified class found in the immediate children. * param - the ProgId of the class to test against (a string) * return - a list of nodes (an List) * note * - Result can be NULL or an empty list if no match is found. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). */
-
getFirstChildOfClass(self, pProgId: str) → "Node"¶ /** * brief Returns the first object of the specified class found in the child hierarchy. * param - the ProgId of the class to test against (a string) * return - a node if one exists (an Node), NULL otherwise * 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 NULL. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). */
-
getFirstChildOfClassAndPrivateTitle(self, pProgId: str, privateTitle: str) → "Node"¶ /** * brief Searches the hierarchy for a child node with the specified class and private title. * param - the ProgId of the class to test against (a string) * param - some text (a string) * return - a node if it exists (an Node), NULL otherwise * 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 NULL. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). * sa setPrivateTitle(), getPrivateTitle(), getFirstParentOfClassAndPrivateTitle() */
-
getFirstParentOfClass(self, pProgId: str) → "Node"¶ /** * brief Returns the first object of the specified class found in the parent hierarchy. * param - the ProgId of the class to test against (a string) * return - a node if one exists (an Node), NULL otherwise * 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 NULL. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). */
-
getFirstParentOfClassAndPrivateTitle(self, pProgId: str, privateTitle: str) → "Node"¶ /** * brief Searches the hierarchy for a parent node with the specified class and private title. * param - the ProgId of the class to test against (a string) * param - some text (a string) * return - a node if it exists (an Node), NULL otherwise * 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 NULL. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). * sa setPrivateTitle(), getPrivateTitle(), getFirstChildOfClassAndPrivateTitle() */
-
getImmediateChildOfClass(self, pProgId: str) → "Node"¶ /** * brief Searches for a child node with the specified class. * param - the ProgId of the class to test against (a string) * return - a node if it exists (an Node), NULL otherwise * 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 NULL. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). */
-
getImmediateParentOfClass(self, pProgId: str) → "Node"¶ /** * brief Searches for a parent node with the specified class. * param - the ProgId of the class to test against (a string) * return - a node if it exists (an Node), NULL otherwise * 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 NULL. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). */
-
getImmediateParentWithGUID(self, pGUID: str) → "Node"¶ /** * brief Gets a parent node with the given GUID. * param - a GUID (a string) * return - a parent node if found (an Node), NULL otherwise * 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 NULL. */
-
getIsNodeOneOfMyAscendants(self, anINode: "Node") → bool¶ /** * brief Checks to see if a specified node is in the parent hierarchy of the node. * return - TRUE if the specified node in the parent hierarchy, FALSE otherwise * note * - The parent hierarchy is searched in its entirety for the specified node. * note * - The search is conducted depth-first. * sa getIsNodeOneOfMyDescendants() */
-
getIsNodeOneOfMyDescendants(self, anINode: "Node") → bool¶ /** * brief Checks to see if a specified node is in the child hierarchy of the node. * return - TRUE if the specified node in the child hierarchy, FALSE otherwise * note * - The child hierarchy is searched in its entirety for the specified node. * note * - The search is conducted depth-first. * sa getIsNodeOneOfMyAscendants() */
-
getParentNodes(self) → List¶ /** * brief Gets the immediate parent nodes. * return - a list of nodes (an List) if it exists, NULL otherwise */
-
getParentWithGUID(self, pGUID: str) → "Node"¶ /** * brief Gets a parent node (from the hierarchy) with the given GUID. * param - a GUID (a string) * return - a parent node if found (an Node), NULL otherwise * 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 NULL. */
-
getParentsOfClass(self, pProgId: str) → List¶ /** * brief Returns the nodes of the specified class found in the immediate parents. * param - the ProgId of the class to test against (a string) * return - a list of nodes (an List) * note * - Result can be NULL or an empty list if no match is found. * note * - Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId). */
-
none()¶
-
propagateDataDirty()¶ Calls for a propagateDirty with the flag OrsDataDirty
-
propagateDirty(self, dirtyFlag: str) → None¶ /** * brief Causes a dirty message to be sent to all children nodes. * param - a string dirty flag (a string) * 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. */
-
propagateGeometryDirty()¶ Calls for a propagateDirty with the flag OrsGeometryDirty
-
propagatePropertyDirty()¶ Calls for a propagateDirty with the flag OrsPropertyDirty
-
propagateVisibilityDirty()¶ Calls for a propagateDirty with the flag OrsVisibilityDirty
-
refresh()¶ Refreshes the views related to the current object
-
refreshAll2DParentViews(self) → None¶ /** * brief Causes all 3D views in the parent hierarchy of the node to be refreshed. */
-
refreshAll3DParentViews(self) → None¶ /** * brief Causes all 3D views in the parent hierarchy of the node to be refreshed. */
-
refreshAllParentViews(self) → None¶ /** * brief Causes all views in the parent hierarchy of the node to be refreshed. */
-
setAllowRenderingInAllParentViews(self, bValue: bool) → None¶ /** * brief Allows or prevents rendering in the views affected by a node. * param - TRUE to allow rendering, FALSE to disallow it. */
-
setAutoUpdate(self, pAutoUpdate: bool) → None¶ /** * brief Sets a node to be “auto-updating”, i.e. it needs not and will not receive dirty messages. * param - TRUE to set the node to be “auto-updating”, FALSE otherwise * note * - “Auto-updating” nodes ignore the dirty messages, i.e. they do not refresh themselves. */
-
switchOrderOfPrecedenceOfChildrenNodes(self, anINode1: "Node", anINode2: "Node") → bool¶ /** * brief Rearranges the order of child nodes. * param - a child node (an Node) * param - a child node (an Node) * return - TRUE if successful, FALSE otherwise * 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. * sa switchOrderOfPrecedenceOfParentNodes() */
-
switchOrderOfPrecedenceOfParentNodes(self, anINode1: "Node", anINode2: "Node") → bool¶ /** * brief Rearranges the ordering of immediate parent nodes. * param - a parent node (an Node) * param - a parent node (an Node) * return - TRUE if successful, FALSE otherwise * 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. * sa switchOrderOfPrecedenceOfChildrenNodes() */
-
Octree¶
-
class
ORSModel.ors.Octree(self, anXML: str) → None¶ Bases:
ORSModel.ors.Node/* brief create a Octree from an xml */
-
buildOctreeBox(self, pGrid: UnstructuredGrid, iTIndex: int, bAppend: bool) → None¶ /* brief buildOctreeBox. */
-
buildSpheresOctreeBox(self, pCollection: SequenceableCollection, boxThatContainTheSpheres: Box, iTIndex: int, bAppend: bool) → None¶ /* brief buildSpheresOctreeBox. */
-
getAtomsForPoint(self, x: float, y: float, z: float, iTIndex: int) → ArrayLong¶ /* brief getAtomsForPoint. */
-
getAtomsIntersectingBoundedPlane(self, aBoundedPlane: Rectangle, iTIndex: int) → List¶ /* brief getAtomsIntersectingBoundedPlane. */
-
getAtomsIntersectingPlane(self, a: float, b: float, c: float, d: float, iTIndex: int) → List¶ /* brief getAtomsIntersectingPlane. */
-
none()¶
-
OpticalFlow¶
-
class
ORSModel.ors.OpticalFlow¶ Bases:
ORSModel.ors.Unmanaged-
computeAverageSpeedAndRotation(self, bUsePonderationByIntensityIm1: bool, pAverageSpeedX: float, pAverageSpeedY: float, pAverageSpeedZ: float, pAverageRotationAroundZ: float, pBarycenterX: float, pBarycenterY: float) → None¶ /* brief method computeAverageSpeedAndRotation */
-
createGaussianPyramid(self, pIOutChannelsGaussianPyramidIm1: Channel, pIOutChannelsGaussianPyramidIm2: Channel, pNumberOfLevels: int) → None¶ /* brief method createGaussianPyramid */
-
findMaximalLevelGaussianPyramidChannelAWithChannelB(self, pIBoundingBoxSearchArea: Box) → int¶ /* brief method findMaximalLevelGaussianPyramidChannelAWithChannelB */
-
findMaximalLevelGaussianPyramidForThisImageSize(self, sizeX: int, sizeY: int, sizeZ: int, bPerformZReduction: bool) → int¶ /* brief method findMaximalLevelGaussianPyramidForThisImageSize */
-
findMinimalLevelGaussianPyramidForGivenPrecision(self, pIBoundingBoxReferenceIm1: Box, pIBoundingBoxSearchArea: Box, minimalDistanceToStopOpticalFlow: float, minimalRotationToStopOpticalFlow: float, maximalNumberOfIterationsOpticalFlow: int, acceptableRelativeError: float) → int¶ /* brief method findMinimalLevelGaussianPyramidForGivenPrecision */
-
getFactorRegularizationSpeedCorrection(self) → float¶ /* brief method getFactorRegularizationSpeedCorrection */
-
getLastDisplacementRegistration2DTransformation(self, pAverageSpeedX: float, pAverageSpeedY: float, pAverageRotationAroundZ: float, pBarycenterX: float, pBarycenterY: float) → None¶ /* brief method getLastDisplacementRegistration2DTransformation */
-
getMaximalConditionValueRegularizedAtransposeA(self) → float¶ /* brief method getMaximalConditionValueRegularizedAtransposeA */
-
getOriginPixelsAverageSpeedIm1(self, x: int, y: int, z: int) → None¶ /* brief method setOriginPixelsAverageSpeedIm1 */
-
getOriginPixelsIm1(self, x: int, y: int, z: int, t: int) → None¶ /* brief method getOriginPixelsIm1 */
-
getOriginPixelsIm2(self, x: int, y: int, z: int, t: int) → None¶ /* brief method getOriginPixelsIm2 */
-
getPatchWindowHalfsize(self, x: int, y: int, z: int) → None¶ /* brief method getPatchWindowHalfsize */
-
getSizePixelsAverageSpeed(self, x: int, y: int, z: int) → None¶ /* brief method setOriginPixelsAverageSpeedIm1 */
-
getUpsampleSpeedToSameSizeAsBaseChannel(self) → bool¶ /* brief method getUpsampleSpeedToSameSizeAsBaseChannel */
-
getUseBrightnessCorrectionFactors(self, pValueLinearFactor: bool, pValueConstantFactor: bool) → None¶ /* brief method getUseBrightnessCorrectionFactors */
-
none()¶
-
registration2DTransformation(self, pIBoundingBoxReferenceIm1: Box, pIBoundingBoxSearchArea: Box, minimalDistanceToStopOpticalFlow: float, minimalRotationToStopOpticalFlow: float, maximalNumberOfIterationsOpticalFlow: int, bApplyTransformation: bool, IProgress: Progress) → Matrix4x4¶ /* brief method registration2DTransformation */
-
setFactorRegularizationSpeedCorrection(self, value: float) → None¶ /* brief method setFactorRegularizationSpeedCorrection */
-
setLevelsGaussianPyramid(self, minLevel: int, maxLevel: int) → None¶ /* brief method setLevelsGaussianPyramid */
-
setMaximalConditionValueRegularizedAtransposeA(self, value: float) → None¶ /* brief method setMaximalConditionValueRegularizedAtransposeA */
-
setOriginPixelsAverageSpeedIm1(self, x: int, y: int, z: int) → None¶ /* brief method setOriginPixelsAverageSpeedIm1 */
-
setOriginPixelsIm1(self, x: int, y: int, z: int, t: int) → None¶ /* brief method setOriginPixelsIm1 */
-
setOriginPixelsIm2(self, x: int, y: int, z: int, t: int) → None¶ /* brief method setOriginPixelsIm2 */
-
setPatchWindowHalfsize(self, x: int, y: int, z: int) → None¶ /* brief method setPatchWindowHalfsize */
-
setSizePixelsAverageSpeed(self, x: int, y: int, z: int) → None¶ /* brief method setOriginPixelsAverageSpeedIm1 */
-
setUpsampleSpeedToSameSizeAsBaseChannel(self, bValue: bool) → None¶ /* brief method setUpsampleSpeedToSameSizeAsBaseChannel */
-
OrderedCollection¶
-
class
ORSModel.ors.OrderedCollection¶ Bases:
ORSModel.ors.SequenceableCollection/** interface OrderedCollection * brief Abstraction class for ordered collections. * * author Normand Mongeau. * version 1.0 * * Abstraction class for ordered collections. / OrderedCollection.__init__(self, anXML: str) -> None / brief create a OrderedCollection from an xml */
-
none()¶
-
OrderedCollectionChar¶
-
class
ORSModel.ors.OrderedCollectionChar(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionChar from an xml */
-
none()¶
-
OrderedCollectionDouble¶
-
class
ORSModel.ors.OrderedCollectionDouble(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionDouble from an xml */
-
none()¶
-
OrderedCollectionFloat¶
-
class
ORSModel.ors.OrderedCollectionFloat(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionFloat from an xml */
-
none()¶
-
OrderedCollectionLONGLONG¶
-
class
ORSModel.ors.OrderedCollectionLONGLONG(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionLONGLONG from an xml */
-
none()¶
-
OrderedCollectionLong¶
-
class
ORSModel.ors.OrderedCollectionLong(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionLong from an xml */
-
none()¶
-
OrderedCollectionShort¶
-
class
ORSModel.ors.OrderedCollectionShort(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionShort from an xml */
-
none()¶
-
OrderedCollectionUnsignedChar¶
-
class
ORSModel.ors.OrderedCollectionUnsignedChar(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionUnsignedChar from an xml */
-
none()¶
-
OrderedCollectionUnsignedLONGLONG¶
-
class
ORSModel.ors.OrderedCollectionUnsignedLONGLONG(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionUnsignedLONGLONG from an xml */
-
none()¶
-
OrderedCollectionUnsignedLong¶
-
class
ORSModel.ors.OrderedCollectionUnsignedLong(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionUnsignedLong from an xml */
-
none()¶
-
OrderedCollectionUnsignedShort¶
-
class
ORSModel.ors.OrderedCollectionUnsignedShort(self, anXML: str) → None¶ Bases:
ORSModel.ors.OrderedCollection/* brief create a OrderedCollectionUnsignedShort from an xml */
-
none()¶
-
OrientedPlane¶
-
class
ORSModel.ors.OrientedPlane¶ Bases:
ORSModel.ors.Unmanaged/** interface OrientedPlane * brief Oriented plane manipulation services * * author Nicolas Piche. * author All other members of ORS participated. * version 1.0 * date May 2010 * *
*/-
copy(self) → "OrientedPlane"¶ /** * brief Gets a copy of the receiver. * return - an oriented plane (an OrientedPlane) */
-
from3PointsAndUp(self, point0: Vector3, point1: Vector3, point2: Vector3, up: Vector3) → None¶ /** * brief Initializes the plane from 3 points and an up vector. * param - The first point (an Vector3) * param - The second point (an Vector3) * param - The third point (an Vector3) * param - The up vector (an Vector3) * note * - The up vector must be perpendicular to the normal vector. */
-
fromPointAndNormalAndUp(self, point: Vector3, normal: Vector3, up: Vector3) → None¶ /** * brief Initializes the receiver from an origin point, a normal vector and an up vector. * param - The point of origin (an Vector3) * param - The normal vector (an Vector3) * param - The up vector (an Vector3) * note * - The up vector must be perpendicular to the normal vector. */
-
getCenter(self) → Vector3¶ /** * brief Gets the center position. * return - the center position (an Vector3) */
-
getDistanceFromOrientedPlane(self, orientedPlane: "OrientedPlane") → float¶ /** * brief Gets the distance from the provided plane to the receiver. * return - a distance (a double) */
-
getDistanceFromPlane(self, plane: Plane) → float¶ /** * brief Returns the distance from the receiver to the provided plane. * param - the plane (an Plane) * return - a distance (a double) * note * - Returns 0 if the receiver is parallel with the provided plane. */
-
getDistanceFromPoint(self, point: Vector3) → float¶ /** * brief Returns the distance from the receiver to the provided point. * param - the point (an Vector3) * return - a distance (a double) */
-
getIntersectionWithLine(self, aLine: Line) → Vector3¶ /** * brief Returns the vector representing the intersection with the provided line. * return - a vector (an Vector3) or NULL if no intersection */
-
getIntersectionWithLineSegment(self, aLineSegment: LineSegment) → Vector3¶ /** * brief Returns the vector representing the intersection with the provided line segment. * return - a vector (an Vector3) or NULL if no intersection */
-
getIntersectionWithPlanes(self, plane1: Plane, plane2: Plane) → Vector3¶ /** * brief Returns the point of the intersection with the provided planes. * return - a vector (an Vector3) or NULL if no intersection */
-
getIsParallelWithOrientedPlane(self, orientedPlane: "OrientedPlane") → bool¶ /** * brief Checks if the receiver is parallel with the provided oriented plane. * return - TRUE if parallel, FALSE otherwise */
-
getIsParallelWithPlane(self, plane: Plane) → bool¶ /** * brief Checks if the receiver is parallel with the provided plane. * param - the plane (an Plane) * return - TRUE if parallel, FALSE otherwise */
-
getNormal(self) → Vector3¶ /** * brief Returns the normal of the plane. * return - A vector (an Vector3) */
-
getPlane(self) → Plane¶ /** * brief Gets the plane represented by the receiver. * return - a plane (an Plane) */
-
getPointOnOrientedPlaneClosestToOrigin(self) → Vector3¶ /** * brief Returns the point on the receiver that is closest to the origin (0, 0, 0) * return - a vector (an Vector3) */
-
getProjectionOnPlane(self, point: Vector3) → Vector3¶ /** * brief Returns the point provided projected on the receiver. * param - the point (an Vector3) * return - the projected point (an Vector3) */
-
getRight(self) → Vector3¶ /** * brief Gets the cross product of the normal and up vectors. * return - a vector (an Vector3) */
-
getRotated(self, axisOfRotation: Vector3, rotationCenter: Vector3, angle: float) → "OrientedPlane"¶ /* brief getRotated */
-
getTransformed(self, aTransformationMatrix: Matrix4x4) → "OrientedPlane"¶ /* brief getTransformed */
-
getTranslatedToIncludePoint(self, point: Vector3) → "OrientedPlane"¶ /* brief getTranslatedToIncludePoint */
-
none()¶
-
rotate(self, axisOfRotation: Vector3, rotationCenter: Vector3, angle: float) → None¶ /* brief rotate */
-
setA(self, a: float) → None¶ /** * brief Sets the A plane value. * param - the A value (a double) */
-
setB(self, b: float) → None¶ /** * brief Sets the B plane value. * param - the B value (a double) */
-
setC(self, c: float) → None¶ /** * brief Sets the C plane value. * param - the C value (a double) */
-
setCenter(self, pCenterVector: Vector3) → None¶ /** * brief Sets the center position. * param - a vector (an Vector3) */
-
setD(self, d: float) → None¶ /** * brief Sets the D plane value. * param - the D value (a double) */
-
setOrientedPlaneValue(self, a: float, b: float, c: float, d: float, upX: float, upY: float, upZ: float, centerX: float, centerY: float, centerZ: float) → None¶ /** * brief Sets all the receiver value components. * param - the A parameter (a double) * param - the B parameter (a double) * param - the C parameter (a double) * param - the D parameter (a double) * param - the up X component (a double) * param - the up Y component (a double) * param - the up Z component (a double) * param - the center position X component (a double) * param - the center position Y component (a double) * param - the center position Z component (a double) */
-
PartialSpaceDijkstra¶
-
class
ORSModel.ors.PartialSpaceDijkstra¶ Bases:
ORSModel.ors.Dijkstra-
none()¶
-
PartialSpaceFastMarching¶
-
class
ORSModel.ors.PartialSpaceFastMarching¶ Bases:
ORSModel.ors.FastMarching-
none()¶
-
Plane¶
-
class
ORSModel.ors.Plane¶ Bases:
ORSModel.ors.Unmanaged/** interface Plane * brief Plane manipulation services * * author Nicolas Piche. * author All other members of ORS participated. * version 1.0 * date January 2010 * *
*/-
copy(self) → "Plane"¶ /** * brief Copies a plane. * return - A new plane (an Plane) * note * - The copied plane has the same equation as the source plane. */
-
from3Points(self, point0: Vector3, point1: Vector3, point2: Vector3) → None¶ /** * brief Initializes the plane from 3 points. * param - The first point (an Vector3) * param - The second point (an Vector3) * param - The third point (an Vector3) */
-
fromNPointsLeastMeanSquares(self, aPointCollection: SequenceableCollection) → None¶ /** * brief Gets the plane minimizing the sum of the squares distances from a set of (at least 3) points. * param - A sequence of points coordinates. */
-
fromPointAndNormal(self, point: Vector3, normal: Vector3) → None¶ /** * brief Initializes the plane from an origin point and a normal vector. * param - The point of origin (an Vector3) * param - The normal vector (an Vector3) */
-
getA(self) → float¶ /** * brief Gets the a coefficient of the plane. * return - The a coefficient of the plane (a double) * note * - The general plane equation is ax + by + cz + dw = 0. * sa getB(), getC(), getD() */
-
getB(self) → float¶ /** * brief Gets the b coefficient of the plane. * return - The b coefficient of the plane (a double) * note * - The general plane equation is ax + by + cz + dw = 0. * sa getA(), getC(), getD() */
-
getC(self) → float¶ /** * brief Gets the c coefficient of the plane. * return - The c coefficient of the plane (a double) * note * - The general plane equation is ax + by + cz + dw = 0. * sa getA(), getB(), getD() */
-
getD(self) → float¶ /** * brief Gets the d coefficient of the plane. * return - The d coefficient of the plane (a double) * note * - The general plane equation is ax + by + cz + dw = 0. * sa getA(), getB(), getC() */
-
getDistanceFromPlane(self, plane: "Plane") → float¶ /** * brief Computes the distance from another plane. * param - A plane (an Plane) * return - the distance (a double) */
-
getDistanceFromPoint(self, point: Vector3) → float¶ /** * brief Computes the distance from a point. * param - A point (an Vector3) * return - the distance (a double) */
-
getIntersectionWithLine(self, aLine: Line) → Vector3¶ /** * brief Return the vector representing the intersection of the provided line and the receiver * return - a vector (an Vector3) or NULL if not intersection */
-
getIntersectionWithLineSegment(self, aLineSegment: LineSegment) → Vector3¶ /** * brief Return the vector representing the intersection of the provided line segment and the receiver * return - a vector (an Vector3) or NULL if not intersection */
-
getIntersectionWithPlanes(self, plane1: "Plane", plane2: "Plane") → Vector3¶ /** * brief Return the point of the intersection of the provided planes and the receiver * return - a vector (an Vector3) or NULL if not intersection */
-
getIsEqualTo(self, plane: "Plane") → bool¶ /** * brief Verifies equality between the receiver and a given plane. * return - TRUE if the argument plane is equal to the receiver, FALSE otherwise */
-
getIsParallelWithPlane(self, plane: "Plane") → bool¶ /** * brief Checks to see if a given plane is parallel to the received plane. * param - A plane (an Plnae) * return - TRUE if both planes are parallel, FALSE otherwise */
-
getNormal(self) → Vector3¶ /** * brief Returns the normal of the plane. * return - A vector (an Vector3) */
-
getPointOnPlaneClosestToOrigin(self) → Vector3¶ /** * brief Returns the closest point to the origin of the plane. * return - A point (an Vector3) */
-
getRotated(self, axisOfRotation: Vector3, rotationCenter: Vector3, angle: float) → "Plane"¶ /* brief getRotated */
-
getTranslatedToIncludePoint(self, point: Vector3) → "Plane"¶ /* brief getTranslatedToIncludePoint */
-
none()¶
-
rotate(self, axisOfRotation: Vector3, rotationCenter: Vector3, angle: float) → None¶ /* brief rotate */
-
setA(self, a: float) → None¶ /** * brief Sets the a coefficient of the plane. * param - The a coefficient of the plane (a double) * note * - The general plane equation is ax + by + cz + dw = 0. * sa setB(), setC(), setD() */
-
setB(self, b: float) → None¶ /** * brief Sets the b coefficient of the plane. * param - The b coefficient of the plane (a double) * note * - The general plane equation is ax + by + cz + dw = 0. * sa setA(), setC(), setD() */
-
setC(self, c: float) → None¶ /** * brief Sets the c coefficient of the plane. * param - The c coefficient of the plane (a double) * note * - The general plane equation is ax + by + cz + dw = 0. * sa setA(), setB(), setD() */
-
PlaneCollection¶
-
class
ORSModel.ors.PlaneCollection¶ Bases:
ORSModel.ors.Visual- /** interface PlaneCollection
- brief Represents a collection of planes in the view.
- author Nicolas Piche.
- author All other members of ORS participated.
- version 1.0
- date Mai 2015
- Represents a collection of planes in the view.
*/
PlaneCollection.__init__(self, anXML: str) -> None /* brief create a PlaneCollection from an xml */
-
getHighlightedPlaneCollection(self, tIndex: int) → OrderedCollectionUnsignedChar¶ /* brief method getHighlightedPlaneCollection */
-
getSelectedPlaneCollection(self, tIndex: int) → OrderedCollectionUnsignedChar¶ /* brief method getSelectedPlaneCollection */
-
none()¶
Progress¶
-
class
ORSModel.ors.Progress¶ Bases:
ORSModel.ors.Managed/** interface Progress * brief An entity to control progress of lengthy processes * * author Normand * author All other members of ORS participated. * version 1.0 * date August 2014 * * An entity describing a progress controller. */
-
closeProgress(self) → None¶ /** * brief Closes the progress bar. * note * - This protocol is also called automatically when the interface gets deleted, so it is not necessary to call it. */
-
decrementRangeBy(self, iVal: int) → None¶ /** * brief Decrements the progress range. * return - the range decrement (an unsigned long) * note * - This protocol is only relevant when the progress is not a working progress. */
-
deleteObject(self) → None¶ /* brief Explicitly deletes the core object wrapped by this COM object. */
-
getCurrentProgress(self) → int¶ /** * brief Gets the current progress position. * return - the current progress bar position (an unsigned long) * note * - This protocol should not be used with working progress bars, as they do not have a position. */
-
getID(self) → int¶ /** * brief Gets the ID. * return - the progress ID (an unsigned short) * note * - This protocol is only relevant when the progress is started from an ID, not from a string caption. */
-
getIsCancellable(self) → bool¶ /** * brief Gets if the progress is cancellable. * return - true if progress is cancellable, false otherwise */
-
getIsCancelled(self) → bool¶ /** * brief Checks if the progress was cancelled by the user. * return - true if progress was cancelled, false otherwise * note * - This protocol is only relevant when the progress is a cancellable progress. */
-
getIsVisible(self) → bool¶ /** * brief Gets if the progress is visible. * return - true if progress is visible, false otherwise */
-
getIsWorkingBar(self) → bool¶ /** * brief Gets if the progress is a working progress or not. * return - true if progress is a working progress, false otherwise */
-
getRange(self) → int¶ /** * brief Gets the progress range. * return - the range (an unsigned long) * note * - This protocol is only relevant when the progress is not a working progress. */
-
incrementRangeBy(self, iVal: int) → None¶ /** * brief Increments the progress range. * return - the range increment (an unsigned long) * note * - This protocol is only relevant when the progress is not a working progress. */
-
none()¶
-
setExtraText(self, text: str) → None¶ /** * brief Sets the extra text. * param - some text (a string) * note * - The extra text is displayed in the progress dialog. */
-
setIsCancellable(self, pValue: bool) → None¶ /** * brief Sets if the progress is cancellable. * param - true to make the progress cancellable, false otherwise */
-
setIsCancelled(self, pValue: bool) → None¶ /** * brief Sets the progress to be cancelled or not. * param - true to cancel, false otherwise * note * - This protocol is only relevant when the progress is a cancellable progress. */
-
setIsVisible(self, bVisible: bool) → None¶ /** * brief Sets if the progress is visible. * return - true to make the progress visible, false to hide it */
-
startProgressWithCaption(self, sCaption: str, iRange: int, bCancellable: bool) → None¶ /** * brief Starts a normal progress bar. * param - the progress caption (a _bstr_) * param - the range (an unsigned long) * param - true if the progress bar is to be cancellable, false otherwise */
-
startProgressWithID(self, iID: int, iRange: int, bCancellable: bool) → None¶ /** * brief Starts a normal progress bar. * param - the progress id (an unsigned short, see ORSProgressBars.h for supported IDs) * param - the range (an unsigned long) * param - true if the progress bar is to be cancellable, false otherwise */
-
startWorkingProgressWithCaption(self, sCaption: str, bCancellable: bool) → None¶ /** * brief Starts a working progress bar. * param - the progress caption (a _bstr_) * param - true if the working bar is to be cancellable, false otherwise */
-
ROI¶
-
class
ORSModel.ors.ROI¶ Bases:
ORSModel.ors.StructuredGrid- /** interface ROI
- brief Represents a region of interest for a dataset.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- sa VisualChannel, MeshFacesROI
- Represents a VisualRegion of Interest (ROI) for a dataset. Can be used to highlight, subtract, extract, etc, portions
- of a dataset. Each ROI has its own color, opacity, visual state, etc. Only
- a limited amount of ROIs (255) can be visible simultaneously.
*/
ROI.__init__(self, anXML: str) -> None /* brief create a ROI from an xml */
-
adaptToChannel(self, pChannel: Channel, x: int, y: int, z: int, pTSourceOffset: int, pTRange: int) → None¶ /** * brief Adapts a ROI to a channel, according to the channel’s coordinates.
- param - a reference channel (an Channel)
- param - an X offset (an short)
- param - an Y offset (an short)
- param - a Z offset (an short)
- param - the T start position of the ROI (an unsigned short)
- param - the number of Ts to process (an unsigned short)
- 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.
*/
-
addCircleArea(self, posX: float, posY: float, posZ: float, normalX: float, normalY: float, normalZ: float, radius: float, tStep: int) → None¶ /* brief Add circle area to ROI */
-
addCircularPath2D(self, path: VisualPath, box: Box, plane: Plane, includeAllTouchingVoxel: bool, inverse: bool, bRemove: bool, IProgress: Progress, tStep: int) → None¶ /* brief Add a 2D polygon from a VisualPath to the ROI */
-
addCircularPath3D(self, path: VisualPath, box: Box, plane: Plane, includeAllTouchingVoxel: bool, inverse: bool, bRemove: bool, IProgress: Progress, tStep: int) → None¶ /* brief Add a 3D polygon from a VisualPath to the ROI */
-
addEllipse2D(self, plane: Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: Progress, tStep: int) → None¶ /** * brief Adds a 2D ellipse to the ROI.
- param - the bounded plane on which the ellipse lies (an Rectangle)
- param - true to include all touching voxels, false to only include voxels where center is included
- param - true to add the inverse of the polygon
- param - true to remove the polygon, false to add it
- param - a progress object (an Progress)
- param - time step for which to add the ellipse (an unsigned short)
*/
-
addEllipse3D(self, plane: Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: Progress, tStep: int) → None¶ /** * brief Adds a 2D ellipse to the ROI.
- param - the bounded plane on which the ellipse lies (an Rectangle)
- param - true to include all touching voxels, false to only include voxels where center is included
- param - true to add the inverse of the polygon
- param - true to remove the polygon, false to add it
- param - a progress object (an Progress)
- param - time step for which to add the ellipse (an unsigned short)
*/
-
addLine(self, pLine: Line, tStep: int) → None¶ /** * brief Adds a line to the ROI.
- param -AnORSLine
- param -time step
- note
- Note that the range values are inclusive.
- sa addSphere(), removeSphere(), removeSphereWithinRange()
*/
-
addLineIfInRange(self, pLine: Line, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: Channel) → None¶ /** * brief Adds a line to the ROI if the corresponding voxels in the channel are within the specified range.
- param - the line to add (an Line)
- param - the time step (an unsigned short)
- param - the lower range value (a double)
- param - the upper range value (a double)
- param - a channel of the same shape as the receiver (an Channel)
- note
- Note that the range values are inclusive.
- sa addSphere(), removeSphere(), removeSphereWithinRange()
*/
-
addLineSegment(self, lineSegment: LineSegment, tStep: int) → None¶ /** * brief Adds a line segment to the ROI.
- param - the line to remove (an Line)
- param - the time step (an unsigned short)
- sa addSphere(), removeSphere(), removeSphereWithinRange()
*/
-
addLineSegmentIfInRange(self, lineSegment: LineSegment, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: Channel) → None¶ /** * brief Adds a line segment to the ROI if the corresponding voxels in the channel are within the specified range.
- param - the line segment to add (an LineSegment)
- param - the time step (an unsigned short)
- param - the lower range value (a double)
- param - the upper range value (a double)
- param - a channel of the same shape as the receiver (an Channel)
- note
- Note that the range values are inclusive.
- sa addSphere(), removeSphere(), removeSphereWithinRange()
*/
-
addPathContour(self, aPath: VisualPath, aBox: Box, tStep: int) → None¶ /* brief Add a VisualPath contour to the ROI */
-
addPolygon2D(self, ptsList: float, ptsListSize: int, plane: Plane, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: Progress, tStep: int) → None¶ /** * brief Add a 3D polygon to the ROI.
- param - the points list (a double array)
- param - the size of the point list (an int)
- param - the plane on which the points lie (a Plane)
- param - true to include all touching voxels, false to only include voxels where center is included
- param - true to add the inverse of the polygon
- param - true to remove the polygon, false to add it
- param - a progress object (an Progress)
- param - the T index (an unsigned short)
- 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
*/
-
addPolygon3D(self, ptsList: float, ptsListSize: int, plane: Plane, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: Progress, tStep: int) → None¶ /** * brief Add a 3D polygon to the ROI.
- param - the points list (a double array)
- param - the size of the point list (an int)
- param - the plane on which the points lie (a Plane)
- param - true to include all touching voxels, false to only include voxels where center is included
- param - true to add the inverse of the polygon
- param - true to remove the polygon, false to add it
- param - a progress object (an Progress)
- param - the T index (an unsigned short)
- 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
*/
-
addROI(self, aROI: "ROI") → None¶ /** * brief Adds a ROI to the current ROI.
- param - the ROI to add (an ROI)
- note
- The ROI to add will be projected correctly if it doesn’t share the same characteristics.
- sa MergeWithROI()
*/
-
addROIAtTOffset(self, aROI: "ROI", pTOffset: int) → None¶ /** * brief Adds a ROI to the current ROI, but at a specific T offset.
- param - the ROI to add (an ROI)
- note
- The ROI to add will be projected correctly if it doesn’t share the same characteristics.
- sa AddROI(), MergeWithROI()
*/
-
addROIAtTimeStepAtTOffset(self, aROI: "ROI", timeIndex: int, pTOffset: int) → None¶ /** * brief Adds a ROI to the current ROI, but at a specific T offset. * param - the ROI to add (an ROI) * note * - The ROI to add will be projected correctly if it doesn’t share the same characteristics. * sa AddROI(), MergeWithROI() */
-
addRectangle2D(self, plane: Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: Progress, tStep: int) → None¶ /** * brief Adds a 3D rectangle to the ROI.
- param - the bounded plane on which the rectangle lies (an Rectangle)
- param - true to include all touching voxels, false to only include voxels where center is included
- param - true to add the inverse of the polygon
- param - true to remove the polygon, false to add it
- param - a progress object (an Progress)
- param - time step for which to add the rectangle (an unsigned short)
- note
- This method adds a 3D rectangle. The points must lie on the same plane.
- The polygon is filled in the plane normal direction.
*/
-
addRectangle3D(self, plane: Rectangle, includeAllTouchingVoxel: bool, inverse: bool, remove: bool, IProgress: Progress, tStep: int) → None¶ /** * brief Adds a 3D rectangle to the ROI.
- param - the bounded plane on which the rectangle lies (an Rectangle)
- param - true to include all touching voxels, false to only include voxels where center is included
- param - true to add the inverse of the polygon
- param - true to remove the polygon, false to add it
- param - a progress object (an Progress)
- param - time step for which to add the rectangle (an unsigned short)
- note
- This method adds a 3D rectangle. The points must lie on the same plane.
- The polygon is filled in the plane normal direction.
*/
-
addToVolumeROIAtPosition(self, xmin: int, ymin: int, zmin: int, tmin: int, inputROI: "ROI") → "ROI"¶ /** * brief Extracts a subset from indices. * param - the minimal X indicies of the subset (an unsigned short) * param - the maximal X indicies of the subset (an unsigned short) * param - the minimal Y indicies of the subset (an unsigned short) * param - the time step start (an unsigned short) * param - the time step end (an unsigned short) * param - the subset ROI */
-
addVoxel(self, index: int) → None¶ /** * brief Adds a voxel.
- param - the index of the voxel (a long long)
- note
- The index is linear within the channel data.
- note
- Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
- note
- If many voxels need to be added, it is better to use the protocols that accept a list of voxels.
- sa addVoxelList(), addVoxels(), removeVoxel(), removeVoxelList(), removeVoxels()
*/
-
addVoxelFromWorldCoordinates(self, pVect: Vector3, timeIndex: int) → None¶ /** * brief Adds point (supplied in the form of world vector) to the ROI.
- param - pVect
- param - the T index (an unsigned short) * sa addVoxelsFromWorldCoordinates() */
-
addVoxelIndicesToROIIfInRange(self, indices: int, indicesSize: int, lowerThreshold: float, upperThreshold: float, pChannel: Channel) → None¶ /** * brief Adds indices to the ROI, checking against a range.
- param - an array of indices (a long long*)
- param - the number of indices in the array (a long long)
- param - the lower range (a double)
- param - the upper range (a double)
- param - the channel to check against (an Channel)
- note
- Only those indicies having values within the supplied range are added to the ROI.
- sa addVoxelsFromWorldCoordinates()
*/
-
addVoxelIntersectingBoundedPlane(self, aPlane: Rectangle, tStep: int) → None¶ /* brief Add voxel intersecting bounded plane */
-
addVoxelInterval(self, iStart: int, iEnd: int) → None¶ /** * brief Adds a voxel interval of indicies.
- param - the start value (inclusive) of the interval (a long long)
- param - the end value (inclusive) of the interval (a long long)
- note
- Every voxel within the interval will be added to the Region of Interest.
- note
- The indicies are linear within the channel data.
- note
- Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
- sa addVoxel(), addVoxelList(), removeVoxel(), removeVoxelList(), removeVoxels(), removeVoxelInterval()
*/
-
addVoxelIntervals(self, pIntervalArray: int, pNumberOfIntervals: int) → None¶ /** * brief Adds a list of voxel indicies intervals.
- param - an array of interval begin and end (inclusive) values (a long long*)
- param - the number of interval pairs in the array (a long)
- note
- Every voxel within the interval will be added to the Region of Interest.
- note
- The indicies are linear within the channel data.
- note
- Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
- sa addVoxel(), addVoxelList(), removeVoxel(), removeVoxelList(), removeVoxels(), removeVoxelInterval()
*/
-
addVoxels(self, indices: int, indicesSize: int) → None¶ /** * brief Adds a list of voxels.
- param - an array of indicies (a long long*)
- param - the number of indicies in the array (a long long)
- 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.
- sa addVoxel(), addVoxelList(), removeVoxel(), removeVoxelList(), removeVoxels()
*/
-
addVoxelsFromWorldCoordinates(self, worldPositionArray: ArrayDouble, timeIndex: int) → None¶ /** * brief Adds indices (supplied in the form of world coordinates) to the ROI.
- param - an array of world position triplets (an ArrayDouble)
- param - the T index (an unsigned int)
- sa addVoxelsFromWorldCoordinatesIfInRange()
*/
-
addVoxelsFromWorldCoordinatesIfInRange(self, worldPositionArray: ArrayDouble, timeIndex: int, lowerThreshold: float, upperThreshold: float, pChannel: Channel) → None¶ /** * brief Adds indices (supplied in the form of world coordinates) to the ROI, checking against a range.
- param - an array of world position triplets (an ArrayDouble)
- param - the T index (an unsigned int)
- param - the lower range (a double)
- param - the upper range (a double)
- param - the channel to check against (an Channel)
- note
- Very similar to addVoxelsFromWorldCoordinates(), but only those indicies having values within the supplied
- range are added to the ROI.
- sa addVoxelsFromWorldCoordinates()
*/
-
clearTimeStepRange(self, pTimeStepStart: int, pTimeStepEnd: int) → None¶ /** * brief Empties a time step range of the region of interest.
- param - the time step start (an unsigned short)
- param - the time step end (an unsigned short)
*/
-
copyInto(self, aROI: "ROI") → None¶ /** * brief Copies the receiver into another ROI.
- param - a destination ROI (an Volume)
*/
-
dijkstra3DGrow(self, inputChannel: Channel, volumeToGrowIn: Box, volumeOfTheGrow: float, timeStep: int) → None¶ /* brief dijkstra3DGrow */
-
dilate(self, pNumberOfIterations: int, pTimeStep: int) → None¶ /** * brief Dilates (grows) the ROI.
- param - the number of dilate iterations (a unsigned short)
- param - the time step (an unsigned short)
- note
- Every voxel of the channel that touches the ROI is added to it, for the given time step.
*/
-
duplicateTimeStepDataAcrossAllTimeSteps(self, pSourceTimeStep: int) → None¶ /** * brief Duplicates data from one time step to all time steps.
- param - the source time step (an unsigned short)
- note
- The data from the source time step is copied to all the time steps of the ROI.
*/
-
erode(self, pNumberOfIterations: int, pTimeStep: int) → None¶ /** * brief Erodes (shrinks) the ROI.
- param - the number of erode iterations (a unsigned short)
- param - the time step (an unsigned short)
- note
- Every voxel of the ROI that touches the channel is removed from the ROI, for the given time step.
*/
-
exchangeInternalData(self, aROI: "ROI") → bool¶ /** * brief Exchanges (swaps) internal data between the receiver and the argument ROI.
- param - a ROI (an ROI)
- return - true if swap was successful, false otherwise
- note
- Both ROIs must have same spatial characteristics.
- sa hasSameSpatialBoxAsROI()
*/
-
extractCenterLinePaths(self, aSourceROI: "ROI", aTargetROI: "ROI") → List¶ /* brief extractCenterLinePaths */
-
extractMinimumLengthPaths(self, aSourceROI: "ROI", aTargetROI: "ROI") → List¶ /* brief extractMinimumLengthPaths */
-
extractSmoothPaths(self, aSourceROI: "ROI", aTargetROI: "ROI", fastMarchingGeometricBias: float, centered: bool) → List¶ /* brief extractSmoothPaths */
-
fillAllInnerHoles2DAlongDirection(self, dirX: float, dirY: float, dirZ: float, considerDiagonal: bool) → None¶ /** * brief Fills all inner holes of 2D slices along any direction.
- param - the X component of the direction (a double)
- param - the Y component of the direction (a double)
- param - the Z component of the direction (a double)
- param - true to use 26 neighbors, false to use 6 neighbors (see note below)
- 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.
*/
-
fillAllInnerHoles2DAlongXAxis(self, iTIndex: int, considerDiagonal: bool) → None¶ /** * brief Fills all X slices’ inner holes.
- param - the T index (an unsigned short)
- param - true to use 26 neighbors, false to use 6 neighbors (see note below)
- 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.
*/
-
fillAllInnerHoles2DAlongYAxis(self, iTIndex: int, considerDiagonal: bool) → None¶ /** * brief Fills all Y slices’ inner holes.
- param - the T index (an unsigned short)
- param - true to use 26 neighbors, false to use 6 neighbors (see note below)
- 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.
*/
-
fillAllInnerHoles2DAlongZAxis(self, iTIndex: int, considerDiagonal: bool) → None¶ /** * brief Fills all Z slices’ inner holes.
- param - the T index (an unsigned short)
- param - true to use 26 neighbors, false to use 6 neighbors (see note below)
- 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.
*/
-
fillInnerHoles(self, iTIndex: int, considerDiagonal: bool) → None¶ /** * brief Fills the ROI’s interior.
- param - the T index (an unsigned short)
- param - true to use 26 neighbors, false to use 6 neighbors (see note below)
- 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).
*/
-
fillInnerHoles2D(self, pCenter: Vector3, pDirection: Vector3, considerDiagonal: bool) → None¶ /** * brief Fills the ROI’s interior in 2D.
- param - a vector describing the 2D plane’s center point (an Vector3)
- param - a vector describing the direction of the plane (an Vector3)
- param - true to use 26 neighbors, false to use 6 neighbors (see note below)
- 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.
*/
-
fillIntervalArrays(self, pOutputLow: ArrayUnsignedLong, pOutputHigh: ArrayLONGLONG) → None¶ /** * brief Extracts indicies in the form of intervals.
- param[out] - an output array for lower indicies (an ArrayUnsignedLong)
- param[out] - an output array for higher indicies (an ArrayLONGLONG)
*/
-
generateAnalyzer(self, aTimeStep: int, inputChannel: Channel, longestDistance: bool, longestSegment: bool, inertiaTensorPrincipalComponent: bool, surfaceArea: bool, centerOfMass: bool, IProgress: Progress) → ROIAnalyzer¶ /* brief method generateAnalyzer */
-
getAsCubicMesh(self, bWorld: bool, IProgress: Progress, IInMesh: Mesh) → Mesh¶ /** * brief Generates a cubic mesh model from the ROI.
- param - true to have the resulting mesh model in world coordinates, false in local
- param - a progress object or NULL to show no progress (an Progress)
- param - an optional target mesh model (an Mesh)
- return - the resulting mesh model (an Mesh)
- note
- If a target Mesh is supplied, data is written to it and returned, otherwise a new Mesh is created.
*/
-
getAsMarchingCubesMesh(self, isovalue: float, bSnapToContour: bool, flipNormal: bool, timeStep: int, xSample: int, ySample: int, zSample: int, pNearest: bool, pWorld: bool, IProgress: Progress, pMesh: Mesh) → Mesh¶ /** * brief Creates a marching cube from the ROI.
- param - an isovalue (a float)
- param - true to snap vertices to contour, false to interpolate
- param - true flips normals, false doesn’t
- param - the time step to use (an unsigned short)
- param - the X sampling (an unsigned short, 1 means no sampling)
- param - the Y sampling (an unsigned short, 1 means no sampling)
- param - the Z sampling (an unsigned short, 1 means no sampling)
- param - true to sample to nearest value, false to sample linearly (if sampling is 1 this flag is ignored)
- param - true to have the resulting mesh model in world coordinates, false in local
- param - a progress object, NULL for no progress (an Progress)
- param[out] - an optional output mesh model (an Mesh)
- return - the resulting mesh model (an 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.
*/
-
getAsROIClipped(self, minX: int, minY: int, minZ: int, minT: int, maxX: int, maxY: int, maxZ: int, maxT: int, aROI: "ROI") → "ROI"¶ /** * brief Clips the ROI to the specified region.
- param - the X min dimension of the clip region (an int)
- param - the Y min dimension of the clip region (an int)
- param - the Z min dimension of the clip region (an int)
- param - the T min dimension of the clip region (an int)
- param - the X max dimension of the clip region (an int)
- param - the Y max dimension of the clip region (an int)
- param - the Z max dimension of the clip region (an int)
- param - the T max dimension of the clip region (an int)
- param - an optional target ROI (an ROI)
- return - the resulting ROI (an ROI)
- note
- If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.
*/
-
getAsROIClosedWithKernel(self, pKernel: ConvolutionKernel, pInRoi: "ROI", pTimeStep: int) → "ROI"¶ /** * brief Closes the ROI according to a supplied 3D kernel.
- param - the kernel (an ConvolutionKernel)
- param - an optional output ROI (an ROI)
- return - the resulting ROI (an ROI)
- note
- The 3D kernel needs not be symetric, 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.
*/
-
getAsROIDilatedWithKernel(self, pKernel: ConvolutionKernel, pInRoi: "ROI", pTimeStep: int) → "ROI"¶ /** * brief Dilates (grows) the ROI according to a supplied 3D kernel.
- param - the kernel (an ConvolutionKernel)
- param - an optional output ROI (an ROI)
- return - the resulting ROI (an ROI)
- note
- The 3D kernel needs not be symetric, 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.
*/
-
getAsROIErodedWithKernel(self, pKernel: ConvolutionKernel, pInRoi: "ROI", pTimeStep: int) → "ROI"¶ /** * brief Erodes (shrinks) the ROI according to a supplied 3D kernel.
- param - the kernel (an ConvolutionKernel)
- param - an optional output ROI (an ROI)
- return - the resulting ROI (an ROI)
- note
- The 3D kernel needs not be symetric, 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.
*/
-
getAsROIFromTimeStepsUnion(self, pTimeStep1: int, pTimeStep2: int, anOutputROI: "ROI") → "ROI"¶ /** * brief Merges (union) 2 time steps of the ROI.
- param - source time step (an unsigned short)
- param - time step to merge with (an unsigned short)
- param - the output ROI (an ROI), see note below
- return - the merged 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).
*/
-
getAsROIMovedInChannel(self, pInputData: Channel, xOffset: int, yOffset: int, zOffset: int, pTargetROI: "ROI") → "ROI"¶ /** * brief Moves the ROI by a given offset in a channel.
- param - the source channel (an Channel)
- param - an X voxel offset (an int)
- param - a Y voxel offset (an int)
- param - a Z voxel offset (an int)
- param - an optional output ROI (an ROI)
- return - the resulting ROI (an ROI)
- note
- If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.
*/
-
getAsROIOpenWithKernel(self, pKernel: ConvolutionKernel, pInRoi: "ROI", pTimeStep: int) → "ROI"¶ /** * brief Opens the ROI according to a supplied 3D kernel.
- param - the kernel (an ConvolutionKernel)
- param - an optional output ROI (an ROI)
- return - the resulting ROI (an ROI)
- note
- The 3D kernel needs not be symetric, 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.
*/
-
getCenterOfMass(self, pTimeStep: int, bForceCenterOnROI: bool) → Vector3¶ /** * brief Computes the ROI’s center of mass.
- param - true to force the center of mass to be part of the ROI, false otherwise (see note below)
- return - the center of mass (an XYZ vector) (an Vector3)
- note
- If the argument is true, the center of mass is forced to be part of the
- ROI. If the center of mass computed is not within the ROI, the nearest voxel in
- the ROI will be used.
*/
-
getCircumferenceAreaAndMinMaxDiameter(self, pBoundedPlane: Rectangle, pointInside: Vector3, nTimeStep: int, area: float, circumference: float, meanDiameter: float, maxDiameterPoint0: Vector3, maxDiameterPoint1: Vector3, minDiameter0: Vector3, minDiameter1: Vector3) → None¶ /* brief getCircumferenceAreaAndMinMaxDiameter */
-
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: Progress, pInData: MultiROI) → MultiROI¶ /** * brief Connected connectivity analysis of the ROI. * param - the T index (an unsigned short) * param - true to consider diagonals, false otherwise * param - a progress object (an Progress), or NULL for no progress * param - an optional output object (an MultiROI) * return - the resulting object (an 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. */
-
getContour2(self, pBoudedPlane: Rectangle, nTimeStep: int, pfPoints: Array) → None¶ /* brief getContour2 */
-
getContourOrdered(self, pPlane: Plane, nTimeStep: int, pfPoints: Array, pnIndexes: ArrayLong) → None¶ /** * brief Get ROI contours Sorts the labels on their sizes, in descending order. * param - The cut plane (a Plane) * param - The time step (an int) * param - The point array to fill (an ArrayFloat) * param - The indexes array to fill (an ArrayLong) * note * - Many contours may be found. The indexes array contains the start index (in the point array) * of the nth contour and the number of points it contains at the location 2*n and 2*n+1 respectively. */
-
getContourOrdered2(self, pBoudedPlane: Rectangle, nTimeStep: int, pfPoints: Array, pnIndexes: ArrayLong) → None¶ /** * brief Get ROI contours Sorts the labels on their sizes, in descending order. * param - The cut plane (a Plane) * param - The time step (an int) * param - The point array to fill (an ArrayFloat) * param - The indexes array to fill (an ArrayLong) * note * - Many contours may be found. The indexes array contains the start index (in the point array) * of the nth contour and the number of points it contains at the location 2*n and 2*n+1 respectively. */
-
getFromTimeStepRange(self, pTimeStepStart: int, pTimeStepEnd: int, anOutputROI: "ROI") → "ROI"¶ /** * brief Extracts a T range from the region of interest, as a new region of interest.
- param - the time step start (an unsigned short)
- param - the time step end (an unsigned short)
*/
-
getFurthestPointsAndDistance(self, pX: int, pY: int, pZ: int, pX2: int, pY2: int, pZ2: int, pDistance: float, timeStep: int) → None¶ /** * brief Finds the two furthest points and computes the distance between these points.
- param[out] - the X coordinate of the first point (an int)
- param[out] - the Y coordinate of the first point (an int)
- param[out] - the Z coordinate of the first point (an int)
- param[out] - the X coordinate of the second point (an int)
- param[out] - the Y coordinate of the second point (an int)
- param[out] - the Z coordinate of the second point (an int)
- param[out] - the distance between these two points (a double)
- note
- This protocol analyzes the ROI and finds its two most distant points. It returns
- the coordinates of these two points, and computes the distance between them.
*/
-
getHasDataWithinArea(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int) → bool¶ /** * brief Queries the ROI to know if it has data within a specific range of indicies. * param - the minimal x coordinate (a int) * param - the minimal y coordinate (a int) * param - the minimal z coordinate (a int) * param - the minimal t coordinate (a int) * param - the maximal x coordinate (a int) * param - the maximal y coordinate (a int) * param - the maximal z coordinate (a int) * param - the maximal t coordinate (a int) * return - true if receiver has data within the range (inclusive), false otherwise */
-
getHasDataWithinRange(self, startIndex: int, endIndex: int) → bool¶ /** * brief Queries the ROI to know if it has data within a specific range of indicies. * param - the starting index (a long long) * param - the ending index (a long long) * return - true if receiver has data within the range (inclusive), false otherwise */
-
getHasVoxelIndex(self, index: int) → bool¶ /** * brief Verifies if the receiver ROI contains a specified voxel index.
- param - a voxel index (a long long)
- return - true if the ROI contains the index, false otherwise
*/
-
getHistogramData(self, pNumberOfBins: int, pTimeStep: int, IChannel: Channel) → HistogramData¶ /** * brief Gets a histogram of the ROI’s underlying data (from its channel).
- param - the number of desired bins (an int)
- return - a histogram (an HistogramData)
*/
-
getInitialColor(self) → Color¶ /** * brief Gets the initial ROI color. * return - a color (an Color) * note * - The color is expressed in RGB fashion. */
-
getIntersectionWithROI(self, aROI: "ROI", anOutputROI: "ROI") → "ROI"¶ /** * brief Intersects the ROI with another ROI.
- param - the ROI to intersect with (an ROI)
- param - the output ROI (an ROI), see note below
- return - the intersected 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).
*/
-
getIsClipped(timestep=0, display=None)¶ Gets to know if the clip box of the ROI or MultiROI is active
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¶ /** * brief Sees if the ROI contains data.
- return - true if ROI contains no data, false otherwise
*/
-
getLabel(self) → int¶ /** * brief Gets the ROI label.
- return - a label (an unsigned short)
- note
- A ROI label is a unsigned short value that can be associated to the ROI. Each ROI
- has one label.
*/
-
getLabelization(self, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, iTIndex: int, considerDiagonal: bool, IProgress: Progress, pInData: MultiROI) → MultiROI¶ /** * brief Connected connectivity analysis of the ROI.
- param - the minimum X range (an unsigned short)
- param - the minimum Y range (an unsigned short)
- param - the minimum Z range (an unsigned short)
- param - the maximum X range (an unsigned short)
- param - the maximum Y range (an unsigned short)
- param - the maximum Z range (an unsigned short)
- param - the T index (an unsigned short)
- param - true to consider diagonals, false otherwise
- param - a progress object (an Progress), or NULL for no progress
- param - an optional output object (an MultiROI)
- return - the resulting object (an 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.
*/
-
getLocalBoundingBoxMax(self, timeStep: int) → Vector3¶ /** * brief Gets the upper-right corner of the visual’s bounding box.
-
getLocalBoundingBoxMin(self, timeStep: int) → Vector3¶ /** * brief Gets the lower-left corner of the visual’s bounding box.
-
getMaxIndex(self) → int¶ /** * brief Gets the largest index of the ROI.
- return - a channel voxel index (a long long)
*/
-
getMaxSourceDataValue(self, pTimeStep: int, pInputData: Channel) → float¶ /** * brief Gets the maximum source voxel value of the ROI for a given channel.
- param - the T index (an unsigned short)
- param - the source channel (an Channel)
- return - a voxel value (a double)
- note
- The value returned is in the same type as the source channel, but converted to a double.
*/
-
getMeanSourceDataValue(self, pTimeStep: int, pInputData: Channel) → float¶ /** * brief Gets the mean source voxel value of the ROI for a given channel.
- param - the T index (an unsigned short)
- param - the source channel (an Channel)
- return - a voxel value (a double)
- note
- The value returned is in the same type as the source channel, but converted to a double.
*/
-
getMinIndex(self) → int¶ /** * brief Gets the smallest index of the ROI.
- return - a channel voxel index (a long long)
*/
-
getMinSourceDataValue(self, pTimeStep: int, pInputData: Channel) → float¶ /** * brief Gets the minimum source voxel value of the ROI for a given channel.
- param - the T index (an unsigned short)
- param - the source channel (an Channel)
- return - a voxel value (a double)
- note
- The value returned is in the same type as the source channel, but converted to a double.
*/
-
getProjectionIn(self, pChannel: Channel, sourceTimeOffset: int, pProgress: Progress) → "ROI"¶ /** * brief Projects the ROI in a channel’s spatial box.
- param - the target channel (an Channel)
- param - a progress object (an Progress) or NULL for no progress
- return - the resulting ROI (an ROI)
- note
- If a target ROI is supplied, data is written to it and returned, otherwise a new ROI is created.
*/
-
getReversed(self, pTargetROI: "ROI") → "ROI"¶ /** * brief Reverses the ROI.
- param - an optional output ROI (an ROI)
- return - the resulting ROI (an 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.
*/
-
getSimplifiedGraphMesh(self, aROI: "ROI", aResultMesh: Mesh, aSurfaceMesh: Mesh) → "ROI"¶ /* brief getSimplifiedGraphMesh */
-
getStandardDeviationSourceDataValue(self, pTimeStep: int, pInputData: Channel) → float¶ /** * brief Gets the standard deviation of the source voxels of the ROI for a given channel.
- param - the T index (an unsigned short)
- param - the source channel (an Channel)
- return - a voxel value (a double)
- note
- The value returned is in the same type as the source channel, but converted to a double.
*/
-
getSubsetFromCoordinates(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int, subsetROI: "ROI") → "ROI"¶ /** * brief Extracts a subset from indices. * param - the minimal X indicies of the subset (an unsigned short) * param - the minimal Y indicies of the subset (an unsigned short) * param - the minimal Z indicies of the subset (an unsigned short) * param - the minimal T indicies of the subset (an unsigned short) * param - the maximal X indicies of the subset (an unsigned short) * param - the maximal Y indicies of the subset (an unsigned short) * param - the maximal Z indicies of the subset (an unsigned short) * param - the maximal T indicies of the subset (an unsigned short) * param - the subset ROI */
-
getSubtractionFromROI(self, aROI: "ROI", pOutputROI: "ROI") → "ROI"¶ /** * brief Subtracts another ROI from the receiver ROI.
- param - the ROI to subtract (an ROI)
- param - the output ROI (an ROI), see note below
- return - the subtracted 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.
*/
-
getSurface(self, timeStep: int) → float¶ /** * brief Gets the ROI’s surface area.
- param -time step for wich we want the surface
- return - the total surface area (a double)
- 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.
*/
-
getTotalVoxelCount(self) → int¶ /** * brief Gets the total number of voxels within the ROI.
- return - the number of voxels in the ROI (a long long)
*/
-
getUnionWithROI(self, aROI: "ROI", iTOffset: int, anOutputROI: "ROI") → "ROI"¶ /** * brief Merges the ROI with another ROI.
- param - the ROI to merge with (an ROI)
- param - the output ROI (an ROI), see note below
- return - the merged 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).
- sa addROI()
*/
-
getVolume(self, timeStep: int) → float¶ /** * brief Returns the e computed volume of the region of interest.
- param - the time step (an unsigned short)
- return - a double.
- note
- The volume is in cubic units of the dimension unit of the underlying channel.
*/
-
getVoxelCount(self, iTIndex: int) → int¶ /** * brief Gets the number of voxels within the ROI for a given T value.
- return - the number of voxels in the ROI (a long long)
- note
- This method computes the number of indicies, so if you need the value several times try to cache its return value.
*/
-
getWillBeDisplayed(self) → bool¶ /** * brief Gets whether or not the ROI is destined to be displayed.
- return - true if the ROI will be displayed, false otherwise
- 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.
*/
-
iterateIntervals(self, callbackFunction: int, userdata: int, bForceSingleThread: bool, bAlignMultiThreadingToZ: bool, createMultiThreadDataFunction: int) → None¶ /** * brief Iterates through the ROI indicies, calling a callback function with index intervals. * param - a callback function (the address of a ORSVOLUMEROIITERATORLINEAR function) * param - any user data to be supplied to the callback function * param - true to force single threaded execution, false to have it multi-threaded * param - true to align multi-thread execution to Z slices, false to align to nothing * param - a callback function to create multithread data (the address of a ORSVOLUMEROIITERATORCREATETHREADDATA function) * 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. */
-
iterateXYZTIntervals(self, callbackFunction: int, userdata: int, bForceSingleThread: bool, bAlignMultiThreadingToZ: bool, createMultiThreadDataFunction: int) → None¶ /** * brief Iterates through the ROI indicies, calling a callback function with X/Y/Z/T intervals. * param - a callback function (the address of a ORSVOLUMEROIITERATORXYZT function) * param - any user data to be supplied to the callback function * param - true to force single threaded execution, false to have it multi-threaded * param - true to align multi-thread execution to Z slices, false to align to nothing * param - a callback function to create multithread data (the address of a ORSVOLUMEROIITERATORCREATETHREADDATA function) * 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. */
-
makeROIForChannel(self, pChannel: Channel, x: int, y: int, z: int) → "ROI"¶ /** * brief Makes a new ROI from the receiver, according to a given channel’s coordinates.
- param - a reference channel (an Channel)
- param - an X offset (an short)
- param - an Y offset (an short)
- param - a Z offset (an short)
- return - a new ROI (an 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.
*/
-
none()¶
-
paintBoxIntersectingChannel()¶
-
paintBoxIntersectingMultiROI()¶
-
paintBoxIntersectingROI()¶
-
paintSphereIntersectingChannel()¶
-
paintSphereIntersectingMultiROI()¶
-
paintSphereIntersectingROI()¶
-
removeAllVoxelsIfInRange(self, timeStep: int, minValue: float, maxValue: float, pChannel: Channel) → None¶ /* brief method removeAllVoxelsIfInRange */
-
removeAllVoxelsIfNotInRange(self, timeStep: int, minValue: float, maxValue: float, pChannel: Channel) → None¶ /* brief method removeAllVoxelsIfNotInRange */
-
removeCircleArea(self, posX: float, posY: float, posZ: float, normalX: float, normalY: float, normalZ: float, radius: float, tStep: int) → None¶ /* brief Remove circle area from ROI */
-
removeLine(self, pLine: Line, tStep: int) → None¶ /** * brief Removes a line from the ROI.
- param - the line to remove (an Line)
- param - the time step (an unsigned short)
- sa addSphere(), removeSphere(), removeSphereWithinRange()
*/
-
removeLineIfInRange(self, pLine: Line, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: Channel) → None¶ /** * brief Removes a line from the ROI if the corresponding voxels in the channel are within the specified range.
- param - the line to remove (an Line)
- param - the time step (an unsigned short)
- param - the lower range value (a double)
- param - the upper range value (a double)
- param - a channel of the same shape as the receiver (an Channel)
- note
- Note that the range values are inclusive.
- sa addSphere(), removeSphere(), removeSphereWithinRange()
*/
-
removeLineSegment(self, lineSegment: LineSegment, tStep: int) → None¶ /** * brief Removes a line segment from the ROI.
- param - the line segment to remove (an Line)
- param - the time step (an unsigned short)
- sa addSphere(), removeSphere(), removeSphereWithinRange()
*/
-
removeLineSegmentIfInRange(self, lineSegment: LineSegment, tStep: int, lowerThreshold: float, upperThreshold: float, pChannel: Channel) → None¶ /** * brief Removes a line segment from the ROI if the corresponding voxels in the channel are within the specified range.
- param - the line segment to remove (an LineSegment)
- param - the time step (an unsigned short)
- param - the lower range value (a double)
- param - the upper range value (a double)
- param - a channel of the same shape as the receiver (an Channel)
- note
- Note that the range values are inclusive.
- sa addSphere(), removeSphere(), removeSphereWithinRange()
*/
-
removeSimplePointsWithDistanceMap(self, seedPointROI: "ROI", spaceChannel: Channel, outputROI: "ROI") → "ROI"¶ /* brief getSimplePointsWithDistanceMap */
-
removeVoxel(self, index: int) → None¶ /** * brief Removes a voxel.
- param - the index of the voxel (a long long)
- note
- The index is linear within the channel data.
- note
- Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
- sa addVoxel(), addVoxels(), addVoxelList(), removeVoxelList(), removeVoxels()
*/
-
removeVoxelIndicesFromROIIfInRange(self, indices: int, indicesSize: int, lowerThreshold: float, upperThreshold: float, pChannel: Channel) → None¶ /** * brief Removes indices from the ROI, checking against a range.
- param - an array of indices (a long long*)
- param - the number of indices in the array (a long long)
- param - the lower range (a double)
- param - the upper range (a double)
- param - the channel to check against (an Channel)
- note
- Only those indicies having values within the supplied range are removed from the ROI.
- sa addVoxelsFromWorldCoordinates()
*/
-
removeVoxelInterval(self, iStart: int, iEnd: int) → None¶ /** * brief Removes a voxel interval of indicies.
- param - the start value (inclusive) of the interval (a long long)
- param - the end value (inclusive) of the interval (a long long)
- note
- Every voxel within the interval will be removed from the Region of Interest.
- note
- The indicies are linear within the channel data.
- note
- Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
- sa addVoxel(), addVoxelList(), removeVoxel(), removeVoxelList(), removeVoxels(), addVoxelInterval()
*/
-
removeVoxelIntervals(self, pIntervalArray: int, pNumberOfIntervals: int) → None¶ /** * brief Removes a list of voxel indicies intervals.
- param - an array of interval begin and end (inclusive) values (a long long*)
- param - the number of interval pairs in the array (a long)
- note
- Every voxel within the interval will be removed from the Region of Interest.
- note
- The indicies are linear within the channel data.
- note
- Any changes to a Region of Interest need to be followed by a show() to refresh the screen.
- sa addVoxel(), addVoxelList(), removeVoxel(), removeVoxelList(), removeVoxels(), removeVoxelInterval()
*/
-
removeVoxels(self, indices: int, indicesSize: int) → None¶ /** * brief Removes a list of voxels.
- param - an array of indicies (a long long*)
- param - the number of indicies in the array (a long long)
- 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.
- sa addVoxel(), addVoxels(), addVoxelList(), removeVoxel(), removeVoxelList()
*/
-
removeVoxelsFromWorldCoordinates(self, worldPositionArray: ArrayDouble, timeIndex: int) → None¶ /** * brief Removes indices (supplied in the form of world coordinates) from the ROI.
- param - an array of world position triplets (an ArrayDouble)
- param - the T index (an unsigned int)
- sa removeVoxelsFromWorldCoordinatesIfInRange()
*/
-
removeVoxelsFromWorldCoordinatesIfInRange(self, worldPositionArray: ArrayDouble, timeIndex: int, lowerThreshold: float, upperThreshold: float, pChannel: Channel) → None¶ /** * brief Removes indices (supplied in the form of world coordinates) from the ROI, checking against a range.
- param - an array of world position triplets (an ArrayDouble)
- param - the T index (an unsigned int)
- param - the lower range (a double)
- param - the upper range (a double)
- param - the channel to check against (an Channel)
- note
- Very similar to removeVoxelsFromWorldCoordinates(), but only those indicies having values within the supplied
- range are removed from the ROI.
- sa removeVoxelsFromWorldCoordinates()
*/
-
reverseTimeStepRange(self, pTimeStepStart: int, pTimeStepEnd: int) → None¶ /** * brief Reverses a time step range of the ROI.
- param - the time step start (an unsigned short)
- param - the time step end (an unsigned short)
*/
-
setInitialColor(self, IColor: Color) → None¶ /** * brief Sets the initial ROI color. * param - a color (an Color) * note * - The color is expressed in RGB fashion. */
-
setLabel(self, aLabel: int) → None¶ /** * brief Sets the ROI label.
- param - a label (an unsigned short)
- note
- A ROI label is an unsigned short value that can be associated to the ROI. Each ROI
- has one label.
*/
-
setWillBeDisplayed(self, value: bool) → None¶ /** * brief Indicates whether or not the ROI is destined to be displayed.
- param - true if the ROI will be displayed, false otherwise
- 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.
*/
ROIAnalyzer¶
-
class
ORSModel.ors.ROIAnalyzer¶ Bases:
ORSModel.ors.Unmanaged/** interface ROIAnalyzer * brief Analyzer for ROIs * * author Nicolas Piché. * author All other members of ORS participated. * version 1.0 * date May 2010 * * */
-
getInertiaTensorPrincipalComponent(self) → Vector3¶ /* brief getInertiaTensorPrincipalComponent() */
-
getInertiaTensorPrincipalComponentWasComputed(self) → bool¶ /* brief getInertiaTensorPrincipalcomponentWasComputed */
-
getStandardDeviationInPhysicalUnits(self) → float¶ /* brief getStandardDeviationInPhysicalUnits() */
-
none()¶
-
Rectangle¶
-
class
ORSModel.ors.Rectangle¶ Bases:
ORSModel.ors.Unmanaged/** interface Rectangle * brief Rectangle plane manipulation services * * author Nicolas Piche. * author All other members of ORS participated. * version 1.0 * date January 2010 * *
*/-
atomicLoad(self, aFilename: str) → None¶ /** * brief Loads an object from a file. * param - a file path (a string) * * note * - Objects are saved in XML format. * note * - The file should contain only one object. If it contains more than one object, use atomicLoadSpecificNode(). * sa atomicSave() */
-
atomicSave(self, aFilename: str) → None¶ /** * brief Saves the object to a file. * param - a file path (a string) * note * - Objects are saved in XML format. * note * - The file will be overwritten if it exists. * sa atomicLoad() */
-
copy(self) → "Rectangle"¶ /** * brief Gets a copy of the receiver. * return - a box (an Rectangle) */
-
getBoundedDoublePlaneInBoxReferential(self, inRefBox: Box) → "Rectangle"¶ /** *brief Gets a copy of the receiver in the argument referential. * param - a box, the destination referential (an Box) * return - a bounded plane, a copy of the receiver in the argument referential (an Rectangle) */
-
getBox(self, direction2Size: float) → Box¶ /** *brief Returns a box, with direction2 size provided by the argument, with the same origin as the receiver. * return - a box (an Box) */
-
getCenter(self) → Vector3¶ /** *brief Gets the geometrical middle of the bounded plane. * return - a bounded plane center position (an Vector3) */
-
getCenterHalfVoxel(self) → Vector3¶ /** *brief Gets the middle of the voxel in the middle of the box. * return - a box center position (an Vector3) */
-
getCenteredBox(self, direction2Size: float) → Box¶ /** *brief Returns a box, with direction2 size provided by the argument, with origin displaced as to have the receiver centered in the direction2 vector. * return - a centered box (an Box)
*/
-
getDirection(self, index: int) → Vector3¶ /** * brief Gets the bounded plane direction2. * return - a vector (an Vector3) * note * - The direction2 vector is normalized and automaticaly generated using the cross product of direction0 vector and direction1 vector. */
-
getDirection0(self) → Vector3¶ /** * brief Gets the bounded plane direction2. * return - a vector (an Vector3) * note * - The direction2 vector is normalized and automaticaly generated using the cross product of direction0 vector and direction1 vector. */
-
getDirection0Size(self) → float¶ /** * brief Gets the bounded plane direction1 vector length. * return - the side 1 length (a double) * note * - This is the size in meters of the bounded plane side 1. */
-
getDirection0Spacing(self) → float¶ /** * brief Gets the receiver direction0 spacing. * return - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
getDirection1(self) → Vector3¶ /** * brief Gets the bounded plane direction2. * return - a vector (an Vector3) * note * - The direction2 vector is normalized and automaticaly generated using the cross product of direction0 vector and direction1 vector. */
-
getDirection1Size(self) → float¶ /** * brief Gets the bounded plane direction1 vector length. * return - the side 1 length (a double) * note * - This is the size in meters of the bounded plane side 1. */
-
getDirection1Spacing(self) → float¶ /** * brief Gets the receiver direction0 spacing. * return - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
getDirection2(self) → Vector3¶ /** * brief Gets the bounded plane direction2. * return - a vector (an Vector3) * note * - The direction2 vector is normalized and automaticaly generated using the cross product of direction0 vector and direction1 vector. */
-
getDirectionSize(self, index: int) → float¶ /** * brief Gets the bounded plane direction1 vector length. * return - the side 1 length (a double) * note * - This is the size in meters of the bounded plane side 1. */
-
getDirectionSpacing(self, index: int) → float¶ /** * brief Gets the receiver direction0 spacing. * return - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
getIntersectionWithPlane(self, pPlane: Plane) → LineSegment¶ /** *brief Returns the line segment representing the intersection of the provided plane and the receiver. * return - a line segment (an LineSegment) * note * - Returns NULL if there is no intersection.
*/
-
getInvertedWorldTranformation(self) → Matrix4x4¶ /** *brief The getWorldTransform matrix cannot be directlly inverted.Use this call to retriev the inverse transform * return - a box center position (an Vector3) */
-
getLinearInterpolatedBoundedPlane(self, aPlane: "Rectangle", normalizedInterpolationFactor: float) → "Rectangle"¶ /** *brief Returns a bounded plane which is the linear interpolation of the receiver and the provided bounded plane. * param - a bounded plane (an Rectangle) * param - an interpolation factor [0.0 , 1.0] plane (a double) * return - an interpolated bounded plane (an Rectangle) */
-
getOrigin(self) → Vector3¶ /** * brief Gets the bounded plane origin position. * return - the origin (an Vector3) * note * - The origin is in world coordinates. */
-
getOriginOpposite(self) → Vector3¶ /** * brief Gets the bounded plane origin opposite position. * return - the origin (an Vector3) * note * - The origin is in world coordinates. */
-
getPlane(self) → Plane¶ /** *brief Returns the plane on which the bounded plane resides. * return - a plane (an Plane)
*/
-
getProjectionOnPlane(self, aPoint: Vector3) → Vector3¶ /** * brief Returns a point which is the argument projected on the plane described by the receiver. * param - a point to project (an Vector3 ) * return - the projected point (an Vector3)
*/
-
getSummit(self, maxDirection0: bool, maxDirection1: bool) → Vector3¶ /** *brief Gets the position of one of the summits of the bounded plane. * param - TRUE to get maxDirection0, FALSE to get minDirection0 * param - TRUE to get maxDirection1, FALSE to get minDirection1
- return - a summit position (an Vector3)
*/
-
getVoxelToWorldCoordinates(self, anIndex: Vector3) → Vector3¶ /** *brief Gets the position of a given voxel. * param - a voxel position (an Vector3) * return - the position in world coordinates (an Vector3) * note * - Only useful if the spacing of the direction vectors have been defined.
*/
-
getWorldToVoxelCoordinates(self, pPointInWorld: Vector3) → Vector3¶ /** *brief Gets the position of a given world coordinate. * param - a world coordinate position point (an Vector3) * return - the position in local coordinates (an Vector3) * note * - Only useful if the spacing of the direction vectors have been defined. */
-
growToIncludePoint(self, aPoint: Vector3) → None¶ /** *brief Grows the receiver as to include the provided point. * note * - The provided point is projected on the bounded plane.
*/
-
none()¶
-
setDirection(self, index: int, pVect: Vector3) → None¶ /** * brief Sets the bounded plane direction0. * param - a vector (an Vector3) * note * - The direction0 vector will be normalized. */
-
setDirection0(self, pVect: Vector3) → None¶ /** * brief Sets the bounded plane direction0. * param - a vector (an Vector3) * note * - The direction0 vector will be normalized. */
-
setDirection0Size(self, aSize: float) → None¶ /** * brief Sets the bounded plane direction1 vector length. * param - the side 1 length (a double) * note * - This is the size in meters of the bounded plane side 0. */
-
setDirection0Spacing(self, aSpacing: float) → None¶ /** * brief Sets the receiver direction0 spacing. * param - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
setDirection1(self, pVect: Vector3) → None¶ /** * brief Sets the bounded plane direction0. * param - a vector (an Vector3) * note * - The direction0 vector will be normalized. */
-
setDirection1Size(self, aSize: float) → None¶ /** * brief Sets the bounded plane direction1 vector length. * param - the side 1 length (a double) * note * - This is the size in meters of the bounded plane side 0. */
-
setDirection1Spacing(self, aSpacing: float) → None¶ /** * brief Sets the receiver direction0 spacing. * param - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
setDirectionSize(self, index: int, aSize: float) → None¶ /** * brief Sets the bounded plane direction1 vector length. * param - the side 1 length (a double) * note * - This is the size in meters of the bounded plane side 0. */
-
setDirectionSizeVector(self, pVect: Vector3) → None¶ /* brief method getIsIntersectingBoundedPlane */
-
setDirectionSpacing(self, index: int, aSpacing: float) → None¶ /** * brief Sets the receiver direction0 spacing. * param - the side 0 spacing (a double) * note * - This value is used to compute transformations from world coordinate space to index space (in the channels). */
-
ReferenceFrame¶
-
class
ORSModel.ors.ReferenceFrame¶ Bases:
ORSModel.ors.Node- /** interface ReferenceFrame
- brief Used to represent a referential.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- sa 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).
*/
ReferenceFrame.__init__(self, anXML: str) -> None /* brief create a ReferenceFrame from an xml */
-
addLocalTranslation(self, pTranslation: Vector3, pTimeStep: int) → None¶ /** * brief Moves the frame by the specified offsets. * param - a translation vector (an Vector3) * param - the time step (an unsigned short) */
-
addLocalTranslationForAllTimeStep(self, pTranslation: Vector3) → None¶ /** * brief Moves the frame by the specified offsets. * param - a translation vector (an Vector3) */
-
addRotation(self, pRotation: Vector3, angle: float, pTimeStep: int) → None¶ /** * brief Adds a rotation to the frame referential. * param - the rotation vector (an Vector3) * param - angle (a float) * param - the time step (an unsigned short) * note * - The rotation is along the specified vector, in the parent referential. * note * - Rotations are cumulative. * * sa addWorldRotation() */
-
addRotationAroundPoint(self, fromNode: Node, axis: Vector3, centerOfRotation: Vector3, angle: float, pTimeStep: int) → None¶ /* brief method addRotationAroundPoint */
-
addRotationAroundPointForAllTimeStep(self, fromNode: Node, axis: Vector3, centerOfRotation: Vector3, angle: float) → None¶ /* brief method addRotationAroundPointForAllTimeStep */
-
addRotationForAllTimeStep(self, pRotation: Vector3, angle: float) → None¶ /* brief method addRotationForAllTimeStep */
-
addScalingAtPoint(self, pScale: Vector3, pPoint: Vector3, pTimeStep: int) → None¶ /* brief method addScalingAtPoint */
-
addScalingAtPointForAllTimeStep(self, pScale: Vector3, pPoint: Vector3) → None¶ /* brief method addScalingAtPointForAllTimeStep */
-
getFaceCallbackMode(self) → int¶ /** * brief Gets the facing callback mode that automates the frame facing behavior. * return - a Face callback mode (a long) * note * - A face callback mode automates the facing behavior of the frame. It can scale, translate, and/or rotate the frame to follow the specified restriction of the selected mode. * note * - Example: if you want the frame to always face the camera you can use the mode CXVFRAME_FACE_XYZ. * note * - See the CxvFrame_FaceCallback enum if the ORS_def.h file to know the valid values. * sa CxvFrame_FaceCallback, setFaceCallbackMode() * */
-
getLocalPosition(self, pTimeStep: int) → Vector3¶ /** * brief Gets the frame translation (a vector) from the local parent referential. * param - the time step (an unsigned short) * return - a vector (an Vector3) * note * - The resulting translation is the frame position in the parent referential. * sa setLocalPosition(), getWorldPosition(), setWorldPosition() * */
-
getMatrix(self, pTimeStep: int) → Matrix4x4¶ /** * brief Gets the frame matrix. * param - the time step (an unsigned short) * return - a matrix (an Matrix4x4) */
-
getParentFrame(self) → "ReferenceFrame"¶ /** * brief Gets the first parent referential. * return - a frame (an ReferenceFrame) if one exists, NULL otherwise * */
-
getPosition(self, aNode: Node, pTimeStep: int) → Vector3¶ /** * brief Gets the frame translation (a vector) directly from the world referential. * return - a vector (an Vector3) * note * - The resulting translation is the frame position in the world referential. * sa setWorldPosition(), setLocalPosition(), getLocalPosition() * */
-
getTransformationFromNodeToThis(self, fromNode: Node, inputOutMatrix: Matrix4x4, pTimeStep: int) → Matrix4x4¶ /* brief method getTransformationFromNodeToThis */
-
getXScale(self, pTimeStep: int) → float¶ /** * brief Gets the X scale of the frame in the parent referential. * param - the time step (an unsigned short) * return - a scale (a double) * sa setXScale() * */
-
getYScale(self, pTimeStep: int) → float¶ /** * brief Gets the Y scale of the frame in the parent referential. * param - the time step (an unsigned short) * return - a scale (a double) * sa setYScale() * */
-
getZScale(self, pTimeStep: int) → float¶ /** * brief Gets the Z scale of the frame in the parent referential. * param - the time step (an unsigned short) * return - a scale (a double) * sa setZScale() * */
-
none()¶
-
reset(self, pTimeStep: int) → None¶ /** * brief Resets the frame. * param - the time step (an unsigned short) * note * - Resetting a frame moves it to 0,0,0, and resets its scale, rotation and tranlation. */
-
resetForAllTimeStep(self) → None¶ /** * brief Resets the frame. * note * - Resetting a frame moves it to 0,0,0, and resets its scale, rotation and tranlation. */
-
resetFromBox(self, anIBox: Box, pTimeStep: int) → None¶ /** * brief Resets the frame to a box’s referential. * param - a box (an Box) * param - the time step (an unsigned short) */
-
resetFromBoxForAllTimeStep(self, anIBox: Box) → None¶ /** * brief Resets the frame to a box’s referential. * param - a box (an Box) */
-
setFaceCallbackMode(self, mode: int) → None¶ /** * brief Sets the facing callback mode that automates the frame facing behavior. * param - a Face callback mode (a long) * note * - A face callback mode automates the facing behavior of the frame. It can scale, translate, and/or rotate the frame to follow the specified restriction of the selected mode. * note * - Example: if you want the frame to always face the camera you can use the mode CXVFRAME_FACE_XYZ. * note * - See the CxvFrame_FaceCallback enum if the ORS_def.h file to know the valid values. * sa CxvFrame_FaceCallback, getFaceCallbackMode() * */
-
setLocalPosition(self, aIVector: Vector3, pTimeStep: int) → None¶ /** * brief Sets the frame translation from a vector in the local parent referential. * param - a vector (an Vector3) * param - the time step (an unsigned short) * note * - The resulting translation is the frame position in the parent referential. * sa getWorldPosition(), setLocalPosition(), getLocalPosition() * */
-
setLocalPositionForAllTimeStep(self, aIVector: Vector3) → None¶ /** * brief Sets the frame translation from a vector in the local parent referential. * param - a vector (an Vector3) * note * - The resulting translation is the frame position in the parent referential. * sa getWorldPosition(), setLocalPosition(), getLocalPosition() * */
-
setMatrix(self, pMatrix: Matrix4x4, pTimeStep: int) → None¶ /** * brief Sets the frame matrix. * param - the matrix (an Matrix4x4) * param - the time step (an unsigned short) */
-
setMatrixForAllTimeStep(self, pMatrix: Matrix4x4) → None¶ /** * brief Sets the frame matrix. * param - the matrix (an Matrix4x4) */
-
setOrientationCosine(self, fromNode: Node, direction0Cosine: Vector3, direction1Cosine: Vector3, direction2Cosine: Vector3, pTimeStep: int) → None¶ /* brief method setOrientation */
-
setOrientationCosineForAllTimeStep(self, fromNode: Node, direction0Cosine: Vector3, direction1Cosine: Vector3, direction2Cosine: Vector3) → None¶ /* brief method setOrientation */
-
setPosition(self, aNode: Node, aIVector: Vector3, pTimeStep: int) → None¶ /** * brief Sets the frame translation from a vector directly in the world referential. * param - a node (a Node) * param - a vector (an Vector3) * param - the time step (an unsigned short) * note * - The resulting translation of the frame takes into account all parent referentials. * sa getWorldPosition(), setLocalPosition(), getLocalPosition() * */
-
setPositionForAllTimeStep(self, aNode: Node, aIVector: Vector3) → None¶ /** * brief Sets the frame translation from a vector directly in the world referential. * param - a node (a Node) * param - a vector (an Vector3) * note * - The resulting translation of the frame takes into account all parent referentials. * sa getWorldPosition(), setLocalPosition(), getLocalPosition() * */
-
setXScale(self, xScale: float, pTimeStep: int) → None¶ /** * brief Sets the X scale of the frame in the parent referential. * param - a scale (a double) * param - the time step (an unsigned short) * sa getXScale() * */
-
setXScaleForAllTimeStep(self, xScale: float) → None¶ /** * brief Sets the X scale of the frame in the parent referential. * param - a scale (a double) * sa getXScale() * */
-
setYScale(self, yScale: float, pTimeStep: int) → None¶ /** * brief Sets the Y scale of the frame in the parent referential. * param - a scale (a double) * param - the time step (an unsigned short) * sa getYScale() * */
-
setYScaleForAllTimeStep(self, yScale: float) → None¶ /** * brief Sets the Y scale of the frame in the parent referential. * param - a scale (a double) * sa getYScale() * */
Saver¶
-
class
ORSModel.ors.Saver¶ Bases:
ORSModel.ors.Managed/** interface Saver * brief Allows to save ORS objects for later retrieval. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date Jan 2005 * sa Loader * * Allows to save ORS objects, for later retrieval. ORS objects are saved in XML format, so * this loader uses internally the msxml framework (hence the frequent mention of DOM). Can also be used * to create any XML (i.e. not just saving objects). */
-
addAttributeToCurrentNode(self, attributName: str, attributeValue: str) → None¶ /** * brief Adds a string attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (a string) * sa push(), addSimpleElementToCurrentNode() */
-
addBoolAttributeToCurrentNode(self, sAttributeName: str, bValue: bool) → None¶ /** * brief Adds a boolean attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (a bool) * sa push(), addSimpleElementToCurrentNode() */
-
addDoubleAttributeToCurrentNode(self, sAttributeName: str, fValue: float) → None¶ /** * brief Adds a double attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (a double) * sa push(), addSimpleElementToCurrentNode() */
-
addFloatAttributeToCurrentNode(self, sAttributeName: str, fValue: float) → None¶ /** * brief Adds a float attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (a float) * sa push(), addSimpleElementToCurrentNode() */
-
addIntAttributeToCurrentNode(self, sAttributeName: str, lValue: int) → None¶ /** * brief Adds an int attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (an int) * sa push(), addSimpleElementToCurrentNode() */
-
addLONGLONGAttributeToCurrentNode(self, sAttributeName: str, lValue: int) → None¶ /** * brief Adds a long long attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (a long long) * sa push(), addSimpleElementToCurrentNode() */
-
addShortAttributeToCurrentNode(self, sAttributeName: str, lValue: int) → None¶ /** * brief Adds a short attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (a short) * sa push(), addSimpleElementToCurrentNode() */
-
addSimpleBoolElementToCurrentNode(self, sElementName: str, bElementValue: bool) → None¶ /** * brief Adds a boolean element to the current node of an XML tree. * param - the element name (a string) * param - the element value (a bool) * sa push(), addAttributeToCurrentNode() */
-
addSimpleCDATAElementToCurrentNode(self, sElementName: str, sElementValue: str) → None¶ /** * brief Adds a CDATA element to the current node of an XML tree. * param - the element name (a string) * param - the element value (a string) * sa push(), addSimpleElementToCurrentNode(), addAttributeToCurrentNode() */
-
addSimpleDoubleElementToCurrentNode(self, sElementName: str, iElementValue: float) → None¶ /** * brief Adds a double element to the current node of an XML tree. * param - the element name (a string) * param - the element value (a double) * sa push(), addAttributeToCurrentNode() */
-
addSimpleElementToCurrentNode(self, elementName: str, elementValue: str) → None¶ /** * brief Adds a string element to the current node of an XML tree. * param - the element name (a string) * param - the element value (a string) * sa push(), addAttributeToCurrentNode() */
-
addSimpleFloatElementToCurrentNode(self, sElementName: str, iElementValue: float) → None¶ /** * brief Adds a float element to the current node of an XML tree. * param - the element name (a string) * param - the element value (a float) * sa push(), addAttributeToCurrentNode() */
-
addSimpleIntElementToCurrentNode(self, sElementName: str, lElementValue: int) → None¶ /** * brief Adds an int element to the current node of an XML tree. * param - the element name (a string) * param - the element value (an int) * sa push(), addAttributeToCurrentNode() */
-
addSimpleLONGLONGElementToCurrentNode(self, sElementName: str, lElementValue: int) → None¶ /** * brief Adds a long long element to the current node of an XML tree. * param - the element name (a string) * param - the element value (a long long) * sa push(), addAttributeToCurrentNode() */
-
addSimpleShortElementToCurrentNode(self, sElementName: str, lElementValue: int) → None¶ /** * brief Adds a short element to the current node of an XML tree. * param - the element name (a string) * param - the element value (a short) * sa push(), addAttributeToCurrentNode() */
-
addSimpleULONGLONGElementToCurrentNode(self, sElementName: str, iElementValue: int) → None¶ /** * brief Adds an unsigned long long element to the current node of an XML tree. * param - the element name (a string) * param - the element value (an unsigned long long) * sa push(), addAttributeToCurrentNode() */
-
addSimpleUnsignedIntElementToCurrentNode(self, sElementName: str, iElementValue: int) → None¶ /** * brief Adds an unsigned int element to the current node of an XML tree. * param - the element name (a string) * param - the element value (an unsigned int) * sa push(), addAttributeToCurrentNode() */
-
addSimpleUnsignedShortElementToCurrentNode(self, sElementName: str, iElementValue: int) → None¶ /** * brief Adds an unsigned short element to the current node of an XML tree. * param - the element name (a string) * param - the element value (an unsigned short) * sa push(), addAttributeToCurrentNode() */
-
addULONGLONGAttributeToCurrentNode(self, sAttributeName: str, iValue: int) → None¶ /** * brief Adds an unsigned long long attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (an unsigned long long) * sa push(), addSimpleElementToCurrentNode() */
-
addUnsignedIntAttributeToCurrentNode(self, sAttributeName: str, iValue: int) → None¶ /** * brief Adds an unsigned int attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (an unsigned int) * sa push(), addSimpleElementToCurrentNode() */
-
addUnsignedShortAttributeToCurrentNode(self, sAttributeName: str, iValue: int) → None¶ /** * brief Adds an unsigned short attribute to the current node of an XML tree. * param - the attribute name (a string) * param - the attribute value (an unsigned short) * sa push(), addSimpleElementToCurrentNode() */
-
loadFromFile(self, anXMLFilename: str) → bool¶ /** * brief Initializes the saver from an XML file. * param - the file name, including full path (a string) * return - true if file was successfully loaded, false otherwise */
-
loadString(self, anXMLString: str) → bool¶ /** * brief Initializes the saver from an XML string. * param - a valid XML (a string) * return - true if string was successfully loaded, false otherwise */
-
none()¶
-
SequenceableCollection¶
-
class
ORSModel.ors.SequenceableCollection¶ Bases:
ORSModel.ors.Collection/** interface SequenceableCollection * brief Abstraction class for sequenceable collections. * * author Normand Mongeau. * version 1.0 * * Abstraction class for sequenceable collections. Sequenceable collections are collections that have an innate ordering. / SequenceableCollection.__init__(self, anXML: str) -> None / brief create a SequenceableCollection from an xml */
-
dtype¶
-
getAsNDArray()¶
-
getMaxValueAsDoubleInRange(self, startIndex: int, endIndex: int) → float¶ /* brief getMaxValueAsDoubleInRange */
-
getMinValueAsDoubleInRange(self, startIndex: int, endIndex: int) → float¶ /* brief getMinValueAsDoubleInRange */
-
none()¶
-
setSize(self, iNewSize: int) → None¶ /** * brief Sets the size of the SequenceableCollection.
- return - the new size (a unsigned long long)
- note
- The size of the array 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.
*/
-
shape¶
-
sortAscending(self, bSlave: "SequenceableCollection", cSlave: "SequenceableCollection", dSlave: "SequenceableCollection", eSlave: "SequenceableCollection") → None¶ /* brief sortAscending */
-
StatisticalAnalyzer¶
-
class
ORSModel.ors.StatisticalAnalyzer¶ Bases:
ORSModel.ors.Unmanaged-
analyze(self, momentsCount: int, median: bool, aCollection: Collection) → None¶ /* brief method analyze */
-
analyzeSubset(self, momentsCount: int, median: bool, startIndex: int, endIndex: int, aCollection: SequenceableCollection) → None¶ /* brief method analyzeSubset */
-
none()¶
-
StructuredGrid¶
-
class
ORSModel.ors.StructuredGrid(self, anXML: str) → None¶ Bases:
ORSModel.ors.Node/* brief create a StructuredGrid from an xml */
-
copyShapeFromBox(self, pBox: Box, tSize: int) → None¶ /** * brief Initializes the structured grid’s shape based on a box.
- param - a box (a Box)
- param - a T size (an unsigned short)
*/
-
copyShapeFromRectangle(self, aRectangle: Rectangle, zSpacing: float, tSize: int) → None¶ /** * brief Initializes the structured grid’s shape based on a rectangle. * brief Output structured grid z size equal 1 * param - a rectangle (a Rectangle) * param - the thickness of the output structured grid (a double) * param - a T size (an unsigned short) */
-
copyShapeFromStructuredGrid(self, pStructuredGrid: "StructuredGrid") → None¶ /** * brief Initializes the structured grid’s shape based on another structured grid.
- param - a source structured grid
- note
- Shape includes size, spacing, type, description, position and location.
- note
- This method does not handle the structured grid’s data.
*/
-
getAsChannel(self, inOutStructuredGrid: "StructuredGrid", IProgress: Progress) → "StructuredGrid"¶ /** * brief Convert a structured grid to a channel * param - an optional output channel (an StructuredGrid) * return - the resulting channel (an StructuredGrid) * 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: * - 255 labels or less: UNSIGNED CHAR * - 65535 labels or less: UNSIGNED SHORT * - otherwise UNSIGNED INT * The value of the label is written where a label exist in the input MultiROI, 0 otherwise. * * sa asROI(), asMultiROI() */
-
getAsMultiROI(self, inOutStructuredGrid: "StructuredGrid", IProgress: Progress) → "StructuredGrid"¶ /** * brief Convert a structured grid to a MultiROI * param - an optional output MultiROI (an StructuredGrid) * return - the resulting MultiROI (an StructuredGrid) * 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. * * sa addToROI(), removeROI(), asChannel() */
-
getAsROI(self, inOutStructuredGrid: "StructuredGrid", IProgress: Progress) → "StructuredGrid"¶ /** * brief Convert a structured grid to a Volume ROI * param - an optional output Volume ROI (an StructuredGrid) * param - an optional progress object (a Progress) * return - the resulting Volume ROI (an StructuredGrid) * 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. * * sa addToROI(), removeROI(), asChannel() */
-
getDirtyBox(self, bResetDirtyBox: bool) → Box¶ /** * brief Gets the dirty box. * param - insicate that the dirty box should be resetted (a bool) * return - the dirty box (a Box) */
-
getHasSameShape(self, pStructuredGrid: "StructuredGrid") → bool¶ /** * brief Verifies if the structured grid has same shape as another structured grid (see note below). * param - a comparison structured grid * return - true if the comparison structured grid has same shape as receiver structured grid, * false otherwise * note * - Shape comparison includes axis sizes, spacing, position and orientation. */
-
getIndexOfFirstIntersectingNonZeroElement()¶
-
getIsIdenticalTo(self, pStructuredGrid: "StructuredGrid") → bool¶ /** * brief Verifies if the structured grid is identical to another structured grid (see note below). * param - a comparison structured grid (a StructuredGrid) * return - TRUE if the comparison structured grid has the same shape and data as receiver structured grid, FALSE otherwise * note * - Comparison of shape and data. */
-
getLabelAtPosition()¶
-
getPositionOfFirstIntersectingNonZeroElement()¶
-
getSliceAtIndex(self, zIndex: int, inStructuredGridSlice: "StructuredGrid", IProgress: Progress) → "StructuredGrid"¶ /* brief method getSliceAtIndex */
-
getSliceIntersectingBoundedPlane(self, aBoundedPlane: Rectangle, inStructuredGridSlice: "StructuredGrid", IProgress: Progress) → "StructuredGrid"¶ /* brief method getSliceIntersectingBoundedPlane */
-
getSpacingInDirection(self, pDirection: Vector3) → float¶ /** * brief Gets the spacing in the specified direction.
- param - the direction vector (an Vector3)
- return - The spacing (a double)
- note
- A structured grid knows its X, Y and Z spacing but can compute the spacing in any direction with this method.
- sa getXSpacing(), getYSpacing(), getZSpacing()
*/
-
getSubset(self, xmin: int, ymin: int, zmin: int, tmin: int, xmax: int, ymax: int, zmax: int, tmax: int, inChannelSubset: "StructuredGrid", IProgress: Progress) → "StructuredGrid"¶ /** * brief Gets a subset of the the structuredGrid. * param - the X lower range (an unsigned short) * param - the Y lower range (an unsigned short) * param - the Z lower range (an unsigned short) * param - the T lower range (an unsigned short) * param - the X upper range (an unsigned short) * param - the Y upper range (an unsigned short) * param - the Z upper range (an unsigned short) * param - the T upper range (an unsigned short) * param - the output structured grid (see notes) * return - a StructuredGrid (see notes) * note * - To prevent creating extra StructuredGrid, the output StructuredGrid can be fed as the last argument to the method. * note * - If the last argument is NULL, an StructuredGrid of the same base type will be created, otherwise the data will be fed directly * into it. * */
-
getTSize(self) → int¶ /** * brief Gets the T size of the structured grid.
- return - the T size (an unsigned short)
- note
- The T size is expressed in units.
- sa setTSize(), getTSpacing()
*/
-
getTSpacing(self) → float¶ /** * brief Gets the structured grid’s T spacing.
- return - T spacing (a double)
- note
- Spacing is used for structured grid visual representation.
- sa setTSpacing()
*/
-
getVoxelToWorldCoordinates(self, anIndex: Vector3) → Vector3¶ /** * brief Gets a given voxel’s location in DICOM Reference Coordinates System.
- param - the X index of the voxel (a double, see below)
- param - the Y index of the voxel (a double, see below)
- param - the Z index of the voxel (a double, see below)
- return - the world coordinates (in a vector) of the voxel (an Vector3)
- note
- This method returns the world coordinates of any given voxel. The arguments supplied represent the voxel index, but can be offset
- by a value between 0 and 1, to discover the exact subvoxel location. For example, to find the exact middle location of the voxel
- at x30,y50,z65, use getVoxelToWorldCoordinates (30.5, 50.5, 65.5).
*/
-
getWorldToVoxelCoordinates(self, pPointInWorld: Vector3) → Vector3¶ /** * brief Gets a given voxel’s index from DICOM Reference Coordinates System.
- param - the X coordinate of the world (a double)
- param - the Y coordinate of the world (a double)
- param - the Z coordinate of the world (a double)
- return - the voxel coordinates (in a vector) of the voxel (an Vector3)
*/
-
getXSize(self) → int¶ /** * brief Gets the X size of the structured grid. * return - the X size (an unsigned long) * note * - The size is expressed in pixels. * sa setXSize(), getXSpacing() * */
-
getXSpacing(self) → float¶ /** * brief Gets the structured grid’s X spacing.
- return - X spacing (a double)
- note
- Spacing is used for structured grid visual representation.
- sa setXSpacing()
*/
-
getYSize(self) → int¶ /** * brief Gets the Y size of the structured grid.
- return - the Y size (an unsigned long)
- note
- The size is expressed in pixels.
- sa setYSize(), getYSpacing()
*/
-
getYSpacing(self) → float¶ /** * brief Gets the structured grid’s Y spacing.
- return - Y spacing (a double)
- note
- Spacing is used for structured grid visual representation.
- sa setYSpacing()
*/
-
getZSize(self) → int¶ /** * brief Gets the Z size of the structured grid.
- return - the Z size (an unsigned long)
- note
- The size is expressed in pixels.
- sa setZSize(), getZSpacing()
*/
-
getZSliceThickness(self) → float¶ /** * brief Gets the structured grid’s Z slice thickness.
- return - Z slice thickness (a double)
- note
- Slice thickness is used for structured grid visual representation.
- sa setZSpacing(), getZSpacing(), setZSliceThickness()
*/
-
getZSpacing(self) → float¶ /** * brief Gets the structured grid’s Z spacing.
- return - Z spacing (a double)
- note
- Spacing is used for structured grid visual representation.
- sa setZSpacing()
*/
-
none()¶
-
paintBoxIfInRange(self, pBox: Box, label: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: "StructuredGrid") → None¶ /* brief paintBoxIfInRange */
-
paintCircleOnPlane(self, pPlane: Rectangle, worldPos: Vector3, radius: float, label: float, timeIndex: int, worldPositionArray: ArrayDouble) → None¶ /* brief paintCircleOnPlane */
-
paintCircleOnPlaneIfInRange(self, pPlane: Rectangle, worldPos: Vector3, radius: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: "StructuredGrid", worldPositionArray: ArrayDouble) → None¶ /* brief paintCircleOnPlaneIfInRange */
-
paintEllipseOnPlane(self, pPlane: Rectangle, worldPos: Vector3, dir0Radius: float, dir1Radius: float, axisOrientation: float, label: float, timeIndex: int, worldPositionArray: ArrayDouble) → None¶ /* brief paintEllipseOnPlane */
-
paintEllipseOnPlaneIfInRange(self, pPlane: Rectangle, worldPos: Vector3, dir0Radius: float, dir1Radius: float, axisOrientation: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: "StructuredGrid", worldPositionArray: ArrayDouble) → None¶ /* brief paintEllipseOnPlaneIfInRange */
-
paintPolygonOnPlane(self, pPlane: Rectangle, polygonWorldPos: ArrayDouble, label: float, timeIndex: int, worldPositionArray: ArrayDouble) → None¶ /* brief paintPolygonOnPlane */
-
paintPolygonOnPlaneIfInRange(self, pPlane: Rectangle, polygonWorldPos: ArrayDouble, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: "StructuredGrid", worldPositionArray: ArrayDouble) → None¶ /* brief paintPolygonOnPlaneIfInRange */
-
paintRectangleOnPlane(self, pPlane: Rectangle, worldPos: Vector3, dir0Length: float, dir1Length: float, label: float, timeIndex: int, worldPositionArray: ArrayDouble) → None¶ /* brief paintRectangleOnPlane */
-
paintRectangleOnPlaneIfInRange(self, pPlane: Rectangle, worldPos: Vector3, dir0Length: float, dir1Length: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: "StructuredGrid", worldPositionArray: ArrayDouble) → None¶ /* brief paintRectangleOnPlaneIfInRange */
-
paintSphere(self, worldPos: Vector3, fRadius: float, label: float, tStep: int) → None¶ /* brief paintSphere */
-
paintSphereIfInRange(self, worldPos: Vector3, fRadius: float, label: float, tStep: int, fMinValue: float, fMaxValue: float, pRangeChannel: "StructuredGrid") → None¶ /* brief paintSphereIfInRange */
-
paintSquareOnPlane(self, pPlane: Rectangle, worldPos: Vector3, radius: float, label: float, timeIndex: int, worldPositionArray: ArrayDouble) → None¶ /* brief paintSquareOnPlane */
-
paintSquareOnPlaneIfInRange(self, pPlane: Rectangle, worldPos: Vector3, radius: float, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: "StructuredGrid", worldPositionArray: ArrayDouble) → None¶ /* brief paintSquareOnPlaneIfInRange */
-
paintSubset(self, startX: int, startY: int, startZ: int, endX: int, endY: int, endZ: int, label: float, tStep: int) → None¶ /* brief paintSubset */
-
paintSubsetIfInRange(self, startX: int, startY: int, startZ: int, endX: int, endY: int, endZ: int, label: float, tStep: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: "StructuredGrid") → None¶ /* brief paintSubsetIfInRange */
-
paintVoxelsFromWorldCoordinates(self, worldPositionArray: ArrayDouble, label: float, timeIndex: int) → None¶ /* brief paintVoxelsFromWorldCoordinates */
-
paintVoxelsFromWorldCoordinatesIfInRange(self, worldPositionArray: ArrayDouble, label: float, timeIndex: int, lowerThreshold: float, upperThreshold: float, pRangeChannel: "StructuredGrid") → None¶ /* brief paintVoxelsFromWorldCoordinatesIfInRange */
-
projectInto(self, aDestinationStructuredGrid: "StructuredGrid", IProgress: Progress) → None¶ /** * brief Copies the receiver into the destination, keeping the destination shape. * param - a destination StructuredGrid (a StructuredGrid) */
-
setTSize(self, pTSize: int) → None¶ /** * brief Sets the T size of the structured grid.
- param - T size (an unsigned short)
- note
- The T size is expressed in units.
- sa getTSize()
*/
-
setTSpacing(self, pTSpacing: float) → None¶ /** * brief Sets the structured grid’s T spacing.
- param - T spacing (a double)
- note
- Spacing is used for structured grid visual representation.
- sa getTSpacing()
*/
-
setXSize(self, pXSize: int) → None¶ /** * brief Sets the X size of the structured grid.
- param - X size (an unsigned long)
- note
- The size is expressed in pixels.
- sa getXSize()
*/
-
setXSpacing(self, pXSpacing: float) → None¶ /** * brief Sets the structured grid’s X spacing.
- param - X spacing (a double)
- note
- Spacing is used for structured grid visual representation.
- sa getXSpacing()
*/
-
setXYZTSize(self, pXSize: int, pZSize: int, pYSize: int, pTSize: int) → None¶ /** * brief Sets the X,Y,Z,T sizes of the structured grid. * param - X size (an unsigned long) * param - Y size (an unsigned long) * param - Z size (an unsigned long) * param - T size (an unsigned long) * note * - The size is expressed in pixels. * sa getXSize() * */
-
setYSize(self, pYSize: int) → None¶ /** * brief Sets the Y size of the structured grid.
- param - Y size (an unsigned long)
- note
- The size is expressed in pixels.
- sa getYSize()
*/
-
setYSpacing(self, pYSpacing: float) → None¶ /** * brief Sets the structured grid’s Y spacing.
- param - Y spacing (a double)
- note
- Spacing is used for structured grid visual representation.
- sa getYSpacing()
*/
-
setZSize(self, pZSize: int) → None¶ /** * brief Sets the Z size of the structured grid.
- param - Z size (an unsigned long)
- note
- The size is expressed in pixels.
- sa getZSize()
*/
-
setZSliceThickness(self, pZThickness: float) → None¶ /** * brief Sets the structured grid’s Z slice thickness.
- param - Z slice thickness (a double)
- note
- Slice thickness is used for structured grid visual representation.
- sa setZSpacing(), getZSpacing(), getZSliceThickness()
*/
-
setZSpacing(self, pZSpacing: float) → None¶ /** * brief Sets the structured grid’s Z spacing.
- param - Z spacing (a double)
- note
- Spacing is used for structured grid visual representation.
- sa getZSpacing()
*/
-
shape¶
-
sliceIteratorFromBox(viewBox, mask=None, usePositiveMask=True, computeMask=False)¶
-
sliceIteratorFromDirection(dir0, dir1, mask=None, positiveMask=True, computeMask=False)¶
-
sliceIteratorFromView(view, mask=None, positiveMask=True, computeMask=False)¶
-
TraceBackChannelAnalyzer¶
-
class
ORSModel.ors.TraceBackChannelAnalyzer¶ Bases:
ORSModel.ors.Unmanaged-
forwardSelectionFromRoi(self, linputChannelTraceForward: Channel, inputROI: ROI, outputROI: ROI) → None¶ /* brief method forwardSelectionFromRoi */
-
forwardSelectionFromRoiToDistance(self, linputChannelTraceForward: Channel, inputROI: ROI, outputROI: ROI, distance: int) → None¶ /* brief method forwardSelectionFromRoiToDistance */
-
none()¶
-
selectPointFurtherOrNearerThanMinDistance(self, linputChannelTraceBack: Channel, indices: int, indicesSize: int, minDistance: int, outputROI: ROI, further: bool) → None¶ /* brief method selectPointFurtherOrNearerThanMinDistance */
-
traceBackTotraceForward(self, linputChannelTraceBack: Channel, loutputChannelTraceForward: Channel) → None¶ /* brief method traceBackTotraceForward */
-
Unmanaged¶
-
class
ORSModel.ors.Unmanaged¶ Bases:
ORSModel.ors.ORSBaseClass/** interface Unmanaged * brief Abstract class for objects that are not managed by the core library. Unmanaged objects are transient objects. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date Jan 2005 * * Abstract class for objects that are not managed by the core library. Unmanaged objects are transient objects. * */
-
classmethod
getAllSubclasses(outputCollection=None)¶
-
static
getClassFromProgId(progId)¶
-
getClassName(self) → str¶ /* brief Retrieves the class name of the core object wrapped by this COM object. */
-
classmethod
getIsSubclassOf(parentClass)¶
-
none()¶
-
classmethod
UnstructuredGrid¶
-
class
ORSModel.ors.UnstructuredGrid(self, anXML: str) → None¶ Bases:
ORSModel.ors.Node/* brief create a UnstructuredGrid from an xml */
-
copyInto(self, aDestinationUnstructuredGrid: Node) → None¶ /** * brief Copies the receiver unstructured grid into another unstructured grid.
- param - a destination channel (an Channel)
*/
-
getBoundingBox(self, iTIndex: int, aWorldTransform: Matrix4x4) → Box¶ /* brief Get the bounding box. */
-
getCenterOfMass(self, iTIndex: int, aWorldTransform: Matrix4x4) → Vector3¶ /* brief method getCenterOfMass */
-
getClosestVertexIndexToPoint(self, iTIndex: int, aWorldTransform: Matrix4x4, pPoint: Vector3) → int¶ /** * brief Gets the index of the closest vertex to a given point.
- param - a view in which to test (a View)
- param - the point (an Vector3)
- param - true if coordinate is supplied in local coordinates, false if in world coordinates
- return - a vertex index (a long)
- note
- Return value is -1 if an error occurs of if mesh is empty.
*/
-
getCurrentVertexScalarValuesSlot(self) → int¶ /** * brief gets the current vertex scalar. * param - the the time step (an unsigned short) * return - the scalar slot index (an unsigned long) * note * - The scalar index is zero-based, and thus should be less than getVertexScalarValuesSlotCount(). */
-
getMinMaxVertexScalarValue(self, scalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float) → None¶ /* brief method getMinMaxVertexScalarValue */
-
getMinimumBoundingBox(self, iTIndex: int, aWorldTransform: Matrix4x4) → Box¶ /* brief Get the minimum bounding box. */
-
getTSize(self) → int¶ /** * brief Gets the number of time steps for the mesh.
- return - a number (an unsigned short)
- sa setCurrentTimeStep()
*/
-
getUseVertexScalarValues(self) → bool¶ /** * brief Sets the mesh to have vertex scalar values or not. * param - true to use scalar values, false otherwise */
-
getVertexAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float) → None¶ /** * brief Gets a specific vertex.
- param - the time step (an unsigned short)
- param - the vertex index (an unsigned long long )
- param - the X value (a double*)
- param - the Y value (a double*)
- param - the Z value (a double*)
*/
-
getVertexCount(self, iTIndex: int) → int¶ /** * brief Returns the number of vertices. * param - the time step (an unsigned short) * return - an unsigned long long */
-
getVertexScalarValue(self, scalarValueSlotIndex: int, scalarValueVertexIndex: int, iTIndex: int) → float¶ /** * brief Gets the value of a vertex scalar. * param - the scalar slot index (an unsigned long) * param - the vertex index (an unsigned long) * param - the time step (an unsigned short) * return - the value of a vertex scalar (a float) */
-
getVertexScalarValueDescription(self, scalarValueSlotIndex: int, iTIndex: int) → str¶ /* brief method getVertexScalarValueDescription */
-
getVertexScalarValueMax(self, scalarValueSlotIndex: int, iTIndex: int) → float¶ /* brief method getVertexScalarValueMax */
-
getVertexScalarValueMaxs(self, iTIndex: int) → ArrayDouble¶ /* brief method getVertexScalarValueMaxs */
-
getVertexScalarValueMin(self, scalarValueSlotIndex: int, iTIndex: int) → float¶ /* brief method getVertexScalarValueMin */
-
getVertexScalarValueMins(self, iTIndex: int) → ArrayDouble¶ /* brief method getVertexScalarValueMins */
-
getVertexScalarValueOffset(self, scalarValueSlotIndex: int, iTIndex: int) → float¶ /** * brief Gets a vertex scalar offset value. * param - the scalar slot index (an unsigned long) * param - the time step (an unsigned short) * return - the scalar offset value (a float) */
-
getVertexScalarValueOffsets(self, iTIndex: int) → ArrayDouble¶ /** * brief Get the vertex scalar offset values. * param - the time step (an unsigned short) * return - the scalar offset value (a float) */
-
getVertexScalarValueSlope(self, scalarValueSlotIndex: int, iTIndex: int) → float¶ /** * brief Get a vertex scalar slope value. * param - the scalar slot index (an unsigned long) * param - the time step (an unsigned short) * return - the scalar slope value (a float) */
-
getVertexScalarValueSlopes(self, iTIndex: int) → ArrayDouble¶ /** * brief Get the vertex scalar slope values. * param - the time step (an unsigned short) * return - the scalar slope value (a float) */
-
getVertexScalarValueUnit(self, scalarValueSlotIndex: int, iTIndex: int) → int¶ /* brief method getVertexScalarValueUnit */
-
getVertexScalarValues(self, iSlotIndex: int, iTIndex: int) → Array¶ - /**
- brief Gets the values of a vertex scalar.
- param - the the time step (an unsigned short)
- return - an array of values (an ArrayFloat)
- note
- The array of values is of length getVertexCount() * getVertexScalarValuesSlotCount().
- note
- The scalar value in the slot s of the vertex v is located at the index (getVertexScalarValuesSlotCount() * v) + s of the array.
- sa setVertexScalarValues(), getVertexCount(), getVertexScalarValuesSlotCount()
*/
-
getVertexScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int) → int¶ /* brief method getVertexScalarValuesDatatype */
-
getVertexScalarValuesSlotCount(self) → int¶ /** * brief Gets the number of slots for vertex scalar values. * return - the number of slots (an unsigned long) */
-
getVertices(self, iTIndex: int) → Array¶ /** * brief Gets the vertices. * param - the time step (an unsigned short) * return - an array of float (an ArrayFloat) * sa setVertices(), getVertexCount() */
-
none()¶
-
offsetVertices(self, x: float, y: float, z: float) → None¶ /** * brief Offsets the mesh vertices.
- param - an X offset value (a double)
- param - a Y offset value (a double)
- param - a Z offset value (a double)
- note
- Each vertice is offset by the given relative coordinates.
*/
-
setCurrentVertexScalarValuesSlot(self, value: int) → None¶ /** * brief Sets the current vertex scalar. * param - the scalar slot index (an unsigned long) * param - the the time step (an unsigned short) * note * - The scalar index is zero-based, and thus should be less than getVertexScalarValuesSlotCount(). */
-
setTSize(self, tSize: int) → None¶ /** * brief Sets the number of time steps for the mesh.
- param - a number (an unsigned short)
*/
-
setUseVertexScalarValues(self, value: bool) → None¶ /** * brief Gets the status of vertex scalar values usage. * return - true if mesh uses scalar values, false otherwise * sa getScalarValues(), getScalarValuesSlotCount() */
-
setVertexAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float) → None¶ /** * brief Sets a specific vertex.
- param - the time step (an unsigned short)
- param - the vertex index (an unsigned long long)
- param - the X value (a double)
- param - the Y value (a double)
- param - the Z value (a double)
*/
-
setVertexScalarValue(self, scalarValueSlotIndex: int, scalarValueVertexIndex: int, aValue: float, iTIndex: int) → None¶ /** * brief Sets the value of a vertex scalar. * param - the scalar slot index (an unsigned long) * param - the vertex index (an unsigned long) * param - the value of a vertex scalar to set (a float) * param - the time step (an unsigned short) */
-
setVertexScalarValueDescription(self, scalarValueSlotIndex: int, value: str, iTIndex: int) → None¶ /* brief method setVertexScalarValueDescription */
-
setVertexScalarValueMax(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /* brief method setVertexScalarValueMax */
-
setVertexScalarValueMaxs(self, pScalarValues: ArrayDouble, iTIndex: int) → None¶ /* brief method setVertexScalarValueMaxs */
-
setVertexScalarValueMin(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /* brief method setVertexScalarValueMin */
-
setVertexScalarValueMins(self, pScalarValues: ArrayDouble, iTIndex: int) → None¶ /* brief method setVertexScalarValueMins */
-
setVertexScalarValueOffset(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /** * brief Sets a vertex scalar offset value. * param - the scalar slot index (an unsigned long) * param - the scalar offset value (a float) * param - the time step (an unsigned short) */
-
setVertexScalarValueOffsets(self, pScalarValues: ArrayDouble, iTIndex: int) → None¶ /** * brief Set the vertex scalar offset values. * param -the scalar offset value (a float) * param -the time step (an unsigned short) */
-
setVertexScalarValueSlope(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None¶ /** * brief Set a vertex scalar slope value. * param -the scalar slot index (an unsigned long) * param -the scalar slope value (a float) * param -the time step (an unsigned short) */
-
setVertexScalarValueSlopes(self, pScalarValues: ArrayDouble, iTIndex: int) → None¶ /** * brief Set the vertex scalar slope values. * param -the scalar slope value (a float) * param -the time step (an unsigned short) */
-
setVertexScalarValueUnit(self, scalarValueSlotIndex: int, value: int, iTIndex: int) → None¶ /* brief method setVertexScalarValueUnit */
-
setVertexScalarValues(self, pScalarValues: Array, iSlotIndex: int, iTIndex: int) → None¶ - /**
- brief Sets the values of a vertex scalar.
- param - an array of values (an ArrayFloat)
- param - the the time step (an unsigned short)
- note
- The array of values is of length getVertexCount() * getVertexScalarValuesSlotCount().
- note
- The scalar value in the slot s of the vertex v is located at the index (getVertexScalarValuesSlotCount() * v) + s of the array.
- sa getVertexScalarValues(), getVertexCount(), getVertexScalarValuesSlotCount()
*/
-
setVertexScalarValuesDatatype(self, iSlotIndex: int, iTIndex: int, nVertexScalarValuesDatatype: int) → None¶ /* brief method setVertexScalarValuesDatatype */
-
Vector3¶
-
class
ORSModel.ors.Vector3¶ Bases:
ORSModel.ors.Unmanaged/** interface Vector3 * brief A wrapper to a 3D vector. * * author Eric Fournier. * author All other members of ORS participated. * version 1.0 * date Jan 2005 * * A wrapper to a 3D vector. * */
-
add(self, aVector: "Vector3") → None¶ /** * brief Adds a vector to the receiver. * param - a vector (an Vector3) */
-
getAPerpendicular(self) → "Vector3"¶ /** * brief Computes a perpendicular from the vector. * return - a perpendicular vector (an Vector3) * sa getDotProductWith(), getAngleWith(), getDistanceFrom() */
-
getAdditionWith(self, aVector: "Vector3") → "Vector3"¶ /** * brief Gets the result of adding a vector to the receiver. * param - a vector (an Vector3) * return - the resulting vector (an Vector3) * note * - The receiver is not modified. */
-
getAngleWith(self, pVect: "Vector3") → float¶ /** * brief Computes the angle with another vector. * param - a vector (an Vector3) * return - the angle (a double) */
-
getCrossProductWith(self, pVect: "Vector3") → "Vector3"¶ /** * brief Computes the cross product with another vector. * param - a vector (an Vector3) * return - the cross product (a double) * sa getDotProductWith(), getAngleWith(), getDistanceFrom() */
-
getDistanceFrom(self, pVect: "Vector3") → float¶ /** * brief Computes the distance to another vector. * param - another vector (an Vector3) * return - the distance (a double) */
-
getDotProductWith(self, pVect: "Vector3") → float¶ /** * brief Computes the dot product with another vector. * param - a vector (an Vector3) * return - the dot product (a double) * sa getCrossProductWith(), getAngleWith(), getDistanceFrom() */
-
getLinearInterpolationWith(self, point1: "Vector3", normalizePosition: float) → "Vector3"¶ /** * brief Computes the lerp with another vector. * param - a vector (an Vector3) * param - a interpolation factor [0,1](a double) * return - the lerp vector (an Vector3) * sa getDotProductWith(), getAngleWith(), getDistanceFrom() */
-
getNegated(self) → "Vector3"¶ /** * brief Gets the receiver negated in a new vector. * return - the resulting vector (an Vector3) * note * - The receiver is not modified. */
-
getRotatedAroundAxis(self, anAxis: "Vector3", centerOfRotation: "Vector3", angleInRadian: float) → "Vector3"¶ /** * brief Return the receiver rotated around the provided axis for the provided amount of radian * param - an axis vector (an Vector3) * param - an centerOfRotation vector (an Vector3) * param - an angle in radian (a double) * return - the product of the rotation (an Vector3)
*/
-
getScaledBy(self, scaleFactor: float) → "Vector3"¶ /** * brief Gets the result of sacling a vector to the receiver. * param - a scale a double * return - the resulting vector (an Vector3) * note * - The receiver is not modified. */
-
getSubtractionFrom(self, aVector: "Vector3") → "Vector3"¶ /** * brief Gets the result of subtracting a vector from the receiver. * param - a vector (an Vector3) * return - the resulting vector (an Vector3) * note * - The receiver is not modified. */
-
getTheta()¶
-
getX(self) → float¶ /** * brief Gets the X value from the vector. * return - a double * sa getY(), getZ(), getW() */
-
getY(self) → float¶ /** * brief Gets the Y value from the vector. * return - a double * sa getX(), getZ(), getW() */
-
getZ(self) → float¶ /** * brief Gets the Z value from the vector. * return - a double * sa getX(), getY(), getW() */
-
is_(another)¶
-
is_not(another)¶
-
none()¶
-
normalize(self) → None¶ /** * brief Normalizes the vector. * note * - A normalized vector has norm (length) 1. */
-
scale(self, scaleFactor: float) → None¶ /** * brief Scales the vector. * param - a scale factor (a double) */
-
setX(self, value: float) → None¶ /** * brief Sets the X value of the vector. * param - a double value * sa setY(), setZ(), setW() */
-
setXYZ(self, x: float, y: float, z: float) → None¶ /** * brief Sets the 3 vector component * param - the X component (a double) * param - the Y component (a double) * param - the Z component (a double) * note * - W is set to zero
*/
-
setY(self, value: float) → None¶ /** * brief Sets the Y value of the vector. * param - a double value * sa setX(), setZ(), setW() */
-
View¶
-
class
ORSModel.ors.View¶ Bases:
ORSModel.ors.Node- /** interface View
- brief Represents a host window where the renderer is displayed.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- Represents a host window where the renderer is displayed.
*/
View.__init__(self, anXML: str) -> None /* brief create a View from an xml */
-
decrementTimeStep(self) → None¶ /** * brief Decrements the view’s time step counter.
- note
- When looking at 4D data (3D plus a time dimension), one can cycle through the
- time dimension in this fashion.
- sa incrementTimeStep(), setIsTimeStepLooping(), getIsTimeStepLooping(), setIsTimeStepPlaying(), getIsTimeStepPlaying(), setTimeStepRate(), getTimeStepRate(), getTimeStepPlayDirection(), setTimeStepPlayDirection()
*/
-
exportBackBuffer(self, sizeX: int, sizeY: int, pRedChan: Channel, pGreenChan: Channel, pBlueChan: Channel, bShowAnnotation: bool, bShowTextAnnotation: bool) → None¶ /** * brief Exports the back buffer, which is a screen shot.
- param - the X pixel size of the viewport (an unsigned short)
- param - the Y pixel size of the viewport (an unsigned short)
- param - the red output channel (an ORSChannelPtr)
- param - the green output channel (an ORSChannelPtr)
- param - the blue output channel (an ORSChannelPtr)
- param - show annotation flag (a BOOL)
- param - show text annotation flag (a BOOL)
- note
- To obtain a grayscale output, only supply the red output channel.
- sa
*/
-
exportSnapshotCustomSized(self, iWidth: int, iHeight: int, pOutputImage: Image) → Image¶ /** * brief Exports a snapshot of the view to an image, sized to specification. * param - the width of the image to be saved (an unsigned short) * param - the height of the image to be saved (an unsigned short) * param - (optional) an output image (an Image) * return - an image (an 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. * * sa exportThumbnail() */
-
fitBoundedPlaneInView(self, IBoundedPlane: Rectangle) → None¶ /* brief method fitBoundedPlaneInView */
-
fitBoundedPlaneInViewLogged(rectangle, logging=True)¶
-
fitBoxInViewLogged(box, logging=True)¶
-
gatherTimeStepMaxFromAll(self) → None¶ /* brief Queries all visible models to know how many timesteps there are */
-
get2DBackgroundColor(self) → Color¶ /** * brief Gets the view’s 3D first background color. * return - a color (an Color) * sa set3DBackgroundColor(), set2DBackgroundColor(), get2DBackgroundColor() */
-
get3DBackgroundColor1(self) → Color¶ /** * brief Gets the view’s 3D first background color. * return - a color (an Color) * sa set3DBackgroundColor(), set2DBackgroundColor(), get2DBackgroundColor() */
-
get3DBackgroundColor2(self) → Color¶ /** * brief Gets the view’s 3D first background color. * return - a color (a Color) * sa set3DBackgroundColor(), set2DBackgroundColor(), get2DBackgroundColor() */
-
get3DBackgroundColorMode(self) → int¶ /** * brief Gets the view’s 3D background color mode.
- return - color mode (a short, see note below)
- 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.
- sa set3DBackgroundColor(), set2DBackgroundColor(), get2DBackgroundColor()
*/
-
getAllVisibleChildrenOfClass(self, pProgId: str) → List¶ /** * brief Returns a flattened list of all the child nodes, of the given class, that are visible. * param - the ProgId of the class to test against (a string) * return - a list of all child nodes that are visible (an List) * note * - The list contains only Managed objects (they will need to be typecast to the appropriate class). */
-
getBoundedPlaneOfFirstSliceOfBox(self, aBox: Box) → Rectangle¶ /* brief method getBoundedPlaneOfFirstSliceOfBox */
-
getBoundedPlaneOfLastSliceOfBox(self, aBox: Box) → Rectangle¶ /* brief method getBoundedPlaneOfLastSliceOfBox */
-
getBoundedPlaneOfSliceOfBox(self, aBox: Box, sliceIndex: int) → Rectangle¶ /* brief method getBoundedPlaneOfSliceOfBox */
-
getBoxAbleToContainAllEnabledVisualReachableByRender(self, inbox: Box) → Box¶ /* brief method getBoxAbleToContainAllEnabledVisualReachableByRender */
-
getCamera(self) → Camera¶ /** * brief Gets the picked Overlay in a view
- return - the GUID of the overlay if successful, should be a VisualOVerlay but this idl doesn’t allow it
*/
-
getContext()¶
-
getDimensionUnit(self, dimensionType: int) → DimensionUnit¶ /** * brief Gets the view’s dimension unit.
- param - the unit type (a CxvUniverse_Dimension_type)
- return - the current dimension unit (DimensionUnit)
- note
- See the ORS_def.h file for enum CxvUniverse_Dimension_type values.
- sa getDimensionUnit(), getValueInMeterConvertedToCurrentUnit()
*/
-
getDimensionUnitID(self, dimensionType: int) → int¶ /** * brief Gets the view’s dimension unit.
- param - the unit type (a CxvUniverse_Dimension_type)
- return - the current CxvUniverse_Dimension unit (a long)
- note
- To obtain the object, call DimensionUnit::getUnitFor().
- note
- See the ORS_def.h file for enum CxvUniverse_Dimension and CxvUniverse_Dimension_type values.
- sa getDimensionAbbreviation(), getValueInMeterConvertedToCurrentUnit()
*/
-
getDisplayedAxis(self, aBox: Box) → int¶ /** * brief Gets the axis direction of the view.
- return - the axis (a unsigned char)
- note
- The axis value is 0 for Sagittal, 1 for Coronal or 2 for Axial.
*/
-
getFitToViewBorder(self) → int¶ /** * brief Gets the number of pixels allocated to the border around the view.
- return - the number of pixels (a long)
*/
-
getHWND(self) → int¶ /** * brief Gets the view handle.
- return - the handle of the window (a ORS_COM_ARG)
*/
-
getIsChildReachableByRenderer(self, INode: Node) → bool¶ /** * brief Verifies if a child node is renderable.
- param - a node in the child hierarchy of the view (a Node)
- return - true if the node is renderable, false otherwise
*/
-
getIsEnabled(self) → bool¶ /** * brief Queries the view to know if it is enabled. * return - true if the view is enabled, false otherwise * note * - Disabled views are “inert”, they react to very few events and display nothing. */
-
getIsInAcquisitionPlaneOf(self, aChannel: Channel) → bool¶ /* brief method getIsInAcquisitionPlaneOf */
-
getIsOrientationAndPositionLocked(self) → bool¶ /** * brief Gets the view’s position and orientation lock status.
- return - true if the view position and orientation is locked, false otherwise
- note
- When a view position is locked, one cannot set its oblique info.
*/
-
getIsOrientationLocked(self) → bool¶ /** * brief Gets the view’s orientation lock status.
- return - true if the view orientation is locked, false otherwise
- note
- When a view orientation is locked, one cannot set its oblique info.
*/
-
getIsPositionLocked(self) → bool¶ /** * brief Gets the view’s position lock status.
- return - true if the view position is locked, false otherwise
- note
- When a view position is locked, one cannot set its oblique info.
*/
-
getIsTrackingLight(self) → bool¶ /** * brief Queries if the view is in tracking light mode or not.
- return - true if the view is in tracking light mode, false otherwise
*/
-
getLODMode(self) → int¶ /** * brief Gets the view LOD mode.
- return - an LOD mode (a long)
- 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.
- sa setLODMode()
*/
-
getLayoutGenealogicalName()¶ Gets the genealogical name of the view
Returns: aName (str) – the genealogical name of the view
-
getLengthAsPixelCount(self, aLength: float) → float¶ /** * brief Gets the number of pixels on the screen that represent a world length.
- param - the world length (a double)
- return - the number of pixels that match the length (a double)
*/
-
getLocalPositionArrayTransformedToXY(self, pVisual: Visual, pLocalPositions: SequenceableCollection, nPtsCount: int, pTimeStep: int, pOutputXYPositions: SequenceableCollection) → SequenceableCollection¶ /* brief method getLocalPositionArrayTransformedToXY */
-
getLocalPositionFromVisualLocalPosition(self, pVisual: Visual, anotherVisual: Visual, pAlocalPositionInAnotherVisual: Vector3, pTimeStep: int) → Vector3¶ /* brief method getLocalPositionFromVisualLocalPosition */
-
getLocalPositionFromWorldPosition(self, pVisual: Visual, pWorldPosition: Vector3, pTimeStep: int) → Vector3¶ /* brief method getLocalPositionFromWorldPosition */
-
getLocalPositionTransformedToXY(self, IVisual: Visual, pCoord: Vector3, pTimeStep: int, oX: float, oY: float) → bool¶ /** * brief Transforms a local coordinate in 2D coordinates.
- param - the visual (an Visual)
- param - a coordinate (an Vector3)
- param[out] - the X 2D coordinate (a double*)
- param[out] - the Y 2D coordinate (a double*)
- return - true if the local Z coordinate is currently visible, false otherwise
- note
- The values are returned in the last two parameters supplied.
- sa getWorldPositionTransformedToXY()
*/
-
getMillisecondsElapsedSinceLastDraw(self) → int¶ /** * brief Returns the time elapsed since the last draw, in milliseconds. * return - the elapsed time, in milliseconds (an unsigned int) */
-
getNextSliceDirectionOfBox(self, aBox: Box) → Vector3¶ /* brief method getNextSliceDirectionOfBox */
-
getPickData(self, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → Intersection¶ /** * brief Gets the object being picked in the view.
- return - an intersection (an Intersection)
- note
- Returns an intersection describing what is currently under the mouse cursor in the view.
- sa getPickVisualData(), getPickPlaneData()
*/
-
getPickVisualData(self, aIVisual: Visual, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → Intersection¶ /** * brief Gets the pick region from a visual in the view.
- param - a visual (an Visual)
- return - an intersection (an 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.
- sa pick(), getPickPlaneData()
*/
-
getProjectionMode2D(self) → int¶ /** * brief Gets the 2D projection mode of the view.
- return - the current 2D projection mode (an int)
- note
- See CxvVolumeProjection_Mode in ORS_def.h for supported volume projection modes.
- sa - setProjectionMode2D(), setProjectionMode(), getProjectionMode()
*/
-
getRectangle()¶ Get the rectangle in the space defined by the View
Returns: rectangle (ORSModel.ors.Rectangle) – a Rectangle
-
getRenderMode(self) → int¶ /** * brief Gets the view render mode. * return - an unsigned char (an OrsRenderMode, see ors_def.h) * */
-
getRestTime(self) → int¶ /** * brief Gets the rendering idle time.
- return - a number of milliseconds (a LONG)
- 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.
*/
-
getScreenLengthTransformedToWorldLength(self, inLength: float) → float¶ /* brief method getScreenLengthTransformedToWorldLength */
-
getShowOrientationIndicators(self) → bool¶ /** * brief Gets the visibility of the orientation indicators.
- return - true if the orientation indicators are visible, false otherwise
*/
-
getShowViewFPS()¶
-
getSlabThickness(self) → float¶ /** * brief Gets the view’s slab thickness.
- return - the slab thickness, in microns (a double)
- note
- Note that this value represents the half slab thickness, in microns.
*/
-
getSliceCountOfBox(self, aBox: Box) → int¶ /** * brief Gets the number of slices of a given box.
- param - the visual box (an Box)
- return - the number of slices in the box, in the current camera direction
- sa getSliceIndexOfBox(), setSliceIndexOfBox()
*/
-
getSliceIndexOfBox(self, aBox: Box) → float¶ /** * brief Gets the current slice position of a given box.
- param - the visual box (an Box)
- return - the current slice position in the box
- sa getSliceCountOfBox(), setSliceIndexOfBox()
*/
-
getValueInCurrentUnitConvertedToMeter(self, pValue: float) → float¶ /** * brief Converts a value expressed in the view’s current dimension unit to meters.
- param - the value to be converted (a double)
- return - the value converted to meters (a double)
- 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).
- sa getDimensionUnit(), getDimensionAbbreviation(), getValueInMeterConvertedToCurrentUnit()
*/
-
getValueInMeterConvertedToCurrentUnit(self, pValue: float) → float¶ /** * brief Converts a value against the view’s current dimension unit.
- param - the value (in meters) to be converted (a double)
- return - the value converted (a double)
- 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().
- sa getDimensionUnit(), getDimensionAbbreviation(), getValueInCurrentUnitConvertedToMeter()
*/
-
getViewAlignedBoxThatContainsAllEnabledVisualsReachableByRenderer(self) → Box¶ /* brief method getViewAlignedBoxThatContainsAllEnabledVisualsReachableByRenderer */
-
getViewBoundedPlaneInWorldCoordinates(self) → Rectangle¶ /** * brief Returns a plane bounded to the view, in world coordinates.
- return - a plane (an Rectangle)
*/
-
getViewMode(self) → int¶ /** * brief Gets the view’s volume mode.
- return - a CxvView_Mode (a long)
- note
- See the ORS_def.h file for valid values.
- sa setViewMode()
*/
-
getViewOrientedBoxThatContainsBox(self, aBox: Box) → Box¶ /* brief method getViewOrientedBoxThatContainsBox */
-
getViewRepresentationColor(self) → Color¶ /** * brief Gets the view’s representation color
- return - a color (a Color)
- note
- This call is used to query the color that represents the view.
*/
-
getWorldLengthTransformedToScreenLength(self, inLength: float) → float¶ /* brief method getWorldLengthTransformedToScreenLength */
-
getWorldPositionArrayTransformedToXY(self, pWorldPositions: SequenceableCollection, nPtsCount: int, pOutputXYPositions: SequenceableCollection) → SequenceableCollection¶ /* brief method getWorldPositionArrayTransformedToXY */
-
getWorldPositionFromLocalPosition(self, pVisual: Visual, pLocalPosition: Vector3, pTimeStep: int) → Vector3¶ /* brief method getWorldPositionFromLocalPosition */
-
getWorldPositionTransformedToXY(self, pPosition: Vector3, oX: float, oY: float) → bool¶ /** * brief Transforms a world coordinate in 2D coordinates.
- param - a position (an Vector3)
- param[out] - the X 2D coordinate (a double*)
- param[out] - the Y 2D coordinate (a double*)
- return - true if the world Z coordinate is currently visible, false otherwise
- note
- The values are returned in the last two parameters supplied.
- sa getLocalPositionTransformedToXY()
*/
-
getXSize(self) → int¶ /** * brief Gets the view X size. * return - the X size, in pixels (an unsigned short) * sa setXSize(), setYSize(), setSize(), getYSize() * */
-
getXYArrayTransformedToLocalPosition(self, pVisual: Visual, pXYPositions: SequenceableCollection, nPtsCount: int, pTimeStep: int, pOutputLocalPositions: SequenceableCollection) → SequenceableCollection¶ /* brief method getXYArrayTransformedToLocalPosition */
-
getXYArrayTransformedToWorldPosition(self, pXYPositions: SequenceableCollection, nPtsCount: int, pOutputWorldPositions: SequenceableCollection) → SequenceableCollection¶ /* brief method getXYArrayTransformedToWorldPosition */
-
getXYTransformedToWorldPosition(self, x: float, y: float) → Vector3¶ /** * brief Transforms a 2D coordinates to world coordinate. * param - the X 2D coordinate (a double) * param - the Y 2D coordinate (a double) * return - a position in world coordinate(an Vector3) * note * - The world coordinate is projected on the current view bounded plane. * sa getLocalPositionTransformedToXY() */
-
getYSize(self) → int¶ /** * brief Gets the view Y size.
- return - the Y size, in pixels (an unsigned short)
- sa setXSize(), setYSize(), setSize(), getXSize()
*/
-
getZoomAtCursorPosition(self) → bool¶ /** * brief Gets the zoom reaction value.
- param - true if zoom is centered to the mouse cursor, or false if centered on view
*/
-
getZoomFactor(self) → float¶ /** * brief Gets the current zoom factor.
- return - zoom factor (a double)
*/
-
incrementTimeStep(self) → None¶ /** * brief Increments the view’s time step counter.
- note
- When looking at 4D data (3D plus a time dimension), one can cycle through the
- time dimension in this fashion.
- sa decrementTimeStep(), setIsTimeStepLooping(), getIsTimeStepLooping(), setIsTimeStepPlaying(), getIsTimeStepPlaying(), setTimeStepRate(), getTimeStepRate(), getTimeStepPlayDirection(), setTimeStepPlayDirection()
*/
-
none()¶
-
set2DBackgroundColor(self, IColor: Color) → None¶ /** * brief Sets the view’s 2D background color.
- param - a color (an Color)
- note
- The color should be expressed as RGB (the alpha is not used here).
- sa get3DBackgroundColor(), set3DBackgroundColor(), get2DBackgroundColor()
*/
-
set3DBackgroundColor(self, iMode: int, IColor1: Color, IColor2: Color) → None¶ /** * brief Sets the view’s 2D background color.
- param - a color (an Color)
- note
- The color should be expressed as RGB (the alpha is not used here).
- sa get3DBackgroundColor(), set3DBackgroundColor(), get2DBackgroundColor()
*/
-
setCameraLogged(camera, logging=True)¶
-
setDimensionUnitID(self, dimensionType: int, pUnit: int) → None¶ /** * brief Sets the view’s dimension unit.
- param - the unit type (a CxvUniverse_Dimension_type)
- param - a CxvUniverse_Dimension unit (a long)
- note
- See the ORS_def.h file for enum CxvUniverse_Dimension and CxvUniverse_Dimension_type values.
*/
-
setFitToViewBorder(self, value: int) → None¶ /** * brief Sets the number of pixels allocated to the border around the view.
- param - the number of pixels (a long)
*/
-
setHWND(self, pHWnd: int, openGLContext: int) → None¶ /** * brief Sets the view’s handle.
- param - the handle of the window (a ORS_COM_ARG)
*/
-
setIsEnabled(self, pEnabled: bool) → None¶ /** * brief Enables or disables the view. * param - true to enable the view, false to disable it * note * - Disabled views are “inert”, they react to very few events and display nothing. */
-
setIsOrientationAndPositionLocked(self, value: bool) → None¶ /** * brief Sets the view’s position lock status.
- param - true to lock the view position, false otherwise
- note
- When a view position is locked, one cannot set its oblique info.
*/
-
setIsOrientationLocked(self, value: bool) → None¶ /** * brief Sets the view’s orientation lock status.
- param - true to lock the view orientation, false otherwise
- note
- When a view orientation is locked, one cannot set its oblique info.
*/
-
setIsPositionLocked(self, value: bool) → None¶ /** * brief Sets the view’s position lock status.
- param - true to lock the view position, false otherwise
- note
- When a view position is locked, one cannot set its oblique info.
*/
-
setIsTrackingLight(self, value: bool) → None¶ /** * brief Sets the view to be in tracking light mode or not.
- param - true to be in tracking light mode, false otherwise
*/
-
setLODMode(self, dwMode: int) → None¶ /** * brief Sets the view LOD mode.
- param - an LOD mode (a long)
- 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.
- sa getLODMode()
*/
-
setOrientationIndicators(self, left: str, right: str, up: str, down: str, top: str, bottom: str) → None¶ /** * brief Sets the orientation indicators.
- param - 6 string, one for each orientation indicator
*/
-
setOrientedPlaneWithBox(self, anOrientedPlane: OrientedPlane, aBox: Box) → None¶ /* brief method setOrientedPlaneWithBox */
-
setOrientedPlaneWithBoxLogged(orientedPlane, box, logging=True)¶
-
setOrthoZoomFactorLogged(zoomFactor, logging=True)¶
-
setProjectionMode2D(self, iMode: int) → None¶ /** * brief Sets the 2D projection mode of the view.
- param - a 2D projection mode (an int)
- note
- See CxvVolumeProjection_Mode in ORS_def.h for supported volume projection modes.
- sa - getProjectionMode2D(), setProjectionMode(), getProjectionMode()
*/
-
setProjectionMode2DLogged(projectionMode, logging=True)¶
-
setRenderMode(self, mode: int) → None¶ /** * brief Sets the view render mode. * param - an unsigned char (an OrsRenderMode, see ors_def.h) * */
-
setShowOrientationIndicators(self, pFlag: bool) → None¶ /** * brief Sets the visibility of the orientation indicators.
- param - true to show the orientation indicators, false to hide them
*/
-
setShowViewFPS()¶
-
setSize(self, xSize: int, ySize: int) → None¶ /** * brief Sets the view size.
- param - the X size, in pixels (an unsigned short)
- param - the Y size, in pixels (an unsigned short)
- sa setXSize(), setYSize(), getXSize(), getYSize()
*/
-
setSlabThickness(self, value: float) → None¶ /** * brief Sets the view’s slab thickness.
- param - the slab thickness, in microns (a double)
- note
- Note that this value should represent the half slab thickness, in microns.
*/
-
setSlabThicknessLogged(thickness, logging=True)¶
-
setSliceIndexOfBox(self, aBox: Box, sliceIndex: float) → None¶ /** * brief Sets the current slice position for a given box.
- param - the visual box (an Box)
- param - the slice position in the box to set
- sa getSliceCountOfBox(), getSliceIndexOfBox()
*/
-
setSliceIndexOfBoxLogged(box, sliceIndex, logging=True)¶
-
setViewMode(self, viewMode: int) → None¶ /** * brief Sets the view’s volume mode.
- param - a CxvView_Mode (a long)
- note
- See the ORS_def.h file for valid values.
- sa getViewMode()
*/
-
setViewModeLogged(viewMode, logging=True)¶
-
setViewOrientedPlane(self, anOrientedPlane: OrientedPlane, aSlabThickness: float) → None¶ /* brief method setViewOrientedPlane */
-
setViewOrientedPlaneLogged(orientedPlane, thickness, logging=True)¶
-
setViewPlanePosition(self, worldPosition: Vector3, centerView: bool) → None¶ /* brief method setViewPlanePosition */
-
setViewPlanePositionLogged(point, center, logging=True)¶
-
setViewRepresentationColor(self, IColor: Color) → None¶ /** * brief Sets the view’s representation color.
- param - a color (an Color)
- note
- This call is used to specify the color that represents the view
*/
-
setXSize(self, xSize: int) → None¶ /** * brief Sets the view X size.
- param - the X size, in pixels (an unsigned short)
- sa setSize(), setYSize(), getXSize(), getYSize()
*/
-
setYSize(self, ySize: int) → None¶ /** * brief Sets the view Y size.
- param - the Y size, in pixels (an unsigned short)
- sa setSize(), setXSize(), getXSize(), getYSize()
*/
Visual¶
-
class
ORSModel.ors.Visual¶ Bases:
ORSModel.ors.Node- /** interface Visual
- brief An abstract class that handles all services pertaining to visualizing objects.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- An abstract class that handles all services pertaining to visualizing objects.
*/
Visual.__init__(self, anXML: str) -> None /* brief create a Visual from an xml */
-
getAllParentViewsWhereVisualIsVisible(self) → List¶ /** * brief Gets a list of views where the visual appears.
- return - a list of views (an List)
*/
-
getBoundingBox(self, iTIndex: int, aTransformationMatrix: Matrix4x4) → Box¶ /* brief method getBoundingBox */
-
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
-
getFirstFrameTowardsNode(self, anINode: Node) → ReferenceFrame¶ /** * brief Gets the first frame found going up the hierarchy towards a given object.
- param - the target node (an Node)
- return - a frame (an ReferenceFrame) or NULL if no frame is found
*/
-
getFrameTransformationFromNode(self, towardNode: Node, pTimeStep: int) → Matrix4x4¶ /* brief method getFrameTransformationFromNode */
-
getIsPickable(self) → bool¶ /** * brief Gets the visual’s pickable state.
- return - true if the visual is pickable, false otherwise
*/
-
getIsVisibleForAllViews(self) → bool¶ /** * brief Gets the visibility of the receiver in all views. * return - true if the receiver is visible is all views, false otherwise * sa getIsVisibleForView(), getIsVisibleForView(), setIsVisibleForAllViews() */
-
getIsVisibleForView(self, IView: View) → bool¶ /** * brief Gets the visibility of the receiver in a given view. * param - the view (a View) * return - true if the receiver is visible, false otherwise * sa setIsVisibleForView(), setIsVisibleForAllViews(), getIsVisibleForAllViews() */
-
getMaterial(self) → Material¶ /** * brief Gets the visual’s material.
- return - a material (an Material) or NULL is none exists
*/
-
getPickTolerance(self) → float¶ /** * brief Gets the pick tolerance.
- return - a number of pixels (a double between 0 and 1)
- note
- The pick tolerance is the radius, around any visual portion, where the mouse cursor can grab the visual.
- It’s expressed in pixels.
*/
-
getShowIn2D(self) → bool¶ /** * brief Gets the visual visibility mode in 2D views.
- return - true if the visual is visible in 2D views, false otherwise
- sa setShowIn2D(), setShowIn3D(), getShowIn3D()
*/
-
getShowIn3D(self) → bool¶ /** * brief Gets the visual visibility mode in 2D views.
- return - true if the visual is visible in 2D views, false otherwise
- sa setShowIn2D(), setShowIn3D(), getShowIn3D()
*/
-
getTSize(self) → int¶ /** * brief Gets the T size. * return - T size (an unsigned short) * sa setTSize() * */
-
getZEnabled(self) → bool¶ /** * brief Gets the visual’s Z buffer state.
- return - true if Z buffer is enabled, false otherwise
- 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.
*/
-
none()¶
-
setIsPickable(self, value: bool) → None¶ /** * brief Sets the visual to be pickable or not.
- param - TRUE to make the visual pickable, false otherwise
*/
-
setIsVisibleForAllViews(self, bValue: bool) → None¶ /** * brief Sets the visibility of the receiver in all views. * param - true to make the receiver visible in all views, false to hide it * note * - This API overrides all prior calls to setIsVisibleForViews(), or in other words, any view specific setting is erased. * sa getIsVisibleForView(), getIsVisibleForView(), getIsVisibleForAllViews() */
-
setIsVisibleForView(self, IView: View, bValue: bool) → None¶ /** * brief Sets the visibility of the receiver in a given view. * param - the view (n View) * param - true to make the receiver visible, false to hide it * note * - This API overrides a prior call to setIsVisibleForAllViews(), for a given view. * sa getIsVisibleForView(), setIsVisibleForAllViews(), getIsVisibleForAllViews() */
-
setIsVisibleForViewLogged(view, flag, logging=True)¶
-
setMaterial(self, aIMaterial: Material) → None¶ /** * brief Sets the visual’s material.
- param - a material (an Material)
*/
-
setPickTolerance(self, pValue: float) → None¶ /** * brief Sets the pick tolerance.
- param - a number of pixels (a double between 0 and 1)
- note
- The pick tolerance is the radius, around any visual portion, where the mouse cursor can grab the visual.
- It’s expressed in pixels.
*/
-
setShowIn2D(self, show: bool) → None¶ /** * brief Sets the visual to be visible or not in 3D views.
- param - true to have the visual be visible in 3D views, false otherwise
- sa setShowIn2D(), getShowIn3D(), getShowIn2D()
*/
-
setShowIn3D(self, show: bool) → None¶ /** * brief Sets the visual to be visible or not in 3D views.
- param - true to have the visual be visible in 3D views, false otherwise
- sa setShowIn2D(), getShowIn3D(), getShowIn2D()
*/
-
setTSize(self, pTSize: int) → None¶ /** * brief Sets the T size. * param - T size (an unsigned short) * sa getTSize() * */
-
setZEnabled(self, value: bool) → None¶ /** * brief Sets the visual’s Z buffer state.
- param - true to enable the Z buffer, false to disable it
- 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.
*/
VisualAngle¶
-
class
ORSModel.ors.VisualAngle¶ Bases:
ORSModel.ors.Annotation- /* brief method render3D //* interface VisualAngle
- brief Represents an angle and its measurement.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Aug 2006
- Represents an angle and its measurement.
*/
VisualAngle.__init__(self, anXML: str) -> None /* brief create a VisualAngle from an xml */
-
fitFromPoints(self, count: int, points: float, iTIndex: int) → None¶ /** * brief Gets the primitive to fit itself to a list of points. * param - the number of triplets supplied (an unsigned long) (see note below) * param - an array of points to fit to (a double*) * note * - Points should be supplied in triplets, for respectively the X, Y and Z position. * sa fitFromVector3(), fitFromPointList() */
-
getAngleValue(self, iTIndex: int) → float¶ /** * brief Gets the value of the angle.
- return - the angle value (a float)
- note
- The angle value is always in radian.
*/
-
getIsSplitted(self, iTIndex: int) → bool¶ /** * brief Queries the angle to see if it is splitted or not.
- return - TRUE if the angle is splitted, FALSE otherwise (see note)
- note
- A splitted angle is not joined at the center, it is the angle between two vectors.
*/
-
none()¶
VisualArrow¶
VisualBox¶
-
class
ORSModel.ors.VisualBox(self, anXML: str) → None¶ Bases:
ORSModel.ors.Visual/* brief create a VisualBox from an xml */
-
getIsMiddleAnchorHighlited(self, iTIndex: int) → bool¶ /* brief method getIsMiddleAnchorHighlited */
-
getSelectedColor(self) → Color¶ /** * brief Gets the selected color of the annotation. * return - the color (a Color) */
-
none()¶
-
pickBoxFace(self, pDisplay: View, xPixelPositionInDisplay: int, yPixelPositionInDisplay: int) → int¶ /* brief method pickBoxFace */
-
pickBoxMiddleAnchor(self, pDisplay: View, xPixelPositionInDisplay: int, yPixelPositionInDisplay: int) → bool¶ /* brief method getBox */
-
pickSpecificBoxFace(self, pDisplay: View, faceIndex: int, xPixelPositionInDisplay: int, yPixelPositionInDisplay: int) → bool¶ /* brief method pickSpecificBoxFace */
-
setIsMiddleAnchorHighlited(self, aValue: bool, iTIndex: int) → None¶ /* brief method setIsMiddleAnchorHighlited */
-
VisualChannel¶
-
class
ORSModel.ors.VisualChannel¶ Bases:
ORSModel.ors.DatasetPresenter- /** interface VisualChannel
- brief Represents a high quality visual volume in the view.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- sa 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.
*/
VisualChannel.__init__(self, anXML: str) -> None /* brief create a VisualChannel from an xml */
-
attachChannels(self, aChannel1: Channel, aChannel2: Channel, aChannel3: Channel, aChannel4: Channel) → bool¶ /** * brief Attaches between 1 and 4 channels to the volume.
- param - a channel (an Channel)
- param - a channel (an Channel)
- param - a channel (an Channel)
- param - a channel (an Channel)
- return - TRUE if attach operation succeeded, FALSE otherwise
- 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.
- sa detachChannel()
*/
-
copyShapeFromChannel(self, pISourceChannel: Channel) → None¶ /* brief Initializes the receiver channel’s shape based on another channel. */
-
detachChannel(self, anIChannel: Channel) → bool¶ /** * brief Detaches a child channel from the volume.
- param - a channel (an Channel)
- return - TRUE if detach was successful, FALSE otherwise
- note
- A standard detachChild() from the channel is also performed by this method.
*/
-
eraseWindowLevelDataForView(self, aView: View) → None¶ /** * brief Erases the window level data specific to a given view. */
-
get2DOpacityFactorForAllViews(self) → float¶ /** * brief Gets the opacity of the volume for all views. * return - the opacity value (a double, between 0 and 1) * note * - An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque. */
-
get2DOpacityFactorForView(self, aView: View) → float¶ /** * brief Gets the opacity of the volume for a given view. * param - the view (an View) * return - the opacity value (a double, between 0 and 1) * note * - An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque. */
-
get2DWindowLevel2ValuesNormalized(self, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current second 2D window level values (width and center) normalized between 0 and 1.
- note
- Volumes support two leveling modes, one for 3D views and the other
- for 2D views.
- note
- Return values are written to the supplied arguments.
- sa get3DWindowLevelValuesNormalized(), get2DWindowLevelValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get2DWindowLevelValuesNormalizedForAllViews(self, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current 3D window level values (width and center) normalized between 0 and 1, for all views.
- note
- Volumes support two leveling modes, one for 3D views and the other
- for 2D views.
- note
- Return values are written to the supplied arguments.
- sa get2DWindowLevelValuesNormalized(), get2DWindowLevel2ValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get2DWindowLevelValuesNormalizedForView(self, aView: View, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current 2D window level values (width and center) normalized between 0 and 1, for a given view.
- param - the view (an View)
- note
- Volumes support two leveling modes, one for 3D views and the other
- for 2D views.
- note
- Return values are written to the supplied arguments.
- sa get3DWindowLevelValuesNormalized(), get2DWindowLevel2ValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get3DOpacityFactorForAllViews(self) → float¶ /** * brief Gets the opacity of the volume for all views. * return - the opacity value (a double, between 0 and 1) * note * - An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque. */
-
get3DOpacityFactorForView(self, aView: View) → float¶ /** * brief Gets the opacity of the volume for a given view. * param - the view (an View) * return - the opacity value (a double, between 0 and 1) * note * - An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque. */
-
get3DWindowLevelValuesNormalizedForAllViews(self, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current 3D window level values (width and center) normalized between 0 and 1, for all views.
- note
- Volumes support two leveling modes, one for 3D views and the other
- for 2D views.
- note
- Return values are written to the supplied arguments.
- sa get2DWindowLevelValuesNormalized(), get2DWindowLevel2ValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
get3DWindowLevelValuesNormalizedForView(self, aView: View, pWindowWidth: float, pWindowCenter: float) → None¶ /** * brief Gets the current 2D window level values (width and center) normalized between 0 and 1, for a given view.
- param - the view (an View)
- note
- Volumes support two leveling modes, one for 3D views and the other
- for 2D views.
- note
- Return values are written to the supplied arguments.
- sa get3DWindowLevelValuesNormalized(), get2DWindowLevel2ValuesNormalized(), get3DWindowLevelValues(), set2DWindowLevelValues(), set3DWindowLevelValues();
*/
-
getCanCreateVisualChannel(self, anIChannel: Channel, nNbChannels: int) → bool¶ /** * brief Returns true if a volume 3D can be created with the given values.
- param - a channel (an Channel)
- param - total number of channels (an unsigned char)
- return - TRUE if a volume can be created, FALSE otherwise
- 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
- Supports all channel types.
- sa createTextures(), getCanCreateVolume(), CxvChannel_Data_Type
*/
-
getCanCreateVolume(self, anIChannel: Channel, nNbChannels: int) → bool¶ /** * brief Returns true if a volume can be created with the given values.
- param - a channel (an Channel)
- param - total number of channels (an unsigned char)
- return - TRUE if a volume can be created, FALSE otherwise
- 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:
- CXVCHANNEL_DATA_TYPE_UNSIGNED_BYTE, CXVCHANNEL_DATA_TYPE_UNSIGNED_SHORT, CXVCHANNEL_DATA_TYPE_SHORT, CXVCHANNEL_DATA_TYPE_FLOAT
- sa createTextures(), getCanCreateVisualChannel(), CxvChannel_Data_Type
*/
-
getFilteringMode(self) → int¶ /** * brief Gets the current filtering mode.
- return - the current filtering mode (a long)
- note
- See CxvFiltering_Mode in ORS_def.h for supported filtering modes.
- sa - setFilteringMode()
*/
-
getHasSourceDataSameShapeAsChannel(self, pChannel: Channel) → bool¶ /** * brief Verifies if the visual’s source data has the same shape as another channel (see note below).
- param - a comparison channel (an Channel)
- return - TRUE if the comparison channel has same shape as receiver visual, FALSE otherwise
- note
- Shape comparison includes axis sizes, spacing, type, position and orientation.
*/
-
getIsoValueForAllViews(self) → float¶ /** * brief Gets the IsoValue of the volume for all views. * return - the iso value (a double, between 0 and 1) */
-
getIsoValueForView(self, aView: View) → float¶ /** * brief Gets the IsoValue of the volume for a given view. * param - the view (an View) * return - the iso value (a double, between 0 and 1) */
-
getPixelIntensity(self, aView: View, pXPos: int, pYPos: int, pIntensity: float) → bool¶ /** * brief Gets the pixel intensity at any given screen coordinate, for a given view. * param - a view (an View) * param - the X coordinate (an unsigned short) * param - the Y coordinate (an unsigned short) * param[out]- the pixel intensity, in physical units (a float) * return - TRUE if the point is part of the volume, FALSE otherwise */
-
getProjectionMode(self) → int¶ /** * brief Gets the projection mode.
- return - the projection mode (an int)
- note
- See CxvVolumeProjection_Mode in ORS_def.h for supported volume projection modes.
- sa CxvVolumeProjection_Mode, setProjectionMode()
*/
-
getSourceDataXSize(self) → int¶ /** * brief Gets the visual’s total X size.
- return - the X size (an unsigned short)
- sa getSourceDataDisplayedXSize()
*/
-
getSourceDataXSpacing(self) → float¶ /** * brief Gets the visual’s X spacing.
- return - the X spacing (a double)
*/
-
getSourceDataYSize(self) → int¶ /** * brief Gets the visual’s total Y size.
- return - the Y size (an unsigned short)
- sa getSourceDataDisplayedYSize()
*/
-
getSourceDataYSpacing(self) → float¶ /** * brief Gets the visual’s Y spacing.
- return - the Y spacing (a double)
*/
-
getSourceDataZSize(self) → int¶ /** * brief Gets the visual’s total Z size.
- return - the Z size (an unsigned short)
- sa getSourceDataDisplayedZSize()
*/
-
getSourceDataZSpacing(self) → float¶ /** * brief Gets the visual’s Z spacing.
- return - the Z spacing (a double)
*/
-
getSurfacenessThresholdForAllViews(self) → float¶ /* brief method getSurfacenessThresholdForAllViews */
-
getSurfacenessThresholdForView(self, aView: View) → float¶ /* brief method getSurfacenessThresholdForView */
-
none()¶
-
reset2DWindowLevelForAllViews(self) → None¶ - /**
- brief Resets the 3D window level for all views.
- note
- If the volume’s channel has a suggested leveling value, it will be used, otherwise the leveling will
- be set to show the full range of data.
- note
- Volumes support two leveling modes, one for 3D views and the other for 2D views.
*/
-
reset2DWindowLevelForView(self, aView: View) → None¶ - /**
- brief Resets the 2D window level for a given view.
- param - the view (an 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.
*/
-
reset3DWindowLevelForAllViews(self) → None¶ - /**
- brief Resets the 3D window level for all views.
- note
- If the volume’s channel has a suggested leveling value, it will be used, otherwise the leveling will
- be set to show the full range of data.
- note
- Volumes support two leveling modes, one for 3D views and the other for 2D views.
*/
-
reset3DWindowLevelForView(self, aView: View) → None¶ - /**
- brief Resets the 2D window level for a given view.
- param - the view (an 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.
*/
-
set2DOpacityFactorForAllViews(self, value: float) → None¶ /** * brief Sets the opacity of the volume for all views. * param - the opacity value (a double, between 0 and 1) * note * - An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque. */
-
set2DOpacityFactorForView(self, aView: View, value: float) → None¶ /** * brief Sets the opacity of the volume for a given view. * param - the view (an View) * param - the opacity value (a double, between 0 and 1) * note * - An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque. */
-
set2DOpacityFactorForViewLogged(view, opacity, logging=True)¶
-
set2DWindowLevel2ToShowFullRange(self) → None¶ - /**
- brief Sets the second 2D window level to show the full range of data.
- note
- Volumes support two leveling modes, one for 3D views and the other for 2D views.
*/
-
set2DWindowLevelToShowFullRangeForAllViews(self) → None¶ - /**
- brief Sets the 3D window level to show the full range of data, for all views.
- note
- Volumes support two leveling modes, one for 3D views and the other for 2D views.
*/
-
set2DWindowLevelToShowFullRangeForView(self, aView: View) → None¶ - /**
- brief Sets the 3D window level to show the full range of data, for a given view.
- param - the view (an View)
- note
- Volumes support two leveling modes, one for 3D views and the other for 2D views.
*/
-
set3DOpacityFactorForAllViews(self, value: float) → None¶ /** * brief Sets the opacity of the volume for all views. * param - the opacity value (a double, between 0 and 1) * note * - An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque. */
-
set3DOpacityFactorForView(self, aView: View, value: float) → None¶ /** * brief Sets the opacity of the volume for a given view. * param - the view (an View) * param - the opacity value (a double, between 0 and 1) * note * - An opacity of 0 makes the volume fully transparent, while 1 makes it fully opaque. */
-
set3DOpacityFactorForViewLogged(view, opacity, logging=True)¶
-
set3DWindowLevelToShowFullRangeForAllViews(self) → None¶ - /**
- brief Sets the 3D window level to show the full range of data, for all views.
- note
- Volumes support two leveling modes, one for 3D views and the other for 2D views.
*/
-
set3DWindowLevelToShowFullRangeForView(self, aView: View) → None¶ - /**
- brief Sets the 3D window level to show the full range of data, for a given view.
- param - the view (an View)
- note
- Volumes support two leveling modes, one for 3D views and the other for 2D views.
*/
-
setEdgeContrastForView(self, aView: View, value: bool) → None¶ /* brief method setEdgeContrastForView */
-
setFilteringMode(self, iMode: int) → None¶ /** * brief Sets the current filtering mode.
- param - a filtering mode (a long)
- note
- See CxvFiltering_Mode in ORS_def.h for supported filtering modes.
- sa - getFilteringMode()
*/
-
setGradientModeForView(self, aView: View, aValue: int) → None¶ /* brief method setGradientModeForView */
-
setInverseSegmentationLighting(self, bInverse: bool) → None¶ /* brief method setInverseSegmentationLighting */
-
setIs2DRangeSelectionEnabled(self, pFlag: bool) → None¶ /** * brief Returns the currently visible ROI at a given position.
- param - the X index (an unsigned short)
- param - the Y index (an unsigned short)
- param - the Z index (an unsigned short)
- param - the T index (an unsigned short)
- note
- Because ROIs can overlap, it is necessary to query the volume to know which ROI is currently visible at a given point.
- // [ROIVisibilityReform] TODO if needed
- [id(656), helpstring(“Returns the currently visible ROI at a given position.”)] HRESULT getVisibleROIAtPosition(View pDisplay, unsigned short pXIndex, unsigned short pYIndex, unsigned short pZIndex, unsigned short pTIndex, [out, retval] ROI** pROI); */
-
setIsoValueForAllViews(self, value: float) → None¶ /** * brief Sets the IsoValue of the volume for all views. * param - the iso value (a double, between 0 and 1) */
-
setIsoValueForView(self, aView: View, value: float) → None¶ /** * brief Sets the IsoValue of the volume for a given view. * param - the view (an View) * param - the iso value (a double, between 0 and 1) */
-
setPlaneChannelForView(self, pView: View, pChannel: Channel) → None¶ /* brief method setPlaneChannelForView */
-
setProjectionMode(self, iMode: int) → None¶ /** * brief Sets the projection mode.
- param - a projection mode (an int)
- note
- See CxvVolumeProjection_Mode in ORS_def.h for supported volume projection modes.
- sa CxvVolumeProjection_Mode, getProjectionMode()
*/
-
setSurfacenessThresholdForAllViews(self, value: float) → None¶ /* brief method setSurfacenessThresholdForAllViews */
-
setSurfacenessThresholdForView(self, aView: View, value: float) → None¶ /* brief method setSurfacenessThresholdForView */
-
setUseTriCubicFilteringIn2D(self, value: bool) → None¶ /* brief method setUseTriCubicFilteringIn2D */
-
setUseTriCubicFilteringIn3D(self, value: bool) → None¶ /* brief method setUseTriCubicFilteringIn3D */
-
shape¶
VisualColorBar¶
-
class
ORSModel.ors.VisualColorBar¶ Bases:
ORSModel.ors.Visual- /** interface VisualColorBar
- brief Used to present a ColorBar on the renderer.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2006
- sa LookupTable
- Used to present a color bar on the renderer.
*/
VisualColorBar.__init__(self, anXML: str) -> None /* brief create a VisualColorBar from an xml */
-
getAllViewsUsingLookupTable(self, aLUT: LookupTable) → List¶ /* brief method getAllViewsUsingLookupTable */
-
getBold(self) → bool¶ /** * brief Gets the bold status of the color bar.
- return - true if color bar is in bold, false otherwise
- sa getItalic()
*/
-
getBorder(self) → bool¶ /** * brief Gets the border status of the color bar.
- return - true if color bar has a border, false otherwise
- sa getBold(), getItalic()
*/
-
getCanBeVisibleForAllViews(self) → bool¶ /** * brief Gets whether or not the color bar can be visible. * return - true if color bar can be make visible, false otherwise */
-
getCanBeVisibleForView(self, pView: View) → bool¶ /** * brief Gets whether or not the color bar can be visible. * return - true if color bar can be make visible, false otherwise */
-
getDecimalPrecision(self) → int¶ /** * brief Gets the decimal precision of the color bar.
- return - the number of decimal places (an unsigned short)
*/
-
getDrawTextShadow(self) → bool¶ /** * brief Gets if the scale bar is showing text shadow.
- return - TRUE if text shadows are visible, FALSE otherwise
*/
-
getHeightAsViewFractionForAllViews(self) → float¶ /* brief method getHeightAsViewFractionForAllView */
-
getHeightAsViewFractionForView(self, pView: View) → float¶ /* brief method getHeightAsViewFractionForView */
-
getItalic(self) → bool¶ /** * brief Gets the italic status of the color bar.
- return - true if color bar is italic, false otherwise
- sa getBold()
*/
-
getOffset(self) → float¶ /** * brief Gets the color bar offset.
- return - the offset (a float)
- sa setOffset(), setSlope(), getSlope()
*/
-
getRangeDimensionUnitForView(self, pView: View) → int¶ /* brief method getRangeDimensionUnitForView */
-
getSlope(self) → float¶ /** * brief Gets the color bar slope.
- return - the slope (a float)
- sa getOffset(), setOffset(), setSlope()
*/
-
getTextColor(self) → Color¶ /** * brief Gets the text color of the color bar. * return - a color object (an Color) */
-
getTextFontSize(self) → float¶ /** * brief Gets the text font size, in screen one thousandths.
- return - the font size (a double between 0 and 1)
*/
-
getTextMinimumFontSize(self) → int¶ /** * brief Gets the minimum text font size, in font points. * return - the font size */
-
getTextShadowColor(self) → Color¶ /** * brief Gets the text shadow color of the color bar. * return - a color object (an Color) */
-
getTickCount(self) → int¶ /** * brief Gets the number of visible ticks on the color bar.
- return - the number of ticks (an unsigned short)
*/
-
getTransparent(self) → bool¶ /** * brief Gets the transparency status of the color bar.
- return - true if color bar is transparent, false otherwise
- sa getBold(), getItalic(), getBorder()
*/
-
getWidthAsViewFractionForAllViews(self) → float¶ /* brief method getWidthAsViewFractionForAllViews */
-
getWidthAsViewFractionForView(self, pView: View) → float¶ /* brief method getWidthAsViewFractionForView */
-
none()¶
-
setBold(self, value: bool) → None¶ /** * brief Sets the color bar to be bold or not.
- param - TRUE to be in bold, FALSE otherwise
- sa setItalic()
*/
-
setBorder(self, value: bool) → None¶ /** * brief Sets the color bar to have a border or not.
- param - true to have a border, false otherwise
- sa setItalic(), setBold()
*/
-
setCanBeVisibleForAllViews(self, aValue: bool) → None¶ /** * brief Sets whether or not the color bar can be visible. * param - true if color bar can be make visible, false otherwise */
-
setCanBeVisibleForView(self, pView: View, aValue: bool) → None¶ /** * brief Sets whether or not the color bar can be visible. * param - true if color bar can be make visible, false otherwise */
-
setCanBeVisibleForViewLogged(view, flag, logging=True)¶
-
setDecimalPrecision(self, value: int) → None¶ /** * brief Sets the decimal precision of the color bar.
- param - the number of decimal places (an unsigned short)
*/
-
setDefaultPosition(self, x: float, y: float) → None¶ /** * brief Sets the default position of the color bar.
- param - the X coordinate (a double)
- param - the Y coordinate (a double)
*/
-
setDrawTextShadow(self, bFlag: bool) → None¶ /** * brief Toggles displaying shadows for the text.
- param - true to show text shadows, false otherwise
- sa setTextShadowColor()
*/
-
setHeightAsViewFractionForAllViews(self, aValue: float) → None¶ /* brief method setHeightAsViewFractionForAllViews */
-
setHeightAsViewFractionForView(self, pView: View, aValue: float) → None¶ /* brief method setHeightAsViewFractionForView */
-
setItalic(self, value: bool) → None¶ /** * brief Sets the color bar to be italic or not. * param - true to be italic, false otherwise * sa setBold() */
-
setLineThickness(self, value: float) → None¶ /* brief Sets the line thickness (in screen one thousandths) */
-
setLookupTableForAllViews(self, aLUT: LookupTable) → None¶ /* brief method setLookupTableForAllViews */
-
setLookupTableForView(self, pView: View, aLUT: LookupTable) → None¶ /* brief method setLookupTableForView */
-
setLookupTableForViewLogged(view, lut, logging=True)¶
-
setOffset(self, anOffset: float) → None¶ /** * brief Sets the color bar offset. * param - the offset (a float) * sa getOffset(), setSlope(), getSlope() * */
-
setOrientationToHorizontalForAllViews(self) → None¶ /* brief method setOrientationToHorizontalForAllViews */
-
setOrientationToHorizontalForView(self, pView: View) → None¶ /* brief method setOrientationToHorizontalForView */
-
setOrientationToVerticalForAllViews(self) → None¶ /* brief method setOrientationToVerticalForAllViews */
-
setOrientationToVerticalForView(self, pView: View) → None¶ /* brief method setOrientationToVerticalForView */
-
setPositionForView(self, pView: View, aPoint: Vector3) → None¶ /** * brief Set the color bar position in view.
- param - the view
*/
-
setRangeDimensionUnitForAllViews(self, value: int) → None¶ /* brief method setRangeDimensionUnitForAllViews */
-
setRangeDimensionUnitForView(self, pView: View, value: int) → None¶ /* brief method setRangeDimensionUnitForView */
-
setRangeForAllViews(self, min: float, max: float, unit: int) → None¶ /* brief method setRangeForAllViews */
-
setRangeForView(self, pView: View, min: float, max: float, unit: int) → None¶ /* brief method setRangeForView */
-
setSlope(self, aSlope: float) → None¶ /** * brief Sets the color bar slope. * param - the slope (a float) * sa getOffset(), setOffset(), getSlope() * */
-
setTextColor(self, IColor: Color) → None¶ /** * brief Sets the text color of the color bar. * param - a color object (an Color) * its item color. */
-
setTextFontName(self, sFontName: str) → None¶ /** * brief Sets the text font name.
- param - the font name (a string)
*/
-
setTextFontSize(self, fontSize: float) → None¶ /** * brief Sets the text font size, in screen one thousandths.
- param - the font size (a double between 0 and 1)
*/
-
setTextMinimumFontSize(self, fontSize: int) → None¶ /** * brief Sets the minimum font size, in font points. * param - the font size */
-
setTextShadowColor(self, IColor: Color) → None¶ /** * brief Sets the text shadow color of the color bar.
- param - a color object (an Color)
- sa setTextColor()
*/
-
setTickCount(self, value: int) → None¶ /** * brief Sets the number of visible ticks on the color bar. * param - the number of ticks (an unsigned short) * sa setRange() */
-
setTransparent(self, value: bool) → None¶ /** * brief Sets the color bar to be transparent or not.
- param - true to be transparent, false otherwise
- sa setItalic(), setBold(), setBorder()
*/
-
setWidthAsViewFractionForAllViews(self, aValue: float) → None¶ /* brief method setWidthAsViewFractionForAllViews */
VisualGrid¶
-
class
ORSModel.ors.VisualGrid¶ Bases:
ORSModel.ors.Visual- /** interface VisualGrid
- brief Represents a grid in a display.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- sa View
- Represents a grid in the display.
*/
VisualGrid.__init__(self, anXML: str) -> None /* brief create a VisualGrid from an xml */
-
none()¶
VisualLabel¶
-
class
ORSModel.ors.VisualLabel¶ Bases:
ORSModel.ors.Annotation- /** interface VisualLabel
- brief Represents a label, which is used to associate text to other objects.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Aug 2006
- Represents a label, which is used to associate text to other objects.
*/
VisualLabel.__init__(self, anXML: str) -> None /* brief create a VisualLabel from an xml */
-
getBindedNode(self) → Node¶ /** * brief Gets the node associated to the label.
- return - a node (an Node)
- note
- A label can thus be associated to any node.
*/
-
getIsCollapsed(self, iTIndex: int) → bool¶ /** * brief Gets the label’s collapsed status.
- return - TRUE if label is collapsed, FALSE if it’s expanded
*/
-
getLabelSortMode(self) → int¶ /** * brief Gets the label sort mode (see note).
- return - the sort mode (an unsigned short)
- note
- 3 modes are currently supported:
- 0 -> no sort
- 1 -> column mode
- 2 -> left/right mode
*/
-
getLabelTextFontSize(self) → int¶ /** * brief Gets the font size.
- return - the font size (a short)
- sa getTextFontName()
*/
-
getPickPlusMinus(self, iTIndex: int) → bool¶ /** * brief Queries the label to know if the plus/minus sign is picked.
- param - TRUE if mouse is over the plus/minus sign, FALSE otherwise
*/
-
getShowLines(self) → bool¶ /** * brief Gets the label lines visibility.
- return - TRUE if lines are shown, FALSE otherwise
- note
- This represents the line between the label and the object it points to.
- sa setTextFontName()
*/
-
moveLabelToCursorPositionInDisplay(self, pDisplay: View, pixelXPositionInDisplay: int, pixelYPositionInDisplay: int) → None¶ /** * brief Moves the label to the current cursor position in a given display.
*/
-
none()¶
-
setForBWRendering(self) → None¶ /** * brief Sets the Label to be rendered in Black & White.
- sa setForNormalRendering()
*/
-
setForNormalRendering(self) → None¶ /** * brief Sets the Label to be rendered normally.
- sa setForBWRendering()
*/
-
setHasBindedNode(self, bValue: bool) → None¶ /** * brief Sets the label as being associated to its parent node.
- param - TRUE to be associated, FALSE otherwise
- note
- A label can thus be associated to any node.
*/
-
setIsCollapsed(self, bValue: bool, iTIndex: int) → None¶ /** * brief Sets the label to be collapsed or expanded.
- param - TRUE to collapse the label, FALSE to expand it
*/
-
setLabelSortMode(self, iMode: int) → None¶ /** * brief Sets the label sort mode (see note).
- param - the sort mode (an unsigned short)
- note
- 3 modes are currently supported:
- 0 -> no sort. Labels can be dragged around by the user.
- 1 -> column mode. They are placed in a columnar fashion, on the left-hand side of the window.
- 2 -> left/right mode. They are placed left or right, depending on the position of the object they refer to.
*/
-
setLabelTextFontName(self, sName: str) → None¶ /** * brief Sets the text font name of the label.
- param - the font name (a string)
- sa setTextFontSize()
*/
-
setLabelTextFontSize(self, pValue: int) → None¶ /** * brief Sets the font size.
- param - the font size (a short)
- sa setTextFontName()
*/
VisualLegend¶
-
class
ORSModel.ors.VisualLegend¶ Bases:
ORSModel.ors.VisualColorBar- /** interface VisualLegend
- brief Used to present a legend on the renderer.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2006
- sa LookupTable
- Used to present a legend on the renderer.
*/
VisualLegend.__init__(self, anXML: str) -> None /* brief create a VisualLegend from an xml */
-
none()¶
VisualMesh¶
-
class
ORSModel.ors.VisualMesh¶ Bases:
ORSModel.ors.Visual- /** interface Mesh
- brief A visual that represents a VisualMesh.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- A visual that represents a VisualMesh.
*/
VisualMesh.__init__(self, anXML: str) -> None /* brief create a VisualMesh from an xml */
-
getColorAtIndex(self, iTIndex: int, vertexIndex: int) → Color¶ /** * brief Gets the color of a specific vertex.
- param - the T index (an unsigned short)
- param - the vertex index (an unsigned long)
- return - the color (an Color)
- sa getColors(), getDefaultColor()
*/
-
getCullMode(self) → int¶ /** * brief Gets the culling mode of the mesh.
- return - the mode (a long)
- note
- See the enum CxvMeshCull_Mode in ORS_def.h for valid values.
*/
-
getCurrentAlphaFuncValue(self) → int¶ /** * brief Sets the transparency of the mesh. * param - a value from 0 to 255 * */
-
getFillModeForAllViews(self) → int¶ /** * brief Gets the mesh fill mode.
- param - a view (a View)
- return - the fill mode (a long)
- note
- See the enum CxvMeshFill_Mode in ORS_def.h for valid values.
- sa getIsFillModeSolid(), getIsFillModeWireFrame(), getIsFillModePoint(), getFillModeForView(), setFillModeForView(), setFillModeForAllViews()
*/
-
getFillModeForView(self, pView: View) → int¶ /** * brief Gets the mesh fill mode.
- param - a view (a View)
- return - the fill mode (a long)
- note
- See the enum CxvMeshFill_Mode in ORS_def.h for valid values.
- sa getIsFillModeSolid(), getIsFillModeWireFrame(), getIsFillModePoint(), setFillModeForView(), getFillModeForAllViews(), setFillModeForAllViews()
*/
-
getIsFillModePoint(self, pView: View) → bool¶ /** * brief Queries the mesh to know if it is in point mode.
- param - a view (a View)
- return - true if in point mode, false otherwise
- sa getIsFillModeSolid(), getIsFillModeWireFrame()
*/
-
getIsFillModeSolid(self, pView: View) → bool¶ /** * brief Queries the mesh to know if it is in solid mode.
- param - a view (a View)
- return - true if in solid mode, false otherwise
- sa getIsFillModePoint(), getIsFillModeWireFrame()
*/
-
getIsFillModeWireFrame(self, pView: View) → bool¶ /** * brief Queries the mesh to know if it is in wire frame mode.
- return - true if wire frame, false otherwise
- sa getIsFillModeSolid(), getIsFillModePoint()
*/
-
getIsPerVertexTransparent(self) → bool¶ /** * brief Gets the status of transparency.
- return - true if the transparency is being read from the RGBA color, false otherwise
- note
- If this setting is used, make sure that each vertex has a color defined as RGBA.
*/
-
getIsTransparent(self) → bool¶ /** * brief Gets the transparency state of the mesh.
- return - true if mesh is transparent, false otherwise
*/
-
getOpacity(self) → float¶ /** * brief Gets the opacity of the mesh.
- return - the opacity (a float)
- note
- Ranges from 0.0f (no opacity) to 1.0f (100% opacity).
- note
- The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- sa
- setIsTransparent(), getIsTransparent()
*/
-
getOpacityOutRange(self) → float¶ /** * brief Gets the opacity for unselected area of the mesh. * return - the opacity (a float) * note * - Ranges from 0.0f (no opacity) to 1.0f (100% opacity). * note * - The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()). * sa * setIsTransparent(), getIsTransparent() */
-
getPrimitiveType(self) → int¶ /** * brief Gets the mesh primitive type.
- return - the type (a long)
- note
- See the enum CxvMeshPrimitive_Type in ORS_def.h for valid values.
*/
-
getSaveInternalStructure(self) → bool¶ /** * brief Queries the mesh to see if it’s set to save its internal data in XML.
- param - true if the mesh will save its interval data, false otherwise
- note
- This flag affects meshes when they are written to an XML output (in a Session file for example).
*/
-
getShowIn2DDuringMotion(self) → bool¶ /** * brief Gets the visibility of the mesh in 2D views during mouse motion.
- return - true if the mesh is visible in 2D views during mouse movement, false otherwise
- sa setShowIn2D(), getShowIn3D(), getShowIn2D(), setShowIn3D()
*/
-
getThickness(self) → float¶ /** * brief Gets the thickness of lines in 2D mode.
- return - the thickness, in pixel units (an double)
*/
-
getUseLighting(self) → bool¶ /** * brief Gets the mesh lighting mode.
- return - true if lighting is on, false otherwise
*/
-
none()¶
-
setCullMode(self, iMode: int) → None¶ - /**
- /**
- brief Sets the culling mode for the mesh.
- param - a mode (a long)
- note
- See the enum CxvMeshCull_Mode in ORS_def.h for valid values.
*/
-
setCurrentAlphaFuncValue(self, value: int) → None¶ /* brief method setCurrentAlphaFuncValue
- param - a value between 0 and 255
*/
-
setFillModeForAllViews(self, pFillMode: int) → None¶ /** * brief Sets the mesh fill mode.
- param - a view (a View)
- param - the fill mode (a long)
- note
- See the enum CxvMeshFill_Mode in ORS_def.h for valid values.
- sa getIsFillModeSolid(), getIsFillModeWireFrame(), getIsFillModePoint(), getFillModeForView(), setFillModeForView(), getFillModeForAllViews()
*/
-
setFillModeForView(self, pView: View, pFillMode: int) → None¶ /** * brief Sets the mesh fill mode.
- param - a view (a View)
- param - the fill mode (a long)
- note
- See the enum CxvMeshFill_Mode in ORS_def.h for valid values.
- sa getIsFillModeSolid(), getIsFillModeWireFrame(), getIsFillModePoint(), getFillModeForView(), getFillModeForAllViews(), setFillModeForAllViews()
*/
-
setIsPerVertexTransparent(self, value: bool) → None¶ /** * brief Sets the transparency to be read from the RGBA vertex color.
- param - true to use the transparency from the RGBA color, false to use the global transparency
- note
- If this setting is used, make sure that each vertex has a color defined as RGBA.
- sa setColors()
*/
-
setIsTransparent(self, value: bool) → None¶ /** * brief Sets the transparency of the mesh.
- param - true to make it transparent, false otherwise
*/
-
setOpacity(self, value: float) → None¶ /** * brief Sets the opacity for unselected range of the mesh. * param - an opacity value (a float) * note * - Ranges from 0.0f (no opacity) to 1.0f (100% opacity). * note * - The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()). * sa * setIsTransparent(), getIsTransparent() */
-
setOpacityOutRange(self, value: float) → None¶ /** * brief Sets the opacity of the mesh.
- param - an opacity value (a float)
- note
- Ranges from 0.0f (no opacity) to 1.0f (100% opacity).
- note
- The mesh does not consider any opacity changes unless it is set to be transparent (see setIsTransparent()).
- sa
- setIsTransparent(), getIsTransparent()
*/
-
setPrimitiveType(self, iMode: int) → None¶ /** * brief Sets the mesh primitive type.
- param - the type (a long)
- note
- See the enum CxvMeshPrimitive_Type in ORS_def.h for valid values.
*/
-
setSaveInternalStructure(self, value: bool) → None¶ /** * brief Sets the mesh to save its internal data in XML.
- param - true to save the mesh internal data, false otherwise
- note
- This flag affects meshes when they are written to an XML output (in a Session file for example).
*/
-
setShowIn2DDuringMotion(self, pValue: bool) → None¶ /** * brief Sets the mesh to be visible or not in 2D views, during mouse motion.
- param - true to have the mesh be visible in 2D views during mouse movement, false otherwise
- sa setShowIn2D(), getShowIn3D(), getShowIn2D(), setShowIn3D()
*/
-
setThickness(self, value: float) → None¶ /** * brief Sets the thickness of lines in 2D mode.
- param - the thickness, in pixel units (an double)
*/
VisualOverlay¶
-
class
ORSModel.ors.VisualOverlay¶ Bases:
ORSModel.ors.Visual- /** interface VisualOverlay
- brief Represents a 2D image as a visual in the 3D space.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- sa 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.
*/
VisualOverlay.__init__(self, anXML: str) -> None /* brief create a VisualOverlay from an xml */
-
getExtent(self) → Vector3¶ /** * brief Sets the position of the overlay.
- param - a position (an Vector3)
*/
-
getExtentInBoundedPlane(self, aBoundedPlane: Rectangle) → Vector3¶ /* brief method getExtentInBoundedPlane */
-
getOpacity(self) → float¶ /** * brief Gets the opacity of the overlay.
- return - the opacity (a float)
- note
- Ranges from 0.0f (no opacity) to 1.0f (100% opacity).
- sa
- setIsTransparent(), getIsTransparent()
*/
-
getPosition(self) → Vector3¶ /** * brief Sets the position of the overlay.
- param - a position (an Vector3)
*/
-
getPositionInBoundedPlane(self, aBoundedPlane: Rectangle) → Vector3¶ /* brief method getTexturePositionInBoundedPlane */
-
none()¶
-
setExtent(self, aVect: Vector3) → None¶ /** * brief Sets the position of the overlay.
- param - a position (an Vector3)
*/
-
setOpacity(self, value: float) → None¶ /** * brief Sets the opacity of the overlay.
- param - an opacity value (a float)
- note
- Ranges from 0.0f (no opacity) to 1.0f (100% opacity).
- sa
- setIsTransparent(), getIsTransparent()
*/
VisualPath¶
-
class
ORSModel.ors.VisualPath¶ Bases:
ORSModel.ors.Annotation- /** interface VisualPath
- brief Represents a path. A path is composed of a series of points.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Aug 2006
- Represents a paths A path is composed of a series of points.
*/
VisualPath.__init__(self, anXML: str) -> None /* brief create a VisualPath from an xml */
-
addPoint(self, pPoint: Vector3, iTIndex: int) → None¶ /** * brief Adds a point. * param - a point (an Vector3) * note * - Points are manual, while control points are automatic, i.e. the control points * will end up generating individual points (on the Bezier curve).
- note
- Any change to a primitive should be followed by update() to reflect the changes visually.
*/
-
addPointForControlPoint(self, controlPointIndex: int, iTIndex: int, aPoint: Vector3) → None¶ /* brief method addPointForControlPoint */
-
applyConvolution(self, aKernel: ConvolutionKernel, timeStep: int) → None¶ /** * brief Apply the kernel to the path position * param - a one dimension kernel * param - timestep */
-
clearAll(self, iTIndex: int) → None¶ /** * brief Clears all points and control points.
- note
- Any change to a primitive should be followed by update() to reflect the changes visually.
*/
-
closestPointOnPathInCurvedOnScreen(self, pView: View, pixelXPositionInView: int, pixelYPositionInView: int) → int¶ /* brief */
-
getArea(self, iTIndex: int, aWorldTransformMatrix: Matrix4x4) → float¶ /** * brief Returns the area of the path. * return - the area of the path (a double) * note * - If the path is not closed, this method returns 0 */
-
getControlPointIndexFromPointIndex(self, id: int, iTIndex: int) → int¶ /* brief method getControlPointIndexFromPointIndex */
-
getControlPointPositionsList(self, iTIndex: int, aTransformationMatrix: Matrix4x4, pIndicesArray: ArrayLong) → ArrayDouble¶ /** * brief Batch gets of given control point’s coordinates by indices. * param - safearray of index of the control point ( long) * return - safearray of triplet of the X Y Z position of the point ( double ) * note * - Points are manual, while control points are automatic, i.e. the control points * will end up generating individual points (on the Bezier curve). * note * - Control point indicies are zero based. * note * - If indices array is NULL, this method assumes an array of all indices. */
-
getControlPointRadiusAtIndex(self, index: int, iTIndex: int) → float¶ /* brief method getControlPointRadiusAt */
-
getDistanceAlongPathBetweenPosition(self, s0: float, s1: float, iTIndex: int) → float¶ /* brief method getDistanceAlongPathBetweenPosition */
-
getDistanceBetweenPosition(self, s0: float, s1: float, iTIndex: int, pMatrix: Matrix4x4) → float¶ /* brief method getDistanceBetweenPosition */
-
getIndexOfClosestPoint(self, aTransformationMatrix: Matrix4x4, pointToCompareTo: Vector3, iTIndex: int) → int¶ /* brief getIndexOfClosestPoint */
-
getIndexOfFarthestPoint(self, aTransformationMatrix: Matrix4x4, pointToCompareTo: Vector3, iTIndex: int) → int¶ /* brief getIndexOfFarthestPoint */
-
getIndexOfPathMarkerWithCaption(self, aCaption: str, iTIndex: int) → int¶ /* brief method getIndexOfPathMarkerWithCaption */
-
getIntersectionPointsOfContourForBoundedPlane(self, aBP: Rectangle, iTIndex: int, aTransformationMatrix: Matrix4x4, pfOutputPoints: OrderedCollectionDouble) → OrderedCollectionDouble¶ /* brief method getIntersectionPointsOfContourForBoundedPlane */
-
getIsBezier(self) → bool¶ /** * brief Gets the path’s Bezier curve status. * param - TRUE if path follows a Bezier curve, FALSE otherwise * sa rebuildBezier() */
-
getIsClosed(self) → bool¶ /** * brief Gets if the path is closed. * return - TRUE if the path is closed, FALSE otherwise */
-
getLength(self, iTIndex: int, aWorldTransformMatrix: Matrix4x4) → float¶ /** * brief Returns the total length of the path. * return - the length of the path (a double) */
-
getParameterAtControlPointIndex(self, index: int, iTIndex: int) → float¶ /* /** * brief Inserts a control point at a given index. * param - the insertion index of the control point (an unsigned long) * param - a point (an Vector3) * note * - Points are manual, while control points are automatic, i.e. the control points * will end up generating individual points (on the Bezier curve). * note * - All existing control points starting at the insertion index are moved down after the insertion. * note * - Point indicies are zero based. // void insertControlPoint(unsigned long index, unsigned short iTIndex, Vector3 pPoint);*//** * brief Gets the position of a given control point on the path. * param - the index of the control point (an unsigned long) * return - the position of the given control point (a double, see below) * note * - This method returns the normalized position (between 0 and 1) of a given control point on the path. * note * - Control point indicies are zero based. * sa getParameterAtPointIndex() */
-
getParameterAtPointIndex(self, index: int, iTIndex: int) → float¶ /** * brief Gets the position of a given point on the path. * param - the index of the point (an unsigned long) * return - the position of the given point (a float, see below) * note * - This method returns the normalized position (between 0 and 1) of a given point on the path. * note * - Point indicies are zero based. * sa getParameterAtControlPointIndex() */
-
getPathMarkerPosition(self, index: int, iTIndex: int) → float¶ /* brief method getPathMarkerPosition */
-
getPathMarkerRegionID(self, index: int, iTIndex: int) → int¶ /* brief method getPathMarkerRegionID */
-
getPathMarkerRegionMode(self, index: int, iTIndex: int) → int¶ /* brief method getPathMarkerRegionMode */
-
getPathMarkerScalar(self, index: int, scalarIndex: int, iTIndex: int) → float¶ /* brief method getPathMarkerScalar */
-
getPathMarkerVisible(self, index: int, iTIndex: int) → bool¶ /* brief method getPathMarkerVisible */
-
getPathPointCenterOfMass(self, iTIndex: int, aTransformationMatrix: Matrix4x4) → Vector3¶ /* brief method getPathPointCenterOfMassInLocalCoordinates */
-
getPathPointGlobalOrientation(self, iTIndex: int, aTransformationMatrix: Matrix4x4) → Vector3¶ /* brief method getPathPointGlobalOrientation */
-
getPickPathMarker(self, pDisp: View, pixelXPositionInView: int, pixelYPositionInView: int) → int¶ /* brief method getPickPathMarker */
-
getPointAtIndex(self, index: int, iTIndex: int, aTransformationMatrix: Matrix4x4) → Vector3¶ /** * brief Gets a given point’s coordinates. * param - the index of the point (an unsigned long) * param - a transformation matrix (an Matrix4x4) * return - a point (an Vector3) * note * - Points are manual, while control points are automatic, i.e. the control points * will end up generating individual points (on the Bezier curve). * note * - Point indicies are zero based. */
-
getPointCount(self, iTIndex: int) → int¶ /** * brief Gets the number of points. * return - the number of points (an unsigned long) */
-
getPointPositionsList(self, iTIndex: int, aTransformationMatrix: Matrix4x4, pnIndexes: ArrayLong) → ArrayDouble¶ /* brief method getPointPositionsList */
-
getPositionOnPath(self, parameter: float, iTIndex: int, aTransformationMatrix: Matrix4x4) → Vector3¶ /* brief method getPositionOnPath */
-
getPositionOnPathNearestTo(self, aLocation: Vector3, iTIndex: int, aTransformationMatrix: Matrix4x4) → float¶ /* brief method getPositionOnPathNearestTo */
-
getPositionOnViewForCurvedChannel(self, pNormalizedPositionOnPath: float, aView: View, aCurvedChannel: Channel) → Vector3¶ /* brief method getPositionOnViewForCurvedChannel */
-
getPositionOnViewOfControlPointForCurvedChannel(self, controlPointIndex: int, aView: View, aCurvedChannel: Channel) → Vector3¶ /* brief method getPositionOnViewOfControlPointForCurvedChannel */
-
getPositionTangentAndNormalOnPath(self, parameter: float, position: Vector3, up: Vector3, right: Vector3, tangent: Vector3, iTIndex: int, aTransformationMatrix: Matrix4x4) → None¶ /** * brief Gets the positional, tangent and normal vectors at a given position on the path. * param - a relative position on the path (a float) * param[out] - the positional vector (an Vector3) * param[out] - the up vector (an Vector3) * param[out] - the right vector (an Vector3) * param[out] - the tangent vector (an Vector3) * param - TRUE to get results in world values, FALSE otherwise * note * - Results are written to the vector arguments. * note * - The first argument should be between 0.0f and 1.0f, with desired level of granulariy. * note * - This method allows one to find the exact location and direction at any given portion of the path. */
-
getPositionsOnPath(self, pPositions: ArrayDouble, iTIndex: int, aTransformationMatrix: Matrix4x4, pfOutputPoints: ArrayDouble) → ArrayDouble¶ /* brief method getPositionsOnPath */
-
getShowAllIn2D(self) → bool¶ /** * brief Gets the Show All status of the path. * return - TRUE if the path is shown fully, FALSE otherwise * note * - If the path is set to “ShowAll”, it will be fully visible in 2D but its color will fade towards black * as it gets further from the current slice. */
-
getTubularMeshFromControlPoints(self, nbPtsCircle: int, aTransformationMatrix: Matrix4x4, offset: float, iTIndex: int, inoutMesh: VisualMesh) → VisualMesh¶ /** * brief Returns a tubular mesh with variable radius, built from the control points. * param - the number of point on the circumference of the tube * param - create a mesh in local or world coordinate * param - an offset to add at the end and beginning of the tube * param - Pointer to the mesh * note The radius is interpolated from the radius value of the control point */
-
getTubularMeshFromPoints(self, nbPtsCircle: int, aTransformationMatrix: Matrix4x4, pointSpacing: float, offset: float, iTIndex: int, inoutMesh: VisualMesh) → VisualMesh¶ /** * brief Returns a tubular mesh built from path points. * param - the number of point on the circumference of the tube * param - create a mesh in local or world coordinate * param - the pysical spacing beetween two point * param - an offset to add at the end and beginning of the tube * param - Pointer to the mesh * note The radius is interpolated from the radius value of the control point */
-
getTubularMeshWithFixedRadiusFromControlPoints(self, radius: float, nbPtsCircle: int, aTransformationMatrix: Matrix4x4, offset: float, iTIndex: int, inoutMesh: VisualMesh) → VisualMesh¶ /** * brief Returns a tubular mesh built from the control points. * param - the radius of the mesh double radius (a double) * param - the number of points on the circumference of the tube (an unsigned short) * param - TRUE to create a mesh in local coordinates, FALSE in world coordinates * param - an offset to add at the end and beginning of the tube (a double) * param - Pointer to the mesh */
-
getTubularMeshWithFixedRadiusFromPoints(self, radius: float, nbPtsCircle: int, aTransformationMatrix: Matrix4x4, pointSpacing: float, offset: float, iTIndex: int, inoutMesh: VisualMesh) → VisualMesh¶ /** * brief Returns a tubular mesh built from path points. * param - the radius of the mesh double radius * param - the number of point on the circumference of the tube * param - create a mesh in local or world coordinate * param - the pysical spacing beetween two point * param - an offset to add at the end and beginning of the tube * param - Pointer to the mesh */
-
insertControlPointForAllTimeStep(self, index: int, pPoint: Vector3) → None¶ /* brief method insertControlPointForAllTimeStep */
-
insertPathMarker(self, index: int, iTIndex: int, parameter: float, canPassOver: bool) → None¶ /* brief method insertPathMarker */
-
movePathMarker(self, pDisp: View, index: int, pixelXPositionInView: int, pixelYPositionInView: int, canPassOver: bool) → None¶ /* brief method movePathMarker */
-
none()¶
-
rebuildBezier(self, iTIndex: int) → None¶ /** * brief Rebuilds the Bezier curve. * sa setIsBezier() */
-
removeAllPointsBetweenControlPoint(self, controlPointIndex1: int, controlPointIndex2: int, iTIndex: int) → None¶ /* brief method removeAllPointsBetweenControlPoint */
-
resamplePath(self, numberOfTime: int, newPointsCount: int, iTIndex: int) → None¶ /* brief method resamplePath */
-
setControlPointCount(self, aSize: int, iTIndex: int) → None¶ /** * brief Offsets the mesh vertices.
- param - an X offset value (a float)
- param - a Y offset value (a float)
- param - a Z offset value (a float)
- note
- Each vertice is offset by the given relative coordinates.
*/
-
setControlPointCountForAllTimeStep(self, aSize: int) → None¶ /* brief setControlPointCountForAllTimeStep */
-
setControlPointPositionsList(self, iTIndex: int, aTransformationMatrix: Matrix4x4, pIndicesArray: ArrayLong, pfPoints: ArrayDouble) → None¶ - /**
- brief Batch sets of given control point’s coordinates by indices.
- param - safearray of index of the control point ( long)
- param - safearray of triplet of the X Y Z position of the point ( float)
- note
- Points are manual, while control points are automatic, i.e. the control points
- will end up generating individual points (on the Bezier curve).
- note
- Control point indicies are zero based.
- note
- If indices array is NULL, this method assumes an array of all indices.
- note
- Any change to a primitive should be followed by update() to reflect the changes visually.
*/
-
setControlPointRadiusAtIndex(self, index: int, iTIndex: int, radius: float) → None¶ /* brief method setControlPointRadiusAt */
-
setControlPointRadiusAtIndexForAllTimeStep(self, index: int, radius: float) → None¶ /* brief method setControlPointRadiusAtIndexForAllTimeStep */
-
setFirstUpVector(self, anIVector: Vector3, iTIndex: int) → None¶ /* brief method setFirstUpVector */
-
setIsBezier(self, value: bool) → None¶ /** * brief Sets the path to follow a Bezier curve. * param - TRUE to make it follow a Bezier curve, FALSE otherwise
- note
- Any change to a primitive should be followed by update() to reflect the changes visually.
- sa rebuildBezier()
*/
-
setIsClosed(self, value: bool) → None¶ /** * brief Sets the path to be closed or not. * param - TRUE to close the path, FALSE otherwise */
-
setPathMarkerCaption(self, index: int, iTIndex: int, caption: str) → None¶ /* brief method setPathMarkerCaption */
-
setPathMarkerColor(self, index: int, iTIndex: int, IColor: Color) → None¶ /* brief method setPathMarkerColor */
-
setPathMarkerPosition(self, index: int, iTIndex: int, parameter: float, canPassOver: bool) → None¶ /* brief method setPathMarkerPosition */
-
setPathMarkerRegionID(self, index: int, iTIndex: int, regionID: int) → None¶ /* brief method setPathMarkerRegionID */
-
setPathMarkerRegionMode(self, index: int, iTIndex: int, regionMode: int) → None¶ /* brief method setPathMarkerRegionMode */
-
setPathMarkerScalar(self, index: int, scalarIndex: int, iTIndex: int, s: float) → None¶ /* brief method setPathMarkerScalar */
-
setPathMarkerVisible(self, index: int, iTIndex: int, s: bool) → None¶ /* brief method setPathMarkerVisible */
-
setPointAtIndex(self, index: int, iTIndex: int, pPoint: Vector3) → None¶ /** * brief Sets a given point’s coordinates. * param - the index of the point (an unsigned long) * param - a point (an Vector3) * note * - Points are manual, while control points are automatic, i.e. the control points * will end up generating individual points (on the Bezier curve). * note * - Point indicies are zero based.
- note
- Any change to a primitive should be followed by update() to reflect the changes visually.
*/
-
setPointAtIndexForAllTimeStep(self, index: int, pPoint: Vector3) → None¶ /* brief method setPointAtIndexForAllTimeStep */
-
setPointPositionsList(self, iTIndex: int, aTransformationMatrix: Matrix4x4, pnIndexes: ArrayLong, pfPoints: ArrayDouble) → None¶ /* brief method setPointPositionsList */
-
setShowAllIn2D(self, value: bool) → None¶ /** * brief Sets the Show All status of the path. * param - TRUE to set the path to be shown fully, FALSE otherwise * note * - If the path is set to “ShowAll”, it will be fully visible in 2D but its color will fade towards black * as it gets further from the current slice. */
VisualPlane¶
-
class
ORSModel.ors.VisualPlane(self, anXML: str) → None¶ Bases:
ORSModel.ors.Visual/* brief create a VisualPlane from an xml */
-
none()¶
-
VisualPoints¶
VisualROI¶
-
class
ORSModel.ors.VisualROI(self, anXML: str) → None¶ Bases:
ORSModel.ors.Visual/* brief create a VisualROI from an xml */
-
addVisualStateFrom(self, IVolumeROIVisual: "VisualROI") → None¶ /* brief method addVisualStateFrom */
-
fillLookupTableWithLabelColors()¶
-
getColorForAllViews(self, IStructuredGrid: StructuredGrid, IVolume: VisualChannel) → Color¶ /* brief method getColorForAllViews */
-
getColorForView(self, IStructuredGrid: StructuredGrid, IVolume: VisualChannel, IView: View) → Color¶ /* brief method get3DColorForView */
-
getHighlightOpacityForAllViews()¶
-
getHighlightOpacityForView()¶
-
getHighlightOpacityOutRangeForAllViews()¶
-
getHighlightOpacityOutRangeForView()¶
-
getIsVisibleIn2DForAllViews(self, IStructuredGrid: StructuredGrid) → bool¶ /* brief method getIsVisibleIn2DForAllViews */
-
getIsVisibleIn2DForView(self, IStructuredGrid: StructuredGrid, IView: View) → bool¶ /* brief method getIsVisibleIn2DForView */
-
getIsVisibleIn3DForAllViews(self, IStructuredGrid: StructuredGrid) → bool¶ /* brief method getIsVisibleIn3DForAllViews */
-
getIsVisibleIn3DForView(self, IStructuredGrid: StructuredGrid, IView: View) → bool¶ /* brief method getIsVisibleIn3DForView */
-
getLabelColor()¶
-
getPlaneChannelForGUID(self, aGUID: str, createIfAbsent: bool) → Channel¶ /* brief method getPlaneChannelForGUID */
-
getROIOpacityForAllViews()¶
-
getROIOpacityForView()¶
-
getROIOpacityOutRangeForAllViews()¶
-
getROIOpacityOutRangeForView()¶
-
getShowContourForAllViews(self, IStructuredGrid: StructuredGrid) → bool¶ /* brief method getShowContourForAllViews */
-
getShowContourForView(self, IStructuredGrid: StructuredGrid, IView: View) → bool¶ /* brief method getShowContourForView */
-
getVolumeOpacityForAllViews(self, IVolume: VisualChannel) → float¶ /* brief method getVolumeOpacityForAllViews */
-
getVolumeOpacityForView(self, IVolume: VisualChannel, IView: View) → float¶ /* brief method getVolumeOpacityForView */
-
none()¶
-
setColorForAllViews(self, IStructuredGrid: StructuredGrid, IVolume: VisualChannel, color: Color) → None¶ /* brief method set3DColorForAllViews */
-
setColorForView(self, IStructuredGrid: StructuredGrid, IVolume: VisualChannel, IView: View, color: Color) → None¶ /* brief method set3DColorForView */
-
setHighlightOpacityForAllViews()¶
-
setHighlightOpacityForView()¶
-
setHighlightOpacityOutRangeForAllViews()¶
-
setHighlightOpacityOutRangeForView()¶
-
setIsVisibleIn2DForAllViews(self, IStructuredGrid: StructuredGrid, bValue: bool) → None¶ /* brief method setIsVisibleIn2DForAllViews */
-
setIsVisibleIn2DForView(self, IStructuredGrid: StructuredGrid, IView: View, bValue: bool) → None¶ /* brief method setIsVisibleIn2DForView */
-
setIsVisibleIn3DForAllViews(self, IStructuredGrid: StructuredGrid, bValue: bool) → None¶ /* brief method setIsVisibleIn3DForAllViews */
-
setIsVisibleIn3DForView(self, IStructuredGrid: StructuredGrid, IView: View, bValue: bool) → None¶ /* brief method setIsVisibleIn3DForView */
-
setROIOpacityForAllViews()¶
-
setROIOpacityForView()¶
-
setROIOpacityOutRangeForAllViews()¶
-
setROIOpacityOutRangeForView()¶
-
setShowContourForAllViews(self, IStructuredGrid: StructuredGrid, bValue: bool) → None¶ /* brief method setShowContourForAllViews */
-
setShowContourForView(self, IStructuredGrid: StructuredGrid, IView: View, bValue: bool) → None¶ /* brief method setShowContourForView */
-
setVolumeOpacityForAllViews(self, IVolume: VisualChannel, opacity: float) → None¶ /* brief method setVolumeOpacityForAllViews */
-
setVolumeOpacityForView(self, IVolume: VisualChannel, IView: View, opacity: float) → None¶ /* brief method setVolumeOpacityForView */
-
updateChannel(self, aChannel: Channel, aContourLabelChannel: Channel, aContourChannel: Channel, IView: View, haveToDoAll: bool) → bool¶ /* brief method updateChannel */
-
VisualRegion¶
-
class
ORSModel.ors.VisualRegion¶ Bases:
ORSModel.ors.Annotation- /** interface VisualRegion
- brief Represents a user-selected 2D region of a view.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2006
- sa View
- Represents a user-selected 2D region of a view.
*/
VisualRegion.__init__(self, anXML: str) -> None /* brief create a VisualRegion from an xml */
-
addRegionIn3DInOrthoToROI(self, outputROI: ROI, aWorldTransformMatrix: Matrix4x4, inside: bool, currentTimeStep: int, IProgress: Progress) → None¶ /* brief method addRegionIn3DInOrthoToROI */
-
addRegionIn3DPerspectiveProjectionToROIIntersectingChannel(self, pCamera: Camera, inside: bool, outputROI: ROI, currentTimeStep: int, intersectingChannel: Channel, levelingMinRange: float, levelingMaxRange: float, ILUT: LookupTable, clipBox: Box) → None¶ /* brief method addRegionIn3DInProjectionToROI */
-
addRegionIn3DPerspectiveProjectionToROIIntersectingLabeldMultiROI()¶
-
addRegionIn3DPerspectiveProjectionToROIIntersectingROI()¶
-
fitFromPoints(self, count: int, points: float, iTIndex: int) → None¶ /** * brief Gets the primitive to fit itself to a list of points. * param - the number of triplets supplied (an unsigned long) (see note below) * param - an array of points to fit to (a float*) * note * - Points should be supplied in triplets, for respectively the X, Y and Z position. * sa fitFromVector3(), fitFromPointList() */
-
getHistogramData(self, aChannel: Channel, currentTimeStep: int, aWorldTransformMatrix: Matrix4x4, inside: bool, numberOfBins: int) → HistogramData¶ /** * brief Gets a histogram of the region’s data.
- param - the channel to use for the data (a Channel)
- param - the time step (an unsigned int)
- param - a transformation matrix (a Matrix4x4)
- param - true to use the inside of the region, false to use the outside
- param - the number of desired bins (an unsigned short)
- return - a histogram (an HistogramData)
*/
-
getPerimeter(self, timeStep: int, worldTransform: Matrix4x4) → float¶ /* brief method getPerimeter */
-
getShape(self) → int¶ /** * brief Gets the shape of the region.
- return - an CxvRegion_Shape value (an int)
- note
- See the ORS_def.h file for valid CxvRegion_Shape values.
*/
-
insertControlPointForAllTimeStep(self, pPoint: Vector3) → None¶ /* brief method insertPointForAllTimeStep */
-
none()¶
-
setControlPoints(self, pfPoints: ArrayDouble, iTIndex: int) → None¶ /** * brief Sets the points of the region.
- param - the number of triplets in the array (a long)
- param - an array of point triplets (a float*)
- 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.
- sa addPoint()
*/
-
setIsOn3DView(self, value: bool) → None¶ /** * brief Insert a point to the region between the two nearest existing points. * param - the point (an Vector3) * note * - Any change to a primitive should be followed by update() to reflect the changes visually. * sa setPoints() // brief method setIsOn3DView */
-
setPlane(self, a: float, b: float, c: float, d: float, iTIndex: int) → None¶ /** * brief Sets the plane coefficient.
- param - the a member (a float)
- param - the b member (a float)
- param - the c member (a float)
- param - the d member (a float)
- note
- Planes are expressed by the general equation ax + by + cz + dw = 0.
*/
VisualRuler¶
-
class
ORSModel.ors.VisualRuler¶ Bases:
ORSModel.ors.Annotation- /** interface VisualRuler
- brief Represents a ruler, used to take measures.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Aug 2006
- Represents a ruler, used to take measures.
*/
VisualRuler.__init__(self, anXML: str) -> None /* brief create a VisualRuler from an xml */
-
getLength(self, iTIndex: int, aWorldTransformMatrix: Matrix4x4) → float¶ /** * brief Gets the length value of the ruler.
- return - the length of the ruler (a double)
- note
- The length of the ruler is always returned in meters. You can use a view
- to convert to other units.
- sa View::getValueInMeterConvertedToCurrentUnit();
*/
-
getShowTicks(self) → bool¶ /** * brief Gets the display status of the ruler’s ticks.
- return - true if ticks are shown, false otherwise
- sa getTickCount()
*/
-
getTickCount(self) → int¶ /** * brief Gets the number of visible ticks on the ruler.
- return - the number of ticks (an unsigned long)
- sa getShowTicks()
*/
-
none()¶
VisualScaleBar¶
-
class
ORSModel.ors.VisualScaleBar(self, anXML: str) → None¶ Bases:
ORSModel.ors.Visual/* brief create a VisualScaleBar from an xml */
-
getAutoAdjustFloatingLength(self) → bool¶ /** * brief Gets if the scalebar auto-adjusts or not.
- return - TRUE if scale bar auto-adjusts, FALSE otherwise
- sa setFloatingLength()
*/
-
getColor(self) → Color¶ /** * brief Gets the scale bar color. * return - a color object (a Color) */
-
getDrawTextShadow(self) → bool¶ /** * brief Gets if the scale bar is showing text shadow.
- return - TRUE if text shadows are visible, FALSE otherwise
*/
-
getFloatingLength(self) → float¶ /** * brief Gets the scalebar’s length when floating.
- return - the scale bar length (a double)
- note
- The length is always expressed in meters.
*/
-
getIsFloating(self) → bool¶ /** * brief Gets if the scalebar is floating.
- return - TRUE if the scale bar is floating, FALSE otherwise
*/
-
getPrecision(self) → int¶ /** * brief Gets the length precision.
- return - a number of decimals (an unsigned char)
- note
- The precision is only used during displaying values, internally full precision is preserved.
*/
-
getScaleBarPositionInView(self, pView: View) → Vector3¶ /* brief Gets the scalebar position on screen for a view. */
-
getTextColor(self) → Color¶ /** * brief Gets the text color of the scale bar.
- return - a color object (an Color)
- note
- The text color is used for the length.
*/
-
getTextFontSize(self) → float¶ /** * brief Gets the font size, in screen one thousandths.
- return - the font size (a double between 0 and 1)
*/
-
getTextMinimumFontSize(self) → int¶ /** * brief Gets the minimum text font size, in font points. * return - the font size */
-
getTextShadowColor(self) → Color¶ /** * brief Gets the text shadow color of the scale bar.
- return - a color object (an Color)
*/
-
none()¶
-
setAutoAdjustFloatingLength(self, value: bool) → None¶ /** * brief Sets if the scalebar auto-adjusts or not.
- param - TRUE to have the scale bar auto-adjust, FALSE otherwise
- sa setFloatingLength()
*/
-
setColor(self, IColor: Color) → None¶ /** * brief Sets the scale bar color. * param - a color object (a Color) */
-
setDrawTextShadow(self, bFlag: bool) → None¶ /** * brief Toggles displaying shadows for the text.
- param - TRUE to show text shadows, FALSE otherwise
- sa setTextShadowColor()
*/
-
setFloatingLength(self, floatLength: float) → None¶ /** * brief Sets the scalebar’s length when floating.
- param - the scale bar length (a double)
- note
- The length is always expressed in meters.
*/
-
setIsFloating(self, value: bool) → None¶ /** * brief Sets the scalebar to be floating or not.
- param - TRUE so set the scale bar to be floating, FALSE to be normal
*/
-
setPrecision(self, iPrecision: int) → None¶ /** * brief Sets the length precision.
- param - the number of decimals (an unsigned char)
- note
- The precision is only used during displaying values of a floating scale bar, internally full precision is preserved.
*/
-
setScaleBarPositionInView(self, pView: View, aPoint: Vector3) → None¶ /* brief Sets the scalebar position on screen for a view. */
-
setTextColor(self, IColor: Color) → None¶ /** * brief Sets the text color of the scale bar.
- param - a color object (an Color)
- note
- The text color is used for the caption.
*/
-
setTextFontName(self, sFontName: str) → None¶ /** * brief Sets the font name.
- param - the font name (a string)
*/
-
setTextFontSize(self, fontSize: float) → None¶ /** * brief Sets the font size, in screen one thousandths. * param - the font size (a double between 0 and 1) */
-
VisualText¶
-
class
ORSModel.ors.VisualText¶ Bases:
ORSModel.ors.Visual- /** interface VisualText
- brief To display text on the renderer.
- author Eric Fournier.
- author All other members of ORS participated.
- version 1.0
- date Jan 2005
- An object that allows text to be displayed over the renderer.
*/
VisualText.__init__(self, anXML: str) -> None /* brief create a VisualText from an xml */
-
getHorizontalAlignment(self) → int¶ /** * brief Gets the horizontal alignment of the item. * return - 0 for left-aligned, 1 for center-aligned or 2 for right-aligned * note * - Default value is left-aligned. */
-
getIsOriginAtTop(self) → bool¶ /** * brief Gets whether or not the text is top-aligned. * return - TRUE if the text is top-aligned, FALSE otherwise * note * - If not top-aligned, the text is bottom-aligned. */
-
getTextColor(self) → Color¶ /** * brief Gets the text color of the item. * return - a color object (an Color) */
-
getTextFontSize(self) → float¶ /** * brief Gets the text font size, in screen one thousandths. * return - the size (a double between 0 and 1) */
-
getTextMinimumFontSize(self) → int¶ /** * brief Gets the minimum text font size, in font points. * return - the font size */
-
getU(self) → float¶ /** * brief Gets the U coordinate of the item. * return - a coordinate (a 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. * sa setAlignment() */
-
getV(self) → float¶ /** * brief Gets the V coordinate of the item. * return - a coordinate (a 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). */
-
none()¶
-
setHorizontalAlignment(self, pValue: int) → None¶ /** * brief Sets the horizontal item alignment. * param - 0 if the text is to be left-aligned, 1 for center-aligned or 2 for right-aligned * note * - Default is left-aligned. */
-
setIsOriginAtTop(self, pValue: bool) → None¶ /** * brief Sets whether or not the text is top-aligned. * param - TRUE if the text is to be top-aligned, FALSE otherwise * note * - If not top-aligned, the text is bottom-aligned. */
-
setText(self, sText: str) → None¶ /** * brief Sets the text of the item. * param - some text (a string) */
-
setTextColor(self, IColor: Color) → None¶ /** * brief Sets the text color of the item. * param - a color object (an Color) * note * - If the instance created by an ORSTextPresenter, it will supply * its item color. */
-
setTextFontName(self, sName: str) → None¶ /** * brief Sets the text font name of the item. * param - the font name (a string) */
-
setTextFontSize(self, iValue: float) → None¶ /** * brief Sets the text font size, in screen one thousandths. * param - the size (a double between 0 and 1) */
-
setTextMinimumFontSize(self, fontSize: int) → None¶ /** * brief Sets the minimum font size, in font points. * param - the font size */
-
setU(self, fValue: float) → None¶ /** * brief Sets the U coordinate of the item. * param - a coordinate (a 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. * sa setAlignment() */
-
setV(self, fValue: float) → None¶ /** * brief Sets the V coordinate of the item. * param - a coordinate (a 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). */
Watershed¶
-
class
ORSModel.ors.Watershed¶ Bases:
ORSModel.ors.Unmanaged-
compute(self, watershedDistance: Channel, lOutputChannelLabel: Channel) → None¶ /** * brief Creates a distance map starting from all the provided ROI sources. * param - the distance map generated by the Dijkstra algorithm (an Channel) * param - a traceback channel, can be NULL (an Channel) * param - a label channel, can be NULL (an Channel)
*/
-
getNeighborCount(self) → int¶ /** * brief Gets the number of neighbors used by the Dijkstra algorithm (the connectivity). * return - the number of neighbors (an unsigned char) * note * - Can be 6, 18 or 26 */
-
getROICount(self) → int¶ /** * brief Returns the number of ROIs that have been set as sources. * return - the number of ROIs that have been provided (an unsigned char) * note * - A maximum of 10 ROI can be provided.
*/
-
getVolumeROI(self, index: int) → ROI¶ /** * brief Retrieves a particular ROI from the index specified slot. * param - the slot index (an unsigned char) * return - the ROI associated with this slot index (an ROI), or NULL if no ROI is at that slot * note * - A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel. */
-
none()¶
-
setInputChannelAndWorkingArea(self, inputChannel: Channel, minX: int, minY: int, minZ: int, maxX: int, maxY: int, maxZ: int, currentT: int) → None¶ /** * brief Sets the channel that will be used by the Dijkstra algorithm to calculate distance. * param - the input channel (an Channel) * param - the minimum X index in the input channel (an unsigned short) * param - the minimum Y index in the input channel (an unsigned short) * param - the minimum Z index in the input channel (an unsigned short) * param - the maximum X index in the input channel (an unsigned short) * param - the maximum Y index in the input channel (an unsigned short) * param - the maximum Z index in the input channel (an unsigned short) * note * - The min and max boundaries must not describe a space bigger than the input channel.
*/
-
setInputLabelsChannel(self, aInputLabelsChannel: Channel) → None¶ /* brief method setInputLabelsChannel */
-
setNeighborCountTo18(self) → None¶ /** * brief Sets the number of neighbors used by the Dijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)). */
-
setNeighborCountTo26(self) → None¶ /** * brief Sets the number of neighbors used by the Dijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)). */
-
setNeighborCountTo6(self) → None¶ /** * brief Sets the number of neighbors used by the Dijkstra algorithm to 18 ( Neighbor distance <= sqrt(2)). */
-
setVolumeROI(self, index: int, aVolROI: ROI) → None¶ /** * brief Fills a particular ROI slot to be used as a source for the Dijkstra algorithm * param - the slot index (an unsigned short) * param - the ROI associated with this slot index (an ROI) * note * - A maximum of 10 ROIs can be provided. The ROIs provided must be of the same shape as the input channel. */
-
Alternative constructors¶
Subclasses of Unmanaged¶
-
ORSModel.__init__.orsColor(r=0, g=0, b=0, a=0)¶
-
ORSModel.__init__.orsVect(x=0, y=0, z=0)¶
-
ORSModel.__init__.orsRect(origin, dir0, dir0Length, dir0Spacing, dir1, dir1Length, dir1Spacing)¶
-
ORSModel.__init__.orsKernel(sizeX, sizeY, sizeZ, *arg)¶
-
ORSModel.__init__.orsBox(origin, dir0, dir0Length, dir0Spacing, dir1, dir1Length, dir1Spacing, dir2, dir2Length, dir2Spacing)¶
-
ORSModel.__init__.orsPlane(a, b, c, d)¶
-
ORSModel.__init__.orsMatrix(v00, v01, v02, v03, v10, v11, v12, v13, v20, v21, v22, v23, v30, v31, v32, v33)¶
-
ORSModel.__init__.orsCamera(dir, pos, up, pivot, vHeight, vWidth, vTopLefX, vTopLeftY, vNear, vFar, useOrtho, orthoZoom, focalLength, depthOfField, angleOfView, normalizationTranslationMatix, normalizationRotationMatix, normalizationScaleMatix)¶
-
ORSModel.__init__.orsOrientedPlane(a, b, c, d, center, up)¶
-
ORSModel.__init__.orsLine(origin, orientation)¶
-
ORSModel.__init__.orsLineSegment(start, end)¶