VTK
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  InverseCDF = 0, // Identical to method 1 of R
72  InverseCDFAveragedSteps = 1, // Identical to method 2 of R, ignored for non-numeric types
73  NearestObservation = 2 // Identical to method 3 of R
74  };
75 
77 
80  vtkSetMacro( NumberOfIntervals, vtkIdType );
81  vtkGetMacro( NumberOfIntervals, vtkIdType );
83 
85 
88  vtkSetMacro( QuantileDefinition, QuantileDefinitionType );
89  void SetQuantileDefinition ( int );
91 
93 
96  vtkSetMacro( Quantize, bool );
97  vtkGetMacro( Quantize, bool );
99 
101 
105  vtkSetMacro( MaximumHistogramSize, vtkIdType );
106  vtkGetMacro( MaximumHistogramSize, vtkIdType );
108 
112  vtkIdType GetQuantileDefinition() { return static_cast<vtkIdType>( this->QuantileDefinition ); }
113 
119  bool SetParameter( const char* parameter,
120  int index,
121  vtkVariant value ) override;
122 
128  vtkMultiBlockDataSet* ) override { return; };
129 
130 protected:
132  ~vtkOrderStatistics() override;
133 
137  void Learn( vtkTable*,
138  vtkTable*,
139  vtkMultiBlockDataSet* ) override;
140 
144  void Derive( vtkMultiBlockDataSet* ) override;
145 
149  void Test( vtkTable*,
151  vtkTable* ) override;
152 
156  void Assess( vtkTable* inData,
157  vtkMultiBlockDataSet* inMeta,
158  vtkTable* outData ) override
159  { this->Superclass::Assess( inData, inMeta, outData, 1 ); }
160 
164  void SelectAssessFunctor( vtkTable* outData,
165  vtkDataObject* inMeta,
166  vtkStringArray* rowNames,
167  AssessFunctor*& dfunc ) override;
168 
171  bool Quantize;
173 
174 private:
175  vtkOrderStatistics(const vtkOrderStatistics&) = delete;
176  void operator=(const vtkOrderStatistics&) = delete;
177 };
178 
179 #endif
A base class for a functor that assesses data.
static vtkTableAlgorithm * New()
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.
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:347
A atomic type representing the union of many types.
Definition: vtkVariant.h:71
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:68
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
general representation of visualization data
Definition: vtkDataObject.h:64
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.