VTK  9.0.2
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 
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 
142 
147 
149  {
150  HISTOGRAM_IMAGE = 3
151  };
152 
157 
158 protected:
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 
204 
206 
208 
209 private:
211  void operator=(const vtkPairwiseExtractHistogram2D&) = delete;
212 };
213 
214 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
maintain an unordered list of data objects
general representation of visualization data
Definition: vtkDataObject.h:60
compute a 2D histogram between two columns of an input vtkTable.
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
a simple class to control print indentation
Definition: vtkIndent.h:34
Store vtkAlgorithm input/output information.
Composite dataset that organizes datasets into blocks.
compute a 2D histogram between all adjacent columns of an input vtkTable.
void Learn(vtkTable *inData, vtkTable *inParameters, vtkMultiBlockDataSet *outMeta) override
Execute the calculations required by the Learn option.
void SetCustomColumnRange(int col, double range[2])
More standard way to set the custom range for a particular column.
void SetCustomColumnRangeByIndex(double, double)
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.
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.
void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *) override
Given a collection of models, calculate aggregate model.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void Derive(vtkMultiBlockDataSet *) override
Execute the calculations required by the Derive option.
void GetBinWidth(int idx, double bw[2])
Get the width of all of the bins.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkIdTypeArray > OutputOutlierIds
~vtkPairwiseExtractHistogram2D() override
void SetCustomColumnRange(int col, double rmin, double rmax)
static vtkPairwiseExtractHistogram2D * New()
double GetMaximumBinCount()
Get the maximum bin count over all histograms.
void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the calculations required by the Test option.
virtual vtkExtractHistogram2D * NewHistogramFilter()
Generate a new histogram filter.
vtkSmartPointer< vtkCollection > HistogramFilters
vtkExtractHistogram2D * GetHistogramFilter(int idx)
Get a pointer to the idx'th histogram filter.
vtkImageData * GetOutputHistogramImage(int idx)
Get the vtkImageData output of the idx'th histogram filter.
void SelectAssessFunctor(vtkTable *vtkNotUsed(outData), vtkDataObject *vtkNotUsed(inMeta), vtkStringArray *vtkNotUsed(rowNames), AssessFunctor *&vtkNotUsed(dfunc)) override
Provide the appropriate assessment functor.
double * GetHistogramExtents(int idx)
Get the histogram extents currently in use, either computed or set by the user for the idx'th histogr...
double GetMaximumBinCount(int idx)
Get the maximum bin count for a single histogram.
void Assess(vtkTable *, vtkMultiBlockDataSet *, vtkTable *) override
Execute the assess option.
A base class for a functor that assesses data.
Base class for statistics algorithms.
a vtkAbstractArray subclass for strings
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:63
record modification and/or execution time
Definition: vtkTimeStamp.h:33
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
@ range
Definition: vtkX3D.h:244
int vtkIdType
Definition: vtkType.h:338
#define VTK_UNSIGNED_INT
Definition: vtkType.h:49
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:45
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:47
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:51