open_iA 2024.9
Loading...
Searching...
No Matches
iAvtkClipPolyData Class Reference

clip polygonal data with (multiple) user-specified implicit function or input scalar data More...

#include <iAvtkClipPolyData.h>

Inheritance diagram for iAvtkClipPolyData:
[legend]
Collaboration diagram for iAvtkClipPolyData:
[legend]

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 iAvtkClipPolyDataNew ()
 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
 

Detailed Description

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.

Warning
In order to cut all types of cells in polygonal data, iAvtkClipPolyData triangulates some cells, and then cuts the resulting simplices (i.e., points, lines, and triangles). This means that the resulting output may consist of different cell types than the input data.
See also
vtkImplicitFunction vtkCutter vtkClipVolume vtkExtractGeometry

Constructor & Destructor Documentation

◆ iAvtkClipPolyData()

iAvtkClipPolyData::iAvtkClipPolyData ( vtkImplicitFunction * cf = nullptr)
protected

◆ ~iAvtkClipPolyData()

iAvtkClipPolyData::~iAvtkClipPolyData ( )
overrideprotected

Member Function Documentation

◆ AddClipFunction()

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.

◆ ClearClipFunctions()

void iAvtkClipPolyData::ClearClipFunctions ( )

Clear all clipping functions.

◆ CreateDefaultLocator()

void iAvtkClipPolyData::CreateDefaultLocator ( )

Create default locator.

Used to create one when none is specified. The locator is used to merge coincident points.

◆ GetClippedOutput()

vtkPolyData * iAvtkClipPolyData::GetClippedOutput ( )

Return the Clipped output.

◆ GetClippedOutputPort()

vtkAlgorithmOutput * iAvtkClipPolyData::GetClippedOutputPort ( )
inline

Return the output port (a vtkAlgorithmOutput) of the clipped output.

◆ GetMTime()

vtkMTimeType iAvtkClipPolyData::GetMTime ( )
override

Return the mtime also considering the locator and clip function.

◆ HasClipFunctions()

bool iAvtkClipPolyData::HasClipFunctions ( ) const

Returns whether any implicit functions are currently assigned.

◆ New()

static iAvtkClipPolyData * iAvtkClipPolyData::New ( )
static

Construct with user-specified implicit function; InsideOut turned off; value set to 0.0; GenerateClipScalars turned off; GenerateClippedOutput turned off.

◆ PrintSelf()

void iAvtkClipPolyData::PrintSelf ( ostream & os,
vtkIndent indent )
override

◆ RemoveClipFunction()

void iAvtkClipPolyData::RemoveClipFunction ( vtkImplicitFunction * func)

Remove an implicit function from clipping.

◆ RequestData()

int iAvtkClipPolyData::RequestData ( vtkInformation * ,
vtkInformationVector ** ,
vtkInformationVector *  )
overrideprotected

◆ SetLocator()

void iAvtkClipPolyData::SetLocator ( vtkIncrementalPointLocator * locator)

Specify a spatial locator for merging points.

By default, an instance of vtkMergePoints is used.

◆ vtkBooleanMacro() [1/3]

iAvtkClipPolyData::vtkBooleanMacro ( GenerateClippedOutput ,
vtkTypeBool  )

◆ vtkBooleanMacro() [2/3]

iAvtkClipPolyData::vtkBooleanMacro ( GenerateClipScalars ,
vtkTypeBool  )

◆ vtkBooleanMacro() [3/3]

iAvtkClipPolyData::vtkBooleanMacro ( InsideOut ,
vtkTypeBool  )

◆ vtkGetMacro() [1/5]

iAvtkClipPolyData::vtkGetMacro ( GenerateClippedOutput ,
vtkTypeBool  )

◆ vtkGetMacro() [2/5]

iAvtkClipPolyData::vtkGetMacro ( GenerateClipScalars ,
vtkTypeBool  )

◆ vtkGetMacro() [3/5]

iAvtkClipPolyData::vtkGetMacro ( InsideOut ,
vtkTypeBool  )

◆ vtkGetMacro() [4/5]

iAvtkClipPolyData::vtkGetMacro ( OutputPointsPrecision ,
int  )

◆ vtkGetMacro() [5/5]

iAvtkClipPolyData::vtkGetMacro ( Value ,
double  )

◆ vtkGetObjectMacro()

iAvtkClipPolyData::vtkGetObjectMacro ( Locator ,
vtkIncrementalPointLocator  )

◆ vtkSetMacro() [1/5]

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.

◆ vtkSetMacro() [2/5]

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.

◆ vtkSetMacro() [3/5]

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.

◆ vtkSetMacro() [4/5]

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.

◆ vtkSetMacro() [5/5]

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.

◆ vtkTypeMacro()

iAvtkClipPolyData::vtkTypeMacro ( iAvtkClipPolyData ,
vtkPolyDataAlgorithm  )

Member Data Documentation

◆ ClipFunctions

std::vector<vtkImplicitFunction *> iAvtkClipPolyData::ClipFunctions
protected

◆ GenerateClippedOutput

vtkTypeBool iAvtkClipPolyData::GenerateClippedOutput
protected

◆ GenerateClipScalars

vtkTypeBool iAvtkClipPolyData::GenerateClipScalars
protected

◆ InsideOut

vtkTypeBool iAvtkClipPolyData::InsideOut
protected

◆ Locator

vtkIncrementalPointLocator* iAvtkClipPolyData::Locator
protected

◆ OutputPointsPrecision

int iAvtkClipPolyData::OutputPointsPrecision
protected

◆ Value

double iAvtkClipPolyData::Value
protected

The documentation for this class was generated from the following files: