13#ifndef ML_SIMILAR_VECTOR_DIRECTIONS_CLUSTER_ALGORITHM_H
14#define ML_SIMILAR_VECTOR_DIRECTIONS_CLUSTER_ALGORITHM_H
106 return std::abs(
dotProduct) > _parameters.similarityToleranceVectors;
149 int _numVectorComponents;
Type specific implementations of the interface class for clustering algorithms.
CLUSTERVOXELTYPE ClusterVoxelType
The used type of the voxels, needed by derived classes.
Structure computes and holds all cluster information. For internal use.
Implementation of a clustering algorithm for vector data types.
ClusterAlgorithm< constvoid *, SimilarVectorDirectionsClusterAlgorithm >::ClusterVoxelType SimilarVectorDirectionsClusterVoxelType
Voxel type to be used for the VectorClusterAlgorithm.
ML_FORCE_INLINE bool isInTolerance(SimilarVectorDirectionsClusterVoxelType neighborValue, SimilarVectorDirectionsClusterVoxelType currentValue)
Tolerance calculation for vector images.
static ML_FORCE_INLINE SimilarVectorDirectionsClusterVoxelType getVoxel(void *position)
Get the typed voxel value for current position.
SimilarVectorDirectionsClusterAlgorithm(const ComputeClusterParameters ¶meters, Clusters *clusters)
Constructor.
ML_FORCE_INLINE double calcDotProduct(SimilarVectorDirectionsClusterVoxelType vec1Ptr, SimilarVectorDirectionsClusterVoxelType vec2Ptr)
Calculates the dot product of two n-dimensional vectors.
static ML_FORCE_INLINE MLdouble getVoxelAsDouble(void *)
static ML_FORCE_INLINE const void * convertBackgroundValue(MLdouble)
MLErrorCode runClustering()
MLint32 MLDataType
MLDataType.
MLEXPORT MLDataType MLDataTypeFromName(const char *const name)
Returns the id of the data type with name name.
#define ML_BAD_DATA_TYPE
A wrong or unexpected data type has been passed to an algorithm which often is a programming error; t...
MLint32 MLErrorCode
Type of an ML Error code.
#define ML_RESULT_OK
No error. Everything seems to be okay.
#define ML_FORCE_INLINE
Forcing the use of 'inline' for methods.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Structure to hold parameters for cluster computation.