VTK
dox/Infovis/vtkPairwiseExtractHistogram2D.h
Go to the documentation of this file.
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 
00054 class VTK_INFOVIS_EXPORT vtkPairwiseExtractHistogram2D : public vtkStatisticsAlgorithm
00055 {
00056 public:
00057   static vtkPairwiseExtractHistogram2D* New();
00058   vtkTypeMacro(vtkPairwiseExtractHistogram2D, vtkStatisticsAlgorithm);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062 
00063   vtkSetVector2Macro(NumberOfBins,int);
00064   vtkGetVector2Macro(NumberOfBins,int);
00066 
00068 
00071   vtkSetMacro(CustomColumnRangeIndex,int);
00072   void SetCustomColumnRangeByIndex(double,double);
00074 
00076 
00079   void SetCustomColumnRange(int col, double range[2]);
00080   void SetCustomColumnRange(int col, double rmin, double rmax);
00082 
00084 
00085   vtkSetMacro(ScalarType,int);
00086   void SetScalarTypeToUnsignedInt()
00087     {this->SetScalarType(VTK_UNSIGNED_INT);};
00088   void SetScalarTypeToUnsignedLong()
00089     {this->SetScalarType(VTK_UNSIGNED_LONG);};
00090   void SetScalarTypeToUnsignedShort()
00091     {this->SetScalarType(VTK_UNSIGNED_SHORT);};
00092   void SetScalarTypeToUnsignedChar()
00093     {this->SetScalarType(VTK_UNSIGNED_CHAR);};
00094   vtkGetMacro(ScalarType,int);
00096   
00098   double GetMaximumBinCount(int idx);
00099 
00101   double GetMaximumBinCount();
00102 
00105   int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4]);
00106 
00109   int GetBinRange(int idx, vtkIdType bin, double range[4]);
00110 
00113   void GetBinWidth(int idx, double bw[2]);
00114   
00117   double* GetHistogramExtents(int idx);
00118 
00120   vtkImageData* GetOutputHistogramImage(int idx);
00121 
00123   vtkExtractHistogram2D* GetHistogramFilter(int idx);
00124 
00125 //BTX
00126   enum OutputIndices
00127   {
00128     HISTOGRAM_IMAGE=3
00129   };
00130 //ETX
00131 
00133 
00134   virtual void Aggregate( vtkDataObjectCollection*, vtkDataObject* )
00135     {};
00137 
00138 protected:
00139   vtkPairwiseExtractHistogram2D();
00140   ~vtkPairwiseExtractHistogram2D();
00141 
00142   int NumberOfBins[2];
00143   int ScalarType;
00144   int CustomColumnRangeIndex;
00145 
00146   //BTX
00147   vtkSmartPointer<vtkIdTypeArray> OutputOutlierIds;
00148   vtkSmartPointer<vtkCollection> HistogramFilters;
00149   class Internals;
00150   Internals* Implementation;
00151   //ETX
00152 
00154 
00156   virtual void Learn( vtkTable* inData,
00157                       vtkTable* inParameters,
00158                       vtkDataObject* outMeta );
00160 
00162   virtual void Derive( vtkDataObject* ) {};
00163 
00165 
00166   virtual void Assess( vtkTable*, 
00167                        vtkDataObject*, 
00168                        vtkTable* ) {};
00170 
00172 
00173   virtual void Test( vtkTable*,
00174                      vtkDataObject*,
00175                      vtkDataObject* ) { return; }; 
00177 
00179 
00180   virtual void SelectAssessFunctor( vtkTable* vtkNotUsed(outData), 
00181                                     vtkDataObject* vtkNotUsed(inMeta),
00182                                     vtkStringArray* vtkNotUsed(rowNames),
00183                                     AssessFunctor*& vtkNotUsed(dfunc) ) {};
00185   
00187   virtual vtkExtractHistogram2D* NewHistogramFilter();
00188 
00189   virtual int FillOutputPortInformation( int port, vtkInformation* info );
00190 
00191   vtkTimeStamp BuildTime;
00192 private:
00193   vtkPairwiseExtractHistogram2D(const vtkPairwiseExtractHistogram2D&); // Not implemented
00194   void operator=(const vtkPairwiseExtractHistogram2D&);   // Not implemented
00195 };
00196 
00197 #endif