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 
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
vtkBinCellDataFilter::CellLocator
vtkAbstractCellLocator * CellLocator
Definition: vtkBinCellDataFilter.h:199
vtkBinCellDataFilter::vtkBinValues
vtkContourValues vtkBinValues
Definition: vtkBinCellDataFilter.h:47
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:161
vtkX3D::value
Definition: vtkX3D.h:220
vtkBinCellDataFilter::SetValue
void SetValue(int i, double value)
Methods to set / get bin values.
Definition: vtkBinCellDataFilter.h:220
vtkBinCellDataFilter::GetNumberOfBins
int GetNumberOfBins()
Get the number of bins in the list of bin values, not counting the overflow bin.
Definition: vtkBinCellDataFilter.h:256
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkBinCellDataFilter::GenerateValues
void GenerateValues(int numBins, double range[2])
Generate numBins equally spaced bin values between specified range.
Definition: vtkBinCellDataFilter.h:263
vtkBinCellDataFilter::StoreNumberOfNonzeroBins
bool StoreNumberOfNonzeroBins
Definition: vtkBinCellDataFilter.h:192
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:195
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:233
vtkBinCellDataFilter::GetValue
double GetValue(int i)
Get the ith bin value.
Definition: vtkBinCellDataFilter.h:226
vtkBinCellDataFilter::BinValues
vtkBinValues * BinValues
Definition: vtkBinCellDataFilter.h:198
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:39
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:209
vtkBinCellDataFilter::Tolerance
double Tolerance
Definition: vtkBinCellDataFilter.h:193
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:86
vtkDataSetAlgorithm.h
vtkBinCellDataFilter::ComputeTolerance
bool ComputeTolerance
Definition: vtkBinCellDataFilter.h:194
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:39
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:190
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
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:249
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkBinCellDataFilter::CellOverlapMethod
int CellOverlapMethod
Definition: vtkBinCellDataFilter.h:196
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:44