vtkPSciVizKMeans.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPSciVizKMeans.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkPSciVizKMeans_h
35 #define vtkPSciVizKMeans_h
36 
37 #include "vtkPVVTKExtensionsFiltersStatisticsModule.h" //needed for exports
38 #include "vtkSciVizStatistics.h"
39 
41 {
42 public:
43  static vtkPSciVizKMeans* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
54  vtkSetMacro(K, int);
55  vtkGetMacro(K, int);
57 
59 
63  vtkSetMacro(MaxNumIterations, int);
64  vtkGetMacro(MaxNumIterations, int);
66 
68 
72  vtkSetMacro(Tolerance, double);
73  vtkGetMacro(Tolerance, double);
75 
76 protected:
78  ~vtkPSciVizKMeans() override;
79 
80  int LearnAndDerive(vtkMultiBlockDataSet* model, vtkTable* inData) override;
81  int AssessData(
82  vtkTable* observations, vtkDataObject* dataset, vtkMultiBlockDataSet* model) override;
83 
84  int K;
86  double Tolerance;
87 
88 private:
89  vtkPSciVizKMeans(const vtkPSciVizKMeans&) = delete;
90  void operator=(const vtkPSciVizKMeans&) = delete;
91 };
92 
93 #endif // vtkPSciVizKMeans_h
virtual int AssessData(vtkTable *observations, vtkDataObject *dataset, vtkMultiBlockDataSet *model)=0
Method subclasses must override to assess an input table given a model of the proper type...
#define VTKPVVTKEXTENSIONSFILTERSSTATISTICS_EXPORT
static vtkTableAlgorithm * New()
virtual int LearnAndDerive(vtkMultiBlockDataSet *model, vtkTable *inData)=0
Method subclasses must override to calculate a full model from the given input data.
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...