VTK
vtkExtractHistogram2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtractHistogram2D.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 -------------------------------------------------------------------------*/
47 #ifndef __vtkExtractHistogram2D_h
48 #define __vtkExtractHistogram2D_h
49 
51 
52 class vtkImageData;
53 class vtkIdTypeArray;
55 
57 {
58 public:
59  static vtkExtractHistogram2D* New();
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
63 //BTX
65  {
66  HISTOGRAM_IMAGE=3
67  };
68 //ETX
69 
71 
72  vtkSetVector2Macro(NumberOfBins,int);
73  vtkGetVector2Macro(NumberOfBins,int);
75 
77 
79  vtkSetVector2Macro(ComponentsToProcess,int);
80  vtkGetVector2Macro(ComponentsToProcess,int);
82 
84 
87  vtkSetVector4Macro(CustomHistogramExtents,double);
88  vtkGetVector4Macro(CustomHistogramExtents,double);
90 
92 
94  vtkSetMacro(UseCustomHistogramExtents,int);
95  vtkGetMacro(UseCustomHistogramExtents,int);
96  vtkBooleanMacro(UseCustomHistogramExtents,int);
98 
100 
103  vtkSetMacro(ScalarType,int);
105  {this->SetScalarType(VTK_UNSIGNED_INT);};
107  {this->SetScalarType(VTK_UNSIGNED_LONG);};
109  {this->SetScalarType(VTK_UNSIGNED_SHORT);};
111  {this->SetScalarType(VTK_UNSIGNED_CHAR);};
113  {this->SetScalarType(VTK_FLOAT);};
115  {this->SetScalarType(VTK_DOUBLE);};
116  vtkGetMacro(ScalarType,int);
118 
120 
122  vtkGetMacro(MaximumBinCount,double);
124 
127  int GetBinRange(vtkIdType binX, vtkIdType binY, double range[4]);
128 
131  int GetBinRange(vtkIdType bin, double range[4]);
132 
135  void GetBinWidth(double bw[2]);
136 
139  vtkImageData* GetOutputHistogramImage();
140 
143  double* GetHistogramExtents();
144 
145  vtkSetMacro(SwapColumns,int);
146  vtkGetMacro(SwapColumns,int);
147  vtkBooleanMacro(SwapColumns,int);
148 
150 
151  virtual void SetRowMask(vtkDataArray*);
152  vtkGetObjectMacro(RowMask,vtkDataArray);
154 
157 
158 protected:
161 
163  int NumberOfBins[2];
164  double HistogramExtents[4];
165  double CustomHistogramExtents[4];
167  int ComponentsToProcess[2];
171 
172  virtual int ComputeBinExtents(vtkDataArray* col1, vtkDataArray* col2);
173 
175 
177  virtual void Learn( vtkTable* inData,
178  vtkTable* inParameters,
179  vtkMultiBlockDataSet* inMeta );
181 
183  virtual void Derive( vtkMultiBlockDataSet* ) {};
184 
186 
187  virtual void Test( vtkTable*,
189  vtkTable* ) { return; };
191 
193 
194  virtual void SelectAssessFunctor( vtkTable* vtkNotUsed(outData),
195  vtkDataObject* vtkNotUsed(inMeta),
196  vtkStringArray* vtkNotUsed(rowNames),
197  AssessFunctor*& vtkNotUsed(dfunc) ) {};
199 
200  virtual int FillOutputPortInformation( int port, vtkInformation* info );
201 
203 
205  virtual int RequestInformation (vtkInformation *request,
206  vtkInformationVector **inputVector,
207  vtkInformationVector *outputVector);
209 
211 
212  int GetInputArrays(vtkDataArray*& col1, vtkDataArray*& col2);
213 private:
214  vtkExtractHistogram2D(const vtkExtractHistogram2D&); // Not implemented
215  void operator=(const vtkExtractHistogram2D&); // Not implemented
216 };
218 
219 #endif