VTK  9.2.6
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  * Copyright (c) 2000 - 2009, Lawrence Livermore National Security, LLC
19  * Produced at the Lawrence Livermore National Laboratory
20  * LLNL-CODE-400124
21  * All rights reserved.
22  *
23  * This file was adapted from the VisIt clipper (vtkVisItClipper). For details,
24  * see https://visit.llnl.gov/. The full copyright notice is contained in the
25  * file COPYRIGHT located at the root of the VisIt distribution or at
26  * http://www.llnl.gov/visit/copyright.html.
27  *
28  *****************************************************************************/
29 
94 #ifndef vtkTableBasedClipDataSet_h
95 #define vtkTableBasedClipDataSet_h
96 
97 #include "vtkFiltersGeneralModule.h" // For export macro
99 
100 class vtkCallbackCommand;
101 class vtkImplicitFunction;
103 
104 class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
105 {
106 public:
108  void PrintSelf(ostream& os, vtkIndent indent) override;
109 
114  static vtkTableBasedClipDataSet* New();
115 
119  vtkMTimeType GetMTime() override;
120 
122 
129  vtkSetMacro(InsideOut, vtkTypeBool);
130  vtkGetMacro(InsideOut, vtkTypeBool);
131  vtkBooleanMacro(InsideOut, vtkTypeBool);
133 
135 
141  vtkSetMacro(Value, double);
142  vtkGetMacro(Value, double);
144 
146 
151  vtkSetMacro(UseValueAsOffset, bool);
152  vtkGetMacro(UseValueAsOffset, bool);
153  vtkBooleanMacro(UseValueAsOffset, bool);
155 
157 
162  virtual void SetClipFunction(vtkImplicitFunction*);
163  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
165 
167 
173  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
174  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
175  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
177 
179 
187  void SetLocator(vtkIncrementalPointLocator* locator);
188  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
190 
192 
197  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
198  vtkGetMacro(MergeTolerance, double);
200 
205  void CreateDefaultLocator();
206 
208 
212  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
213  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
214  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
216 
220  vtkUnstructuredGrid* GetClippedOutput();
221 
223 
228  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
229  vtkGetMacro(OutputPointsPrecision, int);
231 
232 protected:
234  ~vtkTableBasedClipDataSet() override;
235 
237  int FillInputPortInformation(int port, vtkInformation* info) override;
238 
244  void ClipDataSet(vtkDataSet* pDataSet, vtkDataArray* clipAray, vtkUnstructuredGrid* unstruct);
245 
250  void ClipImageData(
251  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
252 
259  void ClipPolyData(
260  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
261 
268  void ClipRectilinearGridData(
269  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
270 
277  void ClipStructuredGridData(
278  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
279 
286  void ClipUnstructuredGridData(
287  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
288 
292  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
293 
297  void InternalProgressCallback(vtkAlgorithm* algorithm);
298 
303  double Value;
308 
310 
311 private:
313  void operator=(const vtkTableBasedClipDataSet&) = delete;
314 };
315 
316 #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:62
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
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:62
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:55
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.