VTK
dox/Graphics/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 "vtkDataSetAlgorithm.h"
00047 #include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
00048 
00049 class vtkIdTypeArray;
00050 class vtkCharArray;
00051 class vtkMaskPoints;
00052 
00053 class VTK_GRAPHICS_EXPORT vtkProbeFilter : public vtkDataSetAlgorithm
00054 {
00055 public:
00056   static vtkProbeFilter *New();
00057   vtkTypeMacro(vtkProbeFilter,vtkDataSetAlgorithm);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00063   void SetSource(vtkDataObject *source);
00064   vtkDataObject *GetSource();
00066 
00069   void SetSourceConnection(vtkAlgorithmOutput* algOutput);
00070 
00072 
00080   vtkSetMacro(SpatialMatch, int);
00081   vtkGetMacro(SpatialMatch, int);
00082   vtkBooleanMacro(SpatialMatch, int);
00084 
00086 
00088   vtkGetObjectMacro(ValidPoints, vtkIdTypeArray);
00090  
00092 
00095   vtkSetStringMacro(ValidPointMaskArrayName)
00096   vtkGetStringMacro(ValidPointMaskArrayName)
00098 
00099 //BTX 
00100 protected:
00101   vtkProbeFilter();
00102   ~vtkProbeFilter();
00103 
00104   int SpatialMatch;
00105 
00106   virtual int RequestData(vtkInformation *, vtkInformationVector **, 
00107     vtkInformationVector *);
00108   virtual int RequestInformation(vtkInformation *, vtkInformationVector **, 
00109     vtkInformationVector *);
00110   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, 
00111     vtkInformationVector *);
00112 
00114   void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output);
00115 
00118   void BuildFieldList(vtkDataSet* source);
00119 
00122   virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output);
00123 
00125 
00128   void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source, 
00129     vtkDataSet *output);
00131 
00132   char* ValidPointMaskArrayName;
00133   vtkIdTypeArray *ValidPoints;
00134   vtkCharArray* MaskPoints;
00135   int NumberOfValidPoints;
00136 
00137   // Agreed, this is sort of a hack to allow subclasses to override the default
00138   // behavior of this filter to call NullPoint() for every point that is
00139   // not-a-hit when probing. This makes it possible for subclasses to initialize
00140   // the arrays with different defaults.
00141   bool UseNullPoint;
00142 
00143   vtkDataSetAttributes::FieldList* CellList;
00144   vtkDataSetAttributes::FieldList* PointList;
00145 private:
00146   vtkProbeFilter(const vtkProbeFilter&);  // Not implemented.
00147   void operator=(const vtkProbeFilter&);  // Not implemented.
00148 
00149   class vtkVectorOfArrays;
00150   vtkVectorOfArrays* CellArrays;
00151 //ETX
00152 };
00153 
00154 #endif