MeVisLab Toolbox Reference
ml::ClusterInfo Class Reference

Holds basic information about a cluster. More...

#include <mlClusterInfo.h>

Inheritance diagram for ml::ClusterInfo:
ml::ClusterRefType

Public Member Functions

 ClusterInfo ()
 Default constructor.
 
virtual ~ClusterInfo ()
 Default destructor.
 
ML_FORCE_INLINE MLuint getId () const
 Returns a unique id; default is 0.
 
ML_FORCE_INLINE MLuint numVoxels () const
 Returns the cluster size in voxel; default is 0.
 
ML_FORCE_INLINE MLuint rank () const
 Returns the rank of the cluster size compared to the other clusters; default is 0.
 
ML_FORCE_INLINE MLdouble userData () const
 Returns the user data value.
 
ML_FORCE_INLINE void setUserData (MLdouble userData)
 Sets the user data.
 
ML_FORCE_INLINE MLdouble imageValue () const
 Returns the image value associated with this cluster.
 
ML_FORCE_INLINE void setImageValue (MLdouble imageValue)
 Sets the image value associated with this cluster.
 
ML_FORCE_INLINE void addPositionToBoundingBox (MLint x, MLint y, MLint z)
 Adds the given position to this cluster's bounding box.
 
ML_FORCE_INLINE Vector3 getBoundingBoxMin () const
 Returns the min bounding box position.
 
ML_FORCE_INLINE Vector3 getBoundingBoxMax () const
 Returns the max bounding box position.
 

Protected Attributes

MLuint _indexId
 Unique cluster id; default is 0.
 
MLuint _numVoxels
 Cluster size in voxel; default is 0.
 
MLuint _rank
 Rank of the cluster size compared to other cluster; default is 0.
 
MLdouble _userData
 User data, by default its value is set to the rank or original voxel value.
 
MLdouble _imageValue
 Image value, only meaningful if Identical Intensities is used in the clustering algorithm.
 
ClusterBoundingBox _boundingBox
 

Detailed Description

Holds basic information about a cluster.

The class provides a basic interface to get access to the basic properties of a cluster. One will have to derive from this base class to be able to write data to the members! It does not seem necessary to define virtual methods for that reason, because a derived class might grant public access to the algorithm implementation class. Since this class contains only simple data types no copy constructor nor assignment operator are defined. There are also no overloads for comparison operators. Only a specialization for std::less exists, which can be used in conjunction with std::sort.

Definition at line 73 of file mlClusterInfo.h.

Constructor & Destructor Documentation

◆ ClusterInfo()

ml::ClusterInfo::ClusterInfo ( )
inline

Default constructor.

Definition at line 78 of file mlClusterInfo.h.

◆ ~ClusterInfo()

virtual ml::ClusterInfo::~ClusterInfo ( )
inlinevirtual

Default destructor.

Declared virtual because ClusterInfo is meant to be a base class.

Definition at line 89 of file mlClusterInfo.h.

Member Function Documentation

◆ addPositionToBoundingBox()

ML_FORCE_INLINE void ml::ClusterInfo::addPositionToBoundingBox ( MLint x,
MLint y,
MLint z )
inline

Adds the given position to this cluster's bounding box.

Definition at line 117 of file mlClusterInfo.h.

◆ getBoundingBoxMax()

ML_FORCE_INLINE Vector3 ml::ClusterInfo::getBoundingBoxMax ( ) const
inline

Returns the max bounding box position.

Definition at line 121 of file mlClusterInfo.h.

◆ getBoundingBoxMin()

ML_FORCE_INLINE Vector3 ml::ClusterInfo::getBoundingBoxMin ( ) const
inline

Returns the min bounding box position.

Definition at line 119 of file mlClusterInfo.h.

◆ getId()

ML_FORCE_INLINE MLuint ml::ClusterInfo::getId ( ) const
inline

Returns a unique id; default is 0.

Default is 0 (only value not unique). Must be set by the algorithm class.

Definition at line 94 of file mlClusterInfo.h.

Referenced by ml::less::operator()().

◆ imageValue()

ML_FORCE_INLINE MLdouble ml::ClusterInfo::imageValue ( ) const
inline

Returns the image value associated with this cluster.

Definition at line 112 of file mlClusterInfo.h.

◆ numVoxels()

ML_FORCE_INLINE MLuint ml::ClusterInfo::numVoxels ( ) const
inline

Returns the cluster size in voxel; default is 0.

Must be set by the algorithm class.

Definition at line 98 of file mlClusterInfo.h.

Referenced by ml::less::operator()().

◆ rank()

ML_FORCE_INLINE MLuint ml::ClusterInfo::rank ( ) const
inline

Returns the rank of the cluster size compared to the other clusters; default is 0.

Rank 1 means the biggest cluster. Must be set by the algorithm class.

Definition at line 104 of file mlClusterInfo.h.

◆ setImageValue()

ML_FORCE_INLINE void ml::ClusterInfo::setImageValue ( MLdouble imageValue)
inline

Sets the image value associated with this cluster.

Definition at line 114 of file mlClusterInfo.h.

◆ setUserData()

ML_FORCE_INLINE void ml::ClusterInfo::setUserData ( MLdouble userData)
inline

Sets the user data.

Definition at line 109 of file mlClusterInfo.h.

◆ userData()

ML_FORCE_INLINE MLdouble ml::ClusterInfo::userData ( ) const
inline

Returns the user data value.

Definition at line 107 of file mlClusterInfo.h.

Member Data Documentation

◆ _boundingBox

ClusterBoundingBox ml::ClusterInfo::_boundingBox
protected

Definition at line 142 of file mlClusterInfo.h.

◆ _imageValue

MLdouble ml::ClusterInfo::_imageValue
protected

Image value, only meaningful if Identical Intensities is used in the clustering algorithm.

Definition at line 140 of file mlClusterInfo.h.

◆ _indexId

MLuint ml::ClusterInfo::_indexId
protected

Unique cluster id; default is 0.

Definition at line 127 of file mlClusterInfo.h.

◆ _numVoxels

MLuint ml::ClusterInfo::_numVoxels
protected

Cluster size in voxel; default is 0.

Definition at line 130 of file mlClusterInfo.h.

◆ _rank

MLuint ml::ClusterInfo::_rank
protected

Rank of the cluster size compared to other cluster; default is 0.

Rank 1 means the biggest cluster

Definition at line 134 of file mlClusterInfo.h.

◆ _userData

MLdouble ml::ClusterInfo::_userData
protected

User data, by default its value is set to the rank or original voxel value.

Definition at line 137 of file mlClusterInfo.h.


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