VTK  9.2.6
vtkOrderStatistics.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkOrderStatistics.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2011 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19  -------------------------------------------------------------------------*/
49 #ifndef vtkOrderStatistics_h
50 #define vtkOrderStatistics_h
51 
52 #include "vtkFiltersStatisticsModule.h" // For export macro
53 #include "vtkStatisticsAlgorithm.h"
54 
56 class vtkStringArray;
57 class vtkTable;
58 class vtkVariant;
59 
60 class VTKFILTERSSTATISTICS_EXPORT vtkOrderStatistics : public vtkStatisticsAlgorithm
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65  static vtkOrderStatistics* New();
66 
71  {
72  InverseCDF = 0, // Identical to method 1 of R
73  InverseCDFAveragedSteps = 1, // Identical to method 2 of R, ignored for non-numeric types
74  NearestObservation = 2 // Identical to method 3 of R
75  };
76 
78 
81  vtkSetMacro(NumberOfIntervals, vtkIdType);
82  vtkGetMacro(NumberOfIntervals, vtkIdType);
84 
86 
89  vtkSetMacro(QuantileDefinition, QuantileDefinitionType);
90  void SetQuantileDefinition(int);
92 
94 
97  vtkSetMacro(Quantize, bool);
98  vtkGetMacro(Quantize, bool);
100 
102 
106  vtkSetMacro(MaximumHistogramSize, vtkIdType);
107  vtkGetMacro(MaximumHistogramSize, vtkIdType);
109 
113  vtkIdType GetQuantileDefinition() { return static_cast<vtkIdType>(this->QuantileDefinition); }
114 
120  bool SetParameter(const char* parameter, int index, vtkVariant value) override;
121 
127 
129 
139  vtkSetMacro(GhostsToSkip, unsigned char);
140  vtkGetMacro(GhostsToSkip, unsigned char);
142 
143 protected:
145  ~vtkOrderStatistics() override;
146 
148 
152  void Learn(vtkTable*, vtkTable*, vtkMultiBlockDataSet*) override;
153 
157  void Derive(vtkMultiBlockDataSet*) override;
158 
162  void Test(vtkTable*, vtkMultiBlockDataSet*, vtkTable*) override;
163 
167  void Assess(vtkTable* inData, vtkMultiBlockDataSet* inMeta, vtkTable* outData) override
168  {
169  this->Superclass::Assess(inData, inMeta, outData, 1);
170  }
171 
175  void SelectAssessFunctor(vtkTable* outData, vtkDataObject* inMeta, vtkStringArray* rowNames,
176  AssessFunctor*& dfunc) override;
177 
180  bool Quantize;
183  unsigned char GhostsToSkip;
184 
185 private:
186  vtkOrderStatistics(const vtkOrderStatistics&) = delete;
187  void operator=(const vtkOrderStatistics&) = delete;
188 };
189 
190 #endif
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
A class for univariate order statistics.
maintain an unordered list of data objects
void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *) override
Given a collection of models, calculate aggregate model NB: not implemented.
unsigned char GhostsToSkip
virtual void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)=0
Execute the calculations required by the Test option.
a vtkAbstractArray subclass for strings
void Assess(vtkTable *inData, vtkMultiBlockDataSet *inMeta, vtkTable *outData) override
Execute the calculations required by the Assess option.
int vtkIdType
Definition: vtkType.h:332
A atomic type representing the union of many types.
Definition: vtkVariant.h:69
Base class for statistics algorithms.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void Learn(vtkTable *, vtkTable *, vtkMultiBlockDataSet *)=0
Execute the calculations required by the Learn option, given some input Data.
QuantileDefinitionType
The type of quantile definition.
virtual void Derive(vtkMultiBlockDataSet *)=0
Execute the calculations required by the Derive option.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:73
virtual bool SetParameter(const char *parameter, int index, vtkVariant value)
A convenience method (in particular for access from other applications) to set parameter values of Le...
Composite dataset that organizes datasets into blocks.
virtual void SelectAssessFunctor(vtkTable *outData, vtkDataObject *inMeta, vtkStringArray *rowNames, AssessFunctor *&dfunc)=0
A pure virtual method to select the appropriate assessment functor.
QuantileDefinitionType QuantileDefinition
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:65
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType GetQuantileDefinition()
Get the quantile definition.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.