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 ) override;
111 
116  static vtkTableBasedClipDataSet * New();
117 
121  vtkMTimeType GetMTime() override;
122 
124 
131  vtkSetMacro( InsideOut, vtkTypeBool );
132  vtkGetMacro( InsideOut, vtkTypeBool );
133  vtkBooleanMacro( InsideOut, vtkTypeBool );
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, vtkTypeBool );
176  vtkGetMacro( GenerateClipScalars, vtkTypeBool );
177  vtkBooleanMacro( GenerateClipScalars, vtkTypeBool );
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, vtkTypeBool );
215  vtkGetMacro( GenerateClippedOutput, vtkTypeBool );
216  vtkBooleanMacro( GenerateClippedOutput, vtkTypeBool );
218 
222  vtkUnstructuredGrid * GetClippedOutput();
223 
225 
230  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
231  vtkGetMacro(OutputPointsPrecision, int);
233 
234 protected:
236  ~vtkTableBasedClipDataSet() override;
237 
240  int FillInputPortInformation( int port, vtkInformation * info ) 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 
310  double Value;
315 
317 
318 private:
320  void operator= ( const vtkTableBasedClipDataSet & ) = delete;
321 };
322 
323 #endif
abstract interface for implicit functions
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
abstract base class for most VTK objects
Definition: vtkObject.h:59
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkCallbackCommand * InternalProgressObserver
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
vtkImplicitFunction * ClipFunction
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int vtkTypeBool
Definition: vtkABI.h:69
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.
vtkIncrementalPointLocator * Locator
Store zero or more vtkInformation instances.