MeVisLab Toolbox Reference
|
Structure computes and holds all cluster information. For internal use. More...
#include <mlClusters.h>
Public Member Functions | |
Clusters () | |
~Clusters () | |
MLErrorCode | init (MLint extentX, MLint extentY, MLint extentZ) |
Initializes this clusters object and returns an error code. | |
void | calcClusterSizes (const ClusterUserDataParameters &userDataParameters) |
Calculates all cluster sizes and initializes the selection states of all clusters. | |
void | incrementClusterSize (MLuint currentClusterRef) |
Increments the cluster size of the given cluster reference. | |
MLuint | merge (MLuint currentClusterRef, MLuint neighborClusterRef) |
Merges the clusters with the given references and returns the reference id of the merged result which is the smaller reference id. | |
std::vector< ClusterInfo > | getClusterInfoList () const |
Returns the current cluster infos. | |
const ClusterInfo & | getClusterOfVoxel (MLint x, MLint y, MLint z) const |
Returns a cluster info of that voxel to get infos. | |
const ClusterInfo & | getClusterAt (MLuint rank) const |
Returns a cluster info for a given rank. | |
const ClusterInfo & | getBackgroundCluster () const |
Returns the background cluster. | |
MLuint | getClusterRef (MLint x, MLint y, MLint z) const |
Returns the reference id for the cluster at the given voxel position in the image. | |
void | setUserDataAtRank (MLuint rank, MLdouble userData) |
Sets the user data value to the cluster with the given rank. | |
MLuint | getNewReference (MLdouble imageValue) |
Returns a new reference id and eventually resizes (enlarges) the internal reference array. | |
void | setClusterRef (MLint xi, MLint yi, MLint zi, MLuint currentClusterRef) |
Sets a cluster reference id at a given voxel position. | |
void | setImageParameters (const PagedImage *inImage) |
Sets image parameters. | |
MLuint | getNumClusters () const |
Returns the number of clusters. | |
MLuint | getMaxRank () const |
Returns the maximum rank. | |
MLuint | getMaxClusterSize () const |
Returns the size in voxel of the largest cluster. | |
ImageVector | getImageExtent () const |
Returns the image extent of the input image. | |
const ImageVector & | getPageExtent () const |
Returns the page extent of the input image. | |
const Matrix4 & | getVoxelToWorldMatrix () const |
Returns the voxel-to-world matrix of the input image. | |
const Matrix4 & | getWorldToVoxeldMatrix () const |
Returns the world-to-voxel matrix of the input image. | |
MLdouble | getVoxelVolumeInMilliliters () const |
Returns the milliliter factor of one voxel. | |
MedicalImageProperties | getImageProperties () const |
Returns the whole image properties of the input image (with c,t,u set to 1, because only the first volume is handled). | |
MLuint | getRankOfSizeAt (MLint x, MLint y, MLint z) const |
Returns the rank at the given position, 0 for background. | |
void | setUse2DNeighborhood () |
Sets that this clusters were computed using a 2D neighborhood. | |
bool | isUsing2DNeighborhood () const |
Returns whether this clusters were computed using a 2D neighborhood. | |
Structure computes and holds all cluster information. For internal use.
Definition at line 28 of file mlClusters.h.
ml::Clusters::Clusters | ( | ) |
ml::Clusters::~Clusters | ( | ) |
void ml::Clusters::calcClusterSizes | ( | const ClusterUserDataParameters & | userDataParameters | ) |
Calculates all cluster sizes and initializes the selection states of all clusters.
const ClusterInfo & ml::Clusters::getBackgroundCluster | ( | ) | const |
Returns the background cluster.
const ClusterInfo & ml::Clusters::getClusterAt | ( | MLuint | rank | ) | const |
Returns a cluster info for a given rank.
std::vector< ClusterInfo > ml::Clusters::getClusterInfoList | ( | ) | const |
Returns the current cluster infos.
The cluster infos are be arranged by size in descending order. The vector size is the number of clusters found.
const ClusterInfo & ml::Clusters::getClusterOfVoxel | ( | MLint | x, |
MLint | y, | ||
MLint | z ) const |
Returns a cluster info of that voxel to get infos.
Returns the background cluster if the position is not within the image.
Returns the reference id for the cluster at the given voxel position in the image.
|
inline |
Returns the image extent of the input image.
Definition at line 84 of file mlClusters.h.
|
inline |
Returns the whole image properties of the input image (with c,t,u set to 1, because only the first volume is handled).
Definition at line 94 of file mlClusters.h.
MLuint ml::Clusters::getMaxClusterSize | ( | ) | const |
Returns the size in voxel of the largest cluster.
MLuint ml::Clusters::getMaxRank | ( | ) | const |
Returns the maximum rank.
Returns a new reference id and eventually resizes (enlarges) the internal reference array.
Sets up the new cluster's bounding box.
MLuint ml::Clusters::getNumClusters | ( | ) | const |
Returns the number of clusters.
|
inline |
Returns the page extent of the input image.
Definition at line 86 of file mlClusters.h.
Returns the rank at the given position, 0 for background.
Returns the voxel-to-world matrix of the input image.
Definition at line 88 of file mlClusters.h.
|
inline |
Returns the milliliter factor of one voxel.
Definition at line 92 of file mlClusters.h.
Returns the world-to-voxel matrix of the input image.
Definition at line 90 of file mlClusters.h.
Increments the cluster size of the given cluster reference.
MLErrorCode ml::Clusters::init | ( | MLint | extentX, |
MLint | extentY, | ||
MLint | extentZ ) |
Initializes this clusters object and returns an error code.
|
inline |
Returns whether this clusters were computed using a 2D neighborhood.
Definition at line 100 of file mlClusters.h.
Merges the clusters with the given references and returns the reference id of the merged result which is the smaller reference id.
Sets a cluster reference id at a given voxel position.
void ml::Clusters::setImageParameters | ( | const PagedImage * | inImage | ) |
Sets image parameters.
|
inline |
Sets that this clusters were computed using a 2D neighborhood.
Definition at line 98 of file mlClusters.h.
Sets the user data value to the cluster with the given rank.