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 
43 
44 class VTKFILTERSCORE_EXPORT vtkBinCellDataFilter : public vtkDataSetAlgorithm
45 {
46 public:
48 
53  static vtkBinCellDataFilter *New();
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);
72  int GetNumberOfBins();
73  void GenerateValues(int numBins, double range[2]);
74  void GenerateValues(int numBins, double rangeStart, double rangeEnd);
76 
78 
84  void SetSourceData(vtkDataObject *source);
85  vtkDataObject *GetSource();
87 
94  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
95 
97 
107  vtkSetMacro(SpatialMatch, vtkTypeBool);
108  vtkGetMacro(SpatialMatch, vtkTypeBool);
109  vtkBooleanMacro(SpatialMatch, vtkTypeBool);
111 
113 
117  vtkSetMacro(StoreNumberOfNonzeroBins, bool);
118  vtkBooleanMacro(StoreNumberOfNonzeroBins, bool);
119  vtkGetMacro(StoreNumberOfNonzeroBins, bool);
121 
123 
128  vtkSetStringMacro(NumberOfNonzeroBinsArrayName)
129  vtkGetStringMacro(NumberOfNonzeroBinsArrayName)
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 
162  {
163  CELL_CENTROID=0,
164  CELL_POINTS=1,
165  };
166 
168 
173  vtkSetClampMacro(CellOverlapMethod,int,CELL_CENTROID,CELL_POINTS);
174  vtkGetMacro(CellOverlapMethod, int);
176 
178 
182  virtual void SetCellLocator(vtkAbstractCellLocator *cellLocator);
183  vtkGetObjectMacro(CellLocator,vtkAbstractCellLocator);
185 
186 protected:
188  ~vtkBinCellDataFilter() override;
189 
191 
193  double Tolerance;
197 
198  vtkBinValues *BinValues;
200  virtual void CreateDefaultLocator();
201 
203  vtkInformationVector *) override;
205  vtkInformationVector *) override;
207  vtkInformationVector *) override;
208 
210 
211 private:
213  void operator=(const vtkBinCellDataFilter&) = delete;
214 };
215 
220 inline void vtkBinCellDataFilter::SetValue(int i, double value)
221 {this->BinValues->SetValue(i,value);}
222 
226 inline double vtkBinCellDataFilter::GetValue(int i)
227 {return this->BinValues->GetValue(i);}
228 
234 {return this->BinValues->GetValues();}
235 
241 inline void vtkBinCellDataFilter::GetValues(double *binValues)
242 {this->BinValues->GetValues(binValues);}
243 
250 {this->BinValues->SetNumberOfContours(number);}
251 
257 {return this->BinValues->GetNumberOfContours();}
258 
263 inline void vtkBinCellDataFilter::GenerateValues(int numBins, double range[2])
264 {this->BinValues->GenerateValues(numBins, range);}
265 
270 inline void vtkBinCellDataFilter::GenerateValues(int numBins, double
271  rangeStart, double rangeEnd)
272 {this->BinValues->GenerateValues(numBins, rangeStart, rangeEnd);}
273 
274 #endif
helper object to manage setting and generating contour values
Store vtkAlgorithm input/output information.
vtkAbstractCellLocator * CellLocator
an abstract base class for locators which find cells
Proxy object to connect input/output ports.
int vtkTypeBool
Definition: vtkABI.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bin source cell data into input cells.
double * GetValues()
Get a pointer to an array of bin values.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkContourValues vtkBinValues
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
double GetValue(int i)
Get the ith bin value.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
void GenerateValues(int numBins, double range[2])
Generate numBins equally spaced bin values between specified range.
void SetValue(int i, double value)
Methods to set / get bin values.
int GetNumberOfBins()
Get the number of bins in the list of bin values, not counting the overflow bin.
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
general representation of visualization data
Definition: vtkDataObject.h:64
static vtkDataSetAlgorithm * New()
void SetNumberOfBins(int numBins)
Set the number of bins to place into the list.