VTK
vtkProbeFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProbeFilter.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 =========================================================================*/
43 #ifndef vtkProbeFilter_h
44 #define vtkProbeFilter_h
45 
46 #include "vtkFiltersCoreModule.h" // For export macro
47 #include "vtkDataSetAlgorithm.h"
48 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
49 
50 class vtkIdTypeArray;
51 class vtkCharArray;
52 class vtkMaskPoints;
53 
55 {
56 public:
57  static vtkProbeFilter *New();
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
62 
64  void SetSourceData(vtkDataObject *source);
65  vtkDataObject *GetSource();
67 
70  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
71 
73 
81  vtkSetMacro(SpatialMatch, int);
82  vtkGetMacro(SpatialMatch, int);
83  vtkBooleanMacro(SpatialMatch, int);
85 
87 
89  vtkGetObjectMacro(ValidPoints, vtkIdTypeArray);
91 
93 
96  vtkSetStringMacro(ValidPointMaskArrayName)
97  vtkGetStringMacro(ValidPointMaskArrayName)
99 
101 
103  vtkSetMacro(PassCellArrays, int);
104  vtkBooleanMacro(PassCellArrays, int);
105  vtkGetMacro(PassCellArrays, int);
107 
108 
110  vtkSetMacro(PassPointArrays, int);
111  vtkBooleanMacro(PassPointArrays, int);
112  vtkGetMacro(PassPointArrays, int);
114 
115 
117 
119  vtkSetMacro(PassFieldArrays, int);
120  vtkBooleanMacro(PassFieldArrays, int);
121  vtkGetMacro(PassFieldArrays, int);
123 
125 
128  vtkSetMacro(Tolerance, double);
129  vtkGetMacro(Tolerance, double);
131 
133 
136  vtkSetMacro(ComputeTolerance, bool);
137  vtkBooleanMacro(ComputeTolerance, bool);
138  vtkGetMacro(ComputeTolerance, bool);
140 
141 //BTX
142 protected:
143  vtkProbeFilter();
144  ~vtkProbeFilter();
145 
146  int PassCellArrays;
147  int PassPointArrays;
148  int PassFieldArrays;
149 
150  int SpatialMatch;
151 
152  double Tolerance;
153  bool ComputeTolerance;
154 
155  virtual int RequestData(vtkInformation *, vtkInformationVector **,
156  vtkInformationVector *);
157  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
158  vtkInformationVector *);
159  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
160  vtkInformationVector *);
161 
163 
165  void PassAttributeData(
166  vtkDataSet* input, vtkDataObject* source, vtkDataSet* output);
168 
170  void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
171 
174  void BuildFieldList(vtkDataSet* source);
175 
178  virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
179 
181 
184  void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
185  vtkDataSet *output);
187 
188  char* ValidPointMaskArrayName;
189  vtkIdTypeArray *ValidPoints;
190  vtkCharArray* MaskPoints;
191  int NumberOfValidPoints;
192 
193  // Agreed, this is sort of a hack to allow subclasses to override the default
194  // behavior of this filter to call NullPoint() for every point that is
195  // not-a-hit when probing. This makes it possible for subclasses to initialize
196  // the arrays with different defaults.
197  bool UseNullPoint;
198 
199  vtkDataSetAttributes::FieldList* CellList;
200  vtkDataSetAttributes::FieldList* PointList;
201 private:
202  vtkProbeFilter(const vtkProbeFilter&); // Not implemented.
203  void operator=(const vtkProbeFilter&); // Not implemented.
204 
205  class vtkVectorOfArrays;
206  vtkVectorOfArrays* CellArrays;
207 //ETX
208 };
209 
210 #endif
sample data values at specified point locations
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
#define VTKFILTERSCORE_EXPORT
dynamic, self-adjusting array of vtkIdType
Proxy object to connect input/output ports.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:42
a simple class to control print indentation
Definition: vtkIndent.h:38
selectively filter points
Definition: vtkMaskPoints.h:42
represent and manipulate attribute data in a dataset
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce output of the same type as input.
general representation of visualization data
Definition: vtkDataObject.h:64
static vtkDataSetAlgorithm * New()