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 -------------------------------------------------------------------------*/
45 #ifndef vtkPairwiseExtractHistogram2D_h
46 #define vtkPairwiseExtractHistogram2D_h
47 
48 #include "vtkFiltersImagingModule.h" // For export macro
49 #include "vtkStatisticsAlgorithm.h"
50 #include "vtkSmartPointer.h" //needed for smart pointer ivars
51 class vtkCollection;
53 class vtkImageData;
54 class vtkIdTypeArray;
56 
57 class VTKFILTERSIMAGING_EXPORT vtkPairwiseExtractHistogram2D : public vtkStatisticsAlgorithm
58 {
59 public:
62  void PrintSelf(ostream& os, vtkIndent indent);
63 
65 
68  vtkSetVector2Macro(NumberOfBins,int);
69  vtkGetVector2Macro(NumberOfBins,int);
71 
73 
78  vtkSetMacro(CustomColumnRangeIndex,int);
79  void SetCustomColumnRangeByIndex(double,double);
81 
83 
88  void SetCustomColumnRange(int col, double range[2]);
89  void SetCustomColumnRange(int col, double rmin, double rmax);
91 
93 
96  vtkSetMacro(ScalarType,int);
98  {this->SetScalarType(VTK_UNSIGNED_INT);};
100  {this->SetScalarType(VTK_UNSIGNED_LONG);};
102  {this->SetScalarType(VTK_UNSIGNED_SHORT);};
104  {this->SetScalarType(VTK_UNSIGNED_CHAR);};
105  vtkGetMacro(ScalarType,int);
107 
111  double GetMaximumBinCount(int idx);
112 
117 
122  int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4]);
123 
128  int GetBinRange(int idx, vtkIdType bin, double range[4]);
129 
134  void GetBinWidth(int idx, double bw[2]);
135 
140  double* GetHistogramExtents(int idx);
141 
146 
151 
153  {
154  HISTOGRAM_IMAGE=3
155  };
156 
161 
162 protected:
165 
166  int NumberOfBins[2];
169 
172  class Internals;
173  Internals* Implementation;
174 
179  virtual void Learn( vtkTable* inData,
180  vtkTable* inParameters,
181  vtkMultiBlockDataSet* outMeta );
182 
186  virtual void Derive( vtkMultiBlockDataSet* ) {}
187 
191  virtual void Assess( vtkTable*,
193  vtkTable* ) {}
194 
198  virtual void Test( vtkTable*,
200  vtkTable* ) { return; };
201 
205  virtual void SelectAssessFunctor( vtkTable* vtkNotUsed(outData),
206  vtkDataObject* vtkNotUsed(inMeta),
207  vtkStringArray* vtkNotUsed(rowNames),
208  AssessFunctor*& vtkNotUsed(dfunc) ) {}
209 
214 
216 
218 private:
220  void operator=(const vtkPairwiseExtractHistogram2D&) VTK_DELETE_FUNCTION;
221 };
222 
223 #endif
vtkPairwiseExtractHistogram2D::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkStatisticsAlgorithm.h
vtkPairwiseExtractHistogram2D::OutputOutlierIds
vtkSmartPointer< vtkIdTypeArray > OutputOutlierIds
Definition: vtkPairwiseExtractHistogram2D.h:170
vtkPairwiseExtractHistogram2D::Learn
virtual void Learn(vtkTable *inData, vtkTable *inParameters, vtkMultiBlockDataSet *outMeta)
Execute the calculations required by the Learn option.
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkPairwiseExtractHistogram2D::BuildTime
vtkTimeStamp BuildTime
Definition: vtkPairwiseExtractHistogram2D.h:217
vtkDataObjectCollection
maintain an unordered list of data objects
Definition: vtkDataObjectCollection.h:35
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkPairwiseExtractHistogram2D::vtkPairwiseExtractHistogram2D
vtkPairwiseExtractHistogram2D()
vtkPairwiseExtractHistogram2D
compute a 2D histogram between all adjacent columns of an input vtkTable.
Definition: vtkPairwiseExtractHistogram2D.h:58
vtkX3D::range
@ range
Definition: vtkX3D.h:238
vtkSmartPointer< vtkIdTypeArray >
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedLong
void SetScalarTypeToUnsignedLong()
Definition: vtkPairwiseExtractHistogram2D.h:99
vtkPairwiseExtractHistogram2D::GetOutputHistogramImage
vtkImageData * GetOutputHistogramImage(int idx)
Get the vtkImageData output of the idx'th histogram filter.
vtkPairwiseExtractHistogram2D::GetBinRange
int GetBinRange(int idx, vtkIdType bin, double range[4])
Get the range of the of the bin located at 1D position index bin in the 2D histogram array at idx.
vtkPairwiseExtractHistogram2D::Implementation
Internals * Implementation
Definition: vtkPairwiseExtractHistogram2D.h:172
vtkPairwiseExtractHistogram2D::~vtkPairwiseExtractHistogram2D
~vtkPairwiseExtractHistogram2D()
vtkStatisticsAlgorithm::AssessFunctor
A base class for a functor that assesses data.
Definition: vtkStatisticsAlgorithm.h:183
vtkPairwiseExtractHistogram2D::HistogramFilters
vtkSmartPointer< vtkCollection > HistogramFilters
Definition: vtkPairwiseExtractHistogram2D.h:171
vtkPairwiseExtractHistogram2D::New
static vtkPairwiseExtractHistogram2D * New()
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:52
vtkPairwiseExtractHistogram2D::GetHistogramFilter
vtkExtractHistogram2D * GetHistogramFilter(int idx)
Get a pointer to the idx'th histogram filter.
vtkPairwiseExtractHistogram2D::SelectAssessFunctor
virtual void SelectAssessFunctor(vtkTable *vtkNotUsed(outData), vtkDataObject *vtkNotUsed(inMeta), vtkStringArray *vtkNotUsed(rowNames), AssessFunctor *&vtkNotUsed(dfunc))
Provide the appropriate assessment functor.
Definition: vtkPairwiseExtractHistogram2D.h:205
vtkPairwiseExtractHistogram2D::Aggregate
virtual void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *)
Given a collection of models, calculate aggregate model.
Definition: vtkPairwiseExtractHistogram2D.h:160
vtkPairwiseExtractHistogram2D::OutputIndices
OutputIndices
Definition: vtkPairwiseExtractHistogram2D.h:153
vtkPairwiseExtractHistogram2D::SetCustomColumnRange
void SetCustomColumnRange(int col, double rmin, double rmax)
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkPairwiseExtractHistogram2D::GetBinWidth
void GetBinWidth(int idx, double bw[2])
Get the width of all of the bins.
vtkCollection
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
vtkExtractHistogram2D
compute a 2D histogram between two columns of an input vtkTable.
Definition: vtkExtractHistogram2D.h:59
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedInt
void SetScalarTypeToUnsignedInt()
Definition: vtkPairwiseExtractHistogram2D.h:97
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPairwiseExtractHistogram2D::CustomColumnRangeIndex
int CustomColumnRangeIndex
Definition: vtkPairwiseExtractHistogram2D.h:168
vtkPairwiseExtractHistogram2D::GetMaximumBinCount
double GetMaximumBinCount(int idx)
Get the maximum bin count for a single histogram.
vtkSmartPointer.h
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
vtkPairwiseExtractHistogram2D::GetMaximumBinCount
double GetMaximumBinCount()
Get the maximum bin count over all histograms.
vtkPairwiseExtractHistogram2D::Derive
virtual void Derive(vtkMultiBlockDataSet *)
Execute the calculations required by the Derive option.
Definition: vtkPairwiseExtractHistogram2D.h:186
vtkPairwiseExtractHistogram2D::ScalarType
int ScalarType
Definition: vtkPairwiseExtractHistogram2D.h:167
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
vtkPairwiseExtractHistogram2D::SetCustomColumnRange
void SetCustomColumnRange(int col, double range[2])
More standard way to set the custom range for a particular column.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkPairwiseExtractHistogram2D::Test
virtual void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)
Execute the calculations required by the Test option.
Definition: vtkPairwiseExtractHistogram2D.h:198
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedShort
void SetScalarTypeToUnsignedShort()
Definition: vtkPairwiseExtractHistogram2D.h:101
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:42
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedChar
void SetScalarTypeToUnsignedChar()
Definition: vtkPairwiseExtractHistogram2D.h:103
vtkPairwiseExtractHistogram2D::Assess
virtual void Assess(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)
Execute the assess option.
Definition: vtkPairwiseExtractHistogram2D.h:191
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:43
vtkPairwiseExtractHistogram2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPairwiseExtractHistogram2D::SetCustomColumnRangeByIndex
void SetCustomColumnRangeByIndex(double, double)
vtkPairwiseExtractHistogram2D::GetHistogramExtents
double * GetHistogramExtents(int idx)
Get the histogram extents currently in use, either computed or set by the user for the idx'th histogr...
vtkStatisticsAlgorithm
Base class for statistics algorithms.
Definition: vtkStatisticsAlgorithm.h:78
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkPairwiseExtractHistogram2D::NewHistogramFilter
virtual vtkExtractHistogram2D * NewHistogramFilter()
Generate a new histogram filter.
vtkPairwiseExtractHistogram2D::GetBinRange
int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4])
Compute the range of the bin located at position (binX,binY) in the 2D histogram at idx.