VTK  9.5.20250910
vtkBinCellDataFilter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
21#ifndef vtkBinCellDataFilter_h
22#define vtkBinCellDataFilter_h
23
24#include "vtkDataSetAlgorithm.h"
25#include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
26#include "vtkFiltersCoreModule.h" // For export macro
27#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28
29#include "vtkContourValues.h" // Needed for inline methods
30
31VTK_ABI_NAMESPACE_BEGIN
33
34class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkBinCellDataFilter : public vtkDataSetAlgorithm
35{
36public:
38
44
46
50 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
57 void SetValue(int i, double value);
58 double GetValue(int i);
59 double* GetValues();
60 void GetValues(double* binValues);
61 void SetNumberOfBins(int numBins);
62 vtkIdType GetNumberOfBins();
63 void GenerateValues(int numBins, double range[2]);
64 void GenerateValues(int numBins, double rangeStart, double rangeEnd);
66
68
77
85
87
97 vtkSetMacro(SpatialMatch, vtkTypeBool);
98 vtkGetMacro(SpatialMatch, vtkTypeBool);
99 vtkBooleanMacro(SpatialMatch, vtkTypeBool);
101
103
107 vtkSetMacro(StoreNumberOfNonzeroBins, bool);
108 vtkBooleanMacro(StoreNumberOfNonzeroBins, bool);
109 vtkGetMacro(StoreNumberOfNonzeroBins, bool);
111
113
118 vtkSetStringMacro(NumberOfNonzeroBinsArrayName);
119 vtkGetStringMacro(NumberOfNonzeroBinsArrayName);
121
123
128 vtkSetMacro(Tolerance, double);
129 vtkGetMacro(Tolerance, double);
131
133
138 vtkSetMacro(ComputeTolerance, bool);
139 vtkBooleanMacro(ComputeTolerance, bool);
140 vtkGetMacro(ComputeTolerance, bool);
142
144
147 vtkSetMacro(ArrayComponent, int);
148 vtkGetMacro(ArrayComponent, int);
150
152 {
153 CELL_CENTROID = 0,
154 CELL_POINTS = 1,
155 };
156
158
163 vtkSetClampMacro(CellOverlapMethod, int, CELL_CENTROID, CELL_POINTS);
164 vtkGetMacro(CellOverlapMethod, int);
166
168
172 virtual void SetCellLocator(vtkAbstractCellLocator* cellLocator);
173 vtkGetObjectMacro(CellLocator, vtkAbstractCellLocator);
175
176protected:
179
181
183 double Tolerance;
187
190 virtual void CreateDefaultLocator();
191
195
197
198private:
200 void operator=(const vtkBinCellDataFilter&) = delete;
201};
202
207inline void vtkBinCellDataFilter::SetValue(int i, double value)
208{
209 this->BinValues->SetValue(i, value);
210}
211
216{
217 return this->BinValues->GetValue(i);
218}
219
225{
226 return this->BinValues->GetValues();
227}
228
234inline void vtkBinCellDataFilter::GetValues(double* binValues)
235{
236 this->BinValues->GetValues(binValues);
237}
238
245{
246 this->BinValues->SetNumberOfContours(number);
247}
248
254{
255 return this->BinValues->GetNumberOfContours();
256}
257
262inline void vtkBinCellDataFilter::GenerateValues(int numBins, double range[2])
263{
264 this->BinValues->GenerateValues(numBins, range);
265}
266
271inline void vtkBinCellDataFilter::GenerateValues(int numBins, double rangeStart, double rangeEnd)
272{
273 this->BinValues->GenerateValues(numBins, rangeStart, rangeEnd);
274}
275
276VTK_ABI_NAMESPACE_END
277#endif
an abstract base class for locators which find cells
Proxy object to connect input/output ports.
bin source cell data into input cells.
~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
double * GetValues()
Return a pointer to a list of contour values.
int GetNumberOfContours()
Return the number of contours in the.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
void SetValue(int i, double value)
Set the ith contour value.
double GetValue(int i)
Get the ith contour value.
general representation of visualization data
Superclass for algorithms that produce output of the same type as input.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:64
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition vtkType.h:332
#define VTK_MARSHALAUTO