VTK
|
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 00102 vtkSetMacro(PassCellArrays, int); 00103 vtkGetMacro(PassCellArrays, int); 00104 // 00105 vtkSetMacro(PassPointArrays, int); 00106 vtkGetMacro(PassPointArrays, int); 00108 00109 //BTX 00110 protected: 00111 vtkProbeFilter(); 00112 ~vtkProbeFilter(); 00113 00114 int PassCellArrays; 00115 int PassPointArrays; 00116 00117 int SpatialMatch; 00118 00119 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00120 vtkInformationVector *); 00121 virtual int RequestInformation(vtkInformation *, vtkInformationVector **, 00122 vtkInformationVector *); 00123 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, 00124 vtkInformationVector *); 00125 00127 void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output); 00128 00131 void BuildFieldList(vtkDataSet* source); 00132 00135 virtual void InitializeForProbing(vtkDataSet *input, vtkDataSet *output); 00136 00138 00141 void ProbeEmptyPoints(vtkDataSet *input, int srcIdx, vtkDataSet *source, 00142 vtkDataSet *output); 00144 00145 char* ValidPointMaskArrayName; 00146 vtkIdTypeArray *ValidPoints; 00147 vtkCharArray* MaskPoints; 00148 int NumberOfValidPoints; 00149 00150 // Agreed, this is sort of a hack to allow subclasses to override the default 00151 // behavior of this filter to call NullPoint() for every point that is 00152 // not-a-hit when probing. This makes it possible for subclasses to initialize 00153 // the arrays with different defaults. 00154 bool UseNullPoint; 00155 00156 vtkDataSetAttributes::FieldList* CellList; 00157 vtkDataSetAttributes::FieldList* PointList; 00158 private: 00159 vtkProbeFilter(const vtkProbeFilter&); // Not implemented. 00160 void operator=(const vtkProbeFilter&); // Not implemented. 00161 00162 class vtkVectorOfArrays; 00163 vtkVectorOfArrays* CellArrays; 00164 //ETX 00165 }; 00166 00167 #endif