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
 Copy constructor (creates an unconnected object, only copies properties), deprecated. More...
 
void copyProperties (const VesselNode *other)
 Assignment operator, deprecated. Use copyProperties() instead. More...
 
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. More...
 
ImageVector getVectorPos () const
 Position in world. More...
 
double distance (const Vector3 &position) const
 Get the euclidean distance between _worldPos and pos. More...
 
void transform (const Matrix4 &m)
 Apply a 4x4 homogeneous transformation matrix to the node position. More...
 
void convertToVoxel (Matrix4 *mat)
 Convert nodes' coordinates. More...
 
void convertToWorld (Matrix4 *mat)
 Convert nodes' coordinates. More...
 
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: More...
 
void readStateFromTree (TreeNode *parent) override
 Reads the object state from the children of the given parent node. More...
 
- Public Member Functions inherited from BaseGraphItem
MLint getRootId () const
 Get root id. More...
 
void setRootId (MLint rootId)
 Sets the root id. Usually called by calling setRootIdToAllChildren on the graph itself. More...
 
GraphgetGraph (void)
 
const GraphgetGraph (void) const
 
MLint getId (void) const
 Get unique id of the object. More...
 
- 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). More...
 
bool operator!= (const PropertyContainer &other) const
 Check for inequality (managers and values). More...
 
void copyProperties (const PropertyContainer &other)
 Copy all properties from the given container to this object. More...
 
const PropertyManagergetPropertyManager () const
 Get read-only access to the associated property manager. More...
 
PropertyManagergetPropertyManager ()
 Get access to the associated property manager. More...
 
PropertyMap getPropertyMap () const
 Get a map of the contained properties, can be useful for comparison. More...
 
size_t numberOfProperties () const
 Return the number of properties currently available. More...
 
const PropertyValueproperty (size_t index) const
 Get the property with index index as PropertyValue. More...
 
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. More...
 
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. More...
 
const PropertyValueproperty (const std::string &name) const
 Get the property with name name. More...
 
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. More...
 
 ML_ABSTRACT_CLASS_HEADER (PropertyContainer)
 
void addStateToTree (TreeNode *parent) const override
 
 ML_SET_ADDSTATE_VERSION (1)
 Set current addStateToTree() version number: More...
 
void readStateFromTree (TreeNode *parent) override
 Reads the object state from the children of the given parent node. More...
 

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 More...
 
typedef void(VesselNode::* NodeSetFkt) (const MLdouble &)
 function to set double parameter value More...
 
 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. More...
 

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. More...
 
VesselEdgegetDepEdge (size_t i)
 Get the pointer of edge with index i. More...
 
const VesselEdgegetDepEdge (size_t i) const
 Get the pointer of edge with index i. More...
 
std::vector< VesselEdge * > * edges ()
 Get pointer to edge array. More...
 
VesselNodegetDepNode (size_t i)
 Get dependent node via edge with index i. More...
 
const VesselNodegetDepNode (size_t i) const
 Get dependent node via edge with index i. More...
 
bool isPred (size_t i) const
 Is the dependent edge with index i preceding? More...
 
bool isSucc (size_t i) const
 Is the dependent edge with index i succeeding? More...
 
bool isCycle (size_t i) const
 Is the dependent edge with index i a cycle? More...
 
bool closeCycle ()
 TODO: Unclear what this does. More...
 
VesselNodegetPredNode ()
 Get the one and only predecessor node (return NULL for rootnode) More...
 
const VesselNodegetPredNode () const
 Get the one and only predecessor node (return NULL for rootnode) More...
 
VesselEdgegetPredEdge ()
 Get the one and only predecessor edge (return NULL for rootnode) More...
 
const VesselEdgegetPredEdge () const
 Get the one and only predecessor edge (return NULL for rootnode) More...
 

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. More...
 
 BaseGraphItem (const BaseGraphItem &item)
 Copy constructor (creates an unconnected object, only copies properties), deprecated. More...
 
BaseGraphItemoperator= (const BaseGraphItem &item)
 Assignment operator, deprecated. Use copyProperties() instead. More...
 
void copyProperties (const BaseGraphItem *other)
 Copy all properties (topology information is left unchanged) More...
 
bool operator== (const BaseGraphItem &other) const
 Compare properties (ignores topology information) More...
 
bool operator!= (const BaseGraphItem &other) const
 
void addStateToTree (TreeNode *parent) const override
 
 ML_SET_ADDSTATE_VERSION (2)
 Set current addStateToTree() version number: More...
 
void readStateFromTree (TreeNode *parent) override
 Reads the object state from the children of the given parent node. More...
 
- Protected Attributes inherited from BaseGraphItem
Graph_graph
 Reference to the owner Graph object. More...
 
- 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 127 of file mlVesselNode.h.

◆ NodeSetFkt

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

function to set double parameter value

Definition at line 128 of file mlVesselNode.h.

Constructor & Destructor Documentation

◆ ~VesselNode()

VesselNode::~VesselNode ( )
inlineoverride

Copy constructor (creates an unconnected object, only copies properties), deprecated.

Destructor.

Definition at line 40 of file mlVesselNode.h.

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)

Assignment operator, deprecated. Use copyProperties() instead.

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 104 of file mlVesselNode.h.

◆ edges()

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

Get pointer to edge array.

Definition at line 68 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 64 of file mlVesselNode.h.

◆ getDepEdge() [2/2]

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

Get the pointer of edge with index i.

Definition at line 66 of file mlVesselNode.h.

◆ 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 62 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 100 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 79 of file mlVesselNode.h.

◆ 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 75 of file mlVesselNode.h.

◆ 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 77 of file mlVesselNode.h.

◆ ML_SET_ADDSTATE_VERSION()

VesselNode::ML_SET_ADDSTATE_VERSION ( )

Set current addStateToTree() version number:

◆ nodeType()

int VesselNode::nodeType ( ) const

◆ operator!=()

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

Definition at line 51 of file mlVesselNode.h.

◆ 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 98 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 Function 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

friend class VesselEdge
friend

Definition at line 31 of file mlVesselNode.h.


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