MeVisLab Toolbox Reference
VesselEdge Class Reference

Class VesselEdge. More...

#include <mlVesselEdge.h>

Inheritance diagram for VesselEdge:
BaseGraphItem PropertyContainer

Public Member Functions

 VesselEdge (const VesselEdge &other)
 Copy constructor (creates an unconnected object, only copies properties), deprecated.
 
 ~VesselEdge () override
 Destructor.
 
void copyProperties (const VesselEdge *other)
 Copy all properties (topology information is left unchanged)
 
bool operator== (const VesselEdge &other) const
 
bool operator!= (const VesselEdge &other) const
 
void setSTLabel (Graph *pGraph)
 Set label of edge and the attached subtree defined by edge directions according to labels of pGraph.
 
bool markST (int a_label, float r, float g, float b, float a, Vector3 pos, int snap)
 Set label and rgb color of edge and the attached subtree defined by edge directions.
 
bool markEdge (int a_label, float r, float g, float b, float a, Vector3 pos, int snap)
 
Graph topology

Get the predecessor node of this edge.

VesselNodepredNode ()
 
const VesselNodepredNode () const
 
VesselNodesuccNode ()
 Get the successor node of this edge.
 
const VesselNodesuccNode () const
 
void setPred (VesselNode *node)
 Connect edge-head to node node.
 
void setSucc (VesselNode *node)
 Connect edge-tail to node node.
 
bool isPred (const VesselNode *node) const
 Is the graphNode the preceding node of the edge?
 
bool isSucc (const VesselNode *node) const
 Is the graphNode the succeeding node of the edge?
 
void switchDirection ()
 Change direction of the edge by exchanging pred. and succ. node.
 
void setCycle ()
 Separate circles in the graph or connections between trees.
 
void unsetCycle ()
 
bool isCycle () const
 
Graph geometry

Get the euclidean distance between the edge and vp.

Here: get the distance to the nearest skeleton voxel.

double distance (Vector3 vp) const
 
std::pair< MLdouble, size_tgetDistanceAndNearestSkeletonIndex (const Vector3 &pos) const
 
Vector3 extent () const
 Get the edge's extent.
 
SubImageBoxd getBoundingBox () const
 Bounding box of the edge.
 
void transform (const Matrix4 &m)
 Apply a 4x4 homogeneous transformation matrix to all skeleton positions.
 
void convertToVoxel (Matrix4 *mat)
 Convert all skeleton coordinates.
 
void convertToWorld (Matrix4 *mat)
 
Skeletons
SkeletoncreateSkeleton (const Vector3 &pos=Vector3(0), double minDistance=0.0, double maxDistance=0.0)
 
SkeletoncreateSkeleton (const ImageVector &pos, double minDistance=0.0, double maxDistance=0.0)
 
SkeletoncreateSkeleton (const Skeleton *skeletonTemplate)
 
void removeLeadingSkeletons (size_t count)
 
void removeTrailingSkeletons (size_t count)
 
void removeSkeleton (size_t index)
 
size_t numSkeletons (void) const
 
Skeletonskeleton (size_t index)
 
const Skeletonskeleton (size_t index) const
 
void skeletonsAscending (std::vector< Skeleton * > &skeletons)
 Return copy of skeletons' addresses in ascending order (graph hierarchy)
 
void skeletonsAscending (std::vector< const Skeleton * > &skeletons) const
 Return copy of skeletons' addresses in ascending order (graph hierarchy)
 
void skeletonsDescending (std::vector< Skeleton * > &skeletons)
 Return copy of skeletons' addresses in descending order (graph hierarchy)
 
void skeletonsDescending (std::vector< const Skeleton * > &skeletons) const
 Return copy of skeletons' addresses in descending order (graph hierarchy)
 
void orderSkeletonsAscending ()
 
void skeletonsAscending (std::vector< Skeleton > &skeletons) const
 Return copy of skeletons in ascending order (graph hierarchy from pred -> succ)
 
void skeletonsDescending (std::vector< Skeleton > &skeletons) const
 Return copy of skeletons in descending order (graph hierarchy from succ -> pred)
 
bool skeletonsAreAscending () const
 Returns if the skeletons are ordered ascending.
 
void clearSkeletons ()
 Encapsulate std::vector access.
 
SkeletonfrontSkeleton ()
 
SkeletonbackSkeleton ()
 
const SkeletonfrontSkeleton () const
 
const SkeletonbackSkeleton () const
 
Skeletonskeleton (Vector3 pos, int itemType)
 Get the skeleton with minimal distance to pos.
 
const Skeletonskeleton (Vector3 pos, int itemType) const
 Get the skeleton with minimal distance to pos.
 
size_t getVoxelNum () const
 Get number of edge voxels.
 
void smooth (unsigned int numSmoothingPasses, double positionSmoothingFactor, double radiusSmoothingFactor, double smoothingLimit=0.0f)
 Smooths the skeletons' positions and radii.
 
Persistence

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

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.
 
- 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 EdgeAnalyser
 
class Graph
 
class LoadTreeData
 

Default Measurements

typedef double(VesselEdge::* EdgeGetFkt) (void) const
 object bound function pointer: position of function relative to (individual) object base
 
typedef void(VesselEdge::* EdgeSetFkt) (double)
 function to set double parameter value
 
 STATIC_GRAPH_PROPERTY (MLdouble, averageMinDistance, AverageMinDistance)
 
 STATIC_GRAPH_PROPERTY (MLdouble, length, Length)
 
 STATIC_GRAPH_PROPERTY (MLdouble, STLength, STLength)
 
 STATIC_GRAPH_PROPERTY (MLdouble, volume, Volume)
 
 STATIC_GRAPH_PROPERTY (MLdouble, STVolume, STVolume)
 
 STATIC_GRAPH_PROPERTY (Vector3, STBarycenter, STBarycenter)
 
 STATIC_GRAPH_PROPERTY (MLint, hierarchy, Hierarchy)
 
 STATIC_GRAPH_PROPERTY (MLint, label, Label)
 
 STATIC_GRAPH_PROPERTY (MLdouble, weight, Weight)
 
void setSTLabel (int nLabel)
 Set label of edge and the attached subtree defined by edge directions.
 

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

Class VesselEdge.

Definition at line 34 of file mlVesselEdge.h.

Member Typedef Documentation

◆ EdgeGetFkt

typedef double(VesselEdge::* VesselEdge::EdgeGetFkt) (void) const

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

function to get double parameter value

Definition at line 117 of file mlVesselEdge.h.

◆ EdgeSetFkt

typedef void(VesselEdge::* VesselEdge::EdgeSetFkt) (double)

function to set double parameter value

Definition at line 118 of file mlVesselEdge.h.

Constructor & Destructor Documentation

◆ VesselEdge()

VesselEdge::VesselEdge ( const VesselEdge & other)

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

◆ ~VesselEdge()

VesselEdge::~VesselEdge ( )
override

Destructor.

Member Function Documentation

◆ addStateToTree()

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

◆ backSkeleton() [1/2]

Skeleton * VesselEdge::backSkeleton ( )
inline

Definition at line 173 of file mlVesselEdge.h.

◆ backSkeleton() [2/2]

const Skeleton * VesselEdge::backSkeleton ( ) const
inline

Definition at line 175 of file mlVesselEdge.h.

◆ clearSkeletons()

void VesselEdge::clearSkeletons ( )

Encapsulate std::vector access.

◆ convertToVoxel()

void VesselEdge::convertToVoxel ( Matrix4 * mat)

Convert all skeleton coordinates.

◆ convertToWorld()

void VesselEdge::convertToWorld ( Matrix4 * mat)

◆ copyProperties()

void VesselEdge::copyProperties ( const VesselEdge * other)

Copy all properties (topology information is left unchanged)

◆ createSkeleton() [1/3]

Skeleton * VesselEdge::createSkeleton ( const ImageVector & pos,
double minDistance = 0.0,
double maxDistance = 0.0 )
inline

Definition at line 129 of file mlVesselEdge.h.

References mlrange_cast().

◆ createSkeleton() [2/3]

Skeleton * VesselEdge::createSkeleton ( const Skeleton * skeletonTemplate)

◆ createSkeleton() [3/3]

Skeleton * VesselEdge::createSkeleton ( const Vector3 & pos = Vector3(0),
double minDistance = 0.0,
double maxDistance = 0.0 )

◆ distance()

double VesselEdge::distance ( Vector3 vp) const
inline

Definition at line 86 of file mlVesselEdge.h.

References mlrange_cast().

◆ extent()

Vector3 VesselEdge::extent ( ) const

Get the edge's extent.

◆ frontSkeleton() [1/2]

Skeleton * VesselEdge::frontSkeleton ( )
inline

Definition at line 172 of file mlVesselEdge.h.

◆ frontSkeleton() [2/2]

const Skeleton * VesselEdge::frontSkeleton ( ) const
inline

Definition at line 174 of file mlVesselEdge.h.

◆ getBoundingBox()

SubImageBoxd VesselEdge::getBoundingBox ( ) const

Bounding box of the edge.

◆ getDistanceAndNearestSkeletonIndex()

std::pair< MLdouble, size_t > VesselEdge::getDistanceAndNearestSkeletonIndex ( const Vector3 & pos) const

◆ getVoxelNum()

size_t VesselEdge::getVoxelNum ( ) const

Get number of edge voxels.

◆ isCycle()

bool VesselEdge::isCycle ( ) const
inline

Definition at line 79 of file mlVesselEdge.h.

◆ isPred()

bool VesselEdge::isPred ( const VesselNode * node) const
inline

Is the graphNode the preceding node of the edge?

Definition at line 69 of file mlVesselEdge.h.

◆ isSucc()

bool VesselEdge::isSucc ( const VesselNode * node) const
inline

Is the graphNode the succeeding node of the edge?

Definition at line 71 of file mlVesselEdge.h.

◆ markEdge()

bool VesselEdge::markEdge ( int a_label,
float r,
float g,
float b,
float a,
Vector3 pos,
int snap )

◆ markST()

bool VesselEdge::markST ( int a_label,
float r,
float g,
float b,
float a,
Vector3 pos,
int snap )

Set label and rgb color of edge and the attached subtree defined by edge directions.

Start at skeleton of this edge which is nearest to pos, while for snap = Graph::Node/Graph:Edge the nearest node skeleton or the nearest edge skeleton is used, respectively.

◆ ML_SET_ADDSTATE_VERSION()

VesselEdge::ML_SET_ADDSTATE_VERSION ( 3 )

Set current addStateToTree() version number:

◆ numSkeletons()

size_t VesselEdge::numSkeletons ( void ) const
inline

Definition at line 143 of file mlVesselEdge.h.

◆ operator!=()

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

Definition at line 50 of file mlVesselEdge.h.

References mlrange_cast().

◆ operator==()

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

◆ orderSkeletonsAscending()

void VesselEdge::orderSkeletonsAscending ( )

◆ predNode() [1/2]

VesselNode * VesselEdge::predNode ( )
inline

Definition at line 55 of file mlVesselEdge.h.

◆ predNode() [2/2]

const VesselNode * VesselEdge::predNode ( ) const
inline

Definition at line 56 of file mlVesselEdge.h.

◆ readStateFromTree()

void VesselEdge::readStateFromTree ( TreeNode * parent)
override

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

◆ removeLeadingSkeletons()

void VesselEdge::removeLeadingSkeletons ( size_t count)

◆ removeSkeleton()

void VesselEdge::removeSkeleton ( size_t index)

◆ removeTrailingSkeletons()

void VesselEdge::removeTrailingSkeletons ( size_t count)

◆ setCycle()

void VesselEdge::setCycle ( )
inline

Separate circles in the graph or connections between trees.

Definition at line 77 of file mlVesselEdge.h.

◆ setPred()

void VesselEdge::setPred ( VesselNode * node)

Connect edge-head to node node.

◆ setSTLabel() [1/2]

void VesselEdge::setSTLabel ( Graph * pGraph)

Set label of edge and the attached subtree defined by edge directions according to labels of pGraph.

◆ setSTLabel() [2/2]

void VesselEdge::setSTLabel ( int nLabel)

Set label of edge and the attached subtree defined by edge directions.

◆ setSucc()

void VesselEdge::setSucc ( VesselNode * node)

Connect edge-tail to node node.

◆ skeleton() [1/4]

Skeleton * VesselEdge::skeleton ( size_t index)
inline

Definition at line 144 of file mlVesselEdge.h.

◆ skeleton() [2/4]

const Skeleton * VesselEdge::skeleton ( size_t index) const
inline

Definition at line 145 of file mlVesselEdge.h.

◆ skeleton() [3/4]

Skeleton * VesselEdge::skeleton ( Vector3 pos,
int itemType )
inline

Get the skeleton with minimal distance to pos.

If itemType = Graph::node, the nearest end-skeleton (snap to node) is returned, if itemType = Graph::edge, it is the nearest edge skeleton.

Definition at line 180 of file mlVesselEdge.h.

References skeleton().

Referenced by skeleton().

◆ skeleton() [4/4]

const Skeleton * VesselEdge::skeleton ( Vector3 pos,
int itemType ) const

Get the skeleton with minimal distance to pos.

If itemType = Graph::node, the nearest end-skeleton (snap to node) is returned, if itemType = Graph::edge, it is the nearest edge skeleton.

◆ skeletonsAreAscending()

bool VesselEdge::skeletonsAreAscending ( ) const

Returns if the skeletons are ordered ascending.

◆ skeletonsAscending() [1/3]

void VesselEdge::skeletonsAscending ( std::vector< const Skeleton * > & skeletons) const

Return copy of skeletons' addresses in ascending order (graph hierarchy)

◆ skeletonsAscending() [2/3]

void VesselEdge::skeletonsAscending ( std::vector< Skeleton * > & skeletons)

Return copy of skeletons' addresses in ascending order (graph hierarchy)

◆ skeletonsAscending() [3/3]

void VesselEdge::skeletonsAscending ( std::vector< Skeleton > & skeletons) const

Return copy of skeletons in ascending order (graph hierarchy from pred -> succ)

◆ skeletonsDescending() [1/3]

void VesselEdge::skeletonsDescending ( std::vector< const Skeleton * > & skeletons) const

Return copy of skeletons' addresses in descending order (graph hierarchy)

◆ skeletonsDescending() [2/3]

void VesselEdge::skeletonsDescending ( std::vector< Skeleton * > & skeletons)

Return copy of skeletons' addresses in descending order (graph hierarchy)

◆ skeletonsDescending() [3/3]

void VesselEdge::skeletonsDescending ( std::vector< Skeleton > & skeletons) const

Return copy of skeletons in descending order (graph hierarchy from succ -> pred)

◆ smooth()

void VesselEdge::smooth ( unsigned int numSmoothingPasses,
double positionSmoothingFactor,
double radiusSmoothingFactor,
double smoothingLimit = 0.0f )

Smooths the skeletons' positions and radii.

No smoothing is done if a smoothing factor is 0 (or the number of smoothing passes = 0), smoothingLimit defines the maximal allowed displacement of skeletons (relative to minimal voxel extension), smoothingLimit = 0.0 means no limit.

◆ STATIC_GRAPH_PROPERTY() [1/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( MLdouble ,
averageMinDistance ,
AverageMinDistance  )

◆ STATIC_GRAPH_PROPERTY() [2/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( MLdouble ,
length ,
Length  )

◆ STATIC_GRAPH_PROPERTY() [3/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( MLdouble ,
STLength ,
STLength  )

◆ STATIC_GRAPH_PROPERTY() [4/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( MLdouble ,
STVolume ,
STVolume  )

◆ STATIC_GRAPH_PROPERTY() [5/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( MLdouble ,
volume ,
Volume  )

◆ STATIC_GRAPH_PROPERTY() [6/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( MLdouble ,
weight ,
Weight  )

◆ STATIC_GRAPH_PROPERTY() [7/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( MLint ,
hierarchy ,
Hierarchy  )

◆ STATIC_GRAPH_PROPERTY() [8/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( MLint ,
label ,
Label  )

◆ STATIC_GRAPH_PROPERTY() [9/9]

VesselEdge::STATIC_GRAPH_PROPERTY ( Vector3 ,
STBarycenter ,
STBarycenter  )

◆ succNode() [1/2]

VesselNode * VesselEdge::succNode ( )
inline

Get the successor node of this edge.

Definition at line 59 of file mlVesselEdge.h.

◆ succNode() [2/2]

const VesselNode * VesselEdge::succNode ( ) const
inline

Definition at line 60 of file mlVesselEdge.h.

◆ switchDirection()

void VesselEdge::switchDirection ( )

Change direction of the edge by exchanging pred. and succ. node.

◆ transform()

void VesselEdge::transform ( const Matrix4 & m)

Apply a 4x4 homogeneous transformation matrix to all skeleton positions.

◆ unsetCycle()

void VesselEdge::unsetCycle ( )
inline

Definition at line 78 of file mlVesselEdge.h.

Friends And Related Symbol Documentation

◆ EdgeAnalyser

Definition at line 36 of file mlVesselEdge.h.

◆ Graph

friend class Graph
friend

Definition at line 37 of file mlVesselEdge.h.

◆ LoadTreeData

friend class LoadTreeData
friend

Definition at line 38 of file mlVesselEdge.h.


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