VTK  9.3.1
vtkPairwiseExtractHistogram2D.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2009 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
29 #ifndef vtkPairwiseExtractHistogram2D_h
30 #define vtkPairwiseExtractHistogram2D_h
31 
32 #include "vtkFiltersImagingModule.h" // For export macro
33 #include "vtkSmartPointer.h" //needed for smart pointer ivars
34 #include "vtkStatisticsAlgorithm.h"
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkCollection;
38 class vtkImageData;
39 class vtkIdTypeArray;
41 
42 class VTKFILTERSIMAGING_EXPORT vtkPairwiseExtractHistogram2D : public vtkStatisticsAlgorithm
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
53  vtkSetVector2Macro(NumberOfBins, int);
54  vtkGetVector2Macro(NumberOfBins, int);
56 
58 
63  vtkSetMacro(CustomColumnRangeIndex, int);
64  void SetCustomColumnRangeByIndex(double, double);
66 
68 
73  void SetCustomColumnRange(int col, double range[2]);
74  void SetCustomColumnRange(int col, double rmin, double rmax);
76 
78 
81  vtkSetMacro(ScalarType, int);
82  void SetScalarTypeToUnsignedInt() { this->SetScalarType(VTK_UNSIGNED_INT); }
83  void SetScalarTypeToUnsignedLong() { this->SetScalarType(VTK_UNSIGNED_LONG); }
84  void SetScalarTypeToUnsignedShort() { this->SetScalarType(VTK_UNSIGNED_SHORT); }
85  void SetScalarTypeToUnsignedChar() { this->SetScalarType(VTK_UNSIGNED_CHAR); }
86  vtkGetMacro(ScalarType, int);
88 
92  double GetMaximumBinCount(int idx);
93 
97  double GetMaximumBinCount();
98 
103  int GetBinRange(int idx, vtkIdType binX, vtkIdType binY, double range[4]);
104 
109  int GetBinRange(int idx, vtkIdType bin, double range[4]);
110 
115  void GetBinWidth(int idx, double bw[2]);
116 
121  double* GetHistogramExtents(int idx);
122 
126  vtkImageData* GetOutputHistogramImage(int idx);
127 
131  vtkExtractHistogram2D* GetHistogramFilter(int idx);
132 
134  {
135  HISTOGRAM_IMAGE = 3
136  };
137 
142 
143 protected:
145  ~vtkPairwiseExtractHistogram2D() override;
146 
147  int NumberOfBins[2];
150 
153  class Internals;
154  Internals* Implementation;
155 
160  void Learn(vtkTable* inData, vtkTable* inParameters, vtkMultiBlockDataSet* outMeta) override;
161 
165  void Derive(vtkMultiBlockDataSet*) override {}
166 
171 
176 
180  void SelectAssessFunctor(vtkTable* vtkNotUsed(outData), vtkDataObject* vtkNotUsed(inMeta),
181  vtkStringArray* vtkNotUsed(rowNames), AssessFunctor*& vtkNotUsed(dfunc)) override
182  {
183  }
184 
188  virtual vtkExtractHistogram2D* NewHistogramFilter();
189 
191 
193 
194 private:
196  void operator=(const vtkPairwiseExtractHistogram2D&) = delete;
197 };
198 
199 VTK_ABI_NAMESPACE_END
200 #endif
A base class for a functor that assesses data.
#define VTK_UNSIGNED_INT
Definition: vtkType.h:39
vtkSmartPointer< vtkCollection > HistogramFilters
vtkSmartPointer< vtkIdTypeArray > OutputOutlierIds
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:37
maintain an unordered list of data objects
record modification and/or execution time
Definition: vtkTimeStamp.h:24
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:315
void Derive(vtkMultiBlockDataSet *) override
Execute the calculations required by the Derive option.
void SetScalarTypeToUnsignedLong()
Set the scalar type for each of the computed histograms.
Base class for statistics algorithms.
a simple class to control print indentation
Definition: vtkIndent.h:28
compute a 2D histogram between two columns of an input vtkTable.
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
virtual void Learn(vtkTable *, vtkTable *, vtkMultiBlockDataSet *)=0
Execute the calculations required by the Learn option, given some input Data.
void SetScalarTypeToUnsignedChar()
Set the scalar type for each of the computed histograms.
void SetScalarTypeToUnsignedInt()
Set the scalar type for each of the computed histograms.
void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *) override
Given a collection of models, calculate aggregate model.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:58
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:35
void SelectAssessFunctor(vtkTable *vtkNotUsed(outData), vtkDataObject *vtkNotUsed(inMeta), vtkStringArray *vtkNotUsed(rowNames), AssessFunctor *&vtkNotUsed(dfunc)) override
Provide the appropriate assessment functor.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:44
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void Assess(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the assess option.
Composite dataset that organizes datasets into blocks.
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:41
void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the calculations required by the Test option.
void SetScalarTypeToUnsignedShort()
Set the scalar type for each of the computed histograms.
general representation of visualization data
Definition: vtkDataObject.h:54
compute a 2D histogram between all adjacent columns of an input vtkTable.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.