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 
54 class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
55 {
56 public:
57  static vtkProbeFilter *New();
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
62 
64  void SetSourceData(vtkDataObject *source);
65  vtkDataObject *GetSource();
67 
70  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
71 
73 
81  vtkSetMacro(SpatialMatch, int);
82  vtkGetMacro(SpatialMatch, int);
83  vtkBooleanMacro(SpatialMatch, int);
85 
87 
89  vtkGetObjectMacro(ValidPoints, vtkIdTypeArray);
91 
93 
96  vtkSetStringMacro(ValidPointMaskArrayName)
97  vtkGetStringMacro(ValidPointMaskArrayName)
99 
100 //BTX
101 protected:
102  vtkProbeFilter();
103  ~vtkProbeFilter();
104 
105  int SpatialMatch;
106 
107  virtual int RequestData(vtkInformation *, vtkInformationVector **,
108  vtkInformationVector *);
109  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
110  vtkInformationVector *);
111  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
112  vtkInformationVector *);
113 
115  void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
116 
119  void BuildFieldList(vtkDataSet* source);
120 
123  virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
124 
126 
129  void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
130  vtkDataSet *output);
132 
133  char* ValidPointMaskArrayName;
134  vtkIdTypeArray *ValidPoints;
135  vtkCharArray* MaskPoints;
136  int NumberOfValidPoints;
137 
138  // Agreed, this is sort of a hack to allow subclasses to override the default
139  // behavior of this filter to call NullPoint() for every point that is
140  // not-a-hit when probing. This makes it possible for subclasses to initialize
141  // the arrays with different defaults.
142  bool UseNullPoint;
143 
144  vtkDataSetAttributes::FieldList* CellList;
145  vtkDataSetAttributes::FieldList* PointList;
146 private:
147  vtkProbeFilter(const vtkProbeFilter&); // Not implemented.
148  void operator=(const vtkProbeFilter&); // Not implemented.
149 
150  class vtkVectorOfArrays;
151  vtkVectorOfArrays* CellArrays;
152 //ETX
153 };
154 
155 #endif