VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPairwiseExtractHistogram2D.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 2009 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 -------------------------------------------------------------------------*/ 00044 #ifndef __vtkPairwiseExtractHistogram2D_h 00045 #define __vtkPairwiseExtractHistogram2D_h 00046 00047 #include "vtkStatisticsAlgorithm.h" 00048 #include "vtkSmartPointer.h" //needed for smart pointer ivars 00049 class vtkCollection; 00050 class vtkExtractHistogram2D; 00051 class vtkImageData; 00052 class vtkIdTypeArray; 00053 class vtkMultiBlockDataSet; 00054 00055 class VTK_INFOVIS_EXPORT vtkPairwiseExtractHistogram2D : public vtkStatisticsAlgorithm 00056 { 00057 public: 00058 static vtkPairwiseExtractHistogram2D* New(); 00059 vtkTypeMacro(vtkPairwiseExtractHistogram2D, vtkStatisticsAlgorithm); 00060 void PrintSelf(ostream& os, vtkIndent indent); 00061 00063 00064 vtkSetVector2Macro(NumberOfBins,int); 00065 vtkGetVector2Macro(NumberOfBins,int); 00067 00069 00072 vtkSetMacro(CustomColumnRangeIndex,int); 00073 void SetCustomColumnRangeByIndex(double,double); 00075 00077 00080 void SetCustomColumnRange(int col, double range[2]); 00081 void SetCustomColumnRange(int col, double rmin, double rmax); 00083 00085 00086 vtkSetMacro(ScalarType,int); 00087 void SetScalarTypeToUnsignedInt() 00088 {this->SetScalarType(VTK_UNSIGNED_INT);}; 00089 void SetScalarTypeToUnsignedLong() 00090 {this->SetScalarType(VTK_UNSIGNED_LONG);}; 00091 void SetScalarTypeToUnsignedShort() 00092 {this->SetScalarType(VTK_UNSIGNED_SHORT);}; 00093 void SetScalarTypeToUnsignedChar() 00094 {this->SetScalarType(VTK_UNSIGNED_CHAR);}; 00095 vtkGetMacro(ScalarType,int); 00097 00099 double GetMaximumBinCount(int idx); 00100 00102 double GetMaximumBinCount(); 00103 00106 int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4]); 00107 00110 int GetBinRange(int idx, vtkIdType bin, double range[4]); 00111 00114 void GetBinWidth(int idx, double bw[2]); 00115 00118 double* GetHistogramExtents(int idx); 00119 00121 vtkImageData* GetOutputHistogramImage(int idx); 00122 00124 vtkExtractHistogram2D* GetHistogramFilter(int idx); 00125 00126 //BTX 00127 enum OutputIndices 00128 { 00129 HISTOGRAM_IMAGE=3 00130 }; 00131 //ETX 00132 00134 virtual void Aggregate( vtkDataObjectCollection*, vtkMultiBlockDataSet* ) {}; 00135 00136 protected: 00137 vtkPairwiseExtractHistogram2D(); 00138 ~vtkPairwiseExtractHistogram2D(); 00139 00140 int NumberOfBins[2]; 00141 int ScalarType; 00142 int CustomColumnRangeIndex; 00143 00144 //BTX 00145 vtkSmartPointer<vtkIdTypeArray> OutputOutlierIds; 00146 vtkSmartPointer<vtkCollection> HistogramFilters; 00147 class Internals; 00148 Internals* Implementation; 00149 //ETX 00150 00152 00154 virtual void Learn( vtkTable* inData, 00155 vtkTable* inParameters, 00156 vtkMultiBlockDataSet* outMeta ); 00158 00160 virtual void Derive( vtkMultiBlockDataSet* ) {}; 00161 00163 00164 virtual void Assess( vtkTable*, 00165 vtkMultiBlockDataSet*, 00166 vtkTable* ) {}; 00168 00170 00171 virtual void Test( vtkTable*, 00172 vtkMultiBlockDataSet*, 00173 vtkTable* ) { return; }; 00175 00177 00178 virtual void SelectAssessFunctor( vtkTable* vtkNotUsed(outData), 00179 vtkDataObject* vtkNotUsed(inMeta), 00180 vtkStringArray* vtkNotUsed(rowNames), 00181 AssessFunctor*& vtkNotUsed(dfunc) ) {}; 00183 00185 virtual vtkExtractHistogram2D* NewHistogramFilter(); 00186 00187 virtual int FillOutputPortInformation( int port, vtkInformation* info ); 00188 00189 vtkTimeStamp BuildTime; 00190 private: 00191 vtkPairwiseExtractHistogram2D(const vtkPairwiseExtractHistogram2D&); // Not implemented 00192 void operator=(const vtkPairwiseExtractHistogram2D&); // Not implemented 00193 }; 00194 00195 #endif