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 
51 class vtkIdTypeArray;
52 class vtkCharArray;
53 class vtkMaskPoints;
54 class vtkImageData;
55 
56 class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
57 {
58 public:
59  static vtkProbeFilter *New();
61  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
62 
64 
70  void SetSourceData(vtkDataObject *source);
71  vtkDataObject *GetSource();
73 
80  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
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 
167 protected:
168  vtkProbeFilter();
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 
180  int RequestData(vtkInformation *, vtkInformationVector **,
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;
230 private:
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
sample data values at specified point locations
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
dynamic, self-adjusting array of vtkIdType
Proxy object to connect input/output ports.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:38
a simple class to control print indentation
Definition: vtkIndent.h:39
selectively filter points
Definition: vtkMaskPoints.h:43
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
represent and manipulate attribute data in a dataset
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:64
static vtkDataSetAlgorithm * New()