ParaView
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 "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
38 #include "vtkSciVizStatistics.h"
39 
40 class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkPSciVizKMeans : public vtkSciVizStatistics
41 {
42 public:
43  static vtkPSciVizKMeans* New();
45  virtual void PrintSelf(ostream& os, vtkIndent indent);
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  virtual ~vtkPSciVizKMeans();
79 
80  virtual int LearnAndDerive(vtkMultiBlockDataSet* model, vtkTable* inData);
81  virtual int AssessData(
82  vtkTable* observations, vtkDataObject* dataset, vtkMultiBlockDataSet* model);
83 
84  int K;
86  double Tolerance;
87 
88 private:
89  vtkPSciVizKMeans(const vtkPSciVizKMeans&) VTK_DELETE_FUNCTION;
90  void operator=(const vtkPSciVizKMeans&) VTK_DELETE_FUNCTION;
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...
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.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Find k cluster centers and/or assess the closest center and distance to it for each datum...