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 "vtkFiltersImagingModule.h" // For export macro 00048 #include "vtkStatisticsAlgorithm.h" 00049 #include "vtkSmartPointer.h" //needed for smart pointer ivars 00050 class vtkCollection; 00051 class vtkExtractHistogram2D; 00052 class vtkImageData; 00053 class vtkIdTypeArray; 00054 class vtkMultiBlockDataSet; 00055 00056 class VTKFILTERSIMAGING_EXPORT vtkPairwiseExtractHistogram2D : public vtkStatisticsAlgorithm 00057 { 00058 public: 00059 static vtkPairwiseExtractHistogram2D* New(); 00060 vtkTypeMacro(vtkPairwiseExtractHistogram2D, vtkStatisticsAlgorithm); 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 00064 00065 vtkSetVector2Macro(NumberOfBins,int); 00066 vtkGetVector2Macro(NumberOfBins,int); 00068 00070 00073 vtkSetMacro(CustomColumnRangeIndex,int); 00074 void SetCustomColumnRangeByIndex(double,double); 00076 00078 00081 void SetCustomColumnRange(int col, double range[2]); 00082 void SetCustomColumnRange(int col, double rmin, double rmax); 00084 00086 00087 vtkSetMacro(ScalarType,int); 00088 void SetScalarTypeToUnsignedInt() 00089 {this->SetScalarType(VTK_UNSIGNED_INT);}; 00090 void SetScalarTypeToUnsignedLong() 00091 {this->SetScalarType(VTK_UNSIGNED_LONG);}; 00092 void SetScalarTypeToUnsignedShort() 00093 {this->SetScalarType(VTK_UNSIGNED_SHORT);}; 00094 void SetScalarTypeToUnsignedChar() 00095 {this->SetScalarType(VTK_UNSIGNED_CHAR);}; 00096 vtkGetMacro(ScalarType,int); 00098 00100 double GetMaximumBinCount(int idx); 00101 00103 double GetMaximumBinCount(); 00104 00107 int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4]); 00108 00111 int GetBinRange(int idx, vtkIdType bin, double range[4]); 00112 00115 void GetBinWidth(int idx, double bw[2]); 00116 00119 double* GetHistogramExtents(int idx); 00120 00122 vtkImageData* GetOutputHistogramImage(int idx); 00123 00125 vtkExtractHistogram2D* GetHistogramFilter(int idx); 00126 00127 //BTX 00128 enum OutputIndices 00129 { 00130 HISTOGRAM_IMAGE=3 00131 }; 00132 //ETX 00133 00135 virtual void Aggregate( vtkDataObjectCollection*, vtkMultiBlockDataSet* ) {}; 00136 00137 protected: 00138 vtkPairwiseExtractHistogram2D(); 00139 ~vtkPairwiseExtractHistogram2D(); 00140 00141 int NumberOfBins[2]; 00142 int ScalarType; 00143 int CustomColumnRangeIndex; 00144 00145 //BTX 00146 vtkSmartPointer<vtkIdTypeArray> OutputOutlierIds; 00147 vtkSmartPointer<vtkCollection> HistogramFilters; 00148 class Internals; 00149 Internals* Implementation; 00150 //ETX 00151 00153 00155 virtual void Learn( vtkTable* inData, 00156 vtkTable* inParameters, 00157 vtkMultiBlockDataSet* outMeta ); 00159 00161 virtual void Derive( vtkMultiBlockDataSet* ) {}; 00162 00164 00165 virtual void Assess( vtkTable*, 00166 vtkMultiBlockDataSet*, 00167 vtkTable* ) {}; 00169 00171 00172 virtual void Test( vtkTable*, 00173 vtkMultiBlockDataSet*, 00174 vtkTable* ) { return; }; 00176 00178 00179 virtual void SelectAssessFunctor( vtkTable* vtkNotUsed(outData), 00180 vtkDataObject* vtkNotUsed(inMeta), 00181 vtkStringArray* vtkNotUsed(rowNames), 00182 AssessFunctor*& vtkNotUsed(dfunc) ) {}; 00184 00186 virtual vtkExtractHistogram2D* NewHistogramFilter(); 00187 00188 virtual int FillOutputPortInformation( int port, vtkInformation* info ); 00189 00190 vtkTimeStamp BuildTime; 00191 private: 00192 vtkPairwiseExtractHistogram2D(const vtkPairwiseExtractHistogram2D&); // Not implemented 00193 void operator=(const vtkPairwiseExtractHistogram2D&); // Not implemented 00194 }; 00195 00196 #endif