VTK  9.1.0
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=========================================================================*/
30#ifndef vtkBinCellDataFilter_h
31#define vtkBinCellDataFilter_h
32
33#include "vtkDataSetAlgorithm.h"
34#include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
35#include "vtkFiltersCoreModule.h" // For export macro
36
37#include "vtkContourValues.h" // Needed for inline methods
38
40
41class VTKFILTERSCORE_EXPORT vtkBinCellDataFilter : public vtkDataSetAlgorithm
42{
43public:
45
51
53
57 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
64 void SetValue(int i, double value);
65 double GetValue(int i);
66 double* GetValues();
67 void GetValues(double* binValues);
68 void SetNumberOfBins(int numBins);
69 vtkIdType GetNumberOfBins();
70 void GenerateValues(int numBins, double range[2]);
71 void GenerateValues(int numBins, double rangeStart, double rangeEnd);
73
75
84
92
94
104 vtkSetMacro(SpatialMatch, vtkTypeBool);
105 vtkGetMacro(SpatialMatch, vtkTypeBool);
106 vtkBooleanMacro(SpatialMatch, vtkTypeBool);
108
110
114 vtkSetMacro(StoreNumberOfNonzeroBins, bool);
115 vtkBooleanMacro(StoreNumberOfNonzeroBins, bool);
116 vtkGetMacro(StoreNumberOfNonzeroBins, bool);
118
120
125 vtkSetStringMacro(NumberOfNonzeroBinsArrayName);
126 vtkGetStringMacro(NumberOfNonzeroBinsArrayName);
128
130
135 vtkSetMacro(Tolerance, double);
136 vtkGetMacro(Tolerance, double);
138
140
145 vtkSetMacro(ComputeTolerance, bool);
146 vtkBooleanMacro(ComputeTolerance, bool);
147 vtkGetMacro(ComputeTolerance, bool);
149
151
154 vtkSetMacro(ArrayComponent, int);
155 vtkGetMacro(ArrayComponent, int);
157
159 {
160 CELL_CENTROID = 0,
161 CELL_POINTS = 1,
162 };
163
165
170 vtkSetClampMacro(CellOverlapMethod, int, CELL_CENTROID, CELL_POINTS);
171 vtkGetMacro(CellOverlapMethod, int);
173
175
179 virtual void SetCellLocator(vtkAbstractCellLocator* cellLocator);
180 vtkGetObjectMacro(CellLocator, vtkAbstractCellLocator);
182
183protected:
186
188
190 double Tolerance;
194
197 virtual void CreateDefaultLocator();
198
202
204
205private:
207 void operator=(const vtkBinCellDataFilter&) = delete;
208};
209
214inline void vtkBinCellDataFilter::SetValue(int i, double value)
215{
216 this->BinValues->SetValue(i, value);
217}
218
223{
224 return this->BinValues->GetValue(i);
225}
226
232{
233 return this->BinValues->GetValues();
234}
235
241inline void vtkBinCellDataFilter::GetValues(double* binValues)
242{
243 this->BinValues->GetValues(binValues);
244}
245
252{
253 this->BinValues->SetNumberOfContours(number);
254}
255
261{
262 return this->BinValues->GetNumberOfContours();
263}
264
269inline void vtkBinCellDataFilter::GenerateValues(int numBins, double range[2])
270{
271 this->BinValues->GenerateValues(numBins, range);
272}
273
278inline void vtkBinCellDataFilter::GenerateValues(int numBins, double rangeStart, double rangeEnd)
279{
280 this->BinValues->GenerateValues(numBins, rangeStart, rangeEnd);
281}
282
283#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 GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
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:113
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