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 "vtkFiltersImagingModule.h" // For export macro
48 #include "vtkStatisticsAlgorithm.h"
49 #include "vtkSmartPointer.h" //needed for smart pointer ivars
50 class vtkCollection;
52 class vtkImageData;
53 class vtkIdTypeArray;
55 
56 class VTKFILTERSIMAGING_EXPORT vtkPairwiseExtractHistogram2D : public vtkStatisticsAlgorithm
57 {
58 public:
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
65  vtkSetVector2Macro(NumberOfBins,int);
66  vtkGetVector2Macro(NumberOfBins,int);
68 
70 
73  vtkSetMacro(CustomColumnRangeIndex,int);
74  void SetCustomColumnRangeByIndex(double,double);
76 
78 
81  void SetCustomColumnRange(int col, double range[2]);
82  void SetCustomColumnRange(int col, double rmin, double rmax);
84 
86 
87  vtkSetMacro(ScalarType,int);
88  void SetScalarTypeToUnsignedInt()
89  {this->SetScalarType(VTK_UNSIGNED_INT);};
90  void SetScalarTypeToUnsignedLong()
91  {this->SetScalarType(VTK_UNSIGNED_LONG);};
92  void SetScalarTypeToUnsignedShort()
93  {this->SetScalarType(VTK_UNSIGNED_SHORT);};
94  void SetScalarTypeToUnsignedChar()
95  {this->SetScalarType(VTK_UNSIGNED_CHAR);};
96  vtkGetMacro(ScalarType,int);
98 
100  double GetMaximumBinCount(int idx);
101 
103  double GetMaximumBinCount();
104 
107  int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4]);
108 
111  int GetBinRange(int idx, vtkIdType bin, double range[4]);
112 
115  void GetBinWidth(int idx, double bw[2]);
116 
119  double* GetHistogramExtents(int idx);
120 
122  vtkImageData* GetOutputHistogramImage(int idx);
123 
125  vtkExtractHistogram2D* GetHistogramFilter(int idx);
126 
127 //BTX
129  {
130  HISTOGRAM_IMAGE=3
131  };
132 //ETX
133 
136 
137 protected:
140 
141  int NumberOfBins[2];
144 
145  //BTX
148  class Internals;
149  Internals* Implementation;
150  //ETX
151 
153 
155  virtual void Learn( vtkTable* inData,
156  vtkTable* inParameters,
157  vtkMultiBlockDataSet* outMeta );
159 
161  virtual void Derive( vtkMultiBlockDataSet* ) {};
162 
164 
165  virtual void Assess( vtkTable*,
167  vtkTable* ) {};
169 
171 
172  virtual void Test( vtkTable*,
174  vtkTable* ) { return; };
176 
178 
179  virtual void SelectAssessFunctor( vtkTable* vtkNotUsed(outData),
180  vtkDataObject* vtkNotUsed(inMeta),
181  vtkStringArray* vtkNotUsed(rowNames),
182  AssessFunctor*& vtkNotUsed(dfunc) ) {};
184 
186  virtual vtkExtractHistogram2D* NewHistogramFilter();
187 
188  virtual int FillOutputPortInformation( int port, vtkInformation* info );
189 
191 private:
193  void operator=(const vtkPairwiseExtractHistogram2D&); // Not implemented
194 };
195 
196 #endif