VTK: Filters/Generic/vtkGenericClip.h Source File

| VTK 9.3.1

vtkGenericClip.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
61 #ifndef vtkGenericClip_h
62 #define vtkGenericClip_h
63
64 #include "vtkFiltersGenericModule.h" // For export macro
65 #include "vtkUnstructuredGridAlgorithm.h"
66
67 VTK_ABI_NAMESPACE_BEGIN
68 class vtkImplicitFunction;
69
70 class vtkPointData;
71 class vtkCellData;
72 class vtkIncrementalPointLocator;
73
74 class VTKFILTERSGENERIC_EXPORT vtkGenericClip : public vtkUnstructuredGridAlgorithm
75 {
76 public:
77 vtkTypeMacro(vtkGenericClip, vtkUnstructuredGridAlgorithm);
78 void PrintSelf(ostream& os, vtkIndent indent) override;
79
84 static vtkGenericClip* New();
85
87
92 vtkSetMacro(Value, double);
93 vtkGetMacro(Value, double);
95
97
105 vtkSetMacro(InsideOut, vtkTypeBool);
106 vtkGetMacro(InsideOut, vtkTypeBool);
107 vtkBooleanMacro(InsideOut, vtkTypeBool);
109
111
116 virtual void SetClipFunction(vtkImplicitFunction*);
117 vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
119
121
127 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
128 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
129 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
131
133
137 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
138 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
139 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
141
143
149 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
150 vtkGetMacro(MergeTolerance, double);
152
154
157 vtkUnstructuredGrid* GetClippedOutput();
158 virtual int GetNumberOfOutputs();
160
162
166 void SetLocator(vtkIncrementalPointLocator* locator);
167 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
169
174 void CreateDefaultLocator();
175
179 vtkMTimeType GetMTime() override;
180
182
186 vtkGetStringMacro(InputScalarsSelection);
187 void SelectInputScalars(const char* fieldName) { this->SetInputScalarsSelection(fieldName); }
189
190 protected:
191 vtkGenericClip(vtkImplicitFunction* cf = nullptr);
192 ~vtkGenericClip() override;
193
194 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
195 int FillInputPortInformation(int, vtkInformation*) override;
196
197 vtkImplicitFunction* ClipFunction;
198
199 vtkIncrementalPointLocator* Locator;
200 vtkTypeBool InsideOut;
201 double Value;
202 vtkTypeBool GenerateClipScalars;
203
204 vtkTypeBool GenerateClippedOutput;
205 double MergeTolerance;
206
207 char* InputScalarsSelection;
208 vtkSetStringMacro(InputScalarsSelection);
209
210 // Used internal by vtkGenericAdaptorCell::Clip()
211 vtkPointData* InternalPD;
212 vtkPointData* SecondaryPD;
213 vtkCellData* SecondaryCD;
214
215 private:
216 vtkGenericClip(const vtkGenericClip&) = delete;
217 void operator=(const vtkGenericClip&) = delete;
218 };
219
220 VTK_ABI_NAMESPACE_END
221 #endif
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:40
vtkGenericClip
clip any dataset with an implicit function or scalar data
Definition: vtkGenericClip.h:75
vtkGenericClip::GetMTime
vtkMTimeType GetMTime() override
Return the mtime also considering the locator and clip function.
vtkGenericClip::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkGenericClip.h:199
vtkGenericClip::SecondaryCD
vtkCellData * SecondaryCD
Definition: vtkGenericClip.h:213
vtkGenericClip::InternalPD
vtkPointData * InternalPD
Definition: vtkGenericClip.h:208
vtkGenericClip::~vtkGenericClip
~vtkGenericClip() override
vtkGenericClip::GetClippedOutput
vtkUnstructuredGrid * GetClippedOutput()
Return the Clipped output.
vtkGenericClip::Value
double Value
Definition: vtkGenericClip.h:201
vtkGenericClip::GenerateClipScalars
vtkTypeBool GenerateClipScalars
Definition: vtkGenericClip.h:202
vtkGenericClip::MergeTolerance
double MergeTolerance
Definition: vtkGenericClip.h:205
vtkGenericClip::SecondaryPD
vtkPointData * SecondaryPD
Definition: vtkGenericClip.h:212
vtkGenericClip::InputScalarsSelection
char * InputScalarsSelection
Definition: vtkGenericClip.h:207
vtkGenericClip::GetNumberOfOutputs
virtual int GetNumberOfOutputs()
Return the Clipped output.
vtkGenericClip::InsideOut
vtkTypeBool InsideOut
Definition: vtkGenericClip.h:200
vtkGenericClip::SelectInputScalars
void SelectInputScalars(const char *fieldName)
If you want to clip by an arbitrary array, then set its name here.
Definition: vtkGenericClip.h:187
vtkGenericClip::SetClipFunction
virtual void SetClipFunction(vtkImplicitFunction *)
Specify the implicit function with which to perform the clipping.
vtkGenericClip::vtkGenericClip
vtkGenericClip(vtkImplicitFunction *cf=nullptr)
vtkGenericClip::GenerateClippedOutput
vtkTypeBool GenerateClippedOutput
Definition: vtkGenericClip.h:204
vtkGenericClip::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkGenericClip::New
static vtkGenericClip * New()
Construct with user-specified implicit function; InsideOut turned off; value set to 0....
vtkGenericClip::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkGenericClip::ClipFunction
vtkImplicitFunction * ClipFunction
Definition: vtkGenericClip.h:197
vtkGenericClip::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkGenericClip::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGenericClip::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:59
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:39
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:30
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:99
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
vtkUnstructuredGridAlgorithm.h