VTK
vtkGenericClip.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericClip.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 =========================================================================*/
61 #ifndef vtkGenericClip_h
62 #define vtkGenericClip_h
63 
64 #include "vtkFiltersGenericModule.h" // For export macro
66 
68 
69 class vtkPointData;
70 class vtkCellData;
72 
73 class VTKFILTERSGENERIC_EXPORT vtkGenericClip : public vtkUnstructuredGridAlgorithm
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
83  static vtkGenericClip *New();
84 
86 
91  vtkSetMacro(Value,double);
92  vtkGetMacro(Value,double);
94 
96 
104  vtkSetMacro(InsideOut,vtkTypeBool);
105  vtkGetMacro(InsideOut,vtkTypeBool);
106  vtkBooleanMacro(InsideOut,vtkTypeBool);
108 
110 
115  virtual void SetClipFunction(vtkImplicitFunction*);
116  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
118 
120 
126  vtkSetMacro(GenerateClipScalars,vtkTypeBool);
127  vtkGetMacro(GenerateClipScalars,vtkTypeBool);
128  vtkBooleanMacro(GenerateClipScalars,vtkTypeBool);
130 
132 
136  vtkSetMacro(GenerateClippedOutput,vtkTypeBool);
137  vtkGetMacro(GenerateClippedOutput,vtkTypeBool);
138  vtkBooleanMacro(GenerateClippedOutput,vtkTypeBool);
140 
142 
148  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
149  vtkGetMacro(MergeTolerance,double);
151 
153 
156  vtkUnstructuredGrid *GetClippedOutput();
157  virtual int GetNumberOfOutputs();
159 
161 
165  void SetLocator(vtkIncrementalPointLocator *locator);
166  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
168 
173  void CreateDefaultLocator();
174 
178  vtkMTimeType GetMTime() override;
179 
181 
185  vtkGetStringMacro(InputScalarsSelection);
186  void SelectInputScalars(const char *fieldName)
187  {this->SetInputScalarsSelection(fieldName);}
189 
190 protected:
191  vtkGenericClip(vtkImplicitFunction *cf=nullptr);
192  ~vtkGenericClip() override;
193 
195  int FillInputPortInformation(int, vtkInformation*) override;
196 
198 
201  double Value;
203 
206 
208  vtkSetStringMacro(InputScalarsSelection);
209 
210  // Used internal by vtkGenericAdaptorCell::Clip()
214 
215 private:
216  vtkGenericClip(const vtkGenericClip&) = delete;
217  void operator=(const vtkGenericClip&) = delete;
218 };
219 
220 #endif
vtkGenericClip::MergeTolerance
double MergeTolerance
Definition: vtkGenericClip.h:205
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:31
vtkGenericClip::GenerateClipScalars
vtkTypeBool GenerateClipScalars
Definition: vtkGenericClip.h:202
vtkGenericClip::InsideOut
vtkTypeBool InsideOut
Definition: vtkGenericClip.h:200
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkGenericClip::InputScalarsSelection
char * InputScalarsSelection
Definition: vtkGenericClip.h:207
vtkGenericClip::SecondaryPD
vtkPointData * SecondaryPD
Definition: vtkGenericClip.h:212
vtkGenericClip::InternalPD
vtkPointData * InternalPD
Definition: vtkGenericClip.h:208
vtkGenericClip::SelectInputScalars
void SelectInputScalars(const char *fieldName)
Definition: vtkGenericClip.h:186
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:60
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkGenericClip::SecondaryCD
vtkCellData * SecondaryCD
Definition: vtkGenericClip.h:213
vtkUnstructuredGridAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:32
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkUnstructuredGridAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkGenericClip
clip any dataset with an implicit function or scalar data
Definition: vtkGenericClip.h:73
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkUnstructuredGridAlgorithm::New
static vtkUnstructuredGridAlgorithm * New()
vtkGenericClip::Value
double Value
Definition: vtkGenericClip.h:201
vtkUnstructuredGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridAlgorithm.h
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:40
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:81
vtkGenericClip::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkGenericClip.h:199
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkGenericClip::ClipFunction
vtkImplicitFunction * ClipFunction
Definition: vtkGenericClip.h:197
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkGenericClip::GenerateClippedOutput
vtkTypeBool GenerateClippedOutput
Definition: vtkGenericClip.h:204