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 =========================================================================*/
60 #ifndef vtkClipDataSet_h
61 #define vtkClipDataSet_h
62 
63 #include "vtkFiltersGeneralModule.h" // For export macro
65 
66 class vtkCallbackCommand;
69 
70 class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
71 {
72 public:
74  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
75 
80  static vtkClipDataSet *New();
81 
83 
89  vtkSetMacro(Value,double);
90  vtkGetMacro(Value,double);
92 
94 
99  vtkSetMacro(UseValueAsOffset, bool);
100  vtkGetMacro(UseValueAsOffset, bool);
101  vtkBooleanMacro(UseValueAsOffset, bool);
103 
105 
113  vtkSetMacro(InsideOut,int);
114  vtkGetMacro(InsideOut,int);
115  vtkBooleanMacro(InsideOut,int);
117 
119 
124  virtual void SetClipFunction(vtkImplicitFunction*);
125  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
127 
129 
135  vtkSetMacro(GenerateClipScalars,int);
136  vtkGetMacro(GenerateClipScalars,int);
137  vtkBooleanMacro(GenerateClipScalars,int);
139 
141 
145  vtkSetMacro(GenerateClippedOutput,int);
146  vtkGetMacro(GenerateClippedOutput,int);
147  vtkBooleanMacro(GenerateClippedOutput,int);
149 
151 
157  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
158  vtkGetMacro(MergeTolerance,double);
160 
164  vtkUnstructuredGrid *GetClippedOutput();
165 
167 
171  void SetLocator(vtkIncrementalPointLocator *locator);
172  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
174 
179  void CreateDefaultLocator();
180 
184  vtkMTimeType GetMTime() VTK_OVERRIDE;
185 
187 
192  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
193  vtkGetMacro(OutputPointsPrecision, int);
195 
196 protected:
198  ~vtkClipDataSet() VTK_OVERRIDE;
199 
200  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
201  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
202  vtkImplicitFunction *ClipFunction;
203 
205  int InsideOut;
206  double Value;
207  int GenerateClipScalars;
208 
209  int GenerateClippedOutput;
210  double MergeTolerance;
211 
212  // Callback registered with the InternalProgressObserver.
213  static void InternalProgressCallbackFunction(vtkObject*, unsigned long,
214  void* clientdata, void*);
215  void InternalProgressCallback(vtkAlgorithm *algorithm);
216  // The observer to report progress from the internal readers.
217  vtkCallbackCommand* InternalProgressObserver;
218 
219  //helper functions
220  void ClipVolume(vtkDataSet *input, vtkUnstructuredGrid *output);
221 
222  int ClipPoints(vtkDataSet* input, vtkUnstructuredGrid* output,
223  vtkInformationVector** inputVector);
224 
225  bool UseValueAsOffset;
226  int OutputPointsPrecision;
227 
228 private:
229  vtkClipDataSet(const vtkClipDataSet&) VTK_DELETE_FUNCTION;
230  void operator=(const vtkClipDataSet&) VTK_DELETE_FUNCTION;
231 };
232 
233 #endif
abstract interface for implicit functions
abstract base class for most VTK objects
Definition: vtkObject.h:53
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
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
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.