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 =========================================================================*/
43 #ifndef vtkProbeFilter_h
44 #define vtkProbeFilter_h
45 
46 #include "vtkFiltersCoreModule.h" // For export macro
47 #include "vtkDataSetAlgorithm.h"
48 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
49 
50 class vtkIdTypeArray;
51 class vtkCharArray;
52 class vtkMaskPoints;
53 class vtkImageData;
54 
56 {
57 public:
58  static vtkProbeFilter *New();
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
63 
67  void SetSourceData(vtkDataObject *source);
68  vtkDataObject *GetSource();
70 
75  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
76 
78 
86  vtkSetMacro(SpatialMatch, int);
87  vtkGetMacro(SpatialMatch, int);
88  vtkBooleanMacro(SpatialMatch, int);
90 
92 
94  vtkGetObjectMacro(ValidPoints, vtkIdTypeArray);
96 
98 
101  vtkSetStringMacro(ValidPointMaskArrayName)
102  vtkGetStringMacro(ValidPointMaskArrayName)
104 
106 
108  vtkSetMacro(PassCellArrays, int);
109  vtkBooleanMacro(PassCellArrays, int);
110  vtkGetMacro(PassCellArrays, int);
112 
113 
115  vtkSetMacro(PassPointArrays, int);
116  vtkBooleanMacro(PassPointArrays, int);
117  vtkGetMacro(PassPointArrays, int);
119 
120 
122 
124  vtkSetMacro(PassFieldArrays, int);
125  vtkBooleanMacro(PassFieldArrays, int);
126  vtkGetMacro(PassFieldArrays, int);
128 
130 
133  vtkSetMacro(Tolerance, double);
134  vtkGetMacro(Tolerance, double);
136 
138 
141  vtkSetMacro(ComputeTolerance, bool);
142  vtkBooleanMacro(ComputeTolerance, bool);
143  vtkGetMacro(ComputeTolerance, bool);
145 
146 //BTX
147 protected:
148  vtkProbeFilter();
149  ~vtkProbeFilter();
150 
151  int PassCellArrays;
152  int PassPointArrays;
153  int PassFieldArrays;
154 
155  int SpatialMatch;
156 
157  double Tolerance;
158  bool ComputeTolerance;
159 
160  virtual int RequestData(vtkInformation *, vtkInformationVector **,
161  vtkInformationVector *);
162  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
163  vtkInformationVector *);
164  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
165  vtkInformationVector *);
166 
168 
170  void PassAttributeData(
171  vtkDataSet* input, vtkDataObject* source, vtkDataSet* output);
173 
176  void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
177 
180  void BuildFieldList(vtkDataSet* source);
181 
184  virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
185 
187 
189  void DoProbing(vtkDataSet *input, int srcIdx, vtkDataSet *source,
190  vtkDataSet *output);
192 
193  char* ValidPointMaskArrayName;
194  vtkIdTypeArray *ValidPoints;
195  vtkCharArray* MaskPoints;
196  int NumberOfValidPoints;
197 
198  // Agreed, this is sort of a hack to allow subclasses to override the default
199  // behavior of this filter to call NullPoint() for every point that is
200  // not-a-hit when probing. This makes it possible for subclasses to initialize
201  // the arrays with different defaults.
202  bool UseNullPoint;
203 
204  vtkDataSetAttributes::FieldList* CellList;
205  vtkDataSetAttributes::FieldList* PointList;
206 private:
207  vtkProbeFilter(const vtkProbeFilter&); // Not implemented.
208  void operator=(const vtkProbeFilter&); // Not implemented.
209 
210  // Probe only those points that are marked as not-probed by the MaskPoints
211  // array.
212  void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
213  vtkDataSet *output);
214  // A faster implementation for vtkImageData input.
215  void ProbePointsImageData(vtkImageData *input, int srcIdx, vtkDataSet *source,
216  vtkImageData *output);
217 
218  class vtkVectorOfArrays;
219  vtkVectorOfArrays* CellArrays;
220 //ETX
221 };
222 
223 #endif
sample data values at specified point locations
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
#define VTKFILTERSCORE_EXPORT
dynamic, self-adjusting array of vtkIdType
Proxy object to connect input/output ports.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:42
a simple class to control print indentation
Definition: vtkIndent.h:38
selectively filter points
Definition: vtkMaskPoints.h:42
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
represent and manipulate attribute data in a dataset
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce output of the same type as input.
general representation of visualization data
Definition: vtkDataObject.h:64
static vtkDataSetAlgorithm * New()