MeVisLab Toolbox Reference
WEMConnectedComponent.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
17 
18 ML_START_NAMESPACE
19 
24 namespace WEMConnectedComponent
25 {
27  typedef std::vector<WEMNode*> WEMNodeVector;
28 
30  typedef std::vector<WEMFace*> WEMFaceVector;
31 
36  MLWEM_EXPORT void collectComponent(WEMPatch* wemPatch, WEMNode* node, WEMNodeVector& cNodes, bool unvisitedValue = false);
37 
41  MLWEM_EXPORT void collectComponentEuclideanDistance(WEMPatch* wemPatch, WEMNode* node, WEMNodeVector& cNodes, double maxDistance, bool unvisitedValue = false);
42 
46  MLWEM_EXPORT void collectComponentBoundary(WEMPatch* wemPatch, WEMNode* node, WEMNodeVector& cNodes, bool unvisitedValue = false);
47 
55  std::vector<WEMNode *>& cNodes,
56  std::vector<WEMFace *>& cFaces,
57  WEMVector<WEMFaceCut> **faceCuts,
58  unsigned int outerFlag,
59  unsigned int intersectingFlag,
60  bool visitedValue = true);
61 
68  WEMNode* node,
69  WEMNodeVector& cNodes,
70  WEMFaceVector& cFaces,
71  WEMFaceVector& iFaces,
72  WEMPrimitiveValueList* valueList,
73  double valueRange,
74  unsigned int connectedFlag,
75  bool unvisitedValue = false);
76 
78  MLWEM_EXPORT bool collectComponent(WEMPatch* wemPatch, WEMNodeVector& cNodes, bool unvisitedValue = false);
79 
82  MLWEM_EXPORT void collectComponentPseudoGeodesicDistance(WEMPatch* wemPatch, WEMNode* node, WEMNodeVector& cNodes, double maxDistance, bool unvisitedValue = false);
83 
85  MLWEM_EXPORT double getPathLengthBetweenNodes(WEMPatch* wemPatch, const std::vector<unsigned int>& nodeIndicesPath);
86 };
87 
88 ML_END_NAMESPACE
#define MLWEM_EXPORT
Definition: MLWEMSystem.h:18
Defines the mesh component: node.
Definition: WEMNode.h:33
Base class for triangle and quad patches.
Definition: WEMPatch.h:48
Stores a value list where the values are associated to primitives (WEMNode, WEMEdge,...
Dynamic templated vector.
Definition: WEMVector.h:28
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.
std::vector< WEMNode * > WEMNodeVector
Defines a vector of WEMNode pointers for temporary use.
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.
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.
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 ...
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.
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 ...
std::vector< WEMFace * > WEMFaceVector
Defines a vector of WEMFace pointers for temporary use.
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.