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 =========================================================================*/
62 #ifndef vtkClipDataSet_h
63 #define vtkClipDataSet_h
64 
65 #include "vtkFiltersGeneralModule.h" // For export macro
67 
68 class vtkCallbackCommand;
71 
73 {
74 public:
76  void PrintSelf(ostream& os, vtkIndent indent);
77 
80  static vtkClipDataSet *New();
81 
83 
87  vtkSetMacro(Value,double);
88  vtkGetMacro(Value,double);
90 
92 
95  vtkSetMacro(UseValueAsOffset, bool);
96  vtkGetMacro(UseValueAsOffset, bool);
97  vtkBooleanMacro(UseValueAsOffset, bool);
99 
101 
106  vtkSetMacro(InsideOut,int);
107  vtkGetMacro(InsideOut,int);
108  vtkBooleanMacro(InsideOut,int);
110 
112 
115  virtual void SetClipFunction(vtkImplicitFunction*);
116  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
118 
120 
124  vtkSetMacro(GenerateClipScalars,int);
125  vtkGetMacro(GenerateClipScalars,int);
126  vtkBooleanMacro(GenerateClipScalars,int);
128 
130 
132  vtkSetMacro(GenerateClippedOutput,int);
133  vtkGetMacro(GenerateClippedOutput,int);
134  vtkBooleanMacro(GenerateClippedOutput,int);
136 
138 
142  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
143  vtkGetMacro(MergeTolerance,double);
145 
147  vtkUnstructuredGrid *GetClippedOutput();
148 
150 
152  void SetLocator(vtkIncrementalPointLocator *locator);
153  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
155 
158  void CreateDefaultLocator();
159 
161  unsigned long GetMTime();
162 
164 
167  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
168  vtkGetMacro(OutputPointsPrecision, int);
170 
171 protected:
173  ~vtkClipDataSet();
174 
178 
181  double Value;
183 
186 
187  // Callback registered with the InternalProgressObserver.
188  static void InternalProgressCallbackFunction(vtkObject*, unsigned long,
189  void* clientdata, void*);
190  void InternalProgressCallback(vtkAlgorithm *algorithm);
191  // The observer to report progress from the internal readers.
193 
194  //helper functions
195  void ClipVolume(vtkDataSet *input, vtkUnstructuredGrid *output);
196 
197  int ClipPoints(vtkDataSet* input, vtkUnstructuredGrid* output,
198  vtkInformationVector** inputVector);
199 
202 
203 private:
204  vtkClipDataSet(const vtkClipDataSet&); // Not implemented.
205  void operator=(const vtkClipDataSet&); // Not implemented.
206 };
207 
208 #endif
abstract interface for implicit functions
vtkIncrementalPointLocator * Locator
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
abstract base class for most VTK objects
Definition: vtkObject.h:61
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
virtual int FillInputPortInformation(int port, vtkInformation *info)
supports function callbacks
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
dataset represents arbitrary combinations of all possible cell types
vtkImplicitFunction * ClipFunction
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKFILTERSGENERAL_EXPORT
Superclass for algorithms that produce only unstructured grid as output.
vtkCallbackCommand * InternalProgressObserver
clip any dataset with user-specified implicit function or input scalar data
Store zero or more vtkInformation instances.