18#ifndef itkScalarImageKmeansImageFilter_h
19#define itkScalarImageKmeansImageFilter_h
64template <
typename TInputImage,
typename TOutputImage = Image<
unsigned char, TInputImage::ImageDimension>>
71 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
136 itkSetMacro(UseNonContiguousLabels,
bool);
137 itkGetConstReferenceMacro(UseNonContiguousLabels,
bool);
138 itkBooleanMacro(UseNonContiguousLabels);
148#ifdef ITK_USE_CONCEPT_CHECKING
180 bool m_UseNonContiguousLabels{
false };
184 bool m_ImageRegionDefined{
false };
188#ifndef ITK_MANUAL_INSTANTIATION
189# include "itkScalarImageKmeansImageFilter.hxx"
An image region represents a structured region of data.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
Extract a region of interest from the input image.
Classifies the intensity values of a scalar image using the K-Means algorithm.
typename EstimatorType::ParametersType ParametersType
typename InputImageType::RegionType ImageRegionType
TOutputImage OutputImageType
typename TreeGeneratorType::KdTreeType TreeType
typename OutputImageType::PixelType OutputPixelType
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
TInputImage InputImageType
typename ClassifierType::MembershipFunctionVectorType MembershipFunctionVectorType
~ScalarImageKmeansImageFilter() override=default
std::vector< RealPixelType > MeansContainer
void AddClassWithInitialMean(RealPixelType mean)
typename AdaptorType::MeasurementVectorType MeasurementVectorType
typename ClassifierType::ClassLabelVectorType ClassLabelVectorType
void GenerateData() override
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::PixelType InputPixelType
typename MembershipFunctionType::CentroidType MembershipFunctionOriginType
typename NumericTraits< InputPixelType >::RealType RealPixelType
void SetImageRegion(const ImageRegionType ®ion)
typename MembershipFunctionType::Pointer MembershipFunctionPointer
ScalarImageKmeansImageFilter()
DistanceToCentroidMembershipFunction models class membership using a distance metric.
typename DistanceMetricType::OriginType CentroidType
This class provides ListSample interface to ITK Image.
typename MeasurementPixelTraitsType::MeasurementVectorType MeasurementVectorType
fast k-means algorithm implementation using k-d tree structure
This class provides methods for k-nearest neighbor search and related data structures for a k-d tree.
A decision rule that returns the class label with the smallest discriminant score.
Sample classification class.
std::vector< MembershipFunctionPointer > MembershipFunctionVectorType
std::vector< ClassLabelType > ClassLabelVectorType
This class generates a KdTree object with centroid information.
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
ImageBaseType::RegionType RegionType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....