23#include <boost/shared_ptr.hpp>
105 void computeBoundingBoxes();
115 bool _using2DNeighborhood;
#define MLCLUSTERALGORITHM_EXPORT
Class for handling cluster references.
const Matrix4 & getWorldToVoxeldMatrix() const
Returns the world-to-voxel matrix of the input image.
MLuint merge(MLuint currentClusterRef, MLuint neighborClusterRef)
MedicalImageProperties getImageProperties() const
Returns the whole image properties of the input image (with c,t,u set to 1, because only the first vo...
std::vector< ClusterInfo > getClusterInfoList() const
Returns the current cluster infos.
MLuint getClusterRef(MLint x, MLint y, MLint z) const
const ImageVector & getPageExtent() const
Returns the page extent of the input image.
MLdouble getVoxelVolumeInMilliliters() const
Returns the milliliter factor of one voxel.
bool isUsing2DNeighborhood() const
Returns whether this clusters were computed using a 2D neighborhood.
void calcClusterSizes(const ClusterUserDataParameters &userDataParameters)
void setImageParameters(const PagedImage *inImage)
Sets image parameters.
void setUserDataAtRank(MLuint rank, MLdouble userData)
Sets the user data value to the cluster with the given rank.
MLuint getRankOfSizeAt(MLint x, MLint y, MLint z) const
Returns the rank at the given position, 0 for background.
MLuint getNewReference(MLdouble imageValue)
MLErrorCode init(MLint extentX, MLint extentY, MLint extentZ)
Initializes this clusters object and returns an error code.
const ClusterInfo & getBackgroundCluster() const
Returns the background cluster.
MLuint getMaxClusterSize() const
Returns the size in voxel of the largest cluster.
const ClusterInfo & getClusterAt(MLuint rank) const
Returns a cluster info for a given rank.
const Matrix4 & getVoxelToWorldMatrix() const
Returns the voxel-to-world matrix of the input image.
void setUse2DNeighborhood()
Sets that this clusters were computed using a 2D neighborhood.
void setClusterRef(MLint xi, MLint yi, MLint zi, MLuint currentClusterRef)
Sets a cluster reference id at a given voxel position.
const ClusterInfo & getClusterOfVoxel(MLint x, MLint y, MLint z) const
ImageVector getImageExtent() const
Returns the image extent of the input image.
MLuint getMaxRank() const
Returns the maximum rank.
MLuint getNumClusters() const
Returns the number of clusters.
void incrementClusterSize(MLuint currentClusterRef)
Increments the cluster size of the given cluster reference.
MLint32 MLErrorCode
Type of an ML Error code.
Tmat4< MLdouble > Matrix4
The standard 4x4 matrix of type double.
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.
Cluster user data parameters.