VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Core/vtkProbeFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkProbeFilter.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00043 #ifndef vtkProbeFilter_h
00044 #define vtkProbeFilter_h
00045 
00046 #include "vtkFiltersCoreModule.h" // For export macro
00047 #include "vtkDataSetAlgorithm.h"
00048 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
00049 
00050 class vtkIdTypeArray;
00051 class vtkCharArray;
00052 class vtkMaskPoints;
00053 
00054 class VTKFILTERSCORE_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
00055 {
00056 public:
00057   static vtkProbeFilter *New();
00058   vtkTypeMacro(vtkProbeFilter,vtkDataSetAlgorithm);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062 
00064   void SetSourceData(vtkDataObject *source);
00065   vtkDataObject *GetSource();
00067 
00070   void SetSourceConnection(vtkAlgorithmOutput* algOutput);
00071 
00073 
00081   vtkSetMacro(SpatialMatch, int);
00082   vtkGetMacro(SpatialMatch, int);
00083   vtkBooleanMacro(SpatialMatch, int);
00085 
00087 
00089   vtkGetObjectMacro(ValidPoints, vtkIdTypeArray);
00091 
00093 
00096   vtkSetStringMacro(ValidPointMaskArrayName)
00097   vtkGetStringMacro(ValidPointMaskArrayName)
00099 
00101 
00103   vtkSetMacro(PassCellArrays, int);
00104   vtkBooleanMacro(PassCellArrays, int);
00105   vtkGetMacro(PassCellArrays, int);
00107 
00108 
00110   vtkSetMacro(PassPointArrays, int);
00111   vtkBooleanMacro(PassPointArrays, int);
00112   vtkGetMacro(PassPointArrays, int);
00114 
00115 
00117 
00119   vtkSetMacro(PassFieldArrays, int);
00120   vtkBooleanMacro(PassFieldArrays, int);
00121   vtkGetMacro(PassFieldArrays, int);
00123 
00125 
00128   vtkSetMacro(Tolerance, double);
00129   vtkGetMacro(Tolerance, double);
00131 
00133 
00136   vtkSetMacro(ComputeTolerance, bool);
00137   vtkBooleanMacro(ComputeTolerance, bool);
00138   vtkGetMacro(ComputeTolerance, bool);
00140 
00141 //BTX
00142 protected:
00143   vtkProbeFilter();
00144   ~vtkProbeFilter();
00145 
00146   int PassCellArrays;
00147   int PassPointArrays;
00148   int PassFieldArrays;
00149 
00150   int SpatialMatch;
00151 
00152   double Tolerance;
00153   bool ComputeTolerance;
00154 
00155   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00156     vtkInformationVector *);
00157   virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
00158     vtkInformationVector *);
00159   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
00160     vtkInformationVector *);
00161 
00163 
00165   void PassAttributeData(
00166     vtkDataSet* input, vtkDataObject* source, vtkDataSet* output);
00168 
00170   void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
00171 
00174   void BuildFieldList(vtkDataSet* source);
00175 
00178   virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
00179 
00181 
00184   void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source,
00185     vtkDataSet *output);
00187 
00188   char* ValidPointMaskArrayName;
00189   vtkIdTypeArray *ValidPoints;
00190   vtkCharArray* MaskPoints;
00191   int NumberOfValidPoints;
00192 
00193   // Agreed, this is sort of a hack to allow subclasses to override the default
00194   // behavior of this filter to call NullPoint() for every point that is
00195   // not-a-hit when probing. This makes it possible for subclasses to initialize
00196   // the arrays with different defaults.
00197   bool UseNullPoint;
00198 
00199   vtkDataSetAttributes::FieldList* CellList;
00200   vtkDataSetAttributes::FieldList* PointList;
00201 private:
00202   vtkProbeFilter(const vtkProbeFilter&);  // Not implemented.
00203   void operator=(const vtkProbeFilter&);  // Not implemented.
00204 
00205   class vtkVectorOfArrays;
00206   vtkVectorOfArrays* CellArrays;
00207 //ETX
00208 };
00209 
00210 #endif