00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00092 #ifndef __vtkTableBasedClipDataSet_h
00093 #define __vtkTableBasedClipDataSet_h
00094
00095 #include "vtkUnstructuredGridAlgorithm.h"
00096
00097 class vtkCallbackCommand;
00098 class vtkImplicitFunction;
00099 class vtkIncrementalPointLocator;
00100
00101 class VTK_GRAPHICS_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
00102 {
00103 public:
00104 vtkTypeMacro( vtkTableBasedClipDataSet, vtkUnstructuredGridAlgorithm );
00105 void PrintSelf( ostream & os, vtkIndent indent );
00106
00110 static vtkTableBasedClipDataSet * New();
00111
00114 unsigned long GetMTime();
00115
00117
00123 vtkSetMacro( InsideOut, int );
00124 vtkGetMacro( InsideOut, int );
00125 vtkBooleanMacro( InsideOut, int );
00127
00129
00133 vtkSetMacro( Value, double );
00134 vtkGetMacro( Value, double );
00136
00138
00142 vtkSetMacro( UseValueAsOffset, bool );
00143 vtkGetMacro( UseValueAsOffset, bool );
00144 vtkBooleanMacro( UseValueAsOffset, bool );
00146
00148
00151 virtual void SetClipFunction( vtkImplicitFunction * );
00152 vtkGetObjectMacro( ClipFunction, vtkImplicitFunction );
00154
00156
00160 vtkSetMacro( GenerateClipScalars, int );
00161 vtkGetMacro( GenerateClipScalars, int );
00162 vtkBooleanMacro( GenerateClipScalars, int );
00164
00166
00173 void SetLocator( vtkIncrementalPointLocator * locator );
00174 vtkGetObjectMacro( Locator, vtkIncrementalPointLocator );
00176
00178
00182 vtkSetClampMacro( MergeTolerance, double, 0.0001, 0.25 );
00183 vtkGetMacro( MergeTolerance, double );
00185
00188 void CreateDefaultLocator();
00189
00191
00193 vtkSetMacro( GenerateClippedOutput, int );
00194 vtkGetMacro( GenerateClippedOutput, int );
00195 vtkBooleanMacro( GenerateClippedOutput, int );
00197
00199 vtkUnstructuredGrid * GetClippedOutput();
00200
00201 protected:
00202 vtkTableBasedClipDataSet( vtkImplicitFunction * cf = NULL );
00203 ~vtkTableBasedClipDataSet();
00204
00206
00207 virtual int ProcessRequest( vtkInformation *,
00208 vtkInformationVector **,
00209 vtkInformationVector *);
00210 virtual int RequestData( vtkInformation *,
00211 vtkInformationVector **, vtkInformationVector * );
00212 virtual int FillInputPortInformation( int port, vtkInformation * info );
00214
00216
00219 void ClipDataSet( vtkDataSet * pDataSet,
00220 vtkDataArray * clipAray, vtkUnstructuredGrid * unstruct );
00222
00224
00226 void ClipImageData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
00227 double isoValue, vtkUnstructuredGrid * outputUG );
00229
00231
00236 void ClipPolyData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
00237 double isoValue, vtkUnstructuredGrid * outputUG );
00239
00241
00246 void ClipRectilinearGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
00247 double isoValue, vtkUnstructuredGrid * outputUG );
00249
00251
00256 void ClipStructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
00257 double isoValue, vtkUnstructuredGrid * outputUG );
00259
00261
00266 void ClipUnstructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
00267 double isoValue, vtkUnstructuredGrid * outputUG );
00269
00270
00272
00273 static void InternalProgressCallbackFunction( vtkObject *, unsigned long,
00274 void * clientdata, void * );
00276
00278 void InternalProgressCallback( vtkAlgorithm * algorithm );
00279
00280
00281 int InsideOut;
00282 int GenerateClipScalars;
00283 int GenerateClippedOutput;
00284 bool UseValueAsOffset;
00285 double Value;
00286 double MergeTolerance;
00287 vtkCallbackCommand * InternalProgressObserver;
00288 vtkImplicitFunction * ClipFunction;
00289 vtkIncrementalPointLocator * Locator;
00290
00291 private:
00292 vtkTableBasedClipDataSet( const vtkTableBasedClipDataSet &);
00293 void operator= ( const vtkTableBasedClipDataSet & );
00294 };
00295
00296 #endif