Intersection

Inheritance diagram

Inheritance diagram of ORSModel.ors.Intersection, ORSModel.ors.Unmanaged, ORSModel.ors.ORSBaseClass

Classes

Intersection

class ORSModel.ors.Intersection

Bases: ORSModel.ors.Unmanaged

brief_description: Represents a ray pick result. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 see: View::pick(), Node::pick()

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClosestVisual(self) → Visual

Returns the picked visual object closest to the pick point.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the closest visual to the pick point.

Returns:output (ORSModel.ors.Visual) – a visual (an Visual), or NULL if no visual was picked
getClosestVisualOfClass(self, pProgId: str) → Visual

Returns the visual object of a given class closest to the pick point.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the closest visual to the pick point.

Parameters:pProgId (str) –
Returns:output (ORSModel.ors.Visual) – a visual (a Visual), or NULL if no visual was picked
getColor(self) → Color

Returns the color value of the intersection.

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

Gets the color value, adjusted to physical units (slope and offset).

Returns:output (ORSModel.ors.Color) – the color (a Color)
getControlPointIndexHit(self) → int
Returns:output (int) –
getDataUnit(self) → str
Returns:output (str) –
getDistance(self) → float

Returns the distance from the ray pick origin to the intersection.

Note

Distances are calculated in pixels.

Returns:output (float) – a double
getFarthestVisual(self) → Visual

Returns the picked visual object farthest from the pick point.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the farthest visual from the pick point.

Returns:output (ORSModel.ors.Visual) – a visual (a Visual), or NULL if no visual was picked
getFarthestVisualOfClass(self, pProgId: str) → Visual

Returns the visual object of a given class farthest from the pick point.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the farthest visual from the pick point.

Parameters:pProgId (str) –
Returns:output (ORSModel.ors.Visual) – a visual (a Visual), or NULL if no visual was picked
getHit(self) → bool

Checks if the ray pick intersects something.

Returns:output (bool) – true if the intersection is valid, false otherwise
getHitCount(self) → int
Returns:output (int) –
getMeshFace(self) → int

When picking a mesh, returns the face index of the triangle being picked.

Returns:output (int) – a face index in the mesh (a int32_t)
getMeshFaceBary1(self) → float

Returns the barycentric coordinate 1.

Returns:output (float) – a double between 0 and 1
getMeshFaceBary2(self) → float

Returns the barycentric coordinate 1.

Returns:output (float) – a double between 0 and 1
getMeshVertexIndex0(self) → int

When picking a mesh, returns the index 1 of the vertex being picked.

Returns:output (int) – a vertex index 1 (a int32_t)
getMeshVertexIndex1(self) → int

When picking a mesh, returns the index 1 of the vertex being picked.

Returns:output (int) – a vertex index 1 (a int32_t)
getMeshVertexIndex2(self) → int

When picking a mesh, returns the index 1 of the vertex being picked.

Returns:output (int) – a vertex index 1 (a int32_t)
getNearestMeshVertexIndex(self) → int

When picking a mesh, returns the vertex index nearest to the point being picked.

Returns:output (int) – a vertex index in the mesh (a int32_t)
getNthDistance(self, nth: int) → float
Parameters:nth (int) –
Returns:output (float) –
getNthLabel(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthMeshFace(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthMeshFaceBary1(self, nth: int) → float
Parameters:nth (int) –
Returns:output (float) –
getNthMeshFaceBary2(self, nth: int) → float
Parameters:nth (int) –
Returns:output (float) –
getNthMeshVertexIndex0(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthMeshVertexIndex1(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthMeshVertexIndex2(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthNearestMeshVertexIndex(self, nth: int) → int
Parameters:nth (int) –
Returns:output (int) –
getNthPositionInLocalCoordinates(self, nth: int) → Vector3
Parameters:nth (int) –
Returns:output (ORSModel.ors.Vector3) –
getNthPositionInWorldCoordinates(self, nth: int) → Vector3
Parameters:nth (int) –
Returns:output (ORSModel.ors.Vector3) –
getNthScalarValue(self, nth: int) → float
Parameters:nth (int) –
Returns:output (float) –
getOffset(self) → float

Gets the intersection offset, which is the offset of the channel being picked.

Returns:output (float) – the offset (a double)
getPickDirection(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getPickOrigin(self) → Vector3
Returns:output (ORSModel.ors.Vector3) –
getPixelPositionInView(self) → Vector3

Returns the position of the intersection in screen coordinates.

Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getPositionInLocalCoordinates(self) → Vector3

Returns the position of the intersection in local coordinates.

Returns:output (ORSModel.ors.Vector3) – a point (a Vector3)
getPositionInVoxelIndex(self) → Vector3

Returns the position of the intersection as X/Y/Z indicies.

Note

The point vector will contain X/Y/Z indicies.

Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getPositionInWorldCoordinates(self) → Vector3

Returns the position of the intersection in world coordinates.

Returns:output (ORSModel.ors.Vector3) – a point (an Vector3)
getScalarValue(self) → float

Returns the scalar value of the picked triangle.

Returns:output (float) – the scalar value (a double)
getSlope(self) → float

Gets the intersection slope, which is the slope of the channel being picked.

Returns:output (float) – the slope (a double)
getStructuredGridAtIndex(self, iIndex: int) → StructuredGrid

Returns the Nth picked structured grid object.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the Nth visual.

Parameters:iIndex (int) – the structured grid index (an unsigned short, zero based)
Returns:output (ORSModel.ors.StructuredGrid) – a structured grid (a StructuredGrid), or NULL if the index given is invalid
getStructuredGridCount(self) → int
Returns:output (int) –
getTimeStep(self) → int

Returns the T value of the intersection.

Returns:output (int) – a uint32_t
getVisualAtIndex(self, iIndex: int) → Visual

Returns the Nth picked visual object.

Note

Since more than one visual can be found by the pick ray, either because visuals are superimposed or because they are found within the pick tolerance, this method returns the Nth visual.

Parameters:iIndex (int) – the visual index (an unsigned short, zero based)
Returns:output (ORSModel.ors.Visual) – a visual (a Visual), or NULL if the index given is invalid
getVisualCount(self) → int

Returns the number of visual objects that were intersected by the ray pick.

Note

Since more than one visual can be found at any given point, this method returns how many visual objects were touched by the ray pick.

Returns:output (int) – a visual object count (an short)
getVoxelIndex(self) → int

Returns the index of the voxel being picked.

Note

The index is computed as follows: (T value * zSize * ySize * xSize) + (Z value * xSize * ySize) + (Y value * xSize) + (X value)

Returns:output (int) – an index (a int64_t)
getWindowLeveledNormalizedValue(self) → float

Returns the value with window leveling applied, normalized between 0 and 1.

Returns:output (float) – a double between 0 and 1
getXIndexInCurvedChannel(self) → float
Returns:output (float) –
getYIndexInCurvedChannel(self) → float
Returns:output (float) –
none() → Intersection
Returns:output (Intersection) –

Unmanaged

class ORSModel.ors.Unmanaged

Bases: ORSModel.ors.ORSBaseClass

brief_description: Abstract class for objects that are not managed by the core library. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

atomicLoad(sFilename: str) → Unmanaged

Creates an object from a file where an object was saved.

Parameters:sFilename (str) – path of the file to load
Returns:output (Unmanaged) – a managed object, or none() if the load fails
atomicSave(self, aFilename: str) → int

Saves the object to a file.

Parameters:aFilename (str) – path of the file to save
Returns:output (int) – 0 if successful, otherwise an error code
createFromPythonRepresentation(aPythonRepresentation: str) → Unmanaged

Create aUnmanaged Object from a python representation a static method.

Parameters:aPythonRepresentation (str) –
Returns:output (ORSModel.ors.Unmanaged) –
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]) –