MeVisLab Toolbox Reference
ml::SimilarIntensitiesClusterAlgorithm< DATATYPE > Class Template Reference

Implementation of a SimilarIntensities clustering algorithm. More...

#include <mlSimilarIntensitiesClusterAlgorithm.h>

Inheritance diagram for ml::SimilarIntensitiesClusterAlgorithm< DATATYPE >:
ml::ClusterAlgorithm< DATATYPE, SimilarIntensitiesClusterAlgorithm< DATATYPE > > ml::ClusterAlgorithmBase

Public Member Functions

 SimilarIntensitiesClusterAlgorithm (const ComputeClusterParameters &parameters, Clusters *clusters)
 
ML_FORCE_INLINE bool isInTolerance (DATATYPE neighborValue, DATATYPE currentValue)
 Tolerance calculation for scalar images. More...
 
- Public Member Functions inherited from ml::ClusterAlgorithm< DATATYPE, SimilarIntensitiesClusterAlgorithm< DATATYPE > >
 ClusterAlgorithm (const ComputeClusterParameters &parameters, Clusters *clusters)
 Constructor to be used. More...
 
MLErrorCode runClustering ()
 
MLErrorCode processSlice (MLint zi, const ImageVector &inputImageExtent, TSubImage< MLint8 > &inMaskSlice)
 
- Public Member Functions inherited from ml::ClusterAlgorithmBase
 ClusterAlgorithmBase (const ComputeClusterParameters &parameters, Clusters *clusters)
 Constructor to be used. More...
 
virtual ~ClusterAlgorithmBase ()
 Default virtual destructor. More...
 
bool hasResults () const
 Returns whether getCluster() and getClusterOfVoxel() contains cluster data. More...
 

Static Public Member Functions

static ML_FORCE_INLINE DATATYPE getVoxel (void *position)
 Get the typed voxel value for current position. More...
 
static ML_FORCE_INLINE MLdouble getVoxelAsDouble (void *)
 

Additional Inherited Members

- Public Types inherited from ml::ClusterAlgorithm< DATATYPE, SimilarIntensitiesClusterAlgorithm< DATATYPE > >
typedef DATATYPE ClusterVoxelType
 The used type of the voxels, needed by derived classes. More...
 
- Protected Types inherited from ml::ClusterAlgorithmBase
enum  { _NR_OF_SUBIMAGES = 2 }
 We do not load the whole image into memory, only keep two slices at once. More...
 
- Protected Member Functions inherited from ml::ClusterAlgorithm< DATATYPE, SimilarIntensitiesClusterAlgorithm< DATATYPE > >
MLuint updateClusterRefForNeighbor (void *neighborVoxelPtr, MLint x, MLint y, MLint z, DATATYPE currentValue, MLuint currentClusterRef)
 Checks if neighbor at position x,y,z belongs to the same cluster given by currentClusterRef. More...
 
MLErrorCode calcClustersForSlices ()
 Template applying cluster calculations for one slice. More...
 
- Protected Member Functions inherited from ml::ClusterAlgorithmBase
void setInSliceVoxelType (MLDataType dt)
 Sets voxel type of input slices. More...
 
void freeInSliceData ()
 Releases memory of input image slices. More...
 
void storeNextSlice (SubImage &slice)
 Sets next image data, expects the data to be managed by memory manager. More...
 
MLErrorCode loadNextSlice (MLint sliceNr, const ImageVector &inImgExt)
 Gets next image data. More...
 
MLErrorCode loadMaskSlice (TSubImage< MLint8 > &slice, MLint sliceNr, const ImageVector &inImgExt) const
 Gets current slice of the mask image. More...
 
MLuint mergeClusterReference (MLint x, MLint y, MLint z, MLuint currClusterRef)
 Merges a cluster reference currClusterRef for position (x,y,z). More...
 
void setResultFlag (bool result)
 Sets internal result flag to result. More...
 
- Static Protected Member Functions inherited from ml::ClusterAlgorithm< DATATYPE, SimilarIntensitiesClusterAlgorithm< DATATYPE > >
static DATATYPE convertBackgroundValue (MLdouble backgroundValue)
 
- Protected Attributes inherited from ml::ClusterAlgorithmBase
enum ml::ClusterAlgorithmBase:: { ... }  NumInImagesEnum
 We do not load the whole image into memory, only keep two slices at once. More...
 
Clusters_clusters
 Result clusters. More...
 
SubImage _currentSlices [_NR_OF_SUBIMAGES]
 do not load the whole image into memory, only keep two slices at once More...
 
ComputeClusterParameters _parameters
 

Detailed Description

template<typename DATATYPE>
class ml::SimilarIntensitiesClusterAlgorithm< DATATYPE >

Implementation of a SimilarIntensities clustering algorithm.

It uses internally two data structures. One (class ClusterRefVolume) holds references for every image voxel to a field of cluster informations (here ClusterRefCollection). For every image voxel will be checked whether it belongs to the background or if not, if it has neighbors with a similar gray value. Merging adjacent cluster is done within ClusterRefCollection.

Definition at line 30 of file mlSimilarIntensitiesClusterAlgorithm.h.

Constructor & Destructor Documentation

◆ SimilarIntensitiesClusterAlgorithm()

template<typename DATATYPE >
ml::SimilarIntensitiesClusterAlgorithm< DATATYPE >::SimilarIntensitiesClusterAlgorithm ( const ComputeClusterParameters parameters,
Clusters clusters 
)
inline

Definition at line 34 of file mlSimilarIntensitiesClusterAlgorithm.h.

Member Function Documentation

◆ getVoxel()

template<typename DATATYPE >
static ML_FORCE_INLINE DATATYPE ml::SimilarIntensitiesClusterAlgorithm< DATATYPE >::getVoxel ( void *  position)
inlinestatic

Get the typed voxel value for current position.

Definition at line 40 of file mlSimilarIntensitiesClusterAlgorithm.h.

◆ getVoxelAsDouble()

template<typename DATATYPE >
static ML_FORCE_INLINE MLdouble ml::SimilarIntensitiesClusterAlgorithm< DATATYPE >::getVoxelAsDouble ( void *  )
inlinestatic

Definition at line 45 of file mlSimilarIntensitiesClusterAlgorithm.h.

◆ isInTolerance()

template<typename DATATYPE >
ML_FORCE_INLINE bool ml::SimilarIntensitiesClusterAlgorithm< DATATYPE >::isInTolerance ( DATATYPE  neighborValue,
DATATYPE  currentValue 
)
inline

Tolerance calculation for scalar images.

Definition at line 53 of file mlSimilarIntensitiesClusterAlgorithm.h.


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