18 #ifndef sitkScalarImageKmeansImageFilter_h
19 #define sitkScalarImageKmeansImageFilter_h
76 SITK_RETURN_SELF_TYPE_HEADER
SetClassWithInitialMean ( std::vector<double> ClassWithInitialMean ) { this->m_ClassWithInitialMean = ClassWithInitialMean;
return *
this; }
85 SITK_RETURN_SELF_TYPE_HEADER
SetUseNonContiguousLabels (
bool UseNonContiguousLabels ) { this->m_UseNonContiguousLabels = UseNonContiguousLabels;
return *
this; }
104 std::string
GetName()
const {
return std::string (
"ScalarImageKmeansImageFilter"); }
107 std::string ToString()
const;
115 Image Execute (
const Image& image1, std::vector<double> classWithInitialMean,
bool useNonContiguousLabels );
122 typedef Image (Self::*MemberFunctionType)(
const Image& image1 );
123 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
BasicPixelIDTypeList PixelIDTypeList
#define SITKBasicFilters_EXPORT
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
bool m_UseNonContiguousLabels
bool GetUseNonContiguousLabels() const
Self & SetClassWithInitialMean(std::vector< double > ClassWithInitialMean)
Classifies the intensity values of a scalar image using the K-Means algorithm.
std::vector< double > GetFinalMeans() const
Self & UseNonContiguousLabelsOff()
std::vector< double > GetClassWithInitialMean() const
Self & UseNonContiguousLabelsOn()
Image ScalarImageKmeans(const Image &image1, std::vector< double > classWithInitialMean=std::vector< double >(), bool useNonContiguousLabels=false)
Classifies the intensity values of a scalar image using the K-Means algorithm.
std::vector< double > m_FinalMeans
Self & SetUseNonContiguousLabels(bool UseNonContiguousLabels)
std::vector< double > m_ClassWithInitialMean
The main Image class for SimpleITK.
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
ScalarImageKmeansImageFilter Self
std::string GetName() const
The base interface for SimpleITK filters that take one input image.