MeVisLab Scripting Reference
|
#include <mlWEMPatchWrapper.h>
Inherits QObject.
Public Slots | |
Identification methods. | |
Accessing the id, label, and description. | |
unsigned int | getId () const |
void | setLabel (const QString &label) |
QString | getLabel () const |
void | setDescription (const QString &desc) |
QString | getDescription () const |
bool | isTrianglePatch () const |
bool | isQuadPatch () const |
Global information. | |
Accessing global / geometric information of this WEMPatch. | |
double | getArea () const |
double | getVolume () const |
double | getLUTMin () const |
double | getLUTMax () const |
QVariantList | getMinBoundingBox () const |
QVariantList | getMaxBoundingBox () const |
bool | isPointInside (const QList< double > &position) const |
double | getPointToTriangleAtDistance (const QList< double > &position, int triangleIndex) const |
QVariantMap | calculatePCA () const |
PrimitiveValueList access. | |
Access methods for the PrimitiveValueLists. | |
MLWEMPrimitiveValueListWrapper * | createOrGetPrimitiveValueList (const QString &description) |
MLWEMPrimitiveValueListWrapper * | getPrimitiveValueList (const QString &description) |
QStringList | getRegisteredPrimitiveValueLists () const |
bool | removePrimitiveValueList (const QString &name) |
NumPy access. | |
Methods to access the patch via NumPy arrays. | |
QVariant | getNodePositionsAsNumPyArray () |
QVariant | getNodeNormalsAsNumPyArray () |
QVariant | getNodeColorsAsNumPyArray () |
QVariant | getFaceNormalsAsNumPyArray () |
QVariant | getTrianglesAsNumPyArray () |
QVariant | getQuadsAsNumPyArray () |
WEMNode properties. | |
Accessing the properties of the WEMNodes of this WEMPatch. | |
int | getNumNodes () const |
QVariantList | getNodeNormalAt (int index) const |
void | setNodeNormalAt (int index, const QVariantList &normal) |
QVariantList | getNodePositionAt (int index) const |
void | setNodePosition (int index, const QVariantList &position) |
void | translateNodeAt (int index, const QVariantList &offset) |
QVariantList | getNodeColorAt (int index) const |
void | setNodeColorAt (int index, const QVariantList &color) |
bool | isNodeBoundaryAt (int index) const |
double | getNodeLargestDihedralAngleAt (int index) const |
WEMNode neighborhood access. | |
Methods to access the neighboring primitives of a WEMNode. | |
int | getNodeNumEdgesAt (int index) const |
int | getNodeNumFacesAt (int index) const |
int | getNodeEdgeIndexAt (int index, int attachedEdgeIndex) const |
int | getNodeFaceIndexAt (int index, int attachedFaceIndex) const |
WEMEdge properties. | |
Accessing the properties of the WEMEdges of this WEMPatch. | |
bool | hasEdges () const |
int | getNumEdges () const |
double | getEdgeLengthAt (int index) const |
double | getEdgeDihedralAngleAt (int index) const |
WEMEdge neighborhood access. | |
Methods for accessing the neighboring primitives of a WEMEdge. | |
int | getEdgeHeadNodeIndexAt (int index) const |
int | getEdgeTailNodeIndexAt (int index) const |
int | getEdgeRightFaceIndexAt (int index) const |
int | getEdgeLeftFaceIndexAt (int index) const |
int | getEdgeRightPredecessorEdgeIndexAt (int index) const |
int | getEdgeLeftPredecessorEdgeIndexAt (int index) const |
int | getEdgeRightSuccessorEdgeIndexAt (int index) const |
int | getEdgeLeftSuccessorEdgeIndexAt (int index) const |
WEMFace properties. | |
Accessing the properties of the WEMFaces of this WEMPatch. | |
int | getNumFaces () const |
QVariantList | getFaceNormalAt (int index) const |
void | setFaceNormalAt (int index, const QVariantList &normal) |
QVariantList | getFaceCentroidAt (int index) const |
double | getFacePerimeterAt (int index) const |
double | getFaceAreaAt (int index) const |
int | isFaceConcaveAt (int index) const |
WEMFace neighborhood access. | |
Methods for accessing the neighboring primitives of a WEMFace. | |
int | getFaceNumNodesAt (int index) const |
int | getFaceNumEdgesAt (int index) const |
int | getFaceNodeIndexAt (int index, int attachedNodeIndex) const |
int | getFaceEdgeIndexAt (int index, int attachedEdgeIndex) const |
Normals/BoundingBox/Edge connectivity. | |
Methods for accessing the neighboring primitives of a WEMFace. | |
void | buildEdgeConnectivity () |
void | computeNormals () |
void | computeBoundingBox () |
A class that wraps WEMPatch objects for use in scripting.
If you need fast ray intersection with the WEMPatch, have a look at the MLWEMBoundingVolumeHierarchyWrapper.
|
slot |
(re-) builds the edge connectivity.
|
slot |
Calculates the main axes using PCA.
Returns a dictionary with the following values:
|
slot |
computes the bounding box.
|
slot |
computes the node normals from face normals.
|
slot |
Creates a new PVL if it does not exist or returns the existing PVL under the given name.
|
slot |
Returns the area of this patch in square mm.
|
slot |
Returns the 'description' attribute of this WEMPatch.
|
slot |
Returns the dihedral angle in radians of the edge at the given index.
|
slot |
Returns the global index of the head node of the edge with the given index.
|
slot |
Returns the global index of the left face of the edge with the given index.
|
slot |
Returns the global index of the left predecessor edge of the edge with the given index.
|
slot |
Returns the global index of the left successor edge of the edge with the given index.
|
slot |
Returns the length in mm of the edge at the given index.
|
slot |
Returns the global index of the right face of the edge with the given index.
|
slot |
Returns the global index of the right predecessor edge of the edge with the given index.
|
slot |
Returns the global index of the right successor edge of the edge with the given index.
|
slot |
Returns the global index of the tail node of the edge with the given index.
|
slot |
Returns the area in square mm of the face with the given index.
|
slot |
Returns the geometric centroid of the face with the given index.
|
slot |
Returns the global index of the edge attached to the face with the given index.
|
slot |
Returns the global index of the node attached to the face with the given index.
|
slot |
Returns the normal of the face with the given index.
|
slot |
Returns all face normals as NumPyArray of 3D vectors.
|
slot |
Returns the number of edges attached to the face with the given index.
The number of edges is not explicitly stored for a face but it is the same as the number of nodes. This method is just for convenience.
|
slot |
Returns the number of nodes attached to the face with the given index.
|
slot |
Returns the perimeter of the face with the given index.
|
slot |
Returns the unique ID of this CSO.
|
slot |
Returns the 'label' attribute of this WEMPatch.
|
slot |
Returns the LUT max value.
|
slot |
Returns the LUT min value.
|
slot |
Returns the max position of the axis aligned bounding box of this WEMPatch.
|
slot |
Returns the min position of the axis aligned bounding box of this WEMPatch.
|
slot |
Returns the color of the node at the given index.
|
slot |
Get all node colors as NumPy array of 4D vectors (RGBA).
|
slot |
Returns the global index of the edge attached to the node at the given index.
|
slot |
Returns the global index of the face attached to the node at the given index.
|
slot |
Returns the largest dihedral angle in radians of faces attached to the node at the given index.
|
slot |
Returns the normal of the node at the given index.
|
slot |
Get all node normals as NumPy array of 3D vectors.
|
slot |
Returns the number of attached edges to the node at the given index.
|
slot |
Returns the number of attached faces to the node at the given index.
|
slot |
Returns the position of the node at the given index.
|
slot |
Get all node positions as NumPy array of 3D vectors.
|
slot |
Returns the number of edges.
|
slot |
Returns the number of faces.
|
slot |
Returns the number of nodes.
|
slot |
Returns the distance of the given point to a triangle at the given index.
If the mesh is not a triangle mesh, -1 is returned.
|
slot |
Returns the PVL with the given name or NULL if that PVL does not exist.
|
slot |
Returns an array of node indices (4 per quad) describing the node indices for each quad/face.
The indices are to be used with the array returned by getNodePositionsAsNumPyArray(). Throws an error if the patch is not a quad patch.
|
slot |
Get descriptions of all registered PrimitiveValueLists.
|
slot |
Returns an array of node indices (3 per triangle) describing the node indices for each triangle/face.
The indices are to be used with the array returned by getNodePositionsAsNumPyArray(). Throws an error if the patch is not a triangle patch.
|
slot |
Returns the volume of this patch in cubic mm.
|
slot |
Returns whether this WEMPatch has edges.
|
slot |
Returns the number of concavities of the face with the given index.
If the face is convex, the return value is 0.
|
slot |
Returns whether the node at the given index is a boundary node.
|
slot |
Returns whether the given position is inside this WEMPatch.
|
slot |
Returns is the patch is a quad patch.
|
slot |
Returns is the patch is a triangle patch.
|
slot |
Removes the primitive value list with the given name. Returns whether the operation was successful.
|
slot |
Sets the 'description' attribute of this WEMPatch.
|
slot |
Sets the face normal of the face with the given index.
|
slot |
Sets the 'label' attribute of this WEMPatch.
|
slot |
Sets the color of the node at the given index.
|
slot |
Sets the normal of the node at the given index.
|
slot |
Sets the position of the node at the given index.
|
slot |
Translates the node at the given index.