VTK-m  2.0
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
vtkm::filter::contour::Contour Class Reference

generate isosurface(s) from a Volume More...

#include <Contour.h>

Inheritance diagram for vtkm::filter::contour::Contour:
vtkm::filter::FilterField vtkm::filter::Filter vtkm::filter::contour::Slice

Public Member Functions

void SetNumberOfIsoValues (vtkm::Id num)
 
vtkm::Id GetNumberOfIsoValues () const
 
void SetIsoValue (vtkm::Float64 v)
 
void SetIsoValue (vtkm::Id index, vtkm::Float64 v)
 
void SetIsoValues (const std::vector< vtkm::Float64 > &values)
 
vtkm::Float64 GetIsoValue (vtkm::Id index) const
 
VTKM_CONT void SetMergeDuplicatePoints (bool on)
 Set/Get whether the points generated should be unique for every triangle or will duplicate points be merged together. More...
 
VTKM_CONT bool GetMergeDuplicatePoints () const
 
VTKM_CONT void SetGenerateNormals (bool on)
 Set/Get whether normals should be generated. More...
 
VTKM_CONT bool GetGenerateNormals () const
 
VTKM_CONT void SetAddInterpolationEdgeIds (bool on)
 Set/Get whether to append the ids of the intersected edges to the vertices of the isosurface triangles. Off by default. More...
 
VTKM_CONT bool GetAddInterpolationEdgeIds () const
 
VTKM_CONT void SetComputeFastNormalsForStructured (bool on)
 Set/Get whether the fast path should be used for normals computation for structured datasets. More...
 
VTKM_CONT bool GetComputeFastNormalsForStructured () const
 
VTKM_CONT void SetComputeFastNormalsForUnstructured (bool on)
 Set/Get whether the fast path should be used for normals computation for unstructured datasets. More...
 
VTKM_CONT bool GetComputeFastNormalsForUnstructured () const
 
VTKM_CONT void SetNormalArrayName (const std::string &name)
 
const VTKM_CONT std::string & GetNormalArrayName () const
 
- Public Member Functions inherited from vtkm::filter::FilterField
 FilterField ()
 
VTKM_CONT void SetOutputFieldName (const std::string &name)
 
const VTKM_CONT std::string & GetOutputFieldName () const
 
VTKM_CONT void SetActiveField (const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
 
void SetActiveField (vtkm::IdComponent index, const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
 
const VTKM_CONT std::string & GetActiveFieldName (vtkm::IdComponent index=0) const
 
VTKM_CONT vtkm::cont::Field::Association GetActiveFieldAssociation (vtkm::IdComponent index=0) const
 
VTKM_CONT void SetActiveCoordinateSystem (vtkm::Id coord_idx)
 
VTKM_CONT void SetActiveCoordinateSystem (vtkm::IdComponent index, vtkm::Id coord_idx)
 
VTKM_CONT vtkm::Id GetActiveCoordinateSystemIndex () const
 
VTKM_CONT vtkm::Id GetActiveCoordinateSystemIndex (vtkm::IdComponent index) const
 
VTKM_CONT void SetUseCoordinateSystemAsField (bool val)
 
VTKM_CONT void SetUseCoordinateSystemAsField (vtkm::IdComponent index, bool val)
 
VTKM_CONT bool GetUseCoordinateSystemAsField (vtkm::IdComponent index=0) const
 
- Public Member Functions inherited from vtkm::filter::Filter
virtual VTKM_CONT ~Filter ()
 
virtual VTKM_CONT bool CanThread () const
 
VTKM_CONT void SetThreadsPerCPU (vtkm::Id numThreads)
 
VTKM_CONT void SetThreadsPerGPU (vtkm::Id numThreads)
 
VTKM_CONT vtkm::Id GetThreadsPerCPU () const
 
VTKM_CONT vtkm::Id GetThreadsPerGPU () const
 
VTKM_CONT bool GetRunMultiThreadedFilter () const
 
VTKM_CONT void SetRunMultiThreadedFilter (bool val)
 
void SetInvoker (vtkm::cont::Invoker inv)
 Specify the vtkm::cont::Invoker to be used to execute worklets by this filter instance. More...
 
VTKM_CONT void SetFieldsToPass (const vtkm::filter::FieldSelection &fieldsToPass)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (vtkm::filter::FieldSelection &&fieldsToPass)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (const vtkm::filter::FieldSelection &fieldsToPass, vtkm::filter::FieldSelection::Mode mode)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (std::initializer_list< std::string > fields, vtkm::filter::FieldSelection::Mode mode=vtkm::filter::FieldSelection::Mode::Select)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (std::initializer_list< std::pair< std::string, vtkm::cont::Field::Association >> fields, vtkm::filter::FieldSelection::Mode mode=vtkm::filter::FieldSelection::Mode::Select)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (const std::string &fieldname, vtkm::cont::Field::Association association, vtkm::filter::FieldSelection::Mode mode=vtkm::filter::FieldSelection::Mode::Select)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (const std::string &fieldname, vtkm::filter::FieldSelection::Mode mode)
 Specify which fields get passed from input to output. More...
 
const VTKM_CONT vtkm::filter::FieldSelectionGetFieldsToPass () const
 Specify which fields get passed from input to output. More...
 
VTKM_CONT vtkm::filter::FieldSelectionGetFieldsToPass ()
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetPassCoordinateSystems (bool flag)
 Specify whether to always pass coordinate systems. More...
 
VTKM_CONT bool GetPassCoordinateSystems () const
 Specify whether to always pass coordinate systems. More...
 
VTKM_CONT vtkm::cont::DataSet Execute (const vtkm::cont::DataSet &input)
 
VTKM_CONT vtkm::cont::PartitionedDataSet Execute (const vtkm::cont::PartitionedDataSet &input)
 

Protected Member Functions

vtkm::cont::DataSet DoExecute (const vtkm::cont::DataSet &result) override
 
- Protected Member Functions inherited from vtkm::filter::FilterField
const VTKM_CONT vtkm::cont::FieldGetFieldFromDataSet (const vtkm::cont::DataSet &input) const
 
const VTKM_CONT vtkm::cont::FieldGetFieldFromDataSet (vtkm::IdComponent index, const vtkm::cont::DataSet &input) const
 
template<typename Functor , typename... Args>
VTKM_CONT void CastAndCallScalarField (const vtkm::cont::UnknownArrayHandle &fieldArray, Functor &&functor, Args &&... args) const
 
template<typename Functor , typename... Args>
VTKM_CONT void CastAndCallScalarField (const vtkm::cont::Field &field, Functor &&functor, Args &&... args) const
 
template<vtkm::IdComponent VecSize, typename Functor , typename... Args>
VTKM_CONT void CastAndCallVecField (const vtkm::cont::UnknownArrayHandle &fieldArray, Functor &&functor, Args &&... args) const
 
template<vtkm::IdComponent VecSize, typename Functor , typename... Args>
VTKM_CONT void CastAndCallVecField (const vtkm::cont::Field &field, Functor &&functor, Args &&... args) const
 
VTKM_CONT vtkm::cont::DataSet CreateResultField (const vtkm::cont::DataSet &inDataSet, const vtkm::cont::Field &resultField) const
 Create the output data set for DoExecute More...
 
VTKM_CONT vtkm::cont::DataSet CreateResultField (const vtkm::cont::DataSet &inDataSet, const std::string &resultFieldName, vtkm::cont::Field::Association resultFieldAssociation, const vtkm::cont::UnknownArrayHandle &resultFieldArray) const
 Create the output data set for DoExecute More...
 
VTKM_CONT vtkm::cont::DataSet CreateResultFieldPoint (const vtkm::cont::DataSet &inDataSet, const std::string &resultFieldName, const vtkm::cont::UnknownArrayHandle &resultFieldArray) const
 Create the output data set for DoExecute More...
 
VTKM_CONT vtkm::cont::DataSet CreateResultFieldCell (const vtkm::cont::DataSet &inDataSet, const std::string &resultFieldName, const vtkm::cont::UnknownArrayHandle &resultFieldArray) const
 Create the output data set for DoExecute More...
 
- Protected Member Functions inherited from vtkm::filter::Filter
VTKM_CONT vtkm::cont::DataSet CreateResult (const vtkm::cont::DataSet &inDataSet) const
 Create the output data set for DoExecute. More...
 
VTKM_CONT vtkm::cont::PartitionedDataSet CreateResult (const vtkm::cont::PartitionedDataSet &input, const vtkm::cont::PartitionedDataSet &resultPartitions) const
 Create the output data set for DoExecute. More...
 
template<typename FieldMapper >
VTKM_CONT vtkm::cont::PartitionedDataSet CreateResult (const vtkm::cont::PartitionedDataSet &input, const vtkm::cont::PartitionedDataSet &resultPartitions, FieldMapper &&fieldMapper) const
 Create the output data set for DoExecute. More...
 
template<typename FieldMapper >
VTKM_CONT vtkm::cont::DataSet CreateResult (const vtkm::cont::DataSet &inDataSet, const vtkm::cont::UnknownCellSet &resultCellSet, FieldMapper &&fieldMapper) const
 Create the output data set for DoExecute. More...
 
virtual VTKM_CONT vtkm::cont::PartitionedDataSet DoExecutePartitions (const vtkm::cont::PartitionedDataSet &inData)
 
template<typename FieldMapper >
VTKM_CONT vtkm::cont::DataSet CreateResultCoordinateSystem (const vtkm::cont::DataSet &inDataSet, const vtkm::cont::UnknownCellSet &resultCellSet, const vtkm::cont::CoordinateSystem &resultCoordSystem, FieldMapper &&fieldMapper) const
 Create the output data set for DoExecute. More...
 
template<typename FieldMapper >
VTKM_CONT vtkm::cont::DataSet CreateResultCoordinateSystem (const vtkm::cont::DataSet &inDataSet, const vtkm::cont::UnknownCellSet &resultCellSet, const std::string &coordsName, const vtkm::cont::UnknownArrayHandle &coordsData, FieldMapper &&fieldMapper) const
 Create the output data set for DoExecute. More...
 

Private Attributes

VTKM_CONT std::vector< vtkm::Float64IsoValues
 
bool GenerateNormals = false
 
bool AddInterpolationEdgeIds = false
 
bool ComputeFastNormalsForStructured = false
 
bool ComputeFastNormalsForUnstructured = true
 
bool MergeDuplicatedPoints = true
 
std::string NormalArrayName = "normals"
 
std::string InterpolationEdgeIdsArrayName = "edgeIds"
 

Additional Inherited Members

- Protected Attributes inherited from vtkm::filter::Filter
vtkm::cont::Invoker Invoke
 

Detailed Description

generate isosurface(s) from a Volume

Takes as input a volume (e.g., 3D structured point set) and generates on output one or more isosurfaces. Multiple contour values must be specified to generate the isosurfaces.

Warning
This filter is currently only supports 3D volumes.

Member Function Documentation

◆ DoExecute()

vtkm::cont::DataSet vtkm::filter::contour::Contour::DoExecute ( const vtkm::cont::DataSet result)
overrideprotectedvirtual

Implements vtkm::filter::Filter.

Reimplemented in vtkm::filter::contour::Slice.

◆ GetAddInterpolationEdgeIds()

VTKM_CONT bool vtkm::filter::contour::Contour::GetAddInterpolationEdgeIds ( ) const
inline

◆ GetComputeFastNormalsForStructured()

VTKM_CONT bool vtkm::filter::contour::Contour::GetComputeFastNormalsForStructured ( ) const
inline

◆ GetComputeFastNormalsForUnstructured()

VTKM_CONT bool vtkm::filter::contour::Contour::GetComputeFastNormalsForUnstructured ( ) const
inline

◆ GetGenerateNormals()

VTKM_CONT bool vtkm::filter::contour::Contour::GetGenerateNormals ( ) const
inline

◆ GetIsoValue()

vtkm::Float64 vtkm::filter::contour::Contour::GetIsoValue ( vtkm::Id  index) const
inline

◆ GetMergeDuplicatePoints()

VTKM_CONT bool vtkm::filter::contour::Contour::GetMergeDuplicatePoints ( ) const

◆ GetNormalArrayName()

const VTKM_CONT std::string& vtkm::filter::contour::Contour::GetNormalArrayName ( ) const
inline

◆ GetNumberOfIsoValues()

vtkm::Id vtkm::filter::contour::Contour::GetNumberOfIsoValues ( ) const
inline

◆ SetAddInterpolationEdgeIds()

VTKM_CONT void vtkm::filter::contour::Contour::SetAddInterpolationEdgeIds ( bool  on)
inline

Set/Get whether to append the ids of the intersected edges to the vertices of the isosurface triangles. Off by default.

◆ SetComputeFastNormalsForStructured()

VTKM_CONT void vtkm::filter::contour::Contour::SetComputeFastNormalsForStructured ( bool  on)
inline

Set/Get whether the fast path should be used for normals computation for structured datasets.

Off by default.

◆ SetComputeFastNormalsForUnstructured()

VTKM_CONT void vtkm::filter::contour::Contour::SetComputeFastNormalsForUnstructured ( bool  on)
inline

Set/Get whether the fast path should be used for normals computation for unstructured datasets.

On by default.

◆ SetGenerateNormals()

VTKM_CONT void vtkm::filter::contour::Contour::SetGenerateNormals ( bool  on)
inline

Set/Get whether normals should be generated.

Off by default. If enabled, the default behaviour is to generate high quality normals for structured datasets, using gradients, and generate fast normals for unstructured datasets based on the result triangle mesh.

◆ SetIsoValue() [1/2]

void vtkm::filter::contour::Contour::SetIsoValue ( vtkm::Float64  v)
inline

◆ SetIsoValue() [2/2]

void vtkm::filter::contour::Contour::SetIsoValue ( vtkm::Id  index,
vtkm::Float64  v 
)
inline

◆ SetIsoValues()

void vtkm::filter::contour::Contour::SetIsoValues ( const std::vector< vtkm::Float64 > &  values)
inline

◆ SetMergeDuplicatePoints()

VTKM_CONT void vtkm::filter::contour::Contour::SetMergeDuplicatePoints ( bool  on)

Set/Get whether the points generated should be unique for every triangle or will duplicate points be merged together.

Duplicate points are identified by the unique edge it was generated from.

◆ SetNormalArrayName()

VTKM_CONT void vtkm::filter::contour::Contour::SetNormalArrayName ( const std::string &  name)
inline

◆ SetNumberOfIsoValues()

void vtkm::filter::contour::Contour::SetNumberOfIsoValues ( vtkm::Id  num)
inline

Member Data Documentation

◆ AddInterpolationEdgeIds

bool vtkm::filter::contour::Contour::AddInterpolationEdgeIds = false
private

◆ ComputeFastNormalsForStructured

bool vtkm::filter::contour::Contour::ComputeFastNormalsForStructured = false
private

◆ ComputeFastNormalsForUnstructured

bool vtkm::filter::contour::Contour::ComputeFastNormalsForUnstructured = true
private

◆ GenerateNormals

bool vtkm::filter::contour::Contour::GenerateNormals = false
private

◆ InterpolationEdgeIdsArrayName

std::string vtkm::filter::contour::Contour::InterpolationEdgeIdsArrayName = "edgeIds"
private

◆ IsoValues

VTKM_CONT std::vector<vtkm::Float64> vtkm::filter::contour::Contour::IsoValues
private

◆ MergeDuplicatedPoints

bool vtkm::filter::contour::Contour::MergeDuplicatedPoints = true
private

◆ NormalArrayName

std::string vtkm::filter::contour::Contour::NormalArrayName = "normals"
private

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