MeVisLab Toolbox Reference
mlGraphUtilities.h File Reference

Go to the source code of this file.

Functions

MLGRAPHUTILITIES_START_NAMESPACE MLGRAPHUTILITIES_EXPORT const VESSELGRAPH_NAMESPACE::VesselEdge * getConnectingEdge (const VESSELGRAPH_NAMESPACE::VesselNode &nodeA, const VESSELGRAPH_NAMESPACE::VesselNode &nodeB)
 Collection of utility functions for VesselGraphs. More...
 
MLGRAPHUTILITIES_EXPORT VESSELGRAPH_NAMESPACE::VesselEdge * getConnectingEdge (VESSELGRAPH_NAMESPACE::VesselNode &nodeA, VESSELGRAPH_NAMESPACE::VesselNode &nodeB)
 Find (first) connecting edge between start and next node by iterating over all depended edges of nodeA. More...
 
MLGRAPHUTILITIES_EXPORT void removeValency2Nodes (VESSELGRAPH_NAMESPACE::Graph &graph)
 Removes all nodes which are connected to exactly two different edges by merging those two edges. More...
 
MLGRAPHUTILITIES_EXPORT void resampleEdges (VESSELGRAPH_NAMESPACE::Graph &graph, double resolution)
 Create skeletons with a given resolution for all edges. More...
 
MLGRAPHUTILITIES_EXPORT std::vector< VESSELGRAPH_NAMESPACE::VesselNode * > findShortestPath (VESSELGRAPH_NAMESPACE::Graph *graph, VESSELGRAPH_NAMESPACE::VesselNode *startNode, VESSELGRAPH_NAMESPACE::VesselNode *endNode)
 Finds the shortest path in graph between startNode and endNode; since the graph is internally handled as undirected graph, the order of start and end node has no influence. More...
 
MLGRAPHUTILITIES_EXPORT std::vector< VESSELGRAPH_NAMESPACE::Skeleton * > findShortestPath (VESSELGRAPH_NAMESPACE::Graph *graph, const Vector3 &startPos, const Vector3 &endPos)
 Finds the shortest path in graph between start and end skeletons which are closest to the given start and end positions; It is based on the method findShortestPath(Graph* graph, VesselNode* startNode, VesselNode* endNode); The order of start and end skeleton has no influence, the resulting skeletons are given from the start to the end. More...
 
MLGRAPHUTILITIES_EXPORT void createLineSkeletonsOnEdge (VESSELGRAPH_NAMESPACE::VesselEdge &edge)
 Creates skeletons between the two nodes of a vessel edge, using Bresenham3D in voxel resolution. More...
 
MLGRAPHUTILITIES_EXPORT void createVesselVoxels (VESSELGRAPH_NAMESPACE::VesselEdge &edge)
 Creates vessel voxels for all skeletons of the given edge if the edge is a cone frustum or a cylinder and already has skeleton voxels. More...
 
MLGRAPHUTILITIES_EXPORT VESSELGRAPH_NAMESPACE::VesselNode * getNearestNode (Graph *graph, const Vector3 &position)
 
MLGRAPHUTILITIES_EXPORT VESSELGRAPH_NAMESPACE::Skeleton * getSmartSnapSkeleton (VESSELGRAPH_NAMESPACE::VesselEdge *selectedEdge, VESSELGRAPH_NAMESPACE::Skeleton *selectedSkeleton, size_t maxDistanceInSkeletons)
 Searches upwards in the tree for a skeleton within the given distance that either has a different label or is an end skeleton of the edge. More...
 

Function Documentation

◆ createLineSkeletonsOnEdge()

MLGRAPHUTILITIES_EXPORT void createLineSkeletonsOnEdge ( VESSELGRAPH_NAMESPACE::VesselEdge &  edge)

Creates skeletons between the two nodes of a vessel edge, using Bresenham3D in voxel resolution.

The minDistance of the two nodes is interpolated and set on the skeletons. This clears any existing skeletons.

◆ createVesselVoxels()

MLGRAPHUTILITIES_EXPORT void createVesselVoxels ( VESSELGRAPH_NAMESPACE::VesselEdge &  edge)

Creates vessel voxels for all skeletons of the given edge if the edge is a cone frustum or a cylinder and already has skeleton voxels.

◆ findShortestPath() [1/2]

MLGRAPHUTILITIES_EXPORT std::vector<VESSELGRAPH_NAMESPACE::Skeleton*> findShortestPath ( VESSELGRAPH_NAMESPACE::Graph *  graph,
const Vector3 &  startPos,
const Vector3 &  endPos 
)

Finds the shortest path in graph between start and end skeletons which are closest to the given start and end positions; It is based on the method findShortestPath(Graph* graph, VesselNode* startNode, VesselNode* endNode); The order of start and end skeleton has no influence, the resulting skeletons are given from the start to the end.

◆ findShortestPath() [2/2]

MLGRAPHUTILITIES_EXPORT std::vector<VESSELGRAPH_NAMESPACE::VesselNode*> findShortestPath ( VESSELGRAPH_NAMESPACE::Graph *  graph,
VESSELGRAPH_NAMESPACE::VesselNode *  startNode,
VESSELGRAPH_NAMESPACE::VesselNode *  endNode 
)

Finds the shortest path in graph between startNode and endNode; since the graph is internally handled as undirected graph, the order of start and end node has no influence.

◆ getConnectingEdge() [1/2]

MLGRAPHUTILITIES_START_NAMESPACE MLGRAPHUTILITIES_EXPORT const VESSELGRAPH_NAMESPACE::VesselEdge* getConnectingEdge ( const VESSELGRAPH_NAMESPACE::VesselNode &  nodeA,
const VESSELGRAPH_NAMESPACE::VesselNode &  nodeB 
)

Collection of utility functions for VesselGraphs.

Contains utility functions for VesselGraph objects, for example shortest path search. Find (first) connecting edge between start and next node by iterating over all depended edges of nodeA. Returns NULL in case that there is no connecting edge.

◆ getConnectingEdge() [2/2]

MLGRAPHUTILITIES_EXPORT VESSELGRAPH_NAMESPACE::VesselEdge* getConnectingEdge ( VESSELGRAPH_NAMESPACE::VesselNode &  nodeA,
VESSELGRAPH_NAMESPACE::VesselNode &  nodeB 
)

Find (first) connecting edge between start and next node by iterating over all depended edges of nodeA.

Returns NULL in case that there is no connecting edge. Non-const wrapper.

◆ getNearestNode()

MLGRAPHUTILITIES_EXPORT VESSELGRAPH_NAMESPACE::VesselNode* getNearestNode ( Graph graph,
const Vector3 &  position 
)

◆ getSmartSnapSkeleton()

MLGRAPHUTILITIES_EXPORT VESSELGRAPH_NAMESPACE::Skeleton* getSmartSnapSkeleton ( VESSELGRAPH_NAMESPACE::VesselEdge *  selectedEdge,
VESSELGRAPH_NAMESPACE::Skeleton *  selectedSkeleton,
size_t  maxDistanceInSkeletons 
)

Searches upwards in the tree for a skeleton within the given distance that either has a different label or is an end skeleton of the edge.

◆ removeValency2Nodes()

MLGRAPHUTILITIES_EXPORT void removeValency2Nodes ( VESSELGRAPH_NAMESPACE::Graph &  graph)

Removes all nodes which are connected to exactly two different edges by merging those two edges.

If necessary, edges will be flipped before the node is removed.

◆ resampleEdges()

MLGRAPHUTILITIES_EXPORT void resampleEdges ( VESSELGRAPH_NAMESPACE::Graph &  graph,
double  resolution 
)

Create skeletons with a given resolution for all edges.