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 2011 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 
50 #include "vtkFiltersImagingModule.h" // For export macro
51 #include "vtkStatisticsAlgorithm.h"
52 
53 class vtkImageData;
54 class vtkIdTypeArray;
56 
58 {
59 public:
60  static vtkExtractHistogram2D* New();
62  void PrintSelf(ostream& os, vtkIndent indent);
63 
64 //BTX
66  {
67  HISTOGRAM_IMAGE=3
68  };
69 //ETX
70 
72 
73  vtkSetVector2Macro(NumberOfBins,int);
74  vtkGetVector2Macro(NumberOfBins,int);
76 
78 
80  vtkSetVector2Macro(ComponentsToProcess,int);
81  vtkGetVector2Macro(ComponentsToProcess,int);
83 
85 
88  vtkSetVector4Macro(CustomHistogramExtents,double);
89  vtkGetVector4Macro(CustomHistogramExtents,double);
91 
93 
95  vtkSetMacro(UseCustomHistogramExtents,int);
96  vtkGetMacro(UseCustomHistogramExtents,int);
97  vtkBooleanMacro(UseCustomHistogramExtents,int);
99 
101 
104  vtkSetMacro(ScalarType,int);
106  {this->SetScalarType(VTK_UNSIGNED_INT);};
108  {this->SetScalarType(VTK_UNSIGNED_LONG);};
110  {this->SetScalarType(VTK_UNSIGNED_SHORT);};
112  {this->SetScalarType(VTK_UNSIGNED_CHAR);};
114  {this->SetScalarType(VTK_FLOAT);};
116  {this->SetScalarType(VTK_DOUBLE);};
117  vtkGetMacro(ScalarType,int);
119 
121 
123  vtkGetMacro(MaximumBinCount,double);
125 
128  int GetBinRange(vtkIdType binX, vtkIdType binY, double range[4]);
129 
132  int GetBinRange(vtkIdType bin, double range[4]);
133 
136  void GetBinWidth(double bw[2]);
137 
140  vtkImageData* GetOutputHistogramImage();
141 
144  double* GetHistogramExtents();
145 
146  vtkSetMacro(SwapColumns,int);
147  vtkGetMacro(SwapColumns,int);
148  vtkBooleanMacro(SwapColumns,int);
149 
151 
152  virtual void SetRowMask(vtkDataArray*);
153  vtkGetObjectMacro(RowMask,vtkDataArray);
155 
158 
159 protected:
162 
164  int NumberOfBins[2];
165  double HistogramExtents[4];
166  double CustomHistogramExtents[4];
168  int ComponentsToProcess[2];
172 
173  virtual int ComputeBinExtents(vtkDataArray* col1, vtkDataArray* col2);
174 
176 
178  virtual void Learn( vtkTable* inData,
179  vtkTable* inParameters,
180  vtkMultiBlockDataSet* inMeta );
182 
184  virtual void Derive( vtkMultiBlockDataSet* ) {}
185 
187 
188  virtual void Test( vtkTable*,
190  vtkTable* ) { return; };
192 
194 
195  virtual void Assess( vtkTable*,
197  vtkTable* ) { return; };
199 
201 
202  virtual void SelectAssessFunctor( vtkTable* vtkNotUsed(outData),
203  vtkDataObject* vtkNotUsed(inMeta),
204  vtkStringArray* vtkNotUsed(rowNames),
205  AssessFunctor*& vtkNotUsed(dfunc) ) {}
207 
208  virtual int FillOutputPortInformation( int port, vtkInformation* info );
209 
211 
213  virtual int RequestInformation (vtkInformation *request,
214  vtkInformationVector **inputVector,
215  vtkInformationVector *outputVector);
217 
219 
220  int GetInputArrays(vtkDataArray*& col1, vtkDataArray*& col2);
221 private:
222  vtkExtractHistogram2D(const vtkExtractHistogram2D&); // Not implemented
223  void operator=(const vtkExtractHistogram2D&); // Not implemented
224 };
226 
227 #endif
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
void PrintSelf(ostream &os, vtkIndent indent)
maintain an unordered list of data objects
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
Base class for statistics algorithms.
virtual void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)
#define VTK_DOUBLE
Definition: vtkType.h:36
#define VTK_FLOAT
Definition: vtkType.h:35
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSIMAGING_EXPORT
compute a 2D histogram between two columns of an input vtkTable.
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual void SelectAssessFunctor(vtkTable *vtkNotUsed(outData), vtkDataObject *vtkNotUsed(inMeta), vtkStringArray *vtkNotUsed(rowNames), AssessFunctor *&vtkNotUsed(dfunc))
virtual void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual void Derive(vtkMultiBlockDataSet *)
virtual void Learn(vtkTable *, vtkTable *, vtkMultiBlockDataSet *)=0
virtual void Assess(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)
virtual int FillOutputPortInformation(int port, vtkInformation *info)
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
Composite dataset that organizes datasets into blocks.
Store zero or more vtkInformation instances.
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
general representation of visualization data
Definition: vtkDataObject.h:64