MeVisLab Toolbox Reference
|
Type specific implementations of the interface class for clustering algorithms. More...
#include <mlClusterAlgorithm.h>
Public Types | |
typedef CLUSTERVOXELTYPE | ClusterVoxelType |
The used type of the voxels, needed by derived classes. | |
Public Member Functions | |
ClusterAlgorithm (const ComputeClusterParameters ¶meters, Clusters *clusters) | |
Constructor to be used. | |
MLErrorCode | runClustering () |
MLErrorCode | processSlice (MLint zi, const ImageVector &inputImageExtent, TSubImage< MLint8 > &inMaskSlice) |
Public Member Functions inherited from ml::ClusterAlgorithmBase | |
ClusterAlgorithmBase (const ComputeClusterParameters ¶meters, Clusters *clusters) | |
Constructor to be used. | |
virtual | ~ClusterAlgorithmBase () |
Default virtual destructor. | |
bool | hasResults () const |
Returns whether getCluster() and getClusterOfVoxel() contains cluster data. | |
Protected Member Functions | |
MLuint | updateClusterRefForNeighbor (void *neighborVoxelPtr, MLint x, MLint y, MLint z, CLUSTERVOXELTYPE currentValue, MLuint currentClusterRef) |
Checks if neighbor at position x,y,z belongs to the same cluster given by currentClusterRef. | |
MLErrorCode | calcClustersForSlices () |
Template applying cluster calculations for one slice. | |
Protected Member Functions inherited from ml::ClusterAlgorithmBase | |
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. | |
Static Protected Member Functions | |
static CLUSTERVOXELTYPE | convertBackgroundValue (MLdouble backgroundValue) |
Additional Inherited Members | |
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 Attributes inherited from ml::ClusterAlgorithmBase | |
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 |
Type specific implementations of the interface class for clustering algorithms.
Derived classes should derive from this class.
The derived class needs to pass its class name as second template argument to ClusterAlgorithm, this allows static dispatch to overloaded members (Curiously recurring template pattern).
The derived class needs to implement getVoxel() and isInTolerance(), see IdenticalIntensitiesClusterAlgorithm for an example.
Definition at line 221 of file mlClusterAlgorithm.h.
typedef CLUSTERVOXELTYPE ml::ClusterAlgorithm< CLUSTERVOXELTYPE, DerivedAlgorithm >::ClusterVoxelType |
The used type of the voxels, needed by derived classes.
Definition at line 226 of file mlClusterAlgorithm.h.
|
inline |
Constructor to be used.
Definition at line 229 of file mlClusterAlgorithm.h.
|
inlineprotected |
Template applying cluster calculations for one slice.
Definition at line 269 of file mlClusterAlgorithm.h.
References ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm >::getErrorCode(), ML_RESULT_OK, mlrange_cast(), NBH_2D_4_XY, NBH_2D_8_XY, ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm >::setParameters(), and ml::ClusterUserDataParameters::useImageValueAsUserData.
|
inlinestaticprotected |
Definition at line 262 of file mlClusterAlgorithm.h.
References mlrange_cast().
|
inline |
Definition at line 345 of file mlClusterAlgorithm.h.
References ML_PROGRAMMING_ERROR, ML_RESULT_OK, mlrange_cast(), MLSizeOf(), NBH_2D_4_XY, NBH_2D_8_XY, NBH_3D_18_XYZ, NBH_3D_26_XYZ, NBH_3D_6_XYZ, and NBH_COUNT.
|
inline |
Definition at line 233 of file mlClusterAlgorithm.h.
References mlrange_cast().
|
inlineprotected |
Checks if neighbor at position x,y,z belongs to the same cluster given by currentClusterRef.
neighborVoxelPtr | Pointer to the neighbor voxel |
x,y,z | Position of neighbor in image coordinates. |
currentValue | Currently examined voxel. |
currentClusterRef | Cluster reference of currently examined voxel. |
Definition at line 248 of file mlClusterAlgorithm.h.
References mlrange_cast().