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 =========================================================================*/
30 #ifndef vtkBinCellDataFilter_h
31 #define vtkBinCellDataFilter_h
32 
33 #include "vtkFiltersCoreModule.h" // For export macro
34 #include "vtkDataSetAlgorithm.h"
35 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
36 
37 #include "vtkContourValues.h" // Needed for inline methods
38 
40 
41 class VTKFILTERSCORE_EXPORT vtkBinCellDataFilter : public vtkDataSetAlgorithm
42 {
43 public:
45 
50  static vtkBinCellDataFilter *New();
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  int GetNumberOfBins();
70  void GenerateValues(int numBins, double range[2]);
71  void GenerateValues(int numBins, double rangeStart, double rangeEnd);
73 
75 
81  void SetSourceData(vtkDataObject *source);
82  vtkDataObject *GetSource();
84 
91  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
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 
183 protected:
185  ~vtkBinCellDataFilter() override;
186 
188 
190  double Tolerance;
194 
197  virtual void CreateDefaultLocator();
198 
200  vtkInformationVector *) override;
202  vtkInformationVector *) override;
204  vtkInformationVector *) override;
205 
207 
208 private:
210  void operator=(const vtkBinCellDataFilter&) = delete;
211 };
212 
217 inline void vtkBinCellDataFilter::SetValue(int i, double value)
218 {this->BinValues->SetValue(i,value);}
219 
223 inline double vtkBinCellDataFilter::GetValue(int i)
224 {return this->BinValues->GetValue(i);}
225 
231 {return this->BinValues->GetValues();}
232 
238 inline void vtkBinCellDataFilter::GetValues(double *binValues)
239 {this->BinValues->GetValues(binValues);}
240 
247 {this->BinValues->SetNumberOfContours(number);}
248 
254 {return this->BinValues->GetNumberOfContours();}
255 
260 inline void vtkBinCellDataFilter::GenerateValues(int numBins, double range[2])
261 {this->BinValues->GenerateValues(numBins, range);}
262 
267 inline void vtkBinCellDataFilter::GenerateValues(int numBins, double
268  rangeStart, double rangeEnd)
269 {this->BinValues->GenerateValues(numBins, rangeStart, rangeEnd);}
270 
271 #endif
vtkBinCellDataFilter::CellLocator
vtkAbstractCellLocator * CellLocator
Definition: vtkBinCellDataFilter.h:196
vtkBinCellDataFilter::vtkBinValues
vtkContourValues vtkBinValues
Definition: vtkBinCellDataFilter.h:44
vtkContourValues::GetValues
double * GetValues()
Return a pointer to a list of contour values.
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
Return the number of contours in the.
vtkBinCellDataFilter::CellOverlapCriterion
CellOverlapCriterion
Definition: vtkBinCellDataFilter.h:158
vtkX3D::value
Definition: vtkX3D.h:220
vtkBinCellDataFilter::SetValue
void SetValue(int i, double value)
Methods to set / get bin values.
Definition: vtkBinCellDataFilter.h:217
vtkBinCellDataFilter::GetNumberOfBins
int GetNumberOfBins()
Get the number of bins in the list of bin values, not counting the overflow bin.
Definition: vtkBinCellDataFilter.h:253
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkBinCellDataFilter::GenerateValues
void GenerateValues(int numBins, double range[2])
Generate numBins equally spaced bin values between specified range.
Definition: vtkBinCellDataFilter.h:260
vtkBinCellDataFilter::StoreNumberOfNonzeroBins
bool StoreNumberOfNonzeroBins
Definition: vtkBinCellDataFilter.h:189
vtkX3D::range
Definition: vtkX3D.h:238
vtkDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Definition: vtkDataSetAlgorithm.h:180
vtkBinCellDataFilter::ArrayComponent
int ArrayComponent
Definition: vtkBinCellDataFilter.h:192
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:825
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:48
vtkBinCellDataFilter::GetValues
double * GetValues()
Get a pointer to an array of bin values.
Definition: vtkBinCellDataFilter.h:230
vtkBinCellDataFilter::GetValue
double GetValue(int i)
Get the ith bin value.
Definition: vtkBinCellDataFilter.h:223
vtkBinCellDataFilter::BinValues
vtkBinValues * BinValues
Definition: vtkBinCellDataFilter.h:195
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkContourValues::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
vtkContourValues::GetValue
double GetValue(int i)
Get the ith contour value.
vtkDataSetAlgorithm::New
static vtkDataSetAlgorithm * New()
vtkContourValues::SetValue
void SetValue(int i, double value)
Set the ith contour value.
vtkBinCellDataFilter::NumberOfNonzeroBinsArrayName
char * NumberOfNonzeroBinsArrayName
Definition: vtkBinCellDataFilter.h:206
vtkBinCellDataFilter::Tolerance
double Tolerance
Definition: vtkBinCellDataFilter.h:190
vtkAbstractCellLocator
an abstract base class for locators which find cells
Definition: vtkAbstractCellLocator.h:48
vtkContourValues.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkDataSetAlgorithm.h
vtkBinCellDataFilter::ComputeTolerance
bool ComputeTolerance
Definition: vtkBinCellDataFilter.h:191
vtkDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkDataSetAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
Definition: vtkDataSetAlgorithm.h:152
vtkBinCellDataFilter::SpatialMatch
vtkTypeBool SpatialMatch
Definition: vtkBinCellDataFilter.h:187
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkContourValues::SetNumberOfContours
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
vtkDataSetAttributes.h
vtkBinCellDataFilter::SetNumberOfBins
void SetNumberOfBins(int numBins)
Set the number of bins to place into the list.
Definition: vtkBinCellDataFilter.h:246
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkBinCellDataFilter::CellOverlapMethod
int CellOverlapMethod
Definition: vtkBinCellDataFilter.h:193
vtkDataSetAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
Definition: vtkDataSetAlgorithm.h:141
vtkBinCellDataFilter
bin source cell data into input cells.
Definition: vtkBinCellDataFilter.h:41