Class ScalarImageKmeansImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.ScalarImageKmeansImageFilter
Classifies the intensity values of a scalar image using the K-Means
algorithm.
Given an input image with scalar values, it uses the K-Means
statistical classifier in order to define labels for every pixel in
the image. The filter is templated over the type of the input image.
The output image is predefined as having the same dimension of the
input image and pixel type unsigned char, under the assumption that
the classifier will generate less than 256 classes.
You may want to look also at the RelabelImageFilter that may be used
as a postprocessing stage, in particular if you are interested in
ordering the labels by their relative size in number of pixels.
See:
 Image
 ImageKmeansModelEstimator
 KdTreeBasedKmeansEstimator, WeightedCentroidKdTreeGenerator, KdTree
 RelabelImageFilter
 itk::simple::ScalarImageKmeans for the procedural interface
 itk::ScalarImageKmeansImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkScalarImageKmeansImageFilter.h
- 
Field SummaryFields inherited from class org.itk.simple.ProcessObjectswigCMemOwn
- 
Constructor SummaryConstructorsModifierConstructorDescriptionitk::simple::ScalarImageKmeansImageFilter::ScalarImageKmeansImageFilter() Default Constructor that takes no arguments and initializes default parametersprotectedScalarImageKmeansImageFilter(long cPtr, boolean cMemoryOwn) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete()virtual itk::simple::ScalarImageKmeansImageFilter::~ScalarImageKmeansImageFilter() DestructorImage itk::simple::ScalarImageKmeansImageFilter::Execute(const Image &image1) Execute the filter on the input imageprotected voidfinalize()std::vector<double> itk::simple::ScalarImageKmeansImageFilter::GetClassWithInitialMean() constprotected static longstd::vector<double> itk::simple::ScalarImageKmeansImageFilter::GetFinalMeans() const Return the array of Means found after the classification.getName()std::string itk::simple::ScalarImageKmeansImageFilter::GetName() const Name of this classbooleanbool itk::simple::ScalarImageKmeansImageFilter::GetUseNonContiguousLabels() const Set/Get the UseNonContiguousLabels flag.voidsetClassWithInitialMean(VectorDouble ClassWithInitialMean) Self& itk::simple::ScalarImageKmeansImageFilter::SetClassWithInitialMean(std::vector< double > ClassWithInitialMean)voidsetUseNonContiguousLabels(boolean UseNonContiguousLabels) Self& itk::simple::ScalarImageKmeansImageFilter::SetUseNonContiguousLabels(bool UseNonContiguousLabels) Set/Get the UseNonContiguousLabels flag.protected static longtoString()std::string itk::simple::ScalarImageKmeansImageFilter::ToString() const Print ourselves outvoidSelf& itk::simple::ScalarImageKmeansImageFilter::UseNonContiguousLabelsOff()voidSelf& itk::simple::ScalarImageKmeansImageFilter::UseNonContiguousLabelsOn() Set the value of UseNonContiguousLabels to true or false respectfully.Methods inherited from class org.itk.simple.ImageFiltergetCPtr, swigReleaseMethods inherited from class org.itk.simple.ProcessObjectabort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
- 
Constructor Details- 
ScalarImageKmeansImageFilterprotected ScalarImageKmeansImageFilter(long cPtr, boolean cMemoryOwn) 
- 
ScalarImageKmeansImageFilterpublic ScalarImageKmeansImageFilter()itk::simple::ScalarImageKmeansImageFilter::ScalarImageKmeansImageFilter() Default Constructor that takes no arguments and initializes default parameters
 
- 
- 
Method Details- 
getCPtr
- 
swigRelease
- 
finalizeprotected void finalize()- Overrides:
- finalizein class- ImageFilter
 
- 
deletepublic void delete()virtual itk::simple::ScalarImageKmeansImageFilter::~ScalarImageKmeansImageFilter() Destructor- Overrides:
- deletein class- ImageFilter
 
- 
setClassWithInitialMeanSelf& itk::simple::ScalarImageKmeansImageFilter::SetClassWithInitialMean(std::vector< double > ClassWithInitialMean)
- 
getClassWithInitialMeanstd::vector<double> itk::simple::ScalarImageKmeansImageFilter::GetClassWithInitialMean() const
- 
setUseNonContiguousLabelspublic void setUseNonContiguousLabels(boolean UseNonContiguousLabels) Self& itk::simple::ScalarImageKmeansImageFilter::SetUseNonContiguousLabels(bool UseNonContiguousLabels) Set/Get the UseNonContiguousLabels flag. When this is set to false the labels are numbered contiguously, like in {0,1,3..N}. When the flag is set to true, the labels are selected in order to span the dynamic range of the output image. This last option is useful when the output image is intended only for display. The default value is false.
- 
useNonContiguousLabelsOnpublic void useNonContiguousLabelsOn()Self& itk::simple::ScalarImageKmeansImageFilter::UseNonContiguousLabelsOn() Set the value of UseNonContiguousLabels to true or false respectfully.
- 
useNonContiguousLabelsOffpublic void useNonContiguousLabelsOff()Self& itk::simple::ScalarImageKmeansImageFilter::UseNonContiguousLabelsOff()
- 
getUseNonContiguousLabelspublic boolean getUseNonContiguousLabels()bool itk::simple::ScalarImageKmeansImageFilter::GetUseNonContiguousLabels() const Set/Get the UseNonContiguousLabels flag. When this is set to false the labels are numbered contiguously, like in {0,1,3..N}. When the flag is set to true, the labels are selected in order to span the dynamic range of the output image. This last option is useful when the output image is intended only for display. The default value is false.
- 
getFinalMeansstd::vector<double> itk::simple::ScalarImageKmeansImageFilter::GetFinalMeans() const Return the array of Means found after the classification. This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
- 
getNamestd::string itk::simple::ScalarImageKmeansImageFilter::GetName() const Name of this class- Overrides:
- getNamein class- ProcessObject
 
- 
toStringstd::string itk::simple::ScalarImageKmeansImageFilter::ToString() const Print ourselves out- Overrides:
- toStringin class- ProcessObject
 
- 
execute
 
-