vtkPSciVizKMeans.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
22 #ifndef vtkPSciVizKMeans_h
23 #define vtkPSciVizKMeans_h
24 
25 #include "vtkPVVTKExtensionsFiltersStatisticsModule.h" //needed for exports
26 #include "vtkSciVizStatistics.h"
27 
29 {
30 public:
31  static vtkPSciVizKMeans* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
42  vtkSetMacro(K, int);
43  vtkGetMacro(K, int);
45 
47 
51  vtkSetMacro(MaxNumIterations, int);
52  vtkGetMacro(MaxNumIterations, int);
54 
56 
60  vtkSetMacro(Tolerance, double);
61  vtkGetMacro(Tolerance, double);
63 
64 protected:
66  ~vtkPSciVizKMeans() override;
67 
68  bool PrepareAlgorithm(vtkGenerateStatistics* filter) override;
69 
70  int K;
72  double Tolerance;
73 
74 private:
75  vtkPSciVizKMeans(const vtkPSciVizKMeans&) = delete;
76  void operator=(const vtkPSciVizKMeans&) = delete;
77 };
78 
79 #endif // vtkPSciVizKMeans_h
#define VTKPVVTKEXTENSIONSFILTERSSTATISTICS_EXPORT
virtual bool PrepareAlgorithm(vtkGenerateStatistics *filter)=0
Subclasses must override this method and configure filter by calling filter->SetStatisticsAlgorithm()...
Abstract base class for computing statistics with vtkStatistics.
void PrintSelf(ostream &os, vtkIndent indent) override
Find k cluster centers and/or assess the closest center and distance to it for each datum...
static vtkPassInputTypeAlgorithm * New()