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 ) override;
108 
113  static vtkTableBasedClipDataSet * New();
114 
118  vtkMTimeType GetMTime() override;
119 
121 
128  vtkSetMacro( InsideOut, vtkTypeBool );
129  vtkGetMacro( InsideOut, vtkTypeBool );
130  vtkBooleanMacro( InsideOut, vtkTypeBool );
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, vtkTypeBool );
173  vtkGetMacro( GenerateClipScalars, vtkTypeBool );
174  vtkBooleanMacro( GenerateClipScalars, vtkTypeBool );
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, vtkTypeBool );
212  vtkGetMacro( GenerateClippedOutput, vtkTypeBool );
213  vtkBooleanMacro( GenerateClippedOutput, vtkTypeBool );
215 
219  vtkUnstructuredGrid * GetClippedOutput();
220 
222 
227  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
228  vtkGetMacro(OutputPointsPrecision, int);
230 
231 protected:
233  ~vtkTableBasedClipDataSet() override;
234 
237  int FillInputPortInformation( int port, vtkInformation * info ) 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 
307  double Value;
312 
314 
315 private:
317  void operator= ( const vtkTableBasedClipDataSet & ) = delete;
318 };
319 
320 #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:53
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
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: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.
vtkIncrementalPointLocator * Locator
Store zero or more vtkInformation instances.