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 
116  double GetMaximumBinCount();
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 
145  vtkImageData* GetOutputHistogramImage(int idx);
146 
150  vtkExtractHistogram2D* GetHistogramFilter(int idx);
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 
213  virtual vtkExtractHistogram2D* NewHistogramFilter();
214 
215  virtual int FillOutputPortInformation( int port, vtkInformation* info );
216 
218 private:
220  void operator=(const vtkPairwiseExtractHistogram2D&) VTK_DELETE_FUNCTION;
221 };
222 
223 #endif
A base class for a functor that assesses data.
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
vtkSmartPointer< vtkCollection > HistogramFilters
vtkSmartPointer< vtkIdTypeArray > OutputOutlierIds
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
maintain an unordered list of data objects
record modification and/or execution time
Definition: vtkTimeStamp.h:35
virtual void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *)
Given a collection of models, calculate aggregate model.
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:287
virtual void SelectAssessFunctor(vtkTable *vtkNotUsed(outData), vtkDataObject *vtkNotUsed(inMeta), vtkStringArray *vtkNotUsed(rowNames), AssessFunctor *&vtkNotUsed(dfunc))
Provide the appropriate assessment functor.
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:39
compute a 2D histogram between two columns of an input vtkTable.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void Derive(vtkMultiBlockDataSet *)
Execute the calculations required by the Derive option.
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.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)
Execute the calculations required by the Test option.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
Composite dataset that organizes datasets into blocks.
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
void SetScalarTypeToUnsignedShort()
Set the scalar type for each of the computed histograms.
general representation of visualization data
Definition: vtkDataObject.h:64
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.
virtual void Assess(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)
Execute the assess option.