23#include <boost/shared_ptr.hpp>
105 void computeBoundingBoxes();
115 bool _using2DNeighborhood;
#define MLCLUSTERALGORITHM_EXPORT
Holds basic information about a cluster.
Class for handling cluster references.
A stack of slices where each entry encodes an id of a ClusterRef.
Structure computes and holds all cluster information. For internal use.
const Matrix4 & getWorldToVoxeldMatrix() const
Returns the world-to-voxel matrix of the input image.
MLuint merge(MLuint currentClusterRef, MLuint neighborClusterRef)
Merges the clusters with the given references and returns the reference id of the merged result which...
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
Returns the reference id for the cluster at the given voxel position in the image.
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)
Calculates all cluster sizes and initializes the selection states of all clusters.
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)
Returns a new reference id and eventually resizes (enlarges) the internal reference array.
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
Returns a cluster info of that voxel to get infos.
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.
This class encapsulates basic medical image properties:
Class which represents an image, which manages properties of an image and image data which is located...
MLint32 MLErrorCode
Type of an ML Error code.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Cluster user data parameters.