MeVisLab Toolbox Reference
mlIdenticalIntensitiesClusterAlgorithm.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_IDENTICAL_INTENSITIES_CLUSTER_ALGORITHM_H
14#define ML_IDENTICAL_INTENSITIES_CLUSTER_ALGORITHM_H
15
16#include "mlClusterAlgorithm.h"
17
19
20
29template <typename DATATYPE>
30class IdenticalIntensitiesClusterAlgorithm : public ClusterAlgorithm<DATATYPE, IdenticalIntensitiesClusterAlgorithm<DATATYPE> >
31{
32public:
36
38 ML_FORCE_INLINE static DATATYPE getVoxel(void* position)
39 {
40 return *static_cast<DATATYPE*>(position);
41 }
42
44 {
45 return static_cast<MLdouble>(getVoxel(position));
46 }
47
51 {
52 return (currentValue == neighborValue);
53 }
54};
55
56
58
59
60#endif
Type specific implementations of the interface class for clustering algorithms.
Structure computes and holds all cluster information. For internal use.
Definition mlClusters.h:29
Implementation of a clustering algorithm checking for identical image intensity values.
static ML_FORCE_INLINE DATATYPE getVoxel(void *position)
Get the typed voxel value for current position.
ML_FORCE_INLINE bool isInTolerance(DATATYPE neighborValue, DATATYPE currentValue)
Tolerance calculation for scalar images.
IdenticalIntensitiesClusterAlgorithm(const ComputeClusterParameters &parameters, Clusters *clusters)
static ML_FORCE_INLINE MLdouble getVoxelAsDouble(void *position)
#define ML_FORCE_INLINE
Forcing the use of 'inline' for methods.
Definition mlMacros.h:54
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
double MLdouble
Definition mlTypeDefs.h:217
Structure to hold parameters for cluster computation.