|
open_iA 2024.9
|
clip polygonal data with (multiple) user-specified implicit function or input scalar data More...
#include <iAvtkClipPolyData.h>
Public Member Functions | |
| void | AddClipFunction (vtkImplicitFunction *func) |
| Add implicit functions with which to perform the clipping. | |
| void | ClearClipFunctions () |
| Clear all clipping functions. | |
| void | CreateDefaultLocator () |
| Create default locator. | |
| vtkPolyData * | GetClippedOutput () |
| Return the Clipped output. | |
| vtkAlgorithmOutput * | GetClippedOutputPort () |
| Return the output port (a vtkAlgorithmOutput) of the clipped output. | |
| vtkMTimeType | GetMTime () override |
| Return the mtime also considering the locator and clip function. | |
| bool | HasClipFunctions () const |
| Returns whether any implicit functions are currently assigned. | |
| void | PrintSelf (ostream &os, vtkIndent indent) override |
| void | RemoveClipFunction (vtkImplicitFunction *func) |
| Remove an implicit function from clipping. | |
| vtkTypeMacro (iAvtkClipPolyData, vtkPolyDataAlgorithm) | |
| vtkSetMacro (Value, double) | |
| Set the clipping value of the implicit function (if clipping with implicit function) or scalar value (if clipping with scalars). | |
| vtkGetMacro (Value, double) | |
| vtkSetMacro (InsideOut, vtkTypeBool) | |
| Set/Get the InsideOut flag. | |
| vtkGetMacro (InsideOut, vtkTypeBool) | |
| vtkBooleanMacro (InsideOut, vtkTypeBool) | |
| vtkSetMacro (GenerateClipScalars, vtkTypeBool) | |
| If this flag is enabled, then the output scalar values will be interpolated from the implicit function values, and not the input scalar data. | |
| vtkGetMacro (GenerateClipScalars, vtkTypeBool) | |
| vtkBooleanMacro (GenerateClipScalars, vtkTypeBool) | |
| vtkSetMacro (GenerateClippedOutput, vtkTypeBool) | |
| Control whether a second output is generated. | |
| vtkGetMacro (GenerateClippedOutput, vtkTypeBool) | |
| vtkBooleanMacro (GenerateClippedOutput, vtkTypeBool) | |
| void | SetLocator (vtkIncrementalPointLocator *locator) |
| Specify a spatial locator for merging points. | |
| vtkGetObjectMacro (Locator, vtkIncrementalPointLocator) | |
| vtkSetMacro (OutputPointsPrecision, int) | |
| Set/get the desired precision for the output types. | |
| vtkGetMacro (OutputPointsPrecision, int) | |
Static Public Member Functions | |
| static iAvtkClipPolyData * | New () |
| Construct with user-specified implicit function; InsideOut turned off; value set to 0.0; GenerateClipScalars turned off; GenerateClippedOutput turned off. | |
Protected Member Functions | |
| iAvtkClipPolyData (vtkImplicitFunction *cf=nullptr) | |
| ~iAvtkClipPolyData () override | |
| int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override |
Protected Attributes | |
| std::vector< vtkImplicitFunction * > | ClipFunctions |
| vtkTypeBool | GenerateClippedOutput |
| vtkTypeBool | GenerateClipScalars |
| vtkTypeBool | InsideOut |
| vtkIncrementalPointLocator * | Locator |
| int | OutputPointsPrecision |
| double | Value |
clip polygonal data with (multiple) user-specified implicit function or input scalar data
iAvtkClipPolyData is a filter that clips polygonal data using either any subclass of vtkImplicitFunction, or the input scalar data. Clipping means that it actually "cuts" through the cells of the dataset, returning everything inside of the specified implicit function (or greater than the scalar value) including "pieces" of a cell. (Compare this with vtkExtractGeometry, which pulls out entire, uncut cells.) The output of this filter is polygonal data.
To use this filter, you must decide if you will be clipping with an implicit function, or whether you will be using the input scalar data. If you want to clip with an implicit function, you must: 1) define an implicit function 2) set it with the SetClipFunction method 3) apply the GenerateClipScalarsOn method If a ClipFunction is not specified, or GenerateClipScalars is off (the default), then the input's scalar data will be used to clip the polydata.
You can also specify a scalar value, which is used to decide what is inside and outside of the implicit function. You can also reverse the sense of what inside/outside is by setting the InsideOut instance variable. (The cutting algorithm proceeds by computing an implicit function value or using the input scalar data for each point in the dataset. This is compared to the scalar value to determine inside/outside.)
This filter can be configured to compute a second output. The second output is the polygonal data that is clipped away. Set the GenerateClippedData boolean on if you wish to access this output data.
|
protected |
|
overrideprotected |
| void iAvtkClipPolyData::AddClipFunction | ( | vtkImplicitFunction * | func | ) |
Add implicit functions with which to perform the clipping.
If you do not define an implicit function, then the input scalar data will be used for clipping.
| void iAvtkClipPolyData::ClearClipFunctions | ( | ) |
Clear all clipping functions.
| void iAvtkClipPolyData::CreateDefaultLocator | ( | ) |
Create default locator.
Used to create one when none is specified. The locator is used to merge coincident points.
| vtkPolyData * iAvtkClipPolyData::GetClippedOutput | ( | ) |
Return the Clipped output.
|
inline |
Return the output port (a vtkAlgorithmOutput) of the clipped output.
|
override |
Return the mtime also considering the locator and clip function.
| bool iAvtkClipPolyData::HasClipFunctions | ( | ) | const |
Returns whether any implicit functions are currently assigned.
|
static |
Construct with user-specified implicit function; InsideOut turned off; value set to 0.0; GenerateClipScalars turned off; GenerateClippedOutput turned off.
|
override |
| void iAvtkClipPolyData::RemoveClipFunction | ( | vtkImplicitFunction * | func | ) |
Remove an implicit function from clipping.
|
overrideprotected |
| void iAvtkClipPolyData::SetLocator | ( | vtkIncrementalPointLocator * | locator | ) |
Specify a spatial locator for merging points.
By default, an instance of vtkMergePoints is used.
| iAvtkClipPolyData::vtkBooleanMacro | ( | GenerateClippedOutput | , |
| vtkTypeBool | ) |
| iAvtkClipPolyData::vtkBooleanMacro | ( | GenerateClipScalars | , |
| vtkTypeBool | ) |
| iAvtkClipPolyData::vtkBooleanMacro | ( | InsideOut | , |
| vtkTypeBool | ) |
| iAvtkClipPolyData::vtkGetMacro | ( | GenerateClippedOutput | , |
| vtkTypeBool | ) |
| iAvtkClipPolyData::vtkGetMacro | ( | GenerateClipScalars | , |
| vtkTypeBool | ) |
| iAvtkClipPolyData::vtkGetMacro | ( | InsideOut | , |
| vtkTypeBool | ) |
| iAvtkClipPolyData::vtkGetMacro | ( | OutputPointsPrecision | , |
| int | ) |
| iAvtkClipPolyData::vtkGetMacro | ( | Value | , |
| double | ) |
| iAvtkClipPolyData::vtkGetObjectMacro | ( | Locator | , |
| vtkIncrementalPointLocator | ) |
| iAvtkClipPolyData::vtkSetMacro | ( | GenerateClippedOutput | , |
| vtkTypeBool | ) |
Control whether a second output is generated.
The second output contains the polygonal data that's been clipped away. GenerateClippedOutput is off by default.
| iAvtkClipPolyData::vtkSetMacro | ( | GenerateClipScalars | , |
| vtkTypeBool | ) |
If this flag is enabled, then the output scalar values will be interpolated from the implicit function values, and not the input scalar data.
If you enable this flag but do not provide an implicit function an error will be reported. GenerateClipScalars is off by default.
| iAvtkClipPolyData::vtkSetMacro | ( | InsideOut | , |
| vtkTypeBool | ) |
Set/Get the InsideOut flag.
When off, a vertex is considered inside the implicit function if its value is greater than the Value ivar. When InsideOutside is turned on, a vertex is considered inside the implicit function if its implicit function value is less than or equal to the Value ivar. InsideOut is off by default.
| iAvtkClipPolyData::vtkSetMacro | ( | OutputPointsPrecision | , |
| int | ) |
Set/get the desired precision for the output types.
See the documentation for the vtkAlgorithm::DesiredOutputPrecision enum for an explanation of the available precision settings. OutputPointsPrecision is DEFAULT_PRECISION by default.
| iAvtkClipPolyData::vtkSetMacro | ( | Value | , |
| double | ) |
Set the clipping value of the implicit function (if clipping with implicit function) or scalar value (if clipping with scalars).
The default value is 0.0.
| iAvtkClipPolyData::vtkTypeMacro | ( | iAvtkClipPolyData | , |
| vtkPolyDataAlgorithm | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |