MeVisLab Toolbox Reference
ml::ClusterAlgorithmBase Class Reference

Interface class for clustering algorithms. More...

#include <mlClusterAlgorithm.h>

Inheritance diagram for ml::ClusterAlgorithmBase:
ml::ClusterAlgorithm< const void *, SimilarVectorDirectionsClusterAlgorithm > ml::ClusterAlgorithm< DATATYPE, SimilarIntensitiesClusterAlgorithm< DATATYPE > > ml::ClusterAlgorithm< DATATYPE, IdenticalIntensitiesClusterAlgorithm< DATATYPE > > ml::ClusterAlgorithm< CLUSTERVOXELTYPE, DerivedAlgorithm > ml::SimilarVectorDirectionsClusterAlgorithm ml::SimilarIntensitiesClusterAlgorithm< DATATYPE > ml::IdenticalIntensitiesClusterAlgorithm< DATATYPE >

Public Member Functions

 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...
 

Protected Types

enum  { _NR_OF_SUBIMAGES = 2 }
 We do not load the whole image into memory, only keep two slices at once. More...
 

Protected Member Functions

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...
 

Protected Attributes

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
 

Friends

template<typename CLUSTERVOXELTYPE , typename DerivedAlgorithm >
class ClusterHandler
 

Detailed Description

Interface class for clustering algorithms.

Definition at line 146 of file mlClusterAlgorithm.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

We do not load the whole image into memory, only keep two slices at once.

Enumerator
_NR_OF_SUBIMAGES 

Definition at line 165 of file mlClusterAlgorithm.h.

Constructor & Destructor Documentation

◆ ClusterAlgorithmBase()

ml::ClusterAlgorithmBase::ClusterAlgorithmBase ( const ComputeClusterParameters parameters,
Clusters clusters 
)

Constructor to be used.

◆ ~ClusterAlgorithmBase()

virtual ml::ClusterAlgorithmBase::~ClusterAlgorithmBase ( )
virtual

Default virtual destructor.

Member Function Documentation

◆ freeInSliceData()

void ml::ClusterAlgorithmBase::freeInSliceData ( )
protected

Releases memory of input image slices.

◆ hasResults()

bool ml::ClusterAlgorithmBase::hasResults ( ) const
inline

Returns whether getCluster() and getClusterOfVoxel() contains cluster data.

Definition at line 160 of file mlClusterAlgorithm.h.

◆ loadMaskSlice()

MLErrorCode ml::ClusterAlgorithmBase::loadMaskSlice ( TSubImage< MLint8 > &  slice,
MLint  sliceNr,
const ImageVector inImgExt 
) const
protected

Gets current slice of the mask image.

◆ loadNextSlice()

MLErrorCode ml::ClusterAlgorithmBase::loadNextSlice ( MLint  sliceNr,
const ImageVector inImgExt 
)
protected

Gets next image data.

◆ mergeClusterReference()

MLuint ml::ClusterAlgorithmBase::mergeClusterReference ( MLint  x,
MLint  y,
MLint  z,
MLuint  currClusterRef 
)
protected

Merges a cluster reference currClusterRef for position (x,y,z).

◆ setInSliceVoxelType()

void ml::ClusterAlgorithmBase::setInSliceVoxelType ( MLDataType  dt)
protected

Sets voxel type of input slices.

◆ setResultFlag()

void ml::ClusterAlgorithmBase::setResultFlag ( bool  result)
inlineprotected

Sets internal result flag to result.

Definition at line 186 of file mlClusterAlgorithm.h.

◆ storeNextSlice()

void ml::ClusterAlgorithmBase::storeNextSlice ( SubImage slice)
protected

Sets next image data, expects the data to be managed by memory manager.

Friends And Related Function Documentation

◆ ClusterHandler

template<typename CLUSTERVOXELTYPE , typename DerivedAlgorithm >
friend class ClusterHandler
friend

Definition at line 205 of file mlClusterAlgorithm.h.

Member Data Documentation

◆ _clusters

Clusters* ml::ClusterAlgorithmBase::_clusters
protected

Result clusters.

Definition at line 189 of file mlClusterAlgorithm.h.

◆ _currentSlices

SubImage ml::ClusterAlgorithmBase::_currentSlices[_NR_OF_SUBIMAGES]
protected

do not load the whole image into memory, only keep two slices at once

Definition at line 192 of file mlClusterAlgorithm.h.

◆ _parameters

ComputeClusterParameters ml::ClusterAlgorithmBase::_parameters
protected

Definition at line 194 of file mlClusterAlgorithm.h.

◆ 

enum { ... } ml::ClusterAlgorithmBase::NumInImagesEnum

We do not load the whole image into memory, only keep two slices at once.


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