VTK  9.2.6
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=========================================================================*/
32
33#ifndef vtkBinCellDataFilter_h
34#define vtkBinCellDataFilter_h
35
36#include "vtkDataSetAlgorithm.h"
37#include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
38#include "vtkFiltersCoreModule.h" // For export macro
39
40#include "vtkContourValues.h" // Needed for inline methods
41
43
44class VTKFILTERSCORE_EXPORT vtkBinCellDataFilter : public vtkDataSetAlgorithm
45{
46public:
48
54
56
60 void PrintSelf(ostream& os, vtkIndent indent) override;
62
64
67 void SetValue(int i, double value);
68 double GetValue(int i);
69 double* GetValues();
70 void GetValues(double* binValues);
71 void SetNumberOfBins(int numBins);
73 void GenerateValues(int numBins, double range[2]);
74 void GenerateValues(int numBins, double rangeStart, double rangeEnd);
76
78
87
95
97
109 vtkBooleanMacro(SpatialMatch, vtkTypeBool);
111
113
117 vtkSetMacro(StoreNumberOfNonzeroBins, bool);
118 vtkBooleanMacro(StoreNumberOfNonzeroBins, bool);
119 vtkGetMacro(StoreNumberOfNonzeroBins, bool);
121
123
131
133
138 vtkSetMacro(Tolerance, double);
139 vtkGetMacro(Tolerance, double);
141
143
148 vtkSetMacro(ComputeTolerance, bool);
149 vtkBooleanMacro(ComputeTolerance, bool);
150 vtkGetMacro(ComputeTolerance, bool);
152
154
157 vtkSetMacro(ArrayComponent, int);
158 vtkGetMacro(ArrayComponent, int);
160
166
168
174 vtkGetMacro(CellOverlapMethod, int);
176
178
182 virtual void SetCellLocator(vtkAbstractCellLocator* cellLocator);
185
186protected:
189
191
193 double Tolerance;
197
200 virtual void CreateDefaultLocator();
201
205
207
208private:
210 void operator=(const vtkBinCellDataFilter&) = delete;
211};
212
217inline void vtkBinCellDataFilter::SetValue(int i, double value)
218{
219 this->BinValues->SetValue(i, value);
220}
221
226{
227 return this->BinValues->GetValue(i);
228}
229
235{
236 return this->BinValues->GetValues();
237}
238
244inline void vtkBinCellDataFilter::GetValues(double* binValues)
245{
246 this->BinValues->GetValues(binValues);
247}
248
255{
256 this->BinValues->SetNumberOfContours(number);
257}
258
264{
265 return this->BinValues->GetNumberOfContours();
266}
267
272inline void vtkBinCellDataFilter::GenerateValues(int numBins, double range[2])
273{
274 this->BinValues->GenerateValues(numBins, range);
275}
276
281inline void vtkBinCellDataFilter::GenerateValues(int numBins, double rangeStart, double rangeEnd)
282{
283 this->BinValues->GenerateValues(numBins, rangeStart, rangeEnd);
284}
285
286#endif
an abstract base class for locators which find cells
Proxy object to connect input/output ports.
~vtkBinCellDataFilter() override
vtkDataObject * GetSource()
Specify the data set whose cells will be counted.
virtual void SetCellLocator(vtkAbstractCellLocator *cellLocator)
Set/Get a spatial locator for speeding the search process.
void SetSourceData(vtkDataObject *source)
Specify the data set whose cells will be counted.
void SetValue(int i, double value)
Methods to set / get bin values.
vtkAbstractCellLocator * CellLocator
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
vtkContourValues vtkBinValues
static vtkBinCellDataFilter * New()
Construct object with initial range (VTK_DOUBLE_MIN, VTK_DOUBLE_MAX) and a single bin.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type and printing.
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify the data set whose cells will be counted.
double GetValue(int i)
Get the ith bin value.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetNumberOfBins(int numBins)
Set the number of bins to place into the list.
virtual void CreateDefaultLocator()
vtkIdType GetNumberOfBins()
Get the number of bins in the list of bin values, not counting the overflow bin.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
double * GetValues()
Get a pointer to an array of bin values.
void GenerateValues(int numBins, double range[2])
Generate numBins equally spaced bin values between specified range.
helper object to manage setting and generating contour values
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:69
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition vtkType.h:332