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 
66 
67 class vtkCallbackCommand;
70 
72 {
73 public:
75  void PrintSelf(ostream& os, vtkIndent indent);
76 
79  static vtkClipDataSet *New();
80 
82 
86  vtkSetMacro(Value,double);
87  vtkGetMacro(Value,double);
89 
91 
94  vtkSetMacro(UseValueAsOffset, bool);
95  vtkGetMacro(UseValueAsOffset, bool);
96  vtkBooleanMacro(UseValueAsOffset, bool);
98 
100 
105  vtkSetMacro(InsideOut,int);
106  vtkGetMacro(InsideOut,int);
107  vtkBooleanMacro(InsideOut,int);
109 
111 
114  virtual void SetClipFunction(vtkImplicitFunction*);
115  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
117 
119 
123  vtkSetMacro(GenerateClipScalars,int);
124  vtkGetMacro(GenerateClipScalars,int);
125  vtkBooleanMacro(GenerateClipScalars,int);
127 
129 
131  vtkSetMacro(GenerateClippedOutput,int);
132  vtkGetMacro(GenerateClippedOutput,int);
133  vtkBooleanMacro(GenerateClippedOutput,int);
135 
137 
141  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
142  vtkGetMacro(MergeTolerance,double);
144 
146  vtkUnstructuredGrid *GetClippedOutput();
147 
149 
151  void SetLocator(vtkIncrementalPointLocator *locator);
152  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
154 
157  void CreateDefaultLocator();
158 
160  unsigned long GetMTime();
161 
162 protected:
164  ~vtkClipDataSet();
165 
167 
168  virtual int ProcessRequest(vtkInformation*,
172 
176 
179  double Value;
181 
184 
185  // Callback registered with the InternalProgressObserver.
186  static void InternalProgressCallbackFunction(vtkObject*, unsigned long,
187  void* clientdata, void*);
188  void InternalProgressCallback(vtkAlgorithm *algorithm);
189  // The observer to report progress from the internal readers.
191 
192  //helper functions
193  void ClipVolume(vtkDataSet *input, vtkUnstructuredGrid *output);
194 
195  int ClipPoints(vtkDataSet* input, vtkUnstructuredGrid* output,
196  vtkInformationVector** inputVector);
197 
199 
200 private:
201  vtkClipDataSet(const vtkClipDataSet&); // Not implemented.
202  void operator=(const vtkClipDataSet&); // Not implemented.
203 };
204 
205 #endif
abstract interface for implicit functions
vtkIncrementalPointLocator * Locator
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_GRAPHICS_EXPORT
abstract base class for most VTK objects
Definition: vtkObject.h:60
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:58
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:59
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
dataset represents arbitrary combinations of all possible cell types
vtkImplicitFunction * ClipFunction
void PrintSelf(ostream &os, vtkIndent indent)
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.
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)