13 #ifndef ML_VESSEL_NODE_H
14 #define ML_VESSEL_NODE_H
32 friend class LoadTreeData;
36 #if ML_DEPRECATED_SINCE(3,5,0)
43 #if ML_DEPRECATED_SINCE(3,5,0)
68 std::vector<VesselEdge*>*
edges() {
return &_edges; }
75 bool isPred(
size_t i)
const {
return _edges[i]->succNode()==
this; }
77 bool isSucc(
size_t i)
const {
return _edges[i]->predNode()==
this; }
79 bool isCycle(
size_t i)
const {
return _edges[i]->isCycle(); }
104 double distance(
const Vector3& position)
const {
return (position - getPos()).length(); }
144 std::vector<VesselEdge*> _edges;
168 void readOldGraphNodeStateFromTree(TreeNode* parent);
170 void readOldVesselNodeStateFromTree(TreeNode* parent);
175 #if ML_DEPRECATED_SINCE(3,5,0)
BaseGraphItem & operator=(const BaseGraphItem &item)
Assignment operator, deprecated. Use copyProperties() instead.
Defines the basic Graph class which holds sets of nodes, edges and roots to model tubular structures ...
VesselNode is derived from GraphNode, hence it can be stored as node item in a class Graph object.
bool isPred(size_t i) const
Is the dependent edge with index i preceding?
void convertToWorld(Matrix4 *mat)
Convert nodes' coordinates.
~VesselNode() override
Copy constructor (creates an unconnected object, only copies properties), deprecated.
const VesselEdge * getDepEdge(size_t i) const
Get the pointer of edge with index i.
VesselNode * getPredNode()
Get the one and only predecessor node (return NULL for rootnode)
void copyProperties(const VesselNode *other)
Assignment operator, deprecated. Use copyProperties() instead.
void readStateFromTree(TreeNode *parent) override
Reads the object state from the children of the given parent node.
STATIC_GRAPH_PROPERTY(MLdouble, minDistance, MinDistance)
STATIC_GRAPH_PROPERTY(Vector3, pos, Pos)
bool isSucc(size_t i) const
Is the dependent edge with index i succeeding?
std::vector< VesselEdge * > * edges()
Get pointer to edge array.
size_t getEdgeNum() const
Get number of edges dependent on the node.
void setVectorPos(const ImageVector &position)
Position in world.
bool closeCycle()
TODO: Unclear what this does.
const VesselNode * getPredNode() const
Get the one and only predecessor node (return NULL for rootnode)
void transform(const Matrix4 &m)
Apply a 4x4 homogeneous transformation matrix to the node position.
bool operator==(const VesselNode &other) const
STATIC_GRAPH_PROPERTY(MLint, label, Label)
ImageVector getVectorPos() const
Position in world.
ML_SET_ADDSTATE_VERSION(2)
Set current addStateToTree() version number:
VesselEdge * getDepEdge(size_t i)
Get the pointer of edge with index i.
STATIC_GRAPH_PROPERTY(MLdouble, maxPathLength, MaxPathLength)
const VesselEdge * getPredEdge() const
Get the one and only predecessor edge (return NULL for rootnode)
VesselEdge * getPredEdge()
Get the one and only predecessor edge (return NULL for rootnode)
VesselNode * getDepNode(size_t i)
Get dependent node via edge with index i.
bool isCycle(size_t i) const
Is the dependent edge with index i a cycle?
double distance(const Vector3 &position) const
Get the euclidean distance between _worldPos and pos.
void convertToVoxel(Matrix4 *mat)
Convert nodes' coordinates.
void addStateToTree(TreeNode *parent) const override
const VesselNode * getDepNode(size_t i) const
Get dependent node via edge with index i.
STATIC_GRAPH_PROPERTY(MLdouble, weight, Weight)
Weight of the node.
bool operator!=(const VesselNode &other) const
#define ML_ABSTRACT_CLASS_HEADER(className)
Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol.
#define STATIC_GRAPH_PROPERTY(Type, lowerCaseName, upperCaseName)
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
#define VESSELGRAPH_END_NAMESPACE
#define VESSELGRAPH_EXPORT
Definiert systemspezifische Macros, die f"ur diese DLL gelten sollen.
#define VESSELGRAPH_BEGIN_NAMESPACE
Tmat4< MLdouble > Matrix4
The standard 4x4 matrix of type double.
Tvec3< MLdouble > Vector3
A vector with 3 components of type double.
TImageVector< MLint > ImageVector
Defines the standard ImageVector type which is used by the ML for indexing and coordinates.