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=========================================================================*/
65#ifndef vtkProbeFilter_h
66#define vtkProbeFilter_h
67
68#include "vtkDataSetAlgorithm.h"
69#include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
70#include "vtkFiltersCoreModule.h" // For export macro
71
73class vtkCell;
74class vtkCharArray;
75class vtkIdTypeArray;
76class vtkImageData;
77class vtkPointData;
79
80class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
81{
82public:
85 void PrintSelf(ostream& os, vtkIndent indent) override;
86
88
97
105
107
112 vtkSetMacro(CategoricalData, vtkTypeBool);
113 vtkGetMacro(CategoricalData, vtkTypeBool);
114 vtkBooleanMacro(CategoricalData, vtkTypeBool);
116
118
128 vtkSetMacro(SpatialMatch, vtkTypeBool);
129 vtkGetMacro(SpatialMatch, vtkTypeBool);
130 vtkBooleanMacro(SpatialMatch, vtkTypeBool);
132
134
140
142
147 vtkSetStringMacro(ValidPointMaskArrayName);
148 vtkGetStringMacro(ValidPointMaskArrayName);
150
152
156 vtkSetMacro(PassCellArrays, vtkTypeBool);
157 vtkBooleanMacro(PassCellArrays, vtkTypeBool);
158 vtkGetMacro(PassCellArrays, vtkTypeBool);
161
165 vtkSetMacro(PassPointArrays, vtkTypeBool);
166 vtkBooleanMacro(PassPointArrays, vtkTypeBool);
167 vtkGetMacro(PassPointArrays, vtkTypeBool);
169
171
175 vtkSetMacro(PassFieldArrays, vtkTypeBool);
176 vtkBooleanMacro(PassFieldArrays, vtkTypeBool);
177 vtkGetMacro(PassFieldArrays, vtkTypeBool);
179
181
186 vtkSetMacro(Tolerance, double);
187 vtkGetMacro(Tolerance, double);
189
191
196 vtkSetMacro(ComputeTolerance, bool);
197 vtkBooleanMacro(ComputeTolerance, bool);
198 vtkGetMacro(ComputeTolerance, bool);
200
202
209 vtkGetObjectMacro(FindCellStrategy, vtkFindCellStrategy);
211
213
222 vtkGetObjectMacro(CellLocatorPrototype, vtkAbstractCellLocator);
224
225protected:
227 ~vtkProbeFilter() override;
228
232
238
242 void Probe(vtkDataSet* input, vtkDataSet* source, vtkDataSet* output);
243
249
253 virtual void InitializeForProbing(vtkDataSet* input, vtkDataSet* output);
254 virtual void InitializeOutputArrays(vtkPointData* outPD, vtkIdType numPts);
255
260 void DoProbing(vtkDataSet* input, int srcIdx, vtkDataSet* source, vtkDataSet* output);
261
263
267
269
270 double Tolerance;
272
276
277 // Support various methods to support the FindCell() operation
280
283
284private:
285 vtkProbeFilter(const vtkProbeFilter&) = delete;
286 void operator=(const vtkProbeFilter&) = delete;
287
288 // Probe only those points that are marked as not-probed by the MaskPoints
289 // array.
290 void ProbeEmptyPoints(vtkDataSet* input, int srcIdx, vtkDataSet* source, vtkDataSet* output);
291
292 // A faster implementation for vtkImageData input.
293 void ProbePointsImageData(
294 vtkImageData* input, int srcIdx, vtkDataSet* source, vtkImageData* output);
295 void ProbeImagePointsInCell(vtkCell* cell, vtkIdType cellId, vtkDataSet* source, int srcBlockId,
296 const double start[3], const double spacing[3], const int dim[3], vtkPointData* outPD,
297 char* maskArray, double* wtsBuff);
298
299 class ProbeImageDataWorklet;
300
301 // A faster implementation for vtkImageData source.
302 void ProbeImageDataPoints(
303 vtkDataSet* input, int srcIdx, vtkImageData* sourceImage, vtkDataSet* output);
304 void ProbeImageDataPointsSMP(vtkDataSet* input, vtkImageData* source, int srcIdx,
305 vtkPointData* outPD, char* maskArray, vtkIdList* pointIds, vtkIdType startId, vtkIdType endId,
306 bool baseThread);
307
308 class ProbeImageDataPointsWorklet;
309
310 class vtkVectorOfArrays;
311 vtkVectorOfArrays* CellArrays;
312};
313
314#endif
an abstract base class for locators which find cells
Proxy object to connect input/output ports.
abstract class to specify cell behavior
Definition vtkCell.h:58
dynamic, self-adjusting array of char
general representation of visualization data
Superclass for algorithms that produce output of the same type as input.
helps manage arrays from multiple vtkDataSetAttributes.
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
helper class to manage the vtkPointSet::FindCell() METHOD
list of point or cell ids
Definition vtkIdList.h:31
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
sample data values at specified point locations
virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output)
Initializes output and various arrays which keep track for probing status.
void SetSourceData(vtkDataObject *source)
Specify the data set that will be probed at the input points.
vtkFindCellStrategy * FindCellStrategy
vtkIdTypeArray * ValidPoints
virtual void SetCellLocatorPrototype(vtkAbstractCellLocator *)
Set/Get the prototype cell locator to perform the FindCell() operation.
virtual void SetFindCellStrategy(vtkFindCellStrategy *)
Set / get the strategy used to perform the FindCell() operation.
virtual void InitializeOutputArrays(vtkPointData *outPD, vtkIdType numPts)
vtkTypeBool CategoricalData
void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output)
Equivalent to calling BuildFieldList(); InitializeForProbing(); DoProbing().
~vtkProbeFilter() override
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
vtkCharArray * MaskPoints
char * ValidPointMaskArrayName
vtkTypeBool SpatialMatch
vtkDataSetAttributes::FieldList * CellList
vtkIdTypeArray * GetValidPoints()
Get the list of point ids in the output that contain attribute data interpolated from the source.
vtkTypeBool PassCellArrays
vtkDataSetAttributes::FieldList * PointList
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify the data set that will be probed at the input points.
void PassAttributeData(vtkDataSet *input, vtkDataObject *source, vtkDataSet *output)
Call at end of RequestData() to pass attribute data respecting the PassCellArrays,...
void BuildFieldList(vtkDataSet *source)
Build the field lists.
vtkAbstractCellLocator * CellLocatorPrototype
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
static vtkProbeFilter * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void DoProbing(vtkDataSet *input, int srcIdx, vtkDataSet *source, vtkDataSet *output)
Probe appropriate points srcIdx is the index in the PointList for the given source.
vtkDataObject * GetSource()
Specify the data set that will be probed at the input points.
vtkTypeBool PassPointArrays
vtkTypeBool PassFieldArrays
int vtkTypeBool
Definition vtkABI.h:69
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition vtkType.h:332