18 #ifndef sitkScalarImageKmeansImageFilter_h
19 #define sitkScalarImageKmeansImageFilter_h
70 SITK_RETURN_SELF_TYPE_HEADER
SetClassWithInitialMean ( std::vector<double> ClassWithInitialMean ) { this->m_ClassWithInitialMean = ClassWithInitialMean;
return *
this; }
79 SITK_RETURN_SELF_TYPE_HEADER
SetUseNonContiguousLabels (
bool UseNonContiguousLabels ) { this->m_UseNonContiguousLabels = UseNonContiguousLabels;
return *
this; }
95 std::vector<double>
GetFinalMeans()
const {
return this->m_FinalMeans; };
98 std::string
GetName()
const {
return std::string (
"ScalarImageKmeansImageFilter"); }
101 std::string ToString()
const;
109 Image Execute (
const Image& image1, std::vector<double> classWithInitialMean,
bool useNonContiguousLabels );
115 typedef Image (Self::*MemberFunctionType)(
const Image& image1 );
116 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 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.