VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTableBasedClipDataSet.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 =========================================================================*/ 00015 00016 00017 /***************************************************************************** 00018 * 00019 * Copyright (c) 2000 - 2009, Lawrence Livermore National Security, LLC 00020 * Produced at the Lawrence Livermore National Laboratory 00021 * LLNL-CODE-400124 00022 * All rights reserved. 00023 * 00024 * This file was adapted from the VisIt clipper (vtkVisItClipper). For details, 00025 * see https://visit.llnl.gov/. The full copyright notice is contained in the 00026 * file COPYRIGHT located at the root of the VisIt distribution or at 00027 * http://www.llnl.gov/visit/copyright.html. 00028 * 00029 *****************************************************************************/ 00030 00031 00095 #ifndef __vtkTableBasedClipDataSet_h 00096 #define __vtkTableBasedClipDataSet_h 00097 00098 #include "vtkFiltersGeneralModule.h" // For export macro 00099 #include "vtkUnstructuredGridAlgorithm.h" 00100 00101 class vtkCallbackCommand; 00102 class vtkImplicitFunction; 00103 class vtkIncrementalPointLocator; 00104 00105 class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm 00106 { 00107 public: 00108 vtkTypeMacro( vtkTableBasedClipDataSet, vtkUnstructuredGridAlgorithm ); 00109 void PrintSelf( ostream & os, vtkIndent indent ); 00110 00114 static vtkTableBasedClipDataSet * New(); 00115 00118 unsigned long GetMTime(); 00119 00121 00127 vtkSetMacro( InsideOut, int ); 00128 vtkGetMacro( InsideOut, int ); 00129 vtkBooleanMacro( InsideOut, int ); 00131 00133 00137 vtkSetMacro( Value, double ); 00138 vtkGetMacro( Value, double ); 00140 00142 00146 vtkSetMacro( UseValueAsOffset, bool ); 00147 vtkGetMacro( UseValueAsOffset, bool ); 00148 vtkBooleanMacro( UseValueAsOffset, bool ); 00150 00152 00155 virtual void SetClipFunction( vtkImplicitFunction * ); 00156 vtkGetObjectMacro( ClipFunction, vtkImplicitFunction ); 00158 00160 00164 vtkSetMacro( GenerateClipScalars, int ); 00165 vtkGetMacro( GenerateClipScalars, int ); 00166 vtkBooleanMacro( GenerateClipScalars, int ); 00168 00170 00177 void SetLocator( vtkIncrementalPointLocator * locator ); 00178 vtkGetObjectMacro( Locator, vtkIncrementalPointLocator ); 00180 00182 00186 vtkSetClampMacro( MergeTolerance, double, 0.0001, 0.25 ); 00187 vtkGetMacro( MergeTolerance, double ); 00189 00192 void CreateDefaultLocator(); 00193 00195 00197 vtkSetMacro( GenerateClippedOutput, int ); 00198 vtkGetMacro( GenerateClippedOutput, int ); 00199 vtkBooleanMacro( GenerateClippedOutput, int ); 00201 00203 vtkUnstructuredGrid * GetClippedOutput(); 00204 00206 00209 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION); 00210 vtkGetMacro(OutputPointsPrecision, int); 00212 00214 00215 virtual int ProcessRequest( vtkInformation *, 00216 vtkInformationVector **, 00217 vtkInformationVector *); 00218 protected: 00219 vtkTableBasedClipDataSet( vtkImplicitFunction * cf = NULL ); 00220 ~vtkTableBasedClipDataSet(); 00222 00223 virtual int RequestData( vtkInformation *, 00224 vtkInformationVector **, vtkInformationVector * ); 00225 virtual int FillInputPortInformation( int port, vtkInformation * info ); 00226 00228 00231 void ClipDataSet( vtkDataSet * pDataSet, 00232 vtkDataArray * clipAray, vtkUnstructuredGrid * unstruct ); 00234 00236 00238 void ClipImageData( vtkDataSet * inputGrd, vtkDataArray * clipAray, 00239 double isoValue, vtkUnstructuredGrid * outputUG ); 00241 00243 00248 void ClipPolyData( vtkDataSet * inputGrd, vtkDataArray * clipAray, 00249 double isoValue, vtkUnstructuredGrid * outputUG ); 00251 00253 00258 void ClipRectilinearGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray, 00259 double isoValue, vtkUnstructuredGrid * outputUG ); 00261 00263 00268 void ClipStructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray, 00269 double isoValue, vtkUnstructuredGrid * outputUG ); 00271 00273 00278 void ClipUnstructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray, 00279 double isoValue, vtkUnstructuredGrid * outputUG ); 00281 00282 00284 00285 static void InternalProgressCallbackFunction( vtkObject *, unsigned long, 00286 void * clientdata, void * ); 00288 00290 void InternalProgressCallback( vtkAlgorithm * algorithm ); 00291 00292 00293 int InsideOut; 00294 int GenerateClipScalars; 00295 int GenerateClippedOutput; 00296 bool UseValueAsOffset; 00297 double Value; 00298 double MergeTolerance; 00299 vtkCallbackCommand * InternalProgressObserver; 00300 vtkImplicitFunction * ClipFunction; 00301 vtkIncrementalPointLocator * Locator; 00302 00303 int OutputPointsPrecision; 00304 00305 private: 00306 vtkTableBasedClipDataSet( const vtkTableBasedClipDataSet &); // Not implemented. 00307 void operator= ( const vtkTableBasedClipDataSet & ); // Not implemented. 00308 }; 00309 00310 #endif