VTK  9.1.0
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 
130 #ifndef vtkTableBasedClipDataSet_h
131 #define vtkTableBasedClipDataSet_h
132 
133 #include "vtkFiltersGeneralModule.h" // For export macro
135 
136 class vtkCallbackCommand;
137 class vtkImplicitFunction;
139 
140 class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
141 {
142 public:
144  void PrintSelf(ostream& os, vtkIndent indent) override;
145 
151 
155  vtkMTimeType GetMTime() override;
156 
158 
165  vtkSetMacro(InsideOut, vtkTypeBool);
166  vtkGetMacro(InsideOut, vtkTypeBool);
167  vtkBooleanMacro(InsideOut, vtkTypeBool);
169 
171 
177  vtkSetMacro(Value, double);
178  vtkGetMacro(Value, double);
180 
182 
187  vtkSetMacro(UseValueAsOffset, bool);
188  vtkGetMacro(UseValueAsOffset, bool);
189  vtkBooleanMacro(UseValueAsOffset, bool);
191 
193 
199  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
201 
203 
209  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
210  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
211  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
213 
215 
224  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
226 
228 
233  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
234  vtkGetMacro(MergeTolerance, double);
236 
242 
244 
248  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
249  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
250  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
252 
257 
259 
264  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
265  vtkGetMacro(OutputPointsPrecision, int);
267 
268 protected:
271 
274 
280  void ClipDataSet(vtkDataSet* pDataSet, vtkDataArray* clipAray, vtkUnstructuredGrid* unstruct);
281 
287  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
288 
296  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
297 
305  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
306 
314  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
315 
323  vtkDataSet* inputGrd, vtkDataArray* clipAray, double isoValue, vtkUnstructuredGrid* outputUG);
324 
328  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
329 
334 
339  double Value;
344 
346 
347 private:
349  void operator=(const vtkTableBasedClipDataSet&) = delete;
350 };
351 
352 #endif
vtkTableBasedClipDataSet::New
static vtkTableBasedClipDataSet * New()
Create an instance with a user-specified implicit function, turning off IVARs InsideOut and GenerateC...
vtkTableBasedClipDataSet::InsideOut
vtkTypeBool InsideOut
Definition: vtkTableBasedClipDataSet.h:335
vtkTableBasedClipDataSet::GetClippedOutput
vtkUnstructuredGrid * GetClippedOutput()
Return the clipped output.
vtkTableBasedClipDataSet::InternalProgressCallbackFunction
static void InternalProgressCallbackFunction(vtkObject *, unsigned long, void *clientdata, void *)
Register a callback function with the InternalProgressObserver.
vtkTableBasedClipDataSet::GenerateClipScalars
vtkTypeBool GenerateClipScalars
Definition: vtkTableBasedClipDataSet.h:336
vtkTableBasedClipDataSet::GetMTime
vtkMTimeType GetMTime() override
Get the MTime for which the point locator and clip function are considered.
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:123
vtkTableBasedClipDataSet::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTableBasedClipDataSet::ClipPolyData
void ClipPolyData(vtkDataSet *inputGrd, vtkDataArray *clipAray, double isoValue, vtkUnstructuredGrid *outputUG)
This function clips a vtkPolyData object based on a specified iso-value (isoValue) using a scalar poi...
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkTableBasedClipDataSet::ClipDataSet
void ClipDataSet(vtkDataSet *pDataSet, vtkDataArray *clipAray, vtkUnstructuredGrid *unstruct)
This function resorts to the sibling class vtkClipDataSet to handle special grids (such as cylinders ...
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkTableBasedClipDataSet::Value
double Value
Definition: vtkTableBasedClipDataSet.h:339
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
vtkTableBasedClipDataSet::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkTableBasedClipDataSet.h:345
vtkTableBasedClipDataSet::InternalProgressObserver
vtkCallbackCommand * InternalProgressObserver
Definition: vtkTableBasedClipDataSet.h:341
vtkTableBasedClipDataSet::~vtkTableBasedClipDataSet
~vtkTableBasedClipDataSet() override
vtkTableBasedClipDataSet::InternalProgressCallback
void InternalProgressCallback(vtkAlgorithm *algorithm)
The actual operation executed by the callback function.
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:80
vtkTableBasedClipDataSet::ClipRectilinearGridData
void ClipRectilinearGridData(vtkDataSet *inputGrd, vtkDataArray *clipAray, double isoValue, vtkUnstructuredGrid *outputUG)
This function clips a vtkRectilinearGrid based on a specified iso-value (isoValue) using a scalar poi...
vtkTableBasedClipDataSet::ClipFunction
vtkImplicitFunction * ClipFunction
Definition: vtkTableBasedClipDataSet.h:342
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkTableBasedClipDataSet::SetClipFunction
virtual void SetClipFunction(vtkImplicitFunction *)
Set/Get the implicit function with which to perform the clipping operation.
vtkTableBasedClipDataSet::ClipStructuredGridData
void ClipStructuredGridData(vtkDataSet *inputGrd, vtkDataArray *clipAray, double isoValue, vtkUnstructuredGrid *outputUG)
This function clips a vtkStructuredGrid based on a specified iso-value (isoValue) using a scalar poin...
vtkTableBasedClipDataSet::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Set/Get a point locator locator for merging duplicate points.
vtkTableBasedClipDataSet::vtkTableBasedClipDataSet
vtkTableBasedClipDataSet(vtkImplicitFunction *cf=nullptr)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkTableBasedClipDataSet::CreateDefaultLocator
void CreateDefaultLocator()
Create a default point locator when none is specified.
vtkTableBasedClipDataSet::GenerateClippedOutput
vtkTypeBool GenerateClippedOutput
Definition: vtkTableBasedClipDataSet.h:337
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkTableBasedClipDataSet::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkTableBasedClipDataSet.h:343
vtkTableBasedClipDataSet::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkTableBasedClipDataSet
Clip any dataset with a user-specified implicit function or an input scalar point data array.
Definition: vtkTableBasedClipDataSet.h:141
vtkTableBasedClipDataSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:154
vtkUnstructuredGridAlgorithm.h
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:41
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkTableBasedClipDataSet::ClipImageData
void ClipImageData(vtkDataSet *inputGrd, vtkDataArray *clipAray, double isoValue, vtkUnstructuredGrid *outputUG)
This function takes a vtkImageData as a vtkRectilinearGrid, which is then clipped by ClipRectilinearG...
vtkTableBasedClipDataSet::UseValueAsOffset
bool UseValueAsOffset
Definition: vtkTableBasedClipDataSet.h:338
vtkTableBasedClipDataSet::ClipUnstructuredGridData
void ClipUnstructuredGridData(vtkDataSet *inputGrd, vtkDataArray *clipAray, double isoValue, vtkUnstructuredGrid *outputUG)
This function clips a vtkUnstructuredGrid based on a specified iso-value (isoValue) using a scalar po...
vtkTableBasedClipDataSet::MergeTolerance
double MergeTolerance
Definition: vtkTableBasedClipDataSet.h:340
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287