MeVisLab Toolbox Reference
VesselNode Class Reference

VesselNode is derived from GraphNode, hence it can be stored as node item in a class Graph object. More...

#include <mlVesselNode.h>

Inheritance diagram for VesselNode:
BaseGraphItem PropertyContainer

Public Member Functions

 ~VesselNode () override
 Destructor.
 
void copyProperties (const VesselNode *other)
 Copy all properties (topology information is left unchanged)
 
bool operator== (const VesselNode &other) const
 
bool operator!= (const VesselNode &other) const
 
Graph geometry
 STATIC_GRAPH_PROPERTY (Vector3, pos, Pos)
 
void setVectorPos (const ImageVector &position)
 Position in world.
 
ImageVector getVectorPos () const
 Position in world.
 
double distance (const Vector3 &position) const
 Get the euclidean distance between _worldPos and pos.
 
void transform (const Matrix4 &m)
 Apply a 4x4 homogeneous transformation matrix to the node position.
 
void convertToVoxel (Matrix4 *mat)
 Convert nodes' coordinates.
 
void convertToWorld (Matrix4 *mat)
 Convert nodes' coordinates.
 
Persistence

Attaches the object state as children of the given parent node.

void addStateToTree (TreeNode *parent) const override
 
 ML_SET_ADDSTATE_VERSION (2)
 Set current addStateToTree() version number:
 
void readStateFromTree (TreeNode *parent) override
 Reads the object state from the children of the given parent node.
 
- Public Member Functions inherited from BaseGraphItem
MLint getRootId () const
 Get root id.
 
void setRootId (MLint rootId)
 Sets the root id. Usually called by calling setRootIdToAllChildren on the graph itself.
 
GraphgetGraph (void)
 
const GraphgetGraph (void) const
 
MLint getId (void) const
 Get unique id of the object.
 
- Public Member Functions inherited from PropertyContainer
 PropertyContainer (const ManagerPointer &manager)
 
 PropertyContainer (const PropertyContainer &other)
 
 ~PropertyContainer () override
 
bool operator== (const PropertyContainer &other) const
 Check for equality (managers and values).
 
bool operator!= (const PropertyContainer &other) const
 Check for inequality (managers and values).
 
void copyProperties (const PropertyContainer &other)
 Copy all properties from the given container to this object.
 
const PropertyManagergetPropertyManager () const
 Get read-only access to the associated property manager.
 
PropertyManagergetPropertyManager ()
 Get access to the associated property manager.
 
PropertyMap getPropertyMap () const
 Get a map of the contained properties, can be useful for comparison.
 
size_t numberOfProperties () const
 Return the number of properties currently available.
 
const PropertyValueproperty (size_t index) const
 Get the property with index index as PropertyValue.
 
template<typename T >
Tproperty (size_t index)
 Get the property with index index with type T. Throws boost::bad_get exception if the currently stored property has a different type.
 
template<typename T >
const Tproperty (size_t index) const
 Get the property with index index with type T, const version. Throws boost::bad_get exception if the currently stored property has a different type.
 
const PropertyValueproperty (const std::string &name) const
 Get the property with name name.
 
template<typename T >
Tproperty (const std::string &name)
 
template<typename T >
const Tproperty (const std::string &name) const
 
virtual void reset ()
 Set all properties to default values.
 
 ML_ABSTRACT_CLASS_HEADER (PropertyContainer)
 
void addStateToTree (TreeNode *parent) const override
 
 ML_SET_ADDSTATE_VERSION (1)
 Set current addStateToTree() version number:
 
void readStateFromTree (TreeNode *parent) override
 Reads the object state from the children of the given parent node.
 

Friends

class Graph
 
class VesselEdge
 
class LoadTreeData
 

Properties

typedef MLdouble(VesselNode::* NodeGetFkt) () const
 object bound function pointer: position of function relative to (individual) object base
 
typedef void(VesselNode::* NodeSetFkt) (const MLdouble &)
 function to set double parameter value
 
 STATIC_GRAPH_PROPERTY (MLint, label, Label)
 
 STATIC_GRAPH_PROPERTY (MLdouble, minDistance, MinDistance)
 
 STATIC_GRAPH_PROPERTY (MLdouble, maxPathLength, MaxPathLength)
 
 STATIC_GRAPH_PROPERTY (MLdouble, weight, Weight)
 Weight of the node.
 

Graph topology

Erase/add edge pointer in the local edge array _edges.

bool isRoot () const
 
bool isEnd () const
 
bool isBranch () const
 
int nodeType () const
 
size_t getEdgeNum () const
 Get number of edges dependent on the node.
 
VesselEdgegetDepEdge (size_t i)
 Get the pointer of edge with index i.
 
const VesselEdgegetDepEdge (size_t i) const
 Get the pointer of edge with index i.
 
std::vector< VesselEdge * > * edges ()
 Get pointer to edge array.
 
VesselNodegetDepNode (size_t i)
 Get dependent node via edge with index i.
 
const VesselNodegetDepNode (size_t i) const
 Get dependent node via edge with index i.
 
bool isPred (size_t i) const
 Is the dependent edge with index i preceding?
 
bool isSucc (size_t i) const
 Is the dependent edge with index i succeeding?
 
bool isCycle (size_t i) const
 Is the dependent edge with index i a cycle?
 
bool closeCycle ()
 TODO: Unclear what this does.
 
VesselNodegetPredNode ()
 Get the one and only predecessor node (return NULL for rootnode)
 
const VesselNodegetPredNode () const
 Get the one and only predecessor node (return NULL for rootnode)
 
VesselEdgegetPredEdge ()
 Get the one and only predecessor edge (return NULL for rootnode)
 
const VesselEdgegetPredEdge () const
 Get the one and only predecessor edge (return NULL for rootnode)
 

Additional Inherited Members

- Public Types inherited from PropertyContainer
typedef PropertyManager::Pointer ManagerPointer
 
typedef PropertyManager::ConstPointer ConstManagerPointer
 
typedef PropertyManager::PropertyMap PropertyMap
 
- Protected Member Functions inherited from BaseGraphItem
 BaseGraphItem (Graph &graph, MLint id, const ManagerPointer &manager)
 Constructor.
 
 BaseGraphItem (const BaseGraphItem &item)
 Copy constructor (creates an unconnected object, only copies properties), deprecated.
 
BaseGraphItemoperator= (const BaseGraphItem &item)
 Assignment operator, deprecated. Use copyProperties() instead.
 
void copyProperties (const BaseGraphItem *other)
 Copy all properties (topology information is left unchanged)
 
bool operator== (const BaseGraphItem &other) const
 Compare properties (ignores topology information)
 
bool operator!= (const BaseGraphItem &other) const
 
void addStateToTree (TreeNode *parent) const override
 
 ML_SET_ADDSTATE_VERSION (2)
 Set current addStateToTree() version number:
 
void readStateFromTree (TreeNode *parent) override
 Reads the object state from the children of the given parent node.
 
- Protected Attributes inherited from BaseGraphItem
Graph_graph
 Reference to the owner Graph object.
 
- Protected Attributes inherited from PropertyContainer
std::vector< PropertyValue_values
 
ManagerPointer _manager
 

Detailed Description

VesselNode is derived from GraphNode, hence it can be stored as node item in a class Graph object.

class VesselNode

Definition at line 28 of file mlVesselNode.h.

Member Typedef Documentation

◆ NodeGetFkt

typedef MLdouble(VesselNode::* VesselNode::NodeGetFkt) () const

object bound function pointer: position of function relative to (individual) object base

function to get double parameter value

Definition at line 118 of file mlVesselNode.h.

◆ NodeSetFkt

typedef void(VesselNode::* VesselNode::NodeSetFkt) (const MLdouble &)

function to set double parameter value

Definition at line 119 of file mlVesselNode.h.

Constructor & Destructor Documentation

◆ ~VesselNode()

VesselNode::~VesselNode ( )
inlineoverride

Destructor.

Definition at line 36 of file mlVesselNode.h.

References mlrange_cast().

Member Function Documentation

◆ addStateToTree()

void VesselNode::addStateToTree ( TreeNode * parent) const
override

◆ closeCycle()

bool VesselNode::closeCycle ( )

TODO: Unclear what this does.

◆ convertToVoxel()

void VesselNode::convertToVoxel ( Matrix4 * mat)

Convert nodes' coordinates.

◆ convertToWorld()

void VesselNode::convertToWorld ( Matrix4 * mat)

Convert nodes' coordinates.

◆ copyProperties()

void VesselNode::copyProperties ( const VesselNode * other)

Copy all properties (topology information is left unchanged)

◆ distance()

double VesselNode::distance ( const Vector3 & position) const
inline

Get the euclidean distance between _worldPos and pos.

Used for node selection in a scene.

Definition at line 95 of file mlVesselNode.h.

◆ edges()

std::vector< VesselEdge * > * VesselNode::edges ( )
inline

Get pointer to edge array.

Definition at line 59 of file mlVesselNode.h.

◆ getDepEdge() [1/2]

VesselEdge * VesselNode::getDepEdge ( size_t i)
inline

Get the pointer of edge with index i.

Definition at line 55 of file mlVesselNode.h.

References mlrange_cast().

◆ getDepEdge() [2/2]

const VesselEdge * VesselNode::getDepEdge ( size_t i) const
inline

Get the pointer of edge with index i.

Definition at line 57 of file mlVesselNode.h.

References mlrange_cast().

◆ getDepNode() [1/2]

VesselNode * VesselNode::getDepNode ( size_t i)

Get dependent node via edge with index i.

◆ getDepNode() [2/2]

const VesselNode * VesselNode::getDepNode ( size_t i) const

Get dependent node via edge with index i.

◆ getEdgeNum()

size_t VesselNode::getEdgeNum ( ) const
inline

Get number of edges dependent on the node.

Definition at line 53 of file mlVesselNode.h.

◆ getPredEdge() [1/2]

VesselEdge * VesselNode::getPredEdge ( )

Get the one and only predecessor edge (return NULL for rootnode)

◆ getPredEdge() [2/2]

const VesselEdge * VesselNode::getPredEdge ( ) const

Get the one and only predecessor edge (return NULL for rootnode)

◆ getPredNode() [1/2]

VesselNode * VesselNode::getPredNode ( )

Get the one and only predecessor node (return NULL for rootnode)

◆ getPredNode() [2/2]

const VesselNode * VesselNode::getPredNode ( ) const

Get the one and only predecessor node (return NULL for rootnode)

◆ getVectorPos()

ImageVector VesselNode::getVectorPos ( ) const
inline

Position in world.

Definition at line 91 of file mlVesselNode.h.

◆ isBranch()

bool VesselNode::isBranch ( ) const

◆ isCycle()

bool VesselNode::isCycle ( size_t i) const
inline

Is the dependent edge with index i a cycle?

Definition at line 70 of file mlVesselNode.h.

References mlrange_cast().

◆ isEnd()

bool VesselNode::isEnd ( ) const

◆ isPred()

bool VesselNode::isPred ( size_t i) const
inline

Is the dependent edge with index i preceding?

Definition at line 66 of file mlVesselNode.h.

References mlrange_cast().

◆ isRoot()

bool VesselNode::isRoot ( ) const

◆ isSucc()

bool VesselNode::isSucc ( size_t i) const
inline

Is the dependent edge with index i succeeding?

Definition at line 68 of file mlVesselNode.h.

References mlrange_cast().

◆ ML_SET_ADDSTATE_VERSION()

VesselNode::ML_SET_ADDSTATE_VERSION ( 2 )

Set current addStateToTree() version number:

◆ nodeType()

int VesselNode::nodeType ( ) const

◆ operator!=()

bool VesselNode::operator!= ( const VesselNode & other) const
inline

Definition at line 42 of file mlVesselNode.h.

References mlrange_cast().

◆ operator==()

bool VesselNode::operator== ( const VesselNode & other) const

◆ readStateFromTree()

void VesselNode::readStateFromTree ( TreeNode * parent)
override

Reads the object state from the children of the given parent node.

◆ setVectorPos()

void VesselNode::setVectorPos ( const ImageVector & position)
inline

Position in world.

Definition at line 89 of file mlVesselNode.h.

◆ STATIC_GRAPH_PROPERTY() [1/5]

VesselNode::STATIC_GRAPH_PROPERTY ( MLdouble ,
maxPathLength ,
MaxPathLength  )

◆ STATIC_GRAPH_PROPERTY() [2/5]

VesselNode::STATIC_GRAPH_PROPERTY ( MLdouble ,
minDistance ,
MinDistance  )

◆ STATIC_GRAPH_PROPERTY() [3/5]

VesselNode::STATIC_GRAPH_PROPERTY ( MLdouble ,
weight ,
Weight  )

Weight of the node.

May be used to direct the graph by attaching edges to the root-node in a weighted order. Default is 1.0.

◆ STATIC_GRAPH_PROPERTY() [4/5]

VesselNode::STATIC_GRAPH_PROPERTY ( MLint ,
label ,
Label  )

◆ STATIC_GRAPH_PROPERTY() [5/5]

VesselNode::STATIC_GRAPH_PROPERTY ( Vector3 ,
pos ,
Pos  )

◆ transform()

void VesselNode::transform ( const Matrix4 & m)

Apply a 4x4 homogeneous transformation matrix to the node position.

Friends And Related Symbol Documentation

◆ Graph

friend class Graph
friend

Definition at line 30 of file mlVesselNode.h.

◆ LoadTreeData

friend class LoadTreeData
friend

Definition at line 32 of file mlVesselNode.h.

◆ VesselEdge

Definition at line 31 of file mlVesselNode.h.


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