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=========================================================================*/
44#ifndef vtkProbeFilter_h
45#define vtkProbeFilter_h
46
47#include "vtkFiltersCoreModule.h" // For export macro
48#include "vtkDataSetAlgorithm.h"
49#include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
50
51class vtkIdTypeArray;
52class vtkCharArray;
53class vtkMaskPoints;
54class vtkImageData;
55
56class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
57{
58public:
61 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
62
64
73
81
83
93 vtkSetMacro(SpatialMatch, int);
94 vtkGetMacro(SpatialMatch, int);
95 vtkBooleanMacro(SpatialMatch, int);
97
99
103 vtkGetObjectMacro(ValidPoints, vtkIdTypeArray);
105
107
112 vtkSetStringMacro(ValidPointMaskArrayName)
113 vtkGetStringMacro(ValidPointMaskArrayName)
115
117
121 vtkSetMacro(PassCellArrays, int);
122 vtkBooleanMacro(PassCellArrays, int);
123 vtkGetMacro(PassCellArrays, int);
125
126
130 vtkSetMacro(PassPointArrays, int);
131 vtkBooleanMacro(PassPointArrays, int);
132 vtkGetMacro(PassPointArrays, int);
134
135
137
141 vtkSetMacro(PassFieldArrays, int);
142 vtkBooleanMacro(PassFieldArrays, int);
143 vtkGetMacro(PassFieldArrays, int);
145
147
152 vtkSetMacro(Tolerance, double);
153 vtkGetMacro(Tolerance, double);
155
157
162 vtkSetMacro(ComputeTolerance, bool);
163 vtkBooleanMacro(ComputeTolerance, bool);
164 vtkGetMacro(ComputeTolerance, bool);
166
167protected:
169 ~vtkProbeFilter() VTK_OVERRIDE;
170
171 int PassCellArrays;
172 int PassPointArrays;
173 int PassFieldArrays;
174
175 int SpatialMatch;
176
177 double Tolerance;
178 bool ComputeTolerance;
179
181 vtkInformationVector *) VTK_OVERRIDE;
182 int RequestInformation(vtkInformation *, vtkInformationVector **,
183 vtkInformationVector *) VTK_OVERRIDE;
184 int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
185 vtkInformationVector *) VTK_OVERRIDE;
186
191 void PassAttributeData(
192 vtkDataSet* input, vtkDataObject* source, vtkDataSet* output);
193
197 void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
198
203 void BuildFieldList(vtkDataSet* source);
204
208 virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
209
214 void DoProbing(vtkDataSet *input, int srcIdx, vtkDataSet *source,
215 vtkDataSet *output);
216
217 char* ValidPointMaskArrayName;
218 vtkIdTypeArray *ValidPoints;
219 vtkCharArray* MaskPoints;
220 int NumberOfValidPoints;
221
222 // Agreed, this is sort of a hack to allow subclasses to override the default
223 // behavior of this filter to call NullPoint() for every point that is
224 // not-a-hit when probing. This makes it possible for subclasses to initialize
225 // the arrays with different defaults.
226 bool UseNullPoint;
227
228 vtkDataSetAttributes::FieldList* CellList;
229 vtkDataSetAttributes::FieldList* PointList;
230private:
231 vtkProbeFilter(const vtkProbeFilter&) VTK_DELETE_FUNCTION;
232 void operator=(const vtkProbeFilter&) VTK_DELETE_FUNCTION;
233
234 // Probe only those points that are marked as not-probed by the MaskPoints
235 // array.
236 void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
237 vtkDataSet *output);
238 // A faster implementation for vtkImageData input.
239 void ProbePointsImageData(vtkImageData *input, int srcIdx, vtkDataSet *source,
240 vtkImageData *output);
241
242 class vtkVectorOfArrays;
243 vtkVectorOfArrays* CellArrays;
244
245};
246
247#endif
Proxy object to connect input/output ports.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:39
general representation of visualization data
Definition: vtkDataObject.h:65
Superclass for algorithms that produce output of the same type as input.
represent and manipulate attribute data in a dataset
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
selectively filter points
Definition: vtkMaskPoints.h:44
sample data values at specified point locations
void SetSourceData(vtkDataObject *source)
Specify the data set that will be probed at the input points.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify the data set that will be probed at the input points.
static vtkProbeFilter * New()
vtkDataObject * GetSource()
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.