28 #include <boost/shared_ptr.hpp>
77 size_t getVoxelNum()
const {
return _vesselCoordinates.size()+1; }
90 std::vector<Vector3> _vesselCoordinates;
111 void setRGBA(
float r,
float g,
float b,
float a ) {
119 for (
size_t i=0; i<4; ++i ) { _colorRGBA[i] = rgba[i]; }
122 void getRGBA(
float* r,
float* g,
float* b,
float* a )
const {
148 static bool _copyVesselVoxels;
Defines the basic Graph class which holds sets of nodes, edges and roots to model tubular structures ...
ML_ABSTRACT_CLASS_HEADER(PropertyContainer)
boost::intrusive_ptr< type > Pointer
Skeleton objects represent centerline voxels stored in a VesselEdge object.
STATIC_GRAPH_PROPERTY(double, label, Label)
STATIC_GRAPH_PROPERTY(MLuint64, enumLabel, EnumLabel)
label to enumerate the skeleton within a graph. not enumerated value is 0. not persistent.
STATIC_GRAPH_PROPERTY(double, freeLabel, FreeLabel)
static void setCopyVesselVoxelsDefault(void)
STATIC_GRAPH_PROPERTY(double, distanceLabel, DistanceLabel)
void copyProperties(const Skeleton *other)
bool operator==(const Skeleton &other) const
void readStateFromTree(TreeNode *parent) override
Reads the object state from the children of the given parent node.
static void setCopyVesselVoxels(bool flag)
Set global parameter for skeleton copy.
Skeleton(const PropertyManager::Pointer &manager, const Vector3 &pos=Vector3(0), double minDistance=0, double maxDistance=0)
Constructor.
void addVesselPos(const ImageVector &v)
size_t numVesselPos() const
STATIC_CASTED_GRAPH_PROPERTY(LABELTYPE, MLuint64, labelType, LabelType)
const Vector3 & vesselPos(size_t index) const
Skeleton(const Skeleton &other)
Copy Constructor.
Vector3 & vesselPos(size_t index)
ML_SET_ADDSTATE_VERSION(5)
Set current addStateToTree() version number:
void addVesselPos(const Vector3 &position)
Skeleton & operator=(const Skeleton &other)
ImageVector vesselVoxelPos(size_t index)
void addStateToTree(TreeNode *parent) const override
Attaches the object state as children of the given parent node.
bool operator!=(const Skeleton &other) const
void setRGBA(float r, float g, float b, float a)
STATIC_GRAPH_PROPERTY(double, area, Area)
void setRGBA(float *rgba)
void getRGBA(float *r, float *g, float *b, float *a) const
size_t getVoxelNum() const
Get number of edge voxels.
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)
#define STATIC_GRAPH_PROPERTY(Type, lowerCaseName, upperCaseName)
UINT64 MLuint64
Introduce platform-independent 64-bit unsigned integer type.
#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 three components of type double.
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.