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. More...
 
 ~VesselEdge () override
 Destructor. More...
 
void copyProperties (const VesselEdge *other)
 Copy all properties (topology information is left unchanged) More...
 
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. More...
 
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. More...
 
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. More...
 
const VesselNodesuccNode () const
 
void setPred (VesselNode *node)
 Connect edge-head to node node. More...
 
void setSucc (VesselNode *node)
 Connect edge-tail to node node. More...
 
bool isPred (const VesselNode *node) const
 Is the graphNode the preceding node of the edge? More...
 
bool isSucc (const VesselNode *node) const
 Is the graphNode the succeeding node of the edge? More...
 
void switchDirection ()
 Change direction of the edge by exchanging pred. and succ. node. More...
 
void setCycle ()
 Separate circles in the graph or connections between trees. More...
 
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_t > getDistanceAndNearestSkeletonIndex (const Vector3 &pos) const
 
Vector3 extent () const
 Get the edge's extent. More...
 
SubImageBoxd getBoundingBox () const
 Bounding box of the edge. More...
 
void transform (const Matrix4 &m)
 Apply a 4x4 homogeneous transformation matrix to all skeleton positions. More...
 
void convertToVoxel (Matrix4 *mat)
 Convert all skeleton coordinates. More...
 
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) More...
 
void skeletonsAscending (std::vector< const Skeleton * > &skeletons) const
 Return copy of skeletons' addresses in ascending order (graph hierarchy) More...
 
void skeletonsDescending (std::vector< Skeleton * > &skeletons)
 Return copy of skeletons' addresses in descending order (graph hierarchy) More...
 
void skeletonsDescending (std::vector< const Skeleton * > &skeletons) const
 Return copy of skeletons' addresses in descending order (graph hierarchy) More...
 
void orderSkeletonsAscending ()
 
void skeletonsAscending (std::vector< Skeleton > &skeletons) const
 Return copy of skeletons in ascending order (graph hierarchy from pred -> succ) More...
 
void skeletonsDescending (std::vector< Skeleton > &skeletons) const
 Return copy of skeletons in descending order (graph hierarchy from succ -> pred) More...
 
bool skeletonsAreAscending () const
 Returns if the skeletons are ordered ascending. More...
 
void clearSkeletons ()
 Encapsulate std::vector access. More...
 
SkeletonfrontSkeleton ()
 
SkeletonbackSkeleton ()
 
const SkeletonfrontSkeleton () const
 
const SkeletonbackSkeleton () const
 
Skeletonskeleton (Vector3 pos, int itemType)
 Get the skeleton with minimal distance to pos. More...
 
const Skeletonskeleton (Vector3 pos, int itemType) const
 Get the skeleton with minimal distance to pos. More...
 
size_t getVoxelNum () const
 Get number of edge voxels. More...
 
void smooth (unsigned int numSmoothingPasses, double positionSmoothingFactor, double radiusSmoothingFactor, double smoothingLimit=0.0f)
 Smooths the skeletons' positions and radii. More...
 
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: 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 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 More...
 
typedef void(VesselEdge::* EdgeSetFkt) (double)
 function to set double parameter value More...
 
 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. 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

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.

◆ 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.

◆ 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 ( )

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.

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

◆ EdgeAnalyser

friend class EdgeAnalyser
friend

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: