MeVisLab Toolbox Reference
ml::ClusterAlgorithmBase Class Reference

Interface class for clustering algorithms. More...

#include <mlClusterAlgorithm.h>

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

Public Member Functions

 ClusterAlgorithmBase (const ComputeClusterParameters &parameters, Clusters *clusters)
 Constructor to be used.
virtual ~ClusterAlgorithmBase ()
 Default virtual destructor.
bool hasResults () const

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.
void freeInSliceData ()
 Releases memory of input image slices.
void storeNextSlice (SubImage &slice)
 Sets next image data, expects the data to be managed by memory manager.
MLErrorCode loadNextSlice (MLint sliceNr, const ImageVector &inImgExt)
 Gets next image data.
MLErrorCode loadMaskSlice (TSubImage< MLint8 > &slice, MLint sliceNr, const ImageVector &inImgExt) const
 Gets current slice of the mask image.
MLuint mergeClusterReference (MLint x, MLint y, MLint z, MLuint currClusterRef)
 Merges a cluster reference currClusterRef for position (x,y,z).
void setResultFlag (bool result)
 Sets internal result flag to result.

Protected Attributes

enum ml::ClusterAlgorithmBase:: { ... }  NumInImagesEnum
 We do not load the whole image into memory, only keep two slices at once.
Clusters_clusters
 Result clusters.
SubImage _currentSlices [_NR_OF_SUBIMAGES]
 do not load the whole image into memory, only keep two slices at once
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 )

◆ ~ClusterAlgorithmBase()

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

Default virtual destructor.

Member Function Documentation

◆ freeInSliceData()

void ml::ClusterAlgorithmBase::freeInSliceData ( )
protected

◆ 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

◆ loadNextSlice()

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

◆ mergeClusterReference()

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

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

Referenced by ml::ClusterVoxelType<, SimilarVectorDirectionsClusterAlgorithm >::updateClusterRefForNeighbor().

◆ setInSliceVoxelType()

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

◆ setResultFlag()

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

Sets internal result flag to result.

Definition at line 186 of file mlClusterAlgorithm.h.

Referenced by ml::ClusterVoxelType<, SimilarVectorDirectionsClusterAlgorithm >::calcClustersForSlices().

◆ storeNextSlice()

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

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

◆ ClusterHandler

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

Member Data Documentation

◆ _clusters

◆ _currentSlices

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

◆ _parameters

◆ []

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: