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 
96 #ifndef vtkTableBasedClipDataSet_h
97 #define vtkTableBasedClipDataSet_h
98 
99 #include "vtkFiltersGeneralModule.h" // For export macro
101 
102 class vtkCallbackCommand;
103 class vtkImplicitFunction;
105 
106 class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
107 {
108 public:
110  void PrintSelf( ostream & os, vtkIndent indent ) VTK_OVERRIDE;
111 
116  static vtkTableBasedClipDataSet * New();
117 
121  vtkMTimeType GetMTime() VTK_OVERRIDE;
122 
124 
131  vtkSetMacro( InsideOut, int );
132  vtkGetMacro( InsideOut, int );
133  vtkBooleanMacro( InsideOut, int );
135 
137 
143  vtkSetMacro( Value, double );
144  vtkGetMacro( Value, double );
146 
148 
153  vtkSetMacro( UseValueAsOffset, bool );
154  vtkGetMacro( UseValueAsOffset, bool );
155  vtkBooleanMacro( UseValueAsOffset, bool );
157 
159 
164  virtual void SetClipFunction( vtkImplicitFunction * );
165  vtkGetObjectMacro( ClipFunction, vtkImplicitFunction );
167 
169 
175  vtkSetMacro( GenerateClipScalars, int );
176  vtkGetMacro( GenerateClipScalars, int );
177  vtkBooleanMacro( GenerateClipScalars, int );
179 
181 
189  void SetLocator( vtkIncrementalPointLocator * locator );
190  vtkGetObjectMacro( Locator, vtkIncrementalPointLocator );
192 
194 
199  vtkSetClampMacro( MergeTolerance, double, 0.0001, 0.25 );
200  vtkGetMacro( MergeTolerance, double );
202 
207  void CreateDefaultLocator();
208 
210 
214  vtkSetMacro( GenerateClippedOutput, int );
215  vtkGetMacro( GenerateClippedOutput, int );
216  vtkBooleanMacro( GenerateClippedOutput, int );
218 
222  vtkUnstructuredGrid * GetClippedOutput();
223 
225 
230  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
231  vtkGetMacro(OutputPointsPrecision, int);
233 
234 protected:
235  vtkTableBasedClipDataSet( vtkImplicitFunction * cf = NULL );
236  ~vtkTableBasedClipDataSet() VTK_OVERRIDE;
237 
238  int RequestData( vtkInformation *,
239  vtkInformationVector **, vtkInformationVector * ) VTK_OVERRIDE;
240  int FillInputPortInformation( int port, vtkInformation * info ) VTK_OVERRIDE;
241 
247  void ClipDataSet( vtkDataSet * pDataSet,
248  vtkDataArray * clipAray, vtkUnstructuredGrid * unstruct );
249 
254  void ClipImageData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
255  double isoValue, vtkUnstructuredGrid * outputUG );
256 
263  void ClipPolyData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
264  double isoValue, vtkUnstructuredGrid * outputUG );
265 
272  void ClipRectilinearGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
273  double isoValue, vtkUnstructuredGrid * outputUG );
274 
281  void ClipStructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
282  double isoValue, vtkUnstructuredGrid * outputUG );
283 
290  void ClipUnstructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
291  double isoValue, vtkUnstructuredGrid * outputUG );
292 
293 
297  static void InternalProgressCallbackFunction( vtkObject *, unsigned long,
298  void * clientdata, void * );
299 
303  void InternalProgressCallback( vtkAlgorithm * algorithm );
304 
305 
306  int InsideOut;
307  int GenerateClipScalars;
308  int GenerateClippedOutput;
309  bool UseValueAsOffset;
310  double Value;
311  double MergeTolerance;
312  vtkCallbackCommand * InternalProgressObserver;
313  vtkImplicitFunction * ClipFunction;
314  vtkIncrementalPointLocator * Locator;
315 
316  int OutputPointsPrecision;
317 
318 private:
319  vtkTableBasedClipDataSet( const vtkTableBasedClipDataSet &) VTK_DELETE_FUNCTION;
320  void operator= ( const vtkTableBasedClipDataSet & ) VTK_DELETE_FUNCTION;
321 };
322 
323 #endif
abstract interface for implicit functions
abstract base class for most VTK objects
Definition: vtkObject.h:59
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
supports function callbacks
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
a simple class to control print indentation
Definition: vtkIndent.h:39
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual vtkMTimeType GetMTime()
Return this object's modified time.
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.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.