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 =========================================================================*/
38 #ifndef vtkProbeFilter_h
39 #define vtkProbeFilter_h
40 
41 #include "vtkFiltersCoreModule.h" // For export macro
42 #include "vtkDataSetAlgorithm.h"
43 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
44 
45 class vtkIdTypeArray;
46 class vtkCell;
47 class vtkCharArray;
48 class vtkImageData;
49 class vtkPointData;
50 
51 class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
52 {
53 public:
54  static vtkProbeFilter *New();
56  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
57 
59 
65  void SetSourceData(vtkDataObject *source);
66  vtkDataObject *GetSource();
68 
75  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
76 
78 
83  vtkSetMacro(CategoricalData,int);
84  vtkGetMacro(CategoricalData,int);
85  vtkBooleanMacro(CategoricalData,int);
87 
89 
99  vtkSetMacro(SpatialMatch, int);
100  vtkGetMacro(SpatialMatch, int);
101  vtkBooleanMacro(SpatialMatch, int);
103 
105 
109  vtkIdTypeArray *GetValidPoints();
111 
113 
118  vtkSetStringMacro(ValidPointMaskArrayName)
119  vtkGetStringMacro(ValidPointMaskArrayName)
121 
123 
127  vtkSetMacro(PassCellArrays, int);
128  vtkBooleanMacro(PassCellArrays, int);
129  vtkGetMacro(PassCellArrays, int);
131 
132 
136  vtkSetMacro(PassPointArrays, int);
137  vtkBooleanMacro(PassPointArrays, int);
138  vtkGetMacro(PassPointArrays, int);
140 
141 
143 
147  vtkSetMacro(PassFieldArrays, int);
148  vtkBooleanMacro(PassFieldArrays, int);
149  vtkGetMacro(PassFieldArrays, int);
151 
153 
158  vtkSetMacro(Tolerance, double);
159  vtkGetMacro(Tolerance, double);
161 
163 
168  vtkSetMacro(ComputeTolerance, bool);
169  vtkBooleanMacro(ComputeTolerance, bool);
170  vtkGetMacro(ComputeTolerance, bool);
172 
173 protected:
174  vtkProbeFilter();
175  ~vtkProbeFilter() VTK_OVERRIDE;
176 
177  int CategoricalData;
178 
179  int PassCellArrays;
180  int PassPointArrays;
181  int PassFieldArrays;
182 
183  int SpatialMatch;
184 
185  double Tolerance;
186  bool ComputeTolerance;
187 
188  int RequestData(vtkInformation *, vtkInformationVector **,
189  vtkInformationVector *) VTK_OVERRIDE;
190  int RequestInformation(vtkInformation *, vtkInformationVector **,
191  vtkInformationVector *) VTK_OVERRIDE;
192  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
193  vtkInformationVector *) VTK_OVERRIDE;
194 
199  void PassAttributeData(
200  vtkDataSet* input, vtkDataObject* source, vtkDataSet* output);
201 
205  void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
206 
211  void BuildFieldList(vtkDataSet* source);
212 
216  virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
217  virtual void InitializeOutputArrays(vtkPointData *outPD, vtkIdType numPts);
218 
223  void DoProbing(vtkDataSet *input, int srcIdx, vtkDataSet *source,
224  vtkDataSet *output);
225 
226  char* ValidPointMaskArrayName;
227  vtkIdTypeArray *ValidPoints;
228  vtkCharArray* MaskPoints;
229 
230 
231  vtkDataSetAttributes::FieldList* CellList;
232  vtkDataSetAttributes::FieldList* PointList;
233 private:
234  vtkProbeFilter(const vtkProbeFilter&) VTK_DELETE_FUNCTION;
235  void operator=(const vtkProbeFilter&) VTK_DELETE_FUNCTION;
236 
237  // Probe only those points that are marked as not-probed by the MaskPoints
238  // array.
239  void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
240  vtkDataSet *output);
241 
242  // A faster implementation for vtkImageData input.
243  void ProbePointsImageData(vtkImageData *input, int srcIdx, vtkDataSet *source,
244  vtkImageData *output);
245  void ProbeImagePointsInCell(vtkCell *cell, vtkIdType cellId, vtkDataSet *source,
246  int srcBlockId, const double start[3], const double spacing[3],
247  const int dim[3], vtkPointData *outPD, char *maskArray, double *wtsBuff);
248 
249  class ProbeImageDataWorklet;
250 
251  class vtkVectorOfArrays;
252  vtkVectorOfArrays* CellArrays;
253 };
254 
255 #endif
sample data values at specified point locations
represent and manipulate point attribute data
Definition: vtkPointData.h:31
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:345
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:35
abstract class to specify cell behavior
Definition: vtkCell.h:56
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
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:58
static vtkDataSetAlgorithm * New()