VTK  9.2.6
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 =========================================================================*/
71 #ifndef vtkProbeFilter_h
72 #define vtkProbeFilter_h
73 
74 #include "vtkDataSetAlgorithm.h"
75 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
76 #include "vtkFiltersCoreModule.h" // For export macro
77 
79 class vtkCell;
80 class vtkCharArray;
81 class vtkIdTypeArray;
82 class vtkImageData;
83 class vtkPointData;
85 
86 class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
87 {
88 public:
89  static vtkProbeFilter* New();
91  void PrintSelf(ostream& os, vtkIndent indent) override;
92 
94 
100  void SetSourceData(vtkDataObject* source);
101  vtkDataObject* GetSource();
103 
110  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
111 
113 
118  vtkSetMacro(CategoricalData, vtkTypeBool);
119  vtkGetMacro(CategoricalData, vtkTypeBool);
120  vtkBooleanMacro(CategoricalData, vtkTypeBool);
122 
124 
134  vtkSetMacro(SpatialMatch, vtkTypeBool);
135  vtkGetMacro(SpatialMatch, vtkTypeBool);
136  vtkBooleanMacro(SpatialMatch, vtkTypeBool);
138 
140 
144  vtkIdTypeArray* GetValidPoints();
146 
148 
153  vtkSetStringMacro(ValidPointMaskArrayName);
154  vtkGetStringMacro(ValidPointMaskArrayName);
156 
158 
162  vtkSetMacro(PassCellArrays, vtkTypeBool);
163  vtkBooleanMacro(PassCellArrays, vtkTypeBool);
164  vtkGetMacro(PassCellArrays, vtkTypeBool);
167 
171  vtkSetMacro(PassPointArrays, vtkTypeBool);
172  vtkBooleanMacro(PassPointArrays, vtkTypeBool);
173  vtkGetMacro(PassPointArrays, vtkTypeBool);
175 
177 
181  vtkSetMacro(PassFieldArrays, vtkTypeBool);
182  vtkBooleanMacro(PassFieldArrays, vtkTypeBool);
183  vtkGetMacro(PassFieldArrays, vtkTypeBool);
185 
187 
192  vtkSetMacro(Tolerance, double);
193  vtkGetMacro(Tolerance, double);
195 
197 
202  vtkSetMacro(ComputeTolerance, bool);
203  vtkBooleanMacro(ComputeTolerance, bool);
204  vtkGetMacro(ComputeTolerance, bool);
206 
208 
214  virtual void SetFindCellStrategy(vtkFindCellStrategy*);
215  vtkGetObjectMacro(FindCellStrategy, vtkFindCellStrategy);
217 
219 
227  virtual void SetCellLocatorPrototype(vtkAbstractCellLocator*);
228  vtkGetObjectMacro(CellLocatorPrototype, vtkAbstractCellLocator);
230 
231 protected:
232  vtkProbeFilter();
233  ~vtkProbeFilter() override;
234 
238 
243  void PassAttributeData(vtkDataSet* input, vtkDataObject* source, vtkDataSet* output);
244 
248  void Probe(vtkDataSet* input, vtkDataSet* source, vtkDataSet* output);
249 
254  void BuildFieldList(vtkDataSet* source);
255 
259  virtual void InitializeForProbing(vtkDataSet* input, vtkDataSet* output);
260  virtual void InitializeOutputArrays(vtkPointData* outPD, vtkIdType numPts);
261 
266  void DoProbing(vtkDataSet* input, int srcIdx, vtkDataSet* source, vtkDataSet* output);
267 
269 
273 
275 
276  double Tolerance;
278 
282 
283  // Support various methods to support the FindCell() operation
286 
289 
290 private:
291  vtkProbeFilter(const vtkProbeFilter&) = delete;
292  void operator=(const vtkProbeFilter&) = delete;
293 
294  // Probe only those points that are marked as not-probed by the MaskPoints
295  // array.
296  void ProbeEmptyPoints(vtkDataSet* input, int srcIdx, vtkDataSet* source, vtkDataSet* output);
297 
298  // A faster implementation for vtkImageData input.
299  void ProbePointsImageData(
300  vtkImageData* input, int srcIdx, vtkDataSet* source, vtkImageData* output);
301  void ProbeImagePointsInCell(vtkCell* cell, vtkIdType cellId, vtkDataSet* source, int srcBlockId,
302  const double start[3], const double spacing[3], const int dim[3], vtkPointData* outPD,
303  char* maskArray, double* wtsBuff);
304 
305  class ProbeImageDataWorklet;
306 
307  // A faster implementation for vtkImageData source.
308  void ProbeImageDataPoints(
309  vtkDataSet* input, int srcIdx, vtkImageData* sourceImage, vtkDataSet* output);
310  void ProbeImageDataPointsSMP(vtkDataSet* input, vtkImageData* source, int srcIdx,
311  vtkPointData* outPD, char* maskArray, vtkIdList* pointIds, vtkIdType startId, vtkIdType endId,
312  bool baseThread);
313 
314  class ProbeImageDataPointsWorklet;
315 
316  class vtkVectorOfArrays;
317  vtkVectorOfArrays* CellArrays;
318 };
319 
320 #endif
sample data values at specified point locations
vtkDataSetAttributes::FieldList * CellList
represent and manipulate point attribute data
Definition: vtkPointData.h:41
vtkTypeBool PassPointArrays
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
helps manage arrays from multiple vtkDataSetAttributes.
an abstract base class for locators which find cells
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkCharArray * MaskPoints
vtkTypeBool PassFieldArrays
Proxy object to connect input/output ports.
helper class to manage the vtkPointSet::FindCell() METHOD
int vtkTypeBool
Definition: vtkABI.h:69
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:51
abstract class to specify cell behavior
Definition: vtkCell.h:60
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
list of point or cell ids
Definition: vtkIdList.h:33
vtkTypeBool SpatialMatch
char * ValidPointMaskArrayName
vtkTypeBool CategoricalData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkFindCellStrategy * FindCellStrategy
vtkTypeBool PassCellArrays
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
vtkIdTypeArray * ValidPoints
vtkDataSetAttributes::FieldList * PointList
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
general representation of visualization data
Definition: vtkDataObject.h:65
static vtkDataSetAlgorithm * New()
vtkAbstractCellLocator * CellLocatorPrototype