VTK: Filters/Imaging/vtkPairwiseExtractHistogram2D.h Source File

| 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;
37 class vtkExtractHistogram2D;
38 class vtkImageData;
39 class vtkIdTypeArray;
40 class vtkMultiBlockDataSet;
41
42 class VTKFILTERSIMAGING_EXPORT vtkPairwiseExtractHistogram2D : public vtkStatisticsAlgorithm
43 {
44 public:
45 static vtkPairwiseExtractHistogram2D* New();
46 vtkTypeMacro(vtkPairwiseExtractHistogram2D, vtkStatisticsAlgorithm);
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
133 enum OutputIndices
134 {
135 HISTOGRAM_IMAGE = 3
136 };
137
141 void Aggregate(vtkDataObjectCollection*, vtkMultiBlockDataSet*) override {}
142
143 protected:
144 vtkPairwiseExtractHistogram2D();
145 ~vtkPairwiseExtractHistogram2D() override;
146
147 int NumberOfBins[2];
148 int ScalarType;
149 int CustomColumnRangeIndex;
150
151 vtkSmartPointer<vtkIdTypeArray> OutputOutlierIds;
152 vtkSmartPointer<vtkCollection> HistogramFilters;
153 class Internals;
154 Internals* Implementation;
155
160 void Learn(vtkTable* inData, vtkTable* inParameters, vtkMultiBlockDataSet* outMeta) override;
161
165 void Derive(vtkMultiBlockDataSet*) override {}
166
170 void Assess(vtkTable*, vtkMultiBlockDataSet*, vtkTable*) override {}
171
175 void Test(vtkTable*, vtkMultiBlockDataSet*, vtkTable*) override {}
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
190 int FillOutputPortInformation(int port, vtkInformation* info) override;
191
192 vtkTimeStamp BuildTime;
193
194 private:
195 vtkPairwiseExtractHistogram2D(const vtkPairwiseExtractHistogram2D&) = delete;
196 void operator=(const vtkPairwiseExtractHistogram2D&) = delete;
197 };
198
199 VTK_ABI_NAMESPACE_END
200 #endif
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
vtkDataObjectCollection
maintain an unordered list of data objects
Definition: vtkDataObjectCollection.h:21
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkExtractHistogram2D
compute a 2D histogram between two columns of an input vtkTable.
Definition: vtkExtractHistogram2D.h:45
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:37
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:50
vtkPairwiseExtractHistogram2D
compute a 2D histogram between all adjacent columns of an input vtkTable.
Definition: vtkPairwiseExtractHistogram2D.h:43
vtkPairwiseExtractHistogram2D::Implementation
Internals * Implementation
Definition: vtkPairwiseExtractHistogram2D.h:153
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedLong
void SetScalarTypeToUnsignedLong()
Set the scalar type for each of the computed histograms.
Definition: vtkPairwiseExtractHistogram2D.h:83
vtkPairwiseExtractHistogram2D::Learn
void Learn(vtkTable *inData, vtkTable *inParameters, vtkMultiBlockDataSet *outMeta) override
Execute the calculations required by the Learn option.
vtkPairwiseExtractHistogram2D::SetCustomColumnRange
void SetCustomColumnRange(int col, double range[2])
More standard way to set the custom range for a particular column.
vtkPairwiseExtractHistogram2D::SetCustomColumnRangeByIndex
void SetCustomColumnRangeByIndex(double, double)
Strange method for setting an index to be used for setting custom column range.
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedInt
void SetScalarTypeToUnsignedInt()
Set the scalar type for each of the computed histograms.
Definition: vtkPairwiseExtractHistogram2D.h:82
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.
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::Aggregate
void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *) override
Given a collection of models, calculate aggregate model.
Definition: vtkPairwiseExtractHistogram2D.h:141
vtkPairwiseExtractHistogram2D::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkPairwiseExtractHistogram2D::Derive
void Derive(vtkMultiBlockDataSet *) override
Execute the calculations required by the Derive option.
Definition: vtkPairwiseExtractHistogram2D.h:165
vtkPairwiseExtractHistogram2D::GetBinWidth
void GetBinWidth(int idx, double bw[2])
Get the width of all of the bins.
vtkPairwiseExtractHistogram2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPairwiseExtractHistogram2D::OutputOutlierIds
vtkSmartPointer< vtkIdTypeArray > OutputOutlierIds
Definition: vtkPairwiseExtractHistogram2D.h:151
vtkPairwiseExtractHistogram2D::~vtkPairwiseExtractHistogram2D
~vtkPairwiseExtractHistogram2D() override
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedShort
void SetScalarTypeToUnsignedShort()
Set the scalar type for each of the computed histograms.
Definition: vtkPairwiseExtractHistogram2D.h:84
vtkPairwiseExtractHistogram2D::CustomColumnRangeIndex
int CustomColumnRangeIndex
Definition: vtkPairwiseExtractHistogram2D.h:149
vtkPairwiseExtractHistogram2D::SetCustomColumnRange
void SetCustomColumnRange(int col, double rmin, double rmax)
More standard way to set the custom range for a particular column.
vtkPairwiseExtractHistogram2D::SetScalarTypeToUnsignedChar
void SetScalarTypeToUnsignedChar()
Set the scalar type for each of the computed histograms.
Definition: vtkPairwiseExtractHistogram2D.h:85
vtkPairwiseExtractHistogram2D::New
static vtkPairwiseExtractHistogram2D * New()
vtkPairwiseExtractHistogram2D::GetMaximumBinCount
double GetMaximumBinCount()
Get the maximum bin count over all histograms.
vtkPairwiseExtractHistogram2D::Test
void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the calculations required by the Test option.
Definition: vtkPairwiseExtractHistogram2D.h:175
vtkPairwiseExtractHistogram2D::NewHistogramFilter
virtual vtkExtractHistogram2D * NewHistogramFilter()
Generate a new histogram filter.
vtkPairwiseExtractHistogram2D::HistogramFilters
vtkSmartPointer< vtkCollection > HistogramFilters
Definition: vtkPairwiseExtractHistogram2D.h:152
vtkPairwiseExtractHistogram2D::vtkPairwiseExtractHistogram2D
vtkPairwiseExtractHistogram2D()
vtkPairwiseExtractHistogram2D::GetHistogramFilter
vtkExtractHistogram2D * GetHistogramFilter(int idx)
Get a pointer to the idx'th histogram filter.
vtkPairwiseExtractHistogram2D::GetOutputHistogramImage
vtkImageData * GetOutputHistogramImage(int idx)
Get the vtkImageData output of the idx'th histogram filter.
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:180
vtkPairwiseExtractHistogram2D::BuildTime
vtkTimeStamp BuildTime
Definition: vtkPairwiseExtractHistogram2D.h:192
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...
vtkPairwiseExtractHistogram2D::ScalarType
int ScalarType
Definition: vtkPairwiseExtractHistogram2D.h:148
vtkPairwiseExtractHistogram2D::GetMaximumBinCount
double GetMaximumBinCount(int idx)
Get the maximum bin count for a single histogram.
vtkPairwiseExtractHistogram2D::OutputIndices
OutputIndices
Definition: vtkPairwiseExtractHistogram2D.h:134
vtkPairwiseExtractHistogram2D::Assess
void Assess(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the assess option.
Definition: vtkPairwiseExtractHistogram2D.h:170
vtkSmartPointer< vtkIdTypeArray >
vtkStatisticsAlgorithm::AssessFunctor
A base class for a functor that assesses data.
Definition: vtkStatisticsAlgorithm.h:183
vtkStatisticsAlgorithm
Base class for statistics algorithms.
Definition: vtkStatisticsAlgorithm.h:69
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:41
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::range
@ range
Definition: vtkX3D.h:238
vtkSmartPointer.h
vtkStatisticsAlgorithm.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:39
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:35
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:37
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:41