VTK  9.0.1
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 "vtkSmartPointer.h" //needed for smart pointer ivars
50 #include "vtkStatisticsAlgorithm.h"
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) override;
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);
97  void SetScalarTypeToUnsignedInt() { this->SetScalarType(VTK_UNSIGNED_INT); }
98  void SetScalarTypeToUnsignedLong() { this->SetScalarType(VTK_UNSIGNED_LONG); }
99  void SetScalarTypeToUnsignedShort() { this->SetScalarType(VTK_UNSIGNED_SHORT); }
100  void SetScalarTypeToUnsignedChar() { this->SetScalarType(VTK_UNSIGNED_CHAR); }
101  vtkGetMacro(ScalarType, int);
103 
107  double GetMaximumBinCount(int idx);
108 
112  double GetMaximumBinCount();
113 
118  int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4]);
119 
124  int GetBinRange(int idx, vtkIdType bin, double range[4]);
125 
130  void GetBinWidth(int idx, double bw[2]);
131 
136  double* GetHistogramExtents(int idx);
137 
141  vtkImageData* GetOutputHistogramImage(int idx);
142 
146  vtkExtractHistogram2D* GetHistogramFilter(int idx);
147 
149  {
150  HISTOGRAM_IMAGE = 3
151  };
152 
157 
158 protected:
160  ~vtkPairwiseExtractHistogram2D() override;
161 
162  int NumberOfBins[2];
165 
168  class Internals;
169  Internals* Implementation;
170 
175  void Learn(vtkTable* inData, vtkTable* inParameters, vtkMultiBlockDataSet* outMeta) override;
176 
180  void Derive(vtkMultiBlockDataSet*) override {}
181 
186 
190  void Test(vtkTable*, vtkMultiBlockDataSet*, vtkTable*) override { return; }
191 
195  void SelectAssessFunctor(vtkTable* vtkNotUsed(outData), vtkDataObject* vtkNotUsed(inMeta),
196  vtkStringArray* vtkNotUsed(rowNames), AssessFunctor*& vtkNotUsed(dfunc)) override
197  {
198  }
199 
203  virtual vtkExtractHistogram2D* NewHistogramFilter();
204 
206 
208 
209 private:
211  void operator=(const vtkPairwiseExtractHistogram2D&) = delete;
212 };
213 
214 #endif
vtkStatisticsAlgorithm.h
vtkPairwiseExtractHistogram2D::OutputOutlierIds
vtkSmartPointer< vtkIdTypeArray > OutputOutlierIds
Definition: vtkPairwiseExtractHistogram2D.h:166
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkPairwiseExtractHistogram2D::BuildTime
vtkTimeStamp BuildTime
Definition: vtkPairwiseExtractHistogram2D.h:207
vtkDataObjectCollection
maintain an unordered list of data objects
Definition: vtkDataObjectCollection.h:31
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:49
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:47
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkPairwiseExtractHistogram2D
compute a 2D histogram between all adjacent columns of an input vtkTable.
Definition: vtkPairwiseExtractHistogram2D.h:57
vtkX3D::range
@ range
Definition: vtkX3D.h:244
vtkSmartPointer< vtkIdTypeArray >
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedLong
void SetScalarTypeToUnsignedLong()
Definition: vtkPairwiseExtractHistogram2D.h:98
vtkPairwiseExtractHistogram2D::Derive
void Derive(vtkMultiBlockDataSet *) override
Execute the calculations required by the Derive option.
Definition: vtkPairwiseExtractHistogram2D.h:180
vtkPairwiseExtractHistogram2D::Implementation
Internals * Implementation
Definition: vtkPairwiseExtractHistogram2D.h:168
vtkStatisticsAlgorithm::AssessFunctor
A base class for a functor that assesses data.
Definition: vtkStatisticsAlgorithm.h:185
vtkPairwiseExtractHistogram2D::HistogramFilters
vtkSmartPointer< vtkCollection > HistogramFilters
Definition: vtkPairwiseExtractHistogram2D.h:167
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:45
vtkPairwiseExtractHistogram2D::OutputIndices
OutputIndices
Definition: vtkPairwiseExtractHistogram2D.h:148
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:52
vtkExtractHistogram2D
compute a 2D histogram between two columns of an input vtkTable.
Definition: vtkExtractHistogram2D.h:58
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedInt
void SetScalarTypeToUnsignedInt()
Definition: vtkPairwiseExtractHistogram2D.h:97
vtkStatisticsAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPairwiseExtractHistogram2D::CustomColumnRangeIndex
int CustomColumnRangeIndex
Definition: vtkPairwiseExtractHistogram2D.h:164
vtkSmartPointer.h
vtkPairwiseExtractHistogram2D::SelectAssessFunctor
void SelectAssessFunctor(vtkTable *vtkNotUsed(outData), vtkDataObject *vtkNotUsed(inMeta), vtkStringArray *vtkNotUsed(rowNames), AssessFunctor *&vtkNotUsed(dfunc)) override
Provide the appropriate assessment functor.
Definition: vtkPairwiseExtractHistogram2D.h:195
vtkStatisticsAlgorithm::Learn
virtual void Learn(vtkTable *, vtkTable *, vtkMultiBlockDataSet *)=0
Execute the calculations required by the Learn option, given some input Data.
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:45
vtkStatisticsAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPairwiseExtractHistogram2D::ScalarType
int ScalarType
Definition: vtkPairwiseExtractHistogram2D.h:163
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:51
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedShort
void SetScalarTypeToUnsignedShort()
Definition: vtkPairwiseExtractHistogram2D.h:99
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:35
vtkPairwiseExtractHistogram2D::Aggregate
void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *) override
Given a collection of models, calculate aggregate model.
Definition: vtkPairwiseExtractHistogram2D.h:156
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedChar
void SetScalarTypeToUnsignedChar()
Definition: vtkPairwiseExtractHistogram2D.h:100
vtkPairwiseExtractHistogram2D::Assess
void Assess(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the assess option.
Definition: vtkPairwiseExtractHistogram2D.h:185
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:36
vtkStatisticsAlgorithm
Base class for statistics algorithms.
Definition: vtkStatisticsAlgorithm.h:71
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkPairwiseExtractHistogram2D::Test
void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the calculations required by the Test option.
Definition: vtkPairwiseExtractHistogram2D.h:190
vtkTableAlgorithm::New
static vtkTableAlgorithm * New()