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 
93 #ifndef vtkTableBasedClipDataSet_h
94 #define vtkTableBasedClipDataSet_h
95 
96 #include "vtkFiltersGeneralModule.h" // For export macro
98 
99 class vtkCallbackCommand;
100 class vtkImplicitFunction;
102 
103 class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
104 {
105 public:
107  void PrintSelf( ostream & os, vtkIndent indent ) VTK_OVERRIDE;
108 
113  static vtkTableBasedClipDataSet * New();
114 
118  vtkMTimeType GetMTime() VTK_OVERRIDE;
119 
121 
128  vtkSetMacro( InsideOut, int );
129  vtkGetMacro( InsideOut, int );
130  vtkBooleanMacro( InsideOut, int );
132 
134 
140  vtkSetMacro( Value, double );
141  vtkGetMacro( Value, double );
143 
145 
150  vtkSetMacro( UseValueAsOffset, bool );
151  vtkGetMacro( UseValueAsOffset, bool );
152  vtkBooleanMacro( UseValueAsOffset, bool );
154 
156 
161  virtual void SetClipFunction( vtkImplicitFunction * );
162  vtkGetObjectMacro( ClipFunction, vtkImplicitFunction );
164 
166 
172  vtkSetMacro( GenerateClipScalars, int );
173  vtkGetMacro( GenerateClipScalars, int );
174  vtkBooleanMacro( GenerateClipScalars, int );
176 
178 
186  void SetLocator( vtkIncrementalPointLocator * locator );
187  vtkGetObjectMacro( Locator, vtkIncrementalPointLocator );
189 
191 
196  vtkSetClampMacro( MergeTolerance, double, 0.0001, 0.25 );
197  vtkGetMacro( MergeTolerance, double );
199 
204  void CreateDefaultLocator();
205 
207 
211  vtkSetMacro( GenerateClippedOutput, int );
212  vtkGetMacro( GenerateClippedOutput, int );
213  vtkBooleanMacro( GenerateClippedOutput, int );
215 
219  vtkUnstructuredGrid * GetClippedOutput();
220 
222 
227  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
228  vtkGetMacro(OutputPointsPrecision, int);
230 
231 protected:
233  ~vtkTableBasedClipDataSet() VTK_OVERRIDE;
234 
235  int RequestData( vtkInformation *,
236  vtkInformationVector **, vtkInformationVector * ) VTK_OVERRIDE;
237  int FillInputPortInformation( int port, vtkInformation * info ) VTK_OVERRIDE;
238 
244  void ClipDataSet( vtkDataSet * pDataSet,
245  vtkDataArray * clipAray, vtkUnstructuredGrid * unstruct );
246 
251  void ClipImageData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
252  double isoValue, vtkUnstructuredGrid * outputUG );
253 
260  void ClipPolyData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
261  double isoValue, vtkUnstructuredGrid * outputUG );
262 
269  void ClipRectilinearGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
270  double isoValue, vtkUnstructuredGrid * outputUG );
271 
278  void ClipStructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
279  double isoValue, vtkUnstructuredGrid * outputUG );
280 
287  void ClipUnstructuredGridData( vtkDataSet * inputGrd, vtkDataArray * clipAray,
288  double isoValue, vtkUnstructuredGrid * outputUG );
289 
290 
294  static void InternalProgressCallbackFunction( vtkObject *, unsigned long,
295  void * clientdata, void * );
296 
300  void InternalProgressCallback( vtkAlgorithm * algorithm );
301 
302 
303  int InsideOut;
304  int GenerateClipScalars;
305  int GenerateClippedOutput;
306  bool UseValueAsOffset;
307  double Value;
308  double MergeTolerance;
309  vtkCallbackCommand * InternalProgressObserver;
310  vtkImplicitFunction * ClipFunction;
312 
313  int OutputPointsPrecision;
314 
315 private:
316  vtkTableBasedClipDataSet( const vtkTableBasedClipDataSet &) VTK_DELETE_FUNCTION;
317  void operator= ( const vtkTableBasedClipDataSet & ) VTK_DELETE_FUNCTION;
318 };
319 
320 #endif
abstract interface for implicit functions
abstract base class for most VTK objects
Definition: vtkObject.h:53
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
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:53
a simple class to control print indentation
Definition: vtkIndent.h:33
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
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.