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 "vtkDataSetAlgorithm.h"
47 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
48 
49 class vtkIdTypeArray;
50 class vtkCharArray;
51 class vtkMaskPoints;
52 
54 {
55 public:
56  static vtkProbeFilter *New();
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
63  void SetSource(vtkDataObject *source);
64  vtkDataObject *GetSource();
66 
69  void SetSourceConnection(vtkAlgorithmOutput* algOutput);
70 
72 
80  vtkSetMacro(SpatialMatch, int);
81  vtkGetMacro(SpatialMatch, int);
82  vtkBooleanMacro(SpatialMatch, int);
84 
86 
88  vtkGetObjectMacro(ValidPoints, vtkIdTypeArray);
90 
92 
95  vtkSetStringMacro(ValidPointMaskArrayName)
96  vtkGetStringMacro(ValidPointMaskArrayName)
98 
99 //BTX
100 protected:
101  vtkProbeFilter();
102  ~vtkProbeFilter();
103 
104  int SpatialMatch;
105 
106  virtual int RequestData(vtkInformation *, vtkInformationVector **,
107  vtkInformationVector *);
108  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
109  vtkInformationVector *);
110  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
111  vtkInformationVector *);
112 
114  void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
115 
118  void BuildFieldList(vtkDataSet* source);
119 
122  virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
123 
125 
128  void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
129  vtkDataSet *output);
131 
132  char* ValidPointMaskArrayName;
133  vtkIdTypeArray *ValidPoints;
134  vtkCharArray* MaskPoints;
135  int NumberOfValidPoints;
136 
137  // Agreed, this is sort of a hack to allow subclasses to override the default
138  // behavior of this filter to call NullPoint() for every point that is
139  // not-a-hit when probing. This makes it possible for subclasses to initialize
140  // the arrays with different defaults.
141  bool UseNullPoint;
142 
143  vtkDataSetAttributes::FieldList* CellList;
144  vtkDataSetAttributes::FieldList* PointList;
145 private:
146  vtkProbeFilter(const vtkProbeFilter&); // Not implemented.
147  void operator=(const vtkProbeFilter&); // Not implemented.
148 
149  class vtkVectorOfArrays;
150  vtkVectorOfArrays* CellArrays;
151 //ETX
152 };
153 
154 #endif