VTK
vtkTableBasedClipDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTableBasedClipDataSet.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 
17 /*****************************************************************************
18 *
19 * Copyright (c) 2000 - 2009, Lawrence Livermore National Security, LLC
20 * Produced at the Lawrence Livermore National Laboratory
21 * LLNL-CODE-400124
22 * All rights reserved.
23 *
24 * This file was adapted from the VisIt clipper (vtkVisItClipper). For details,
25 * see https://visit.llnl.gov/. The full copyright notice is contained in the
26 * file COPYRIGHT located at the root of the VisIt distribution or at
27 * http://www.llnl.gov/visit/copyright.html.
28 *
29 *****************************************************************************/
30 
31 
95 #ifndef vtkTableBasedClipDataSet_h
96 #define vtkTableBasedClipDataSet_h
97 
98 #include "vtkFiltersGeneralModule.h" // For export macro
100 
101 class vtkCallbackCommand;
102 class vtkImplicitFunction;
104 
106 {
107 public:
109  void PrintSelf( ostream & os, vtkIndent indent );
110 
114  static vtkTableBasedClipDataSet * New();
115 
118  unsigned long GetMTime();
119 
121 
127  vtkSetMacro( InsideOut, int );
128  vtkGetMacro( InsideOut, int );
129  vtkBooleanMacro( InsideOut, int );
131 
133 
137  vtkSetMacro( Value, double );
138  vtkGetMacro( Value, double );
140 
142 
146  vtkSetMacro( UseValueAsOffset, bool );
147  vtkGetMacro( UseValueAsOffset, bool );
148  vtkBooleanMacro( UseValueAsOffset, bool );
150 
152 
155  virtual void SetClipFunction( vtkImplicitFunction * );
156  vtkGetObjectMacro( ClipFunction, vtkImplicitFunction );
158 
160 
164  vtkSetMacro( GenerateClipScalars, int );
165  vtkGetMacro( GenerateClipScalars, int );
166  vtkBooleanMacro( GenerateClipScalars, int );
168 
170 
177  void SetLocator( vtkIncrementalPointLocator * locator );
178  vtkGetObjectMacro( Locator, vtkIncrementalPointLocator );
180 
182 
186  vtkSetClampMacro( MergeTolerance, double, 0.0001, 0.25 );
187  vtkGetMacro( MergeTolerance, double );
189 
192  void CreateDefaultLocator();
193 
195 
197  vtkSetMacro( GenerateClippedOutput, int );
198  vtkGetMacro( GenerateClippedOutput, int );
199  vtkBooleanMacro( GenerateClippedOutput, int );
201 
203  vtkUnstructuredGrid * GetClippedOutput();
204 
206 
209  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
210  vtkGetMacro(OutputPointsPrecision, int);
212 
213 protected:
216 
217  virtual int RequestData( vtkInformation *,
219  virtual int FillInputPortInformation( int port, vtkInformation * info );
220 
222 
225  void ClipDataSet( vtkDataSet * pDataSet,
226  vtkDataArray * clipAray, vtkUnstructuredGrid * unstruct );
228 
230 
232  void ClipImageData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
233  double isoValue, vtkUnstructuredGrid * outputUG );
235 
237 
242  void ClipPolyData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
243  double isoValue, vtkUnstructuredGrid * outputUG );
245 
247 
252  void ClipRectilinearGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
253  double isoValue, vtkUnstructuredGrid * outputUG );
255 
257 
262  void ClipStructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
263  double isoValue, vtkUnstructuredGrid * outputUG );
265 
267 
272  void ClipUnstructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
273  double isoValue, vtkUnstructuredGrid * outputUG );
275 
276 
278 
279  static void InternalProgressCallbackFunction( vtkObject *, unsigned long,
280  void * clientdata, void * );
282 
284  void InternalProgressCallback( vtkAlgorithm * algorithm );
285 
286 
291  double Value;
296 
298 
299 private:
300  vtkTableBasedClipDataSet( const vtkTableBasedClipDataSet &); // Not implemented.
301  void operator= ( const vtkTableBasedClipDataSet & ); // Not implemented.
302 };
303 
304 #endif
abstract interface for implicit functions
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
abstract base class for most VTK objects
Definition: vtkObject.h:61
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
vtkCallbackCommand * InternalProgressObserver
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
vtkImplicitFunction * ClipFunction
virtual int FillInputPortInformation(int port, vtkInformation *info)
supports function callbacks
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKFILTERSGENERAL_EXPORT
Clip any dataset with a user-specified implicit function or an input scalar point data array...
Superclass for algorithms that produce only unstructured grid as output.
vtkIncrementalPointLocator * Locator
Store zero or more vtkInformation instances.