Rectangle¶
Inheritance diagram¶
Classes¶
Rectangle¶
-
class
ORSModel.ors.Rectangle¶ Bases:
ORSModel.ors.Shape2Dbrief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2010
-
copy(self) → Rectangle¶ Gets a copy of the receiver.
Returns: output (ORSModel.ors.Rectangle) – a box (an Rectangle)
-
createFromPythonRepresentation(aPythonRepresentation: str) → Rectangle¶ Create aRectangle object from a Python string representation a static method.
Parameters: aPythonRepresentation (str) – a Python evaluable string representation (a str) Returns: output (ORSModel.ors.Rectangle) – a bounded plane (a Rectangle)
-
getArea(self) → float¶ Gets the area of the receiver.
Returns: output (float) – an area (a double)
-
getBoundedDoublePlaneInBoxReferential(self, inRefBox: ORSModel.ors.Box) → Rectangle¶ Gets a copy of the receiver in the argument referential.
Parameters: inRefBox (ORSModel.ors.Box) – a box, the destination referential (an Box) Returns: output (ORSModel.ors.Rectangle) – a bounded plane, a copy of the receiver in the argument referential (an Rectangle)
-
getBox(self, direction2Size: float) → Box¶ Returns a box, with direction2 size provided by the argument, with the same origin as the receiver.
Parameters: direction2Size (float) – Returns: output (ORSModel.ors.Box) – a box (an Box)
-
getCenter(self) → Vector3¶ Gets the geometrical middle of the bounded plane.
Returns: output (ORSModel.ors.Vector3) – a bounded plane center position (an Vector3)
-
getCenterHalfVoxel(self) → Vector3¶ Gets the middle of the voxel in the middle of the box.
Returns: output (ORSModel.ors.Vector3) – a box center position (an Vector3)
-
getCenteredBox(self, direction2Size: float) → Box¶ Returns a box, with direction2 size provided by the argument, with origin displaced as to have the receiver centered in the direction2 vector.
Parameters: direction2Size (float) – Returns: output (ORSModel.ors.Box) – a centered box (an Box)
-
getClassNameStatic() → str¶ getClassNameStatic
Returns: output (str) –
-
getDirection(self, index: int) → Vector3¶ Gets a bounded plane direction.
Note
The direction2 vector is normalized and automaticaly generated using the cross product of direction0 vector and direction1 vector.
Parameters: index (int) – the side index (a uint16_t) Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirection0(self) → Vector3¶ Gets the bounded plane direction0.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirection0Size(self) → float¶ Gets the bounded plane direction0 vector length.
Note
This is the size in meters of the bounded plane side 0.
Returns: output (float) – the side 0 length (a double)
-
getDirection0SizeInVoxel(self) → float¶ Gets the direction0 size in voxels.
Returns: output (float) – the size in voxels (a double)
-
getDirection0Spacing(self) → float¶ Gets the receiver direction0 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Returns: output (float) – the side 0 spacing (a double)
-
getDirection1(self) → Vector3¶ Gets the bounded plane direction1.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirection1Size(self) → float¶ Gets the bounded plane direction1 vector length.
Note
This is the size in meters of the bounded plane side 1.
Returns: output (float) – the side 1 length (a double)
-
getDirection1SizeInVoxel(self) → float¶ Gets the direction1 size in voxels.
Returns: output (float) – the size in voxels (a double)
-
getDirection1Spacing(self) → float¶ Gets the receiver direction1 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Returns: output (float) – the side 1 spacing (a double)
-
getDirection2(self) → Vector3¶ Gets the bounded plane direction2.
Note
The direction2 vector is normalized and automaticaly generated using the cross product of direction0 vector and direction1 vector.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirectionSize(self, index: int) → float¶ Gets a bounded plane direction vector length.
Note
This is the size in meters of the bounded plane side.
Parameters: index (int) – the side index (a uint16_t) Returns: output (float) – the side length (a double)
-
getDirectionSizeVector(self) → Vector3¶ Gets the direction size as a vector.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDirectionSpacing(self, index: int) → float¶ Gets a receiver spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: index (int) – the side index (a uint16_t) Returns: output (float) – the side spacing (a double)
-
getDirectionSpacingVector(self) → Vector3¶ Gets the direction spacing as a vector.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getDistanceFromPoint(self, point: ORSModel.ors.Vector3) → float¶ Computes the distance from a point.
Parameters: point (ORSModel.ors.Vector3) – a point (an Vector3) Returns: output (float) – the distance (a double)
-
getIndex(self) → float¶ Returns: output (float) –
-
getIntersectionWithPlane(self, pPlane: ORSModel.ors.Plane) → LineSegment¶ Returns the line segment representing the intersection of the provided plane and the receiver.
Note
Returns NULL if there is no intersection.
Parameters: pPlane (ORSModel.ors.Plane) – a plane (a Plane) Returns: output (ORSModel.ors.LineSegment) – a line segment (an LineSegment)
-
getInvertedWorldTranformation(self) → Matrix4x4¶ The getWorldTransform matrix cannot be directly inverted. Use this call to retrieve the inverse transform.
Returns: output (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
-
getIsEqualTo(self, aBplane: ORSModel.ors.Rectangle) → bool¶ Parameters: aBplane (ORSModel.ors.Rectangle) – Returns: output (bool) –
-
getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) → bool¶ Gets if the receiver intersects the given shape.
Parameters: aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape) Returns: output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
-
getLinearInterpolatedBoundedPlane(self, aPlane: ORSModel.ors.Rectangle, normalizedInterpolationFactor: float) → Rectangle¶ Returns a bounded plane which is the linear interpolation of the receiver and the provided bounded plane.
Parameters: - aPlane (ORSModel.ors.Rectangle) – a bounded plane (an Rectangle)
- normalizedInterpolationFactor (float) – an interpolation factor [0.0 , 1.0] plane (a double)
Returns: output (ORSModel.ors.Rectangle) – an interpolated bounded plane (an Rectangle)
-
getNormal(self) → Vector3¶ Returns the normal of theRectangle.
Returns: output (ORSModel.ors.Vector3) – a vector (an Vector3)
-
getOrigin(self) → Vector3¶ Gets the bounded plane origin position.
Note
The origin is in world coordinates.
Returns: output (ORSModel.ors.Vector3) – the origin (an Vector3)
-
getOriginOpposite(self) → Vector3¶ Gets the bounded plane origin opposite position.
Note
The origin opposite is in world coordinates.
Returns: output (ORSModel.ors.Vector3) – the origin opposite (an Vector3)
-
getPlane(self) → Plane¶ Returns the plane on which the bounded plane resides.
Returns: output (ORSModel.ors.Plane) – a plane (an Plane)
-
getProjectionOnPlane(self, aPoint: ORSModel.ors.Vector3) → Vector3¶ Returns a point which is the argument projected on the plane described by the receiver.
Parameters: aPoint (ORSModel.ors.Vector3) – a point to project (an Vector3) Returns: output (ORSModel.ors.Vector3) – the projected point (an Vector3)
-
getSpacingInDirection(self, aDirection: ORSModel.ors.Vector3) → float¶ Gets the spacing in the specified direction.
Parameters: aDirection (ORSModel.ors.Vector3) – the direction vector (an Vector3) Returns: output (float) – the spacing (a double)
-
getSummit(self, maxDirection0: bool, maxDirection1: bool) → Vector3¶ Gets the position of one of the summits of the bounded plane.
Parameters: - maxDirection0 (bool) – TRUE to get maxDirection0, FALSE to get minDirection0
- maxDirection1 (bool) – TRUE to get maxDirection1, FALSE to get minDirection1
Returns: output (ORSModel.ors.Vector3) – a summit position (an Vector3)
-
getTransformed(self, aMatrix: ORSModel.ors.Matrix4x4) → Rectangle¶ Parameters: aMatrix (ORSModel.ors.Matrix4x4) – Returns: output (ORSModel.ors.Rectangle) –
-
getVoxelToWorldCoordinates(self, anIndex: ORSModel.ors.Vector3) → Vector3¶ Gets the position of a given voxel.
Note
Only useful if the spacing of the direction vectors have been defined.
Parameters: anIndex (ORSModel.ors.Vector3) – a voxel position (an Vector3) Returns: output (ORSModel.ors.Vector3) – the position in world coordinates (an Vector3)
-
getWorldToVoxelCoordinates(self, pPointInWorld: ORSModel.ors.Vector3) → Vector3¶ Gets the position of a given world coordinate.
Note
Only useful if the spacing of the direction vectors have been defined.
Parameters: pPointInWorld (ORSModel.ors.Vector3) – a world coordinate position point (an Vector3) Returns: output (ORSModel.ors.Vector3) – the position in local coordinates (an Vector3)
-
getWorldTranformation(self) → Matrix4x4¶ Returns: output (ORSModel.ors.Matrix4x4) –
-
growToIncludePoint(self, aPoint: ORSModel.ors.Vector3) → None¶ Grows the receiver as to include the provided point.
Note
The provided point is projected on the bounded plane.
Parameters: aPoint (ORSModel.ors.Vector3) –
-
setDirection(self, index: int, pVect: ORSModel.ors.Vector3) → None¶ Sets a bounded plane direction.
Note
The direction vector will be normalized.
Parameters: - index (int) – the side index (a uint16_t)
- pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirection0(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the bounded plane direction0.
Note
The direction0 vector will be normalized.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirection0Size(self, aSize: float) → None¶ Sets the bounded plane direction0 vector length.
Note
This is the size in meters of the bounded plane side 0.
Parameters: aSize (float) – the side 0 length (a double)
-
setDirection0Spacing(self, aSpacing: float) → None¶ Sets the receiver direction0 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: aSpacing (float) – the side 0 spacing (a double)
-
setDirection1(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the bounded plane direction1.
Note
The direction1 vector will be normalized.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirection1Size(self, aSize: float) → None¶ Sets the bounded plane direction1 vector length.
Note
This is the size in meters of the bounded plane side 1.
Parameters: aSize (float) – the side 1 length (a double)
-
setDirection1Spacing(self, aSpacing: float) → None¶ Sets the receiver direction1 spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: aSpacing (float) – the side 1 spacing (a double)
-
setDirectionSize(self, index: int, aSize: float) → None¶ Sets a bounded plane direction vector length.
Note
This is the size in meters of the bounded plane side.
Parameters: - index (int) – the side index (a uint16_t)
- aSize (float) – the side length (a double)
-
setDirectionSizeVector(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the direction size as a vector.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setDirectionSpacing(self, index: int, aSpacing: float) → None¶ Sets a receiver direction spacing.
Note
This value is used to compute transformations from world coordinate space to index space (in the channels).
Parameters: - index (int) – the side index (a uint16_t)
- aSpacing (float) – the side spacing (a double)
-
setDirectionSpacingVector(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the direction spacing as a vector.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
setOrigin(self, pVect: ORSModel.ors.Vector3) → None¶ Sets the receiver origin position.
Note
The origin should be in world coordinates.
Parameters: pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
-
Shape2D¶
-
class
ORSModel.ors.Shape2D Bases:
ORSModel.ors.Shape-
getClassNameStatic() → str getClassNameStatic
Returns: output (str) –
-
none() → Shape2D Returns: output (Shape2D) –
-
Shape¶
-
class
ORSModel.ors.Shape Bases:
ORSModel.ors.Unmanagedbrief_description: None author: Nicolas Piche. All other members of ORS participated. version: 1.0 date: January 2017
-
copy(self) → Unmanaged Gets a copy of the receiver.
Returns: output (ORSModel.ors.Unmanaged) – a shape
-
getClassNameStatic() → str getClassNameStatic
Returns: output (str) –
-
getIsIntersectingShape(self, aShape: ORSModel.ors.Shape) → bool Gets if the receiver intersects the given shape.
Parameters: aShape (ORSModel.ors.Shape) – a shape to intersect with the receiver (a Shape) Returns: output (bool) – TRUE if the receiver intersects the shape, FALSE otherwise (a bool)
-
getRotated(self, axisOfRotation: ORSModel.ors.Vector3, rotationCenter: ORSModel.ors.Vector3, angle: float) → Shape Parameters: - axisOfRotation (ORSModel.ors.Vector3) –
- rotationCenter (ORSModel.ors.Vector3) –
- angle (float) –
Returns: output (ORSModel.ors.Shape) –
-
getTransformed(self, aMatrix: ORSModel.ors.Matrix4x4) → Shape Parameters: aMatrix (ORSModel.ors.Matrix4x4) – Returns: output (ORSModel.ors.Shape) –
-
none() → Shape Returns: output (Shape) –
-
rotate(self, axisInWorld: ORSModel.ors.Vector3, aroundPointInWorld: ORSModel.ors.Vector3, angleInRadian: float) → None Applies a rotation to the receiver.
Note
The box is a right handed bounded referential.
Parameters: - axisInWorld (ORSModel.ors.Vector3) – a rotation axis (an Vector3)
- aroundPointInWorld (ORSModel.ors.Vector3) – a center of rotation (an Vector3)
- angleInRadian (float) – an angle in radian (a double)
-
transform(self, transformationMatrix: ORSModel.ors.Matrix4x4) → None Applies a transformation to the receiver.
Note
The transformation can include: translation, rotation and scaling.
Parameters: transformationMatrix (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
-
Unmanaged¶
-
class
ORSModel.ors.Unmanaged Bases:
ORSModel.ors.ORSBaseClassbrief_description: Abstract class for objects that are not managed by the core library. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
atomicLoad(sFilename: str) → Unmanaged Creates an object from a file where an object was saved.
Parameters: sFilename (str) – path of the file to load Returns: output (Unmanaged) – a managed object, or none() if the load fails
-
atomicSave(self, aFilename: str) → int Saves the object to a file.
Parameters: aFilename (str) – path of the file to save Returns: output (int) – 0 if successful, otherwise an error code
-
createFromPythonRepresentation(aPythonRepresentation: str) → Unmanaged Create aUnmanaged Object from a python representation a static method.
Parameters: aPythonRepresentation (str) – Returns: output (ORSModel.ors.Unmanaged) –
-
fromPythonRepresentation(self, aPythonRepresentation: str) → bool Create aUnmanaged object from a Python string representation.
Parameters: aPythonRepresentation (str) – a Python evaluable string representation (a string) Returns: output (bool) – TRUE if parsing worked, FALSE otherwise (a bool)
-
classmethod
getAllSubclasses(outputCollection=None)
-
classmethod
getClassDenomination()
-
static
getClassFromProgId(progId)
-
getClassName(self) → str Retrieves the class name of the core object wrapped by this Interface object.
Returns: output (str) –
-
getClassNameStatic() → str getClassNameStatic
Returns: output (str) –
-
getDataChecksum(self) → str Returns: output (str) –
-
getIsInstanceOf(self, pProgId: str) → bool Queries the object to know if it is an instance of a certain class.
Parameters: pProgId (str) – Returns: output (bool) –
-
classmethod
getIsSubclassOf(parentClass)
-
getPythonRepresentation(self) → str Gets a Python evaluable string representation.
Returns: output (str) –
-
isNone(self) → bool Checks if the receiver is none.
Returns: output (bool) –
-
isNotNone(self) → bool Checks if the receiver is not none.
Returns: output (bool) –
-
none() → Unmanaged Returns: output (Unmanaged) –
-
ORSBaseClass¶
-
class
ORSModel.ors.ORSBaseClass brief_description: An abstract class from which all objects issued from the author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
getPythonTraceBack() → typing.List[str] Set the python traceback for a call from python.
Returns: output (typing.List[str]) –
-
isManaged(self) → bool Returns: output (bool) –
-
isNone(self) → bool Returns: output (bool) –
-
setPythonTraceBack(tb: ORSModel.ors.typing.List[str]) → None Set the python traceback for a call from python.
Parameters: tb (typing.List[str]) –
-