MeVisLab Toolbox Reference
ml::WEMConnectedComponent Namespace Reference

The WEMConnectedComponent namespace. More...

Typedefs

typedef std::vector< WEMNode * > WEMNodeVector
 Defines a vector of WEMNode pointers for temporary use. More...
 
typedef std::vector< WEMFace * > WEMFaceVector
 Defines a vector of WEMFace pointers for temporary use. More...
 

Functions

MLWEM_EXPORT void collectComponent (WEMPatch *wemPatch, WEMNode *node, WEMNodeVector &cNodes, bool unvisitedValue=false)
 Collects a connected component of a wemPatch, starting with a node. More...
 
MLWEM_EXPORT void collectComponentEuclideanDistance (WEMPatch *wemPatch, WEMNode *node, WEMNodeVector &cNodes, double maxDistance, bool unvisitedValue=false)
 Same as 'collectComponent', but with an additional range parameter maxDistance. More...
 
MLWEM_EXPORT void collectComponentBoundary (WEMPatch *wemPatch, WEMNode *node, WEMNodeVector &cNodes, bool unvisitedValue=false)
 Same as 'collectComponent', but now the starting node should be on a boundary. More...
 
MLWEM_EXPORT bool collectComponentFaceCut (WEMNode *node, std::vector< WEMNode * > &cNodes, std::vector< WEMFace * > &cFaces, WEMVector< WEMFaceCut > **faceCuts, unsigned int outerFlag, unsigned int intersectingFlag, bool visitedValue=true)
 Collects a connected component of a WEM, starting with a node. More...
 
MLWEM_EXPORT void collectComponentPrimitiveValueList (WEMPatch *wemPatch, WEMNode *node, WEMNodeVector &cNodes, WEMFaceVector &cFaces, WEMFaceVector &iFaces, WEMPrimitiveValueList *valueList, double valueRange, unsigned int connectedFlag, bool unvisitedValue=false)
 Collects a connected component of a WEMPatch, starting with a node. More...
 
MLWEM_EXPORT bool collectComponent (WEMPatch *wemPatch, WEMNodeVector &cNodes, bool unvisitedValue=false)
 Collects a connected component and stores the nodes in the given WEMNodeVector and returns whether a connected component was collected. More...
 
MLWEM_EXPORT void collectComponentPseudoGeodesicDistance (WEMPatch *wemPatch, WEMNode *node, WEMNodeVector &cNodes, double maxDistance, bool unvisitedValue=false)
 Collects all connected (node) components up to a given maximum distance which is measured as the sum of the lengths of the connecting edges. More...
 
MLWEM_EXPORT double getPathLengthBetweenNodes (WEMPatch *wemPatch, const std::vector< unsigned int > &nodeIndicesPath)
 Returns the sum of the lengths of the edges between the nodes given as indices in a given WEMPatch. More...
 

Detailed Description

The WEMConnectedComponent namespace.

provides one static method to collect all WEMNodes, starting. with a given WEMNode, of a connected component into a WEMNodeVector.

Typedef Documentation

◆ WEMFaceVector

Defines a vector of WEMFace pointers for temporary use.

Definition at line 30 of file WEMConnectedComponent.h.

◆ WEMNodeVector

Defines a vector of WEMNode pointers for temporary use.

Definition at line 27 of file WEMConnectedComponent.h.

Function Documentation

◆ collectComponent() [1/2]

MLWEM_EXPORT void ml::WEMConnectedComponent::collectComponent ( WEMPatch wemPatch,
WEMNode node,
WEMNodeVector cNodes,
bool  unvisitedValue = false 
)

Collects a connected component of a wemPatch, starting with a node.

The resulting nodes are collected in the cNodes vector. The unvisitedValue determines, which primitives (nodes) are marked as yet visited or not. The 'visited' status is encoded in the 'isTraversed' flag of the nodes.

◆ collectComponent() [2/2]

MLWEM_EXPORT bool ml::WEMConnectedComponent::collectComponent ( WEMPatch wemPatch,
WEMNodeVector cNodes,
bool  unvisitedValue = false 
)

Collects a connected component and stores the nodes in the given WEMNodeVector and returns whether a connected component was collected.

◆ collectComponentBoundary()

MLWEM_EXPORT void ml::WEMConnectedComponent::collectComponentBoundary ( WEMPatch wemPatch,
WEMNode node,
WEMNodeVector cNodes,
bool  unvisitedValue = false 
)

Same as 'collectComponent', but now the starting node should be on a boundary.

Only connected nodes which are on a boundary are collected in the cNodes vector.

◆ collectComponentEuclideanDistance()

MLWEM_EXPORT void ml::WEMConnectedComponent::collectComponentEuclideanDistance ( WEMPatch wemPatch,
WEMNode node,
WEMNodeVector cNodes,
double  maxDistance,
bool  unvisitedValue = false 
)

Same as 'collectComponent', but with an additional range parameter maxDistance.

The collection of a connected component stops if the nodes traversal state is not 'unvisited' OR if its euclidean distance to the starting node exceeds the maxDistance value.

◆ collectComponentFaceCut()

MLWEM_EXPORT bool ml::WEMConnectedComponent::collectComponentFaceCut ( WEMNode node,
std::vector< WEMNode * > &  cNodes,
std::vector< WEMFace * > &  cFaces,
WEMVector< WEMFaceCut > **  faceCuts,
unsigned int  outerFlag,
unsigned int  intersectingFlag,
bool  visitedValue = true 
)

Collects a connected component of a WEM, starting with a node.

The resulting nodes are collected in the cNodes and cFaces vectors. The visitedValue determines, which primitives (nodes) are marked as yet visited or not. The 'visited' status is encoded in the 'isTraversed' flag of the nodes. On return the common bool value for the given outerFlag is returned Additional checks are done on intersectingFlag

◆ collectComponentPrimitiveValueList()

MLWEM_EXPORT void ml::WEMConnectedComponent::collectComponentPrimitiveValueList ( WEMPatch wemPatch,
WEMNode node,
WEMNodeVector cNodes,
WEMFaceVector cFaces,
WEMFaceVector iFaces,
WEMPrimitiveValueList valueList,
double  valueRange,
unsigned int  connectedFlag,
bool  unvisitedValue = false 
)

Collects a connected component of a WEMPatch, starting with a node.

The resulting nodes are collected in the cNodes and cFaces vectors. The unvisitedValue determines, which primitives (nodes) are marked as yet visited or not. The 'visited' status is encoded in the 'isTraversed' flag of the nodes. Additional checks are done on connectedFlag.

◆ collectComponentPseudoGeodesicDistance()

MLWEM_EXPORT void ml::WEMConnectedComponent::collectComponentPseudoGeodesicDistance ( WEMPatch wemPatch,
WEMNode node,
WEMNodeVector cNodes,
double  maxDistance,
bool  unvisitedValue = false 
)

Collects all connected (node) components up to a given maximum distance which is measured as the sum of the lengths of the connecting edges.

This is a geodesic distance with an error due to the edge directions.

◆ getPathLengthBetweenNodes()

MLWEM_EXPORT double ml::WEMConnectedComponent::getPathLengthBetweenNodes ( WEMPatch wemPatch,
const std::vector< unsigned int > &  nodeIndicesPath 
)

Returns the sum of the lengths of the edges between the nodes given as indices in a given WEMPatch.