VTK
vtkClipDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkClipDataSet.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 =========================================================================*/
63 #ifndef vtkClipDataSet_h
64 #define vtkClipDataSet_h
65 
66 #include "vtkFiltersGeneralModule.h" // For export macro
68 
69 class vtkCallbackCommand;
72 
73 class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
78 
83  static vtkClipDataSet *New();
84 
86 
92  vtkSetMacro(Value,double);
93  vtkGetMacro(Value,double);
95 
97 
102  vtkSetMacro(UseValueAsOffset, bool);
103  vtkGetMacro(UseValueAsOffset, bool);
104  vtkBooleanMacro(UseValueAsOffset, bool);
106 
108 
116  vtkSetMacro(InsideOut,int);
117  vtkGetMacro(InsideOut,int);
118  vtkBooleanMacro(InsideOut,int);
120 
122 
127  virtual void SetClipFunction(vtkImplicitFunction*);
128  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
130 
132 
138  vtkSetMacro(GenerateClipScalars,int);
139  vtkGetMacro(GenerateClipScalars,int);
140  vtkBooleanMacro(GenerateClipScalars,int);
142 
144 
148  vtkSetMacro(GenerateClippedOutput,int);
149  vtkGetMacro(GenerateClippedOutput,int);
150  vtkBooleanMacro(GenerateClippedOutput,int);
152 
154 
160  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
161  vtkGetMacro(MergeTolerance,double);
163 
167  vtkUnstructuredGrid *GetClippedOutput();
168 
170 
174  void SetLocator(vtkIncrementalPointLocator *locator);
175  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
177 
182  void CreateDefaultLocator();
183 
187  vtkMTimeType GetMTime() VTK_OVERRIDE;
188 
190 
195  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
196  vtkGetMacro(OutputPointsPrecision, int);
198 
199 protected:
201  ~vtkClipDataSet() VTK_OVERRIDE;
202 
203  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
204  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
205  vtkImplicitFunction *ClipFunction;
206 
208  int InsideOut;
209  double Value;
210  int GenerateClipScalars;
211 
212  int GenerateClippedOutput;
213  double MergeTolerance;
214 
215  // Callback registered with the InternalProgressObserver.
216  static void InternalProgressCallbackFunction(vtkObject*, unsigned long,
217  void* clientdata, void*);
218  void InternalProgressCallback(vtkAlgorithm *algorithm);
219  // The observer to report progress from the internal readers.
220  vtkCallbackCommand* InternalProgressObserver;
221 
222  //helper functions
223  void ClipVolume(vtkDataSet *input, vtkUnstructuredGrid *output);
224 
225  int ClipPoints(vtkDataSet* input, vtkUnstructuredGrid* output,
226  vtkInformationVector** inputVector);
227 
228  bool UseValueAsOffset;
229  int OutputPointsPrecision;
230 
231 private:
232  vtkClipDataSet(const vtkClipDataSet&) VTK_DELETE_FUNCTION;
233  void operator=(const vtkClipDataSet&) VTK_DELETE_FUNCTION;
234 };
235 
236 #endif
abstract interface for implicit functions
abstract base class for most VTK objects
Definition: vtkObject.h:59
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
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
virtual vtkMTimeType GetMTime()
Return this object's modified time.
Superclass for algorithms that produce only unstructured grid as output.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
clip any dataset with user-specified implicit function or input scalar data
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.