VTK
vtkPairwiseExtractHistogram2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPairwiseExtractHistogram2D.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 2009 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 -------------------------------------------------------------------------*/
44 #ifndef __vtkPairwiseExtractHistogram2D_h
45 #define __vtkPairwiseExtractHistogram2D_h
46 
47 #include "vtkStatisticsAlgorithm.h"
48 #include "vtkSmartPointer.h" //needed for smart pointer ivars
49 class vtkCollection;
51 class vtkImageData;
52 class vtkIdTypeArray;
54 
56 {
57 public:
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
63 
64  vtkSetVector2Macro(NumberOfBins,int);
65  vtkGetVector2Macro(NumberOfBins,int);
67 
69 
72  vtkSetMacro(CustomColumnRangeIndex,int);
73  void SetCustomColumnRangeByIndex(double,double);
75 
77 
80  void SetCustomColumnRange(int col, double range[2]);
81  void SetCustomColumnRange(int col, double rmin, double rmax);
83 
85 
86  vtkSetMacro(ScalarType,int);
88  {this->SetScalarType(VTK_UNSIGNED_INT);};
90  {this->SetScalarType(VTK_UNSIGNED_LONG);};
92  {this->SetScalarType(VTK_UNSIGNED_SHORT);};
94  {this->SetScalarType(VTK_UNSIGNED_CHAR);};
95  vtkGetMacro(ScalarType,int);
97 
99  double GetMaximumBinCount(int idx);
100 
102  double GetMaximumBinCount();
103 
106  int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4]);
107 
110  int GetBinRange(int idx, vtkIdType bin, double range[4]);
111 
114  void GetBinWidth(int idx, double bw[2]);
115 
118  double* GetHistogramExtents(int idx);
119 
121  vtkImageData* GetOutputHistogramImage(int idx);
122 
124  vtkExtractHistogram2D* GetHistogramFilter(int idx);
125 
126 //BTX
128  {
129  HISTOGRAM_IMAGE=3
130  };
131 //ETX
132 
135 
136 protected:
139 
140  int NumberOfBins[2];
143 
144  //BTX
147  class Internals;
148  Internals* Implementation;
149  //ETX
150 
152 
154  virtual void Learn( vtkTable* inData,
155  vtkTable* inParameters,
156  vtkMultiBlockDataSet* outMeta );
158 
160  virtual void Derive( vtkMultiBlockDataSet* ) {};
161 
163 
164  virtual void Assess( vtkTable*,
166  vtkTable* ) {};
168 
170 
171  virtual void Test( vtkTable*,
173  vtkTable* ) { return; };
175 
177 
178  virtual void SelectAssessFunctor( vtkTable* vtkNotUsed(outData),
179  vtkDataObject* vtkNotUsed(inMeta),
180  vtkStringArray* vtkNotUsed(rowNames),
181  AssessFunctor*& vtkNotUsed(dfunc) ) {};
183 
185  virtual vtkExtractHistogram2D* NewHistogramFilter();
186 
187  virtual int FillOutputPortInformation( int port, vtkInformation* info );
188 
190 private:
192  void operator=(const vtkPairwiseExtractHistogram2D&); // Not implemented
193 };
194 
195 #endif