VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOrderStatistics.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2011 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00048 #ifndef __vtkOrderStatistics_h 00049 #define __vtkOrderStatistics_h 00050 00051 #include "vtkStatisticsAlgorithm.h" 00052 00053 class vtkMultiBlockDataSet; 00054 class vtkStringArray; 00055 class vtkTable; 00056 class vtkVariant; 00057 00058 class VTK_INFOVIS_EXPORT vtkOrderStatistics : public vtkStatisticsAlgorithm 00059 { 00060 public: 00061 vtkTypeMacro(vtkOrderStatistics, vtkStatisticsAlgorithm); 00062 void PrintSelf(ostream& os, vtkIndent indent); 00063 static vtkOrderStatistics* New(); 00064 00065 //BTX 00067 00068 enum QuantileDefinitionType { 00069 InverseCDF = 0, // Identical to method 1 of R 00070 InverseCDFAveragedSteps = 1, // Identical to method 2 of R, ignored for non-numeric types 00071 NearestObservation = 2, // Identical to method 3 of R 00072 }; 00073 //ETX 00075 00077 00078 vtkSetMacro( NumberOfIntervals, vtkIdType ); 00079 vtkGetMacro( NumberOfIntervals, vtkIdType ); 00081 00083 00084 vtkSetMacro( QuantileDefinition, QuantileDefinitionType ); 00085 void SetQuantileDefinition ( int ); 00087 00089 00091 vtkSetMacro( Quantize, bool ); 00092 vtkGetMacro( Quantize, bool ); 00094 00096 00098 vtkSetMacro( MaximumHistogramSize, vtkIdType ); 00099 vtkGetMacro( MaximumHistogramSize, vtkIdType ); 00101 00103 vtkIdType GetQuantileDefinition() { return static_cast<vtkIdType>( this->QuantileDefinition ); } 00104 00106 00109 virtual bool SetParameter( const char* parameter, 00110 int index, 00111 vtkVariant value ); 00113 00115 00117 virtual void Aggregate( vtkDataObjectCollection*, 00118 vtkMultiBlockDataSet* ) { return; }; 00120 00121 protected: 00122 vtkOrderStatistics(); 00123 ~vtkOrderStatistics(); 00124 00126 00127 virtual void Learn( vtkTable*, 00128 vtkTable*, 00129 vtkMultiBlockDataSet* ); 00131 00133 virtual void Derive( vtkMultiBlockDataSet* ); 00134 00136 00137 virtual void Test( vtkTable*, 00138 vtkMultiBlockDataSet*, 00139 vtkTable* ); 00141 00143 00144 virtual void Assess( vtkTable* inData, 00145 vtkMultiBlockDataSet* inMeta, 00146 vtkTable* outData ) 00147 { this->Superclass::Assess( inData, inMeta, outData, 1 ); } 00149 00150 //BTX 00152 00153 virtual void SelectAssessFunctor( vtkTable* outData, 00154 vtkDataObject* inMeta, 00155 vtkStringArray* rowNames, 00156 AssessFunctor*& dfunc ); 00157 //ETX 00159 00160 int NumberOfIntervals; 00161 QuantileDefinitionType QuantileDefinition; 00162 bool Quantize; 00163 vtkIdType MaximumHistogramSize; 00164 00165 private: 00166 vtkOrderStatistics(const vtkOrderStatistics&); // Not implemented 00167 void operator=(const vtkOrderStatistics&); // Not implemented 00168 }; 00169 00170 #endif