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 
46 class vtkCell;
47 class vtkCharArray;
48 class vtkIdTypeArray;
49 class vtkImageData;
50 class vtkPointData;
52 
53 class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
54 {
55 public:
56  static vtkProbeFilter *New();
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
67  void SetSourceData(vtkDataObject *source);
68  vtkDataObject *GetSource();
70 
77  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
78 
80 
85  vtkSetMacro(CategoricalData,vtkTypeBool);
86  vtkGetMacro(CategoricalData,vtkTypeBool);
87  vtkBooleanMacro(CategoricalData,vtkTypeBool);
89 
91 
101  vtkSetMacro(SpatialMatch, vtkTypeBool);
102  vtkGetMacro(SpatialMatch, vtkTypeBool);
103  vtkBooleanMacro(SpatialMatch, vtkTypeBool);
105 
107 
111  vtkIdTypeArray *GetValidPoints();
113 
115 
120  vtkSetStringMacro(ValidPointMaskArrayName)
121  vtkGetStringMacro(ValidPointMaskArrayName)
123 
125 
129  vtkSetMacro(PassCellArrays, vtkTypeBool);
130  vtkBooleanMacro(PassCellArrays, vtkTypeBool);
131  vtkGetMacro(PassCellArrays, vtkTypeBool);
133 
134 
138  vtkSetMacro(PassPointArrays, vtkTypeBool);
139  vtkBooleanMacro(PassPointArrays, vtkTypeBool);
140  vtkGetMacro(PassPointArrays, vtkTypeBool);
142 
143 
145 
149  vtkSetMacro(PassFieldArrays, vtkTypeBool);
150  vtkBooleanMacro(PassFieldArrays, vtkTypeBool);
151  vtkGetMacro(PassFieldArrays, vtkTypeBool);
153 
155 
160  vtkSetMacro(Tolerance, double);
161  vtkGetMacro(Tolerance, double);
163 
165 
170  vtkSetMacro(ComputeTolerance, bool);
171  vtkBooleanMacro(ComputeTolerance, bool);
172  vtkGetMacro(ComputeTolerance, bool);
174 
176 
180  virtual void SetCellLocatorPrototype(vtkAbstractCellLocator*);
181  vtkGetObjectMacro(CellLocatorPrototype, vtkAbstractCellLocator);
183 
184 protected:
185  vtkProbeFilter();
186  ~vtkProbeFilter() override;
187 
189  vtkInformationVector *) override;
191  vtkInformationVector *) override;
193  vtkInformationVector *) 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 
227 
231 
233 
234  double Tolerance;
236 
240 
242 
245 private:
246  vtkProbeFilter(const vtkProbeFilter&) = delete;
247  void operator=(const vtkProbeFilter&) = delete;
248 
249  // Probe only those points that are marked as not-probed by the MaskPoints
250  // array.
251  void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
252  vtkDataSet *output);
253 
254  // A faster implementation for vtkImageData input.
255  void ProbePointsImageData(vtkImageData *input, int srcIdx, vtkDataSet *source,
256  vtkImageData *output);
257  void ProbeImagePointsInCell(vtkCell *cell, vtkIdType cellId, vtkDataSet *source,
258  int srcBlockId, const double start[3], const double spacing[3],
259  const int dim[3], vtkPointData *outPD, char *maskArray, double *wtsBuff);
260 
261  class ProbeImageDataWorklet;
262 
263  class vtkVectorOfArrays;
264  vtkVectorOfArrays* CellArrays;
265 };
266 
267 #endif
sample data values at specified point locations
vtkDataSetAttributes::FieldList * CellList
represent and manipulate point attribute data
Definition: vtkPointData.h:31
vtkTypeBool PassPointArrays
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
an abstract base class for locators which find cells
dynamic, self-adjusting array of vtkIdType
perform fast cell location operations
int vtkIdType
Definition: vtkType.h:345
vtkCharArray * MaskPoints
vtkTypeBool PassFieldArrays
Proxy object to connect input/output ports.
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: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
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.
vtkTypeBool PassCellArrays
boost::graph_traits< vtkGraph *>::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
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:58
static vtkDataSetAlgorithm * New()
vtkAbstractCellLocator * CellLocatorPrototype