MeVisLab Toolbox Reference
ml::UndirectedGraph Class Reference

Tags a Graph object to be handled as undirected graph containing VesselEdges. More...

#include <mlGraphToBoostUndirectedGraph.h>

Inheritance diagram for ml::UndirectedGraph:
Graph

Additional Inherited Members

Public Types inherited from Graph
enum  { node , edge }
enum  ActionType {
  NoAction =0 , LabelGraph , EditGraph , ModifyRoots ,
  ModifyNodesEdges , NewGraph , NumActionTypes
}
 Graph modification modes. Ordered from minor to mayor modifications. More...
typedef std::map< MLint, VesselNode * > NodeMap
 Internal node storage.
typedef boost::function< VesselNode *(const NodeMap::value_type &) > NodeAccess
 Helper function returning the VesselNode from a key/value pair of a NodeMap.
typedef boost::function< const VesselNode *(const NodeMap::value_type &) > ConstNodeAccess
 Helper function returning the VesselNode as const from a key/value pair of a NodeMap.
typedef boost::transform_iterator< NodeAccess, NodeMap::iterator > NodeIterator
 Iterator used to traverse nodes in a node map (returns data elements of the map instead of tuples).
typedef boost::transform_iterator< ConstNodeAccess, NodeMap::const_iterator > ConstNodeIterator
 Iterator used to traverse const nodes in a node map (returns data elements of the map instead of tuples).
typedef std::map< MLint, VesselEdge * > EdgeMap
 Internal edge storage.
typedef boost::function< VesselEdge *(const EdgeMap::value_type &) > EdgeAccess
 Helper function returning the VesselEdge from a key/value pair of a EdgeMap.
typedef boost::function< const VesselEdge *(const EdgeMap::value_type &) > ConstEdgeAccess
 Helper function returning the VesselEdge as const from a key/value pair of a EdgeMap.
typedef boost::transform_iterator< EdgeAccess, EdgeMap::iterator > EdgeIterator
 Iterator used to traverse edges in a edge map (returns data elements of the map instead of tuples).
typedef boost::transform_iterator< ConstEdgeAccess, EdgeMap::const_iterator > ConstEdgeIterator
 Iterator used to traverse const edges in a edge map (returns data elements of the map instead of tuples).
Public Member Functions inherited from Graph
MLint splitEdge (MLint edgeID, size_t skeletonIndex)
bool mergeEdges (VesselEdge *parent, VesselEdge *child)
int getNumCluster () const
bool getFlag () const
void setFlag (bool bFlag)
void closeSkeletonGaps ()
void clampToImage ()
void setRootIdToAllChildren ()
void purifyGraph ()
void removeOrphanNodes ()
 Remove nodes with no edges attached.
 Graph ()
 Default constructor.
 Graph (const Graph &g, bool reorder=false)
 Default copy constructor.
 Graph (const Graph &g, const VesselNode *root, bool reorder=false)
 Construct graph from tree in g.
 Graph (const Graph &g, const std::vector< const VesselNode * > &roots, bool reorder=false)
 Construct graph from trees in g.
 Graph (Graph &g, int clusterId, bool reorder=false)
 Construct graph from subgraph of g, defined by clusterId in g.
GraphdeepCopy () const override
 Implement generic deepCopy functionality using copy constructor.
 ~Graph () override
 Destructor.
VesselEdgecreateEdge (VesselNode *predNode, VesselNode *succNode, MLint useId=-1)
 Create a VesselEdge with unique id, add it to the Graph and Nodes and return a pointer to it.
VesselEdgecreateEdge (MLint predNodeId, MLint succNodeId, MLint useId=-1)
 Create a VesselEdge with unique id, add it to the Graph and Nodes identified by the respective IDs and return a pointer to it.
VesselNodecreateNode (const Vector3 &pos=Vector3(0), MLint useId=-1)
 Create a VesselNode with unique id, add it to the Graph and return a pointer to it.
VesselNodecreateNode (const ImageVector &pos, MLint useId=-1)
 Create a VesselNode with unique id, add it to the Graph and return a pointer to it.
void insertRoot (VesselNode *node)
 Insert a node to the list of root nodes.
void addGraph (const Graph &g)
 Add an entire graph to the current graph.
void addGraph (const Graph &g, std::map< const VesselNode *, VesselNode * > &nodeMapping, std::map< const VesselEdge *, VesselEdge * > &edgeMapping, std::map< const VesselNode *, VesselNode * > &rootMapping)
void addSubtrees (const std::vector< const VesselNode * > &roots)
 Add subtrees rooted at nodes roots to this graph.
void copyParts (const std::vector< const VesselNode * > &nodes, const std::vector< const VesselEdge * > &edges, const std::vector< const VesselNode * > &roots)
void copyParts (const std::vector< const VesselNode * > &nodes, const std::vector< const VesselEdge * > &edges, const std::vector< const VesselNode * > &roots, std::map< const VesselNode *, VesselNode * > &nodeMapping, std::map< const VesselEdge *, VesselEdge * > &edgeMapping, std::map< const VesselNode *, VesselNode * > &rootMapping)
bool removeEdge (VesselEdge *edge, bool removeEmptyNodes=true)
 Remove an edge from the graph.
bool removeNode (VesselNode *node)
 Remove a node from the graph.
void removeRoot (VesselNode *r)
 Remove a root from the graph.
void clearRoots ()
 Remove all roots that have been defined.
void clearGraph ()
 Remove all elements from the graph.
NodeIterator beginNode ()
 Provide iterator access to the begin of the node map.
NodeIterator endNode ()
 Provide iterator access to the end of the node map.
ConstNodeIterator beginNode () const
 Provide const iterator access to the begin of the node map.
ConstNodeIterator endNode () const
 Provide const iterator access to the end of the node map.
EdgeIterator beginEdge ()
 Provide iterator access to the begin of the edge map.
EdgeIterator endEdge ()
 Provide iterator access to the end of the edge map.
ConstEdgeIterator beginEdge () const
 Provide const iterator access to the begin of the edge map.
ConstEdgeIterator endEdge () const
 Provide const iterator access to the end of the edge map.
NodeIterator beginRoot ()
 Provide iterator access to the begin of the root map.
NodeIterator endRoot ()
 Provide iterator access to the end of the root map.
ConstNodeIterator beginRoot () const
 Provide const iterator access to the begin of the root map.
ConstNodeIterator endRoot () const
 Provide const iterator access to the end of the root map.
size_t numNodes () const
 Returns the number nodes in this graph.
size_t numEdges () const
 Returns the number edges in this graph.
size_t numRoots () const
 Returns the number roots in this graph.
const VesselNodegetIdNode (MLint id) const
 Get node with id id;.
VesselNodegetIdNode (MLint id)
 Get node with id id;.
const VesselEdgegetIdEdge (MLint id) const
 Get edge with id id.
VesselEdgegetIdEdge (MLint id)
 Get edge with id id.
const VesselNodegetNode (Vector3 pos) const
 Get the node with minimal distance to \cpos. Uses method distance() of node classes.
VesselNodegetNode (Vector3 pos)
 Get the node with minimal distance to \cpos. Uses method distance() of node classes.
const VesselEdgegetEdge (Vector3 pos) const
 Get the edge with minimal distance to \cpos. Uses method distance() of edge classes.
VesselEdgegetEdge (Vector3 pos)
 Get the edge with minimal distance to \cpos. Uses method distance() of edge classes.
const VesselNodegetRoot (Vector3 pos) const
 Get the root node with minimal distance to \cpos.
VesselNodegetRoot (Vector3 pos)
 Get the root node with minimal distance to \cpos.
const VesselNodegetNode (size_t index) const
VesselNodegetNode (size_t index)
const VesselEdgegetEdge (size_t index) const
VesselEdgegetEdge (size_t index)
const VesselNodegetRoot (size_t index) const
VesselNodegetRoot (size_t index)
size_t getIndex (const VesselNode *node) const
 Return the index of VesselNode node in the nodeMap or numNodes() if node was not found.
size_t getIndex (const VesselEdge *edge) const
 Return the index of VesselEdge edge in the edgeMap or numEdges() if edge was not found.
PropertyManager::Pointer getNodePropertyManager ()
PropertyManager::ConstPointer getNodePropertyManager () const
PropertyManager::Pointer getEdgePropertyManager ()
 Get access to the GraphPropertyManager for edges.
PropertyManager::ConstPointer getEdgePropertyManager () const
PropertyManager::Pointer getSkeletonPropertyManager ()
 Get access to the GraphPropertyManager for skeletons.
PropertyManager::ConstPointer getSkeletonPropertyManager () const
void transform (const Matrix4 &m)
void setToWorldMatrix (const Matrix4 *m)
 Set the conversion matrix for conversions from voxel to world coordinate.
void setToWorldMatrix (const Matrix4 &m)
 Set the conversion matrix for conversions from voxel to world coordinate.
const Matrix4 * getToWorldMatrix () const
 Get the conversion matrix for conversions from voxel to world coordinate.
void getToWorldMatrix (float *mat) const
 Get the conversion matrix for conversions from voxel to world coordinate.
Matrix4 getToVoxelMatrix () const
 Get the conversion matrix for conversions from world to voxel coordinate.
void setToWorld (void)
 Define all element coordinates to be in world coordinates (no conversion takes place).
void setToVoxel (void)
 Define all element coordinates to be in voxels coordinates (no conversion takes place).
bool isWorld () const
 Return whether element coordinates are given in voxel or world coordinates.
void worldVoxelConvert ()
 Convert all graph coordinates from the current coordinate system to the opposite.
void convertToVoxel (void)
void convertToWorld (void)
void setImgExt (ImageVector v)
ImageVector getImgExt () const
MLint extX () const
MLint extY () const
MLint extZ () const
void setVoxelExt (Vector3 v)
Vector3 getVoxelExt () const
Graphoperator= (const Graph &g)
 Clear current graph and build new one with props of g.
GraphnewGraph (bool unusedDeprecated=true) const
 Allocate new graph with same properties as this (slowly).
int separateGraph ()
bool directGraph (double FloodThresh)
void stripCycles ()
SubImageBoxd getBoundingBox () const
 Calculate graph's bounding box from edge-bounding-boxes.
void addStateToTree (TreeNode *parent) const override
 ML_SET_ADDSTATE_VERSION (3)
 Set current addStateToTree() version number:
void readStateFromTree (TreeNode *parent) override
 Reads the object state from the children of the given parent node.
int getVersion (void)
void setCurrentVersion (void)
 Set graph's version to persistent version number.
void setVersion (int version)
 Set version.
bool getUseBinaryPersistence ()
void useBinaryPersistence (bool use)
std::string toBinaryData () const
void fromBinaryData (const std::string &data)
 Reconstructs the graph using the binary data.
void setAction (ActionType action, std::string sender)
ActionType getActionValue (void) const
void setActionValue (ActionType action)
void setActionCallBack (GraphAction *cbObj)
static double getMinSkeletonLabel (void)
static double getMaxSkeletonLabel (void)
Protected Member Functions inherited from Graph
void _setRootIdToChildren (int rootId, VesselNode *node, VesselEdge *predEdge)
bool _isContainedInImageExtent (const Vector3 &pos, const Matrix4 &toVoxelMatrix)
Static Protected Member Functions inherited from Graph
template<typename ResultType, typename ParameterType>
static ResultType getSecond (const ParameterType &p)
Protected Attributes inherited from Graph
bool _isWorld
 Is the graph in world coordinates? Default is true.
Matrix4 _toWorldMatrix
 Matrix transform to get from voxel to world coordinates.
ImageVector _imgExt
 Extension of the image the graph is compiled from.
Vector3 _voxelExt
 Extension of a voxel of the image the graph is compiled from.
std::map< MLint, VesselNode * > _nodes
 Maps of graph items.
std::map< MLint, VesselEdge * > _edges
std::map< MLint, VesselNode * > _roots
bool _bFlag
 Flag for diverse usage.
int _numCluster
ActionType _action
GraphAction_actionCBObject
static double MIN_SKELETON_LABEL
static double MAX_SKELETON_LABEL

Detailed Description

Tags a Graph object to be handled as undirected graph containing VesselEdges.

Definition at line 40 of file mlGraphToBoostUndirectedGraph.h.


The documentation for this class was generated from the following file: