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 vtkCell;
53 class vtkCharArray;
54 class vtkImageData;
55 class vtkPointData;
56 
57 class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
58 {
59 public:
60  static vtkProbeFilter *New();
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
65 
71  void SetSourceData(vtkDataObject *source);
72  vtkDataObject *GetSource();
74 
81  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
82 
84 
89  vtkSetMacro(CategoricalData,int);
90  vtkGetMacro(CategoricalData,int);
91  vtkBooleanMacro(CategoricalData,int);
93 
95 
105  vtkSetMacro(SpatialMatch, int);
106  vtkGetMacro(SpatialMatch, int);
107  vtkBooleanMacro(SpatialMatch, int);
109 
111 
115  vtkIdTypeArray *GetValidPoints();
117 
119 
124  vtkSetStringMacro(ValidPointMaskArrayName)
125  vtkGetStringMacro(ValidPointMaskArrayName)
127 
129 
133  vtkSetMacro(PassCellArrays, int);
134  vtkBooleanMacro(PassCellArrays, int);
135  vtkGetMacro(PassCellArrays, int);
137 
138 
142  vtkSetMacro(PassPointArrays, int);
143  vtkBooleanMacro(PassPointArrays, int);
144  vtkGetMacro(PassPointArrays, int);
146 
147 
149 
153  vtkSetMacro(PassFieldArrays, int);
154  vtkBooleanMacro(PassFieldArrays, int);
155  vtkGetMacro(PassFieldArrays, int);
157 
159 
164  vtkSetMacro(Tolerance, double);
165  vtkGetMacro(Tolerance, double);
167 
169 
174  vtkSetMacro(ComputeTolerance, bool);
175  vtkBooleanMacro(ComputeTolerance, bool);
176  vtkGetMacro(ComputeTolerance, bool);
178 
179 protected:
180  vtkProbeFilter();
181  ~vtkProbeFilter() override;
182 
184 
188 
190 
191  double Tolerance;
193 
195  vtkInformationVector *) override;
197  vtkInformationVector *) override;
199  vtkInformationVector *) override;
200 
205  void PassAttributeData(
206  vtkDataSet* input, vtkDataObject* source, vtkDataSet* output);
207 
211  void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
212 
217  void BuildFieldList(vtkDataSet* source);
218 
222  virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
223  virtual void InitializeOutputArrays(vtkPointData *outPD, vtkIdType numPts);
224 
229  void DoProbing(vtkDataSet *input, int srcIdx, vtkDataSet *source,
230  vtkDataSet *output);
231 
235 
236 
239 private:
240  vtkProbeFilter(const vtkProbeFilter&) = delete;
241  void operator=(const vtkProbeFilter&) = delete;
242 
243  // Probe only those points that are marked as not-probed by the MaskPoints
244  // array.
245  void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
246  vtkDataSet *output);
247 
248  // A faster implementation for vtkImageData input.
249  void ProbePointsImageData(vtkImageData *input, int srcIdx, vtkDataSet *source,
250  vtkImageData *output);
251  void ProbeImagePointsInCell(vtkCell *cell, vtkIdType cellId, vtkDataSet *source,
252  int srcBlockId, const double start[3], const double spacing[3],
253  const int dim[3], vtkPointData *outPD, char *maskArray, double *wtsBuff);
254 
255  class ProbeImageDataWorklet;
256 
257  class vtkVectorOfArrays;
258  vtkVectorOfArrays* CellArrays;
259 };
260 
261 #endif
sample data values at specified point locations
vtkDataSetAttributes::FieldList * CellList
represent and manipulate point attribute data
Definition: vtkPointData.h:37
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:345
vtkCharArray * MaskPoints
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
abstract class to specify cell behavior
Definition: vtkCell.h:59
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
char * ValidPointMaskArrayName
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
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 *)
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.
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()