VTK
vtkBinCellDataFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBinCellDataFilter.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 =========================================================================*/
33 #ifndef vtkBinCellDataFilter_h
34 #define vtkBinCellDataFilter_h
35 
36 #include "vtkFiltersCoreModule.h" // For export macro
37 #include "vtkDataSetAlgorithm.h"
38 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
39 
40 #include "vtkContourValues.h" // Needed for inline methods
41 
42 class vtkCellLocator;
43 
44 class VTKFILTERSCORE_EXPORT vtkBinCellDataFilter : public vtkDataSetAlgorithm
45 {
46 public:
48 
50  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
51 
57 
59 
62  void SetValue(int i, double value);
63  double GetValue(int i);
64  double *GetValues();
65  void GetValues(double *binValues);
66  void SetNumberOfBins(int numBins);
67  int GetNumberOfBins();
68  void GenerateValues(int numBins, double range[2]);
69  void GenerateValues(int numBins, double rangeStart, double rangeEnd);
71 
73 
82 
90 
92 
102  vtkSetMacro(SpatialMatch, int);
103  vtkGetMacro(SpatialMatch, int);
104  vtkBooleanMacro(SpatialMatch, int);
106 
108 
112  vtkSetMacro(StoreNumberOfNonzeroBins, bool);
113  vtkBooleanMacro(StoreNumberOfNonzeroBins, bool);
114  vtkGetMacro(StoreNumberOfNonzeroBins, bool);
116 
118 
123  vtkSetStringMacro(NumberOfNonzeroBinsArrayName)
124  vtkGetStringMacro(NumberOfNonzeroBinsArrayName)
126 
128 
133  vtkSetMacro(Tolerance, double);
134  vtkGetMacro(Tolerance, double);
136 
138 
143  vtkSetMacro(ComputeTolerance, bool);
144  vtkBooleanMacro(ComputeTolerance, bool);
145  vtkGetMacro(ComputeTolerance, bool);
147 
149 
152  vtkSetMacro(ArrayComponent,int);
153  vtkGetMacro(ArrayComponent,int);
155 
157  {
158  CELL_CENTROID=0,
159  CELL_POINTS=1,
160  };
161 
163 
168  vtkSetClampMacro(CellOverlapMethod,int,CELL_CENTROID,CELL_POINTS);
169  vtkGetMacro(CellOverlapMethod, int);
171 
173 
177  virtual void SetCellLocator(vtkCellLocator *cellLocator);
178  vtkGetObjectMacro(CellLocator,vtkCellLocator);
180 
181 protected:
183  ~vtkBinCellDataFilter() VTK_OVERRIDE;
184 
185  int SpatialMatch;
186 
187  bool StoreNumberOfNonzeroBins;
188  double Tolerance;
189  bool ComputeTolerance;
190  int ArrayComponent;
191  int CellOverlapMethod;
192 
193  vtkBinValues *BinValues;
194  vtkCellLocator *CellLocator;
195 
196  int RequestData(vtkInformation *, vtkInformationVector **,
197  vtkInformationVector *) VTK_OVERRIDE;
198  int RequestInformation(vtkInformation *, vtkInformationVector **,
199  vtkInformationVector *) VTK_OVERRIDE;
200  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
201  vtkInformationVector *) VTK_OVERRIDE;
202 
203  virtual void CreateDefaultLocator();
204 
205  char* NumberOfNonzeroBinsArrayName;
206 
207 private:
208  vtkBinCellDataFilter(const vtkBinCellDataFilter&) VTK_DELETE_FUNCTION;
209  void operator=(const vtkBinCellDataFilter&) VTK_DELETE_FUNCTION;
210 };
211 
216 inline void vtkBinCellDataFilter::SetValue(int i, double value)
217 {this->BinValues->SetValue(i,value);}
218 
222 inline double vtkBinCellDataFilter::GetValue(int i)
223 {return this->BinValues->GetValue(i);}
224 
230 {return this->BinValues->GetValues();}
231 
237 inline void vtkBinCellDataFilter::GetValues(double *binValues)
238 {this->BinValues->GetValues(binValues);}
239 
246 {this->BinValues->SetNumberOfContours(number);}
247 
253 {return this->BinValues->GetNumberOfContours();}
254 
259 inline void vtkBinCellDataFilter::GenerateValues(int numBins, double range[2])
260 {this->BinValues->GenerateValues(numBins, range);}
261 
266 inline void vtkBinCellDataFilter::GenerateValues(int numBins, double
267  rangeStart, double rangeEnd)
268 {this->BinValues->GenerateValues(numBins, rangeStart, rangeEnd);}
269 
270 #endif
vtkBinCellDataFilter::~vtkBinCellDataFilter
~vtkBinCellDataFilter() override
vtkBinCellDataFilter::SetSourceConnection
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify the data set whose cells will be counted.
vtkBinCellDataFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBinCellDataFilter::vtkBinValues
vtkContourValues vtkBinValues
Definition: vtkBinCellDataFilter.h:47
vtkCellLocator
octree-based spatial search object to quickly locate cells
Definition: vtkCellLocator.h:53
vtkBinCellDataFilter::CellOverlapCriterion
CellOverlapCriterion
Definition: vtkBinCellDataFilter.h:157
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkBinCellDataFilter::GetNumberOfBins
int GetNumberOfBins()
Get the number of bins in the list of bin values, not counting the overflow bin.
Definition: vtkBinCellDataFilter.h:252
vtkBinCellDataFilter::SetCellLocator
virtual void SetCellLocator(vtkCellLocator *cellLocator)
Set/Get a spatial locator for speeding the search process.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkBinCellDataFilter::GenerateValues
void GenerateValues(int numBins, double range[2])
Generate numBins equally spaced bin values between specified range.
Definition: vtkBinCellDataFilter.h:259
vtkX3D::range
@ range
Definition: vtkX3D.h:238
vtkBinCellDataFilter::SetSourceData
void SetSourceData(vtkDataObject *source)
Specify the data set whose cells will be counted.
vtkBinCellDataFilter::vtkBinCellDataFilter
vtkBinCellDataFilter()
vtkBinCellDataFilter::New
static vtkBinCellDataFilter * New()
Construct object with initial range (VTK_DOUBLE_MIN, VTK_DOUBLE_MAX) and a single bin.
vtkBinCellDataFilter::GetSource
vtkDataObject * GetSource()
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:822
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:52
vtkBinCellDataFilter::GetValues
double * GetValues()
Get a pointer to an array of bin values.
Definition: vtkBinCellDataFilter.h:229
vtkBinCellDataFilter::GetValue
double GetValue(int i)
Get the ith bin value.
Definition: vtkBinCellDataFilter.h:222
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:36
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkContourValues::SetValue
void SetValue(int i, double value)
Set the ith contour value.
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkContourValues.h
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkDataSetAlgorithm.h
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:40
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkDataSetAttributes.h
vtkBinCellDataFilter::SetNumberOfBins
void SetNumberOfBins(int numBins)
Set the number of bins to place into the list.
Definition: vtkBinCellDataFilter.h:245
vtkBinCellDataFilter
bin source cell data into input cells.
Definition: vtkBinCellDataFilter.h:45