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

#include <FilterField.h>

Inheritance diagram for vtkm::filter::FilterField:
vtkm::filter::Filter vtkm::filter::clean_grid::CleanGrid vtkm::filter::connected_components::CellSetConnectivity vtkm::filter::connected_components::ImageConnectivity vtkm::filter::contour::ClipWithField vtkm::filter::contour::ClipWithImplicitFunction vtkm::filter::contour::Contour vtkm::filter::contour::MIRFilter vtkm::filter::density_estimate::Entropy vtkm::filter::density_estimate::Histogram vtkm::filter::density_estimate::NDEntropy vtkm::filter::density_estimate::NDHistogram vtkm::filter::density_estimate::ParticleDensityBase vtkm::filter::entity_extraction::ExternalFaces vtkm::filter::entity_extraction::ExtractGeometry vtkm::filter::entity_extraction::ExtractPoints vtkm::filter::entity_extraction::ExtractStructured vtkm::filter::entity_extraction::GhostCellRemove vtkm::filter::entity_extraction::Mask vtkm::filter::entity_extraction::MaskPoints vtkm::filter::entity_extraction::Threshold vtkm::filter::entity_extraction::ThresholdPoints vtkm::filter::field_conversion::CellAverage vtkm::filter::field_conversion::PointAverage vtkm::filter::field_transform::CylindricalCoordinateTransform vtkm::filter::field_transform::FieldToColors vtkm::filter::field_transform::LogValues vtkm::filter::field_transform::PointElevation vtkm::filter::field_transform::PointTransform vtkm::filter::field_transform::SphericalCoordinateTransform vtkm::filter::field_transform::WarpScalar vtkm::filter::field_transform::WarpVector vtkm::filter::flow::FilterParticleAdvection vtkm::filter::flow::Lagrangian vtkm::filter::flow::LagrangianStructures vtkm::filter::flow::StreamSurface vtkm::filter::geometry_refinement::SplitSharpEdges vtkm::filter::geometry_refinement::Tube vtkm::filter::image_processing::ComputeMoments vtkm::filter::image_processing::ImageDifference vtkm::filter::image_processing::ImageMedian vtkm::filter::mesh_info::CellMeasures vtkm::filter::mesh_info::MeshQuality vtkm::filter::mesh_info::MeshQualityArea vtkm::filter::mesh_info::MeshQualityAspectGamma vtkm::filter::mesh_info::MeshQualityAspectRatio vtkm::filter::mesh_info::MeshQualityCondition vtkm::filter::mesh_info::MeshQualityDiagonalRatio vtkm::filter::mesh_info::MeshQualityDimension vtkm::filter::mesh_info::MeshQualityJacobian vtkm::filter::mesh_info::MeshQualityMaxAngle vtkm::filter::mesh_info::MeshQualityMaxDiagonal vtkm::filter::mesh_info::MeshQualityMinAngle vtkm::filter::mesh_info::MeshQualityMinDiagonal vtkm::filter::mesh_info::MeshQualityOddy vtkm::filter::mesh_info::MeshQualityRelativeSizeSquared vtkm::filter::mesh_info::MeshQualityScaledJacobian vtkm::filter::mesh_info::MeshQualityShape vtkm::filter::mesh_info::MeshQualityShapeAndSize vtkm::filter::mesh_info::MeshQualityShear vtkm::filter::mesh_info::MeshQualitySkew vtkm::filter::mesh_info::MeshQualityStretch vtkm::filter::mesh_info::MeshQualityTaper vtkm::filter::mesh_info::MeshQualityVolume vtkm::filter::mesh_info::MeshQualityWarpage vtkm::filter::resampling::Probe vtkm::filter::scalar_topology::ContourTreeAugmented vtkm::filter::scalar_topology::ContourTreeMesh2D vtkm::filter::scalar_topology::ContourTreeMesh3D vtkm::filter::scalar_topology::ContourTreeUniformDistributed vtkm::filter::vector_analysis::CrossProduct vtkm::filter::vector_analysis::DotProduct vtkm::filter::vector_analysis::Gradient vtkm::filter::vector_analysis::SurfaceNormals vtkm::filter::vector_analysis::VectorMagnitude vtkm::filter::zfp::ZFPCompressor1D vtkm::filter::zfp::ZFPCompressor2D vtkm::filter::zfp::ZFPCompressor3D vtkm::filter::zfp::ZFPDecompressor1D vtkm::filter::zfp::ZFPDecompressor2D vtkm::filter::zfp::ZFPDecompressor3D

Classes

struct  ScalarToVec
 

Public Member Functions

 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

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::DataSet DoExecute (const vtkm::cont::DataSet &inData)=0
 
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 Member Functions

void ResizeIfNeeded (size_t index_st)
 

Private Attributes

std::string OutputFieldName
 
std::vector< std::string > ActiveFieldNames
 
std::vector< vtkm::cont::Field::AssociationActiveFieldAssociation
 
std::vector< bool > UseCoordinateSystemAsField
 
std::vector< vtkm::IdActiveCoordinateSystemIndices
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ FilterField()

vtkm::filter::FilterField::FilterField ( )
inline

Member Function Documentation

◆ CastAndCallScalarField() [1/2]

template<typename Functor , typename... Args>
VTKM_CONT void vtkm::filter::FilterField::CastAndCallScalarField ( const vtkm::cont::Field field,
Functor &&  functor,
Args &&...  args 
) const
inlineprotected

◆ CastAndCallScalarField() [2/2]

template<typename Functor , typename... Args>
VTKM_CONT void vtkm::filter::FilterField::CastAndCallScalarField ( const vtkm::cont::UnknownArrayHandle fieldArray,
Functor &&  functor,
Args &&...  args 
) const
inlineprotected

◆ CastAndCallVecField() [1/2]

template<vtkm::IdComponent VecSize, typename Functor , typename... Args>
VTKM_CONT void vtkm::filter::FilterField::CastAndCallVecField ( const vtkm::cont::Field field,
Functor &&  functor,
Args &&...  args 
) const
inlineprotected

◆ CastAndCallVecField() [2/2]

template<vtkm::IdComponent VecSize, typename Functor , typename... Args>
VTKM_CONT void vtkm::filter::FilterField::CastAndCallVecField ( const vtkm::cont::UnknownArrayHandle fieldArray,
Functor &&  functor,
Args &&...  args 
) const
inlineprotected

◆ CreateResultField() [1/2]

VTKM_CONT vtkm::cont::DataSet vtkm::filter::FilterField::CreateResultField ( const vtkm::cont::DataSet inDataSet,
const std::string &  resultFieldName,
vtkm::cont::Field::Association  resultFieldAssociation,
const vtkm::cont::UnknownArrayHandle resultFieldArray 
) const
inlineprotected

Create the output data set for DoExecute

This form of CreateResult will create an output data set with the same cell structure and coordinate system as the input and pass all fields (as requested by the Filter state). Additionally, it will add a field matching the provided specifications to the result.

Parameters
[in]inDataSetThe input data set being modified (usually the one passed into DoExecute). The returned DataSet is filled with fields of inDataSet (as selected by the FieldsToPass state of the filter).
[in]resultFieldNameThe name of the field added to the returned DataSet.
[in]resultFieldAssociationThe association of the field (e.g. point or cell) added to the returned DataSet.
[in]resultFieldArrayAn array containing the data for the field added to the returned DataSet.

◆ CreateResultField() [2/2]

VTKM_CONT vtkm::cont::DataSet vtkm::filter::FilterField::CreateResultField ( const vtkm::cont::DataSet inDataSet,
const vtkm::cont::Field resultField 
) const
protected

Create the output data set for DoExecute

This form of CreateResult will create an output data set with the same cell structure and coordinate system as the input and pass all fields (as requested by the Filter state). Additionally, it will add the provided field to the result.

Parameters
[in]inDataSetThe input data set being modified (usually the one passed into DoExecute). The returned DataSet is filled with fields of inDataSet (as selected by the FieldsToPass state of the filter).
[in]resultFieldA Field that is added to the returned DataSet.

◆ CreateResultFieldCell()

VTKM_CONT vtkm::cont::DataSet vtkm::filter::FilterField::CreateResultFieldCell ( const vtkm::cont::DataSet inDataSet,
const std::string &  resultFieldName,
const vtkm::cont::UnknownArrayHandle resultFieldArray 
) const
inlineprotected

Create the output data set for DoExecute

This form of CreateResult will create an output data set with the same cell structure and coordinate system as the input and pass all fields (as requested by the Filter state). Additionally, it will add a cell field matching the provided specifications to the result.

Parameters
[in]inDataSetThe input data set being modified (usually the one passed into DoExecute). The returned DataSet is filled with fields of inDataSet (as selected by the FieldsToPass state of the filter).
[in]resultFieldNameThe name of the field added to the returned DataSet.
[in]resultFieldArrayAn array containing the data for the field added to the returned DataSet.

◆ CreateResultFieldPoint()

VTKM_CONT vtkm::cont::DataSet vtkm::filter::FilterField::CreateResultFieldPoint ( const vtkm::cont::DataSet inDataSet,
const std::string &  resultFieldName,
const vtkm::cont::UnknownArrayHandle resultFieldArray 
) const
inlineprotected

Create the output data set for DoExecute

This form of CreateResult will create an output data set with the same cell structure and coordinate system as the input and pass all fields (as requested by the Filter state). Additionally, it will add a point field matching the provided specifications to the result.

Parameters
[in]inDataSetThe input data set being modified (usually the one passed into DoExecute). The returned DataSet is filled with fields of inDataSet (as selected by the FieldsToPass state of the filter).
[in]resultFieldNameThe name of the field added to the returned DataSet.
[in]resultFieldArrayAn array containing the data for the field added to the returned DataSet.

◆ GetActiveCoordinateSystemIndex() [1/2]

VTKM_CONT vtkm::Id vtkm::filter::FilterField::GetActiveCoordinateSystemIndex ( ) const
inline

Select the coordinate system coord_idx to make active to use when processing the input DataSet. This is used primarily by the Filter to select the coordinate system to use as a field when UseCoordinateSystemAsField is true.

◆ GetActiveCoordinateSystemIndex() [2/2]

VTKM_CONT vtkm::Id vtkm::filter::FilterField::GetActiveCoordinateSystemIndex ( vtkm::IdComponent  index) const
inline

Select the coordinate system coord_idx to make active to use when processing the input DataSet. This is used primarily by the Filter to select the coordinate system to use as a field when UseCoordinateSystemAsField is true.

◆ GetActiveFieldAssociation()

VTKM_CONT vtkm::cont::Field::Association vtkm::filter::FilterField::GetActiveFieldAssociation ( vtkm::IdComponent  index = 0) const
inline

Choose the field to operate on. Note, if this->UseCoordinateSystemAsField is true, then the active field is not used.

◆ GetActiveFieldName()

const VTKM_CONT std::string& vtkm::filter::FilterField::GetActiveFieldName ( vtkm::IdComponent  index = 0) const
inline

Choose the field to operate on. Note, if this->UseCoordinateSystemAsField is true, then the active field is not used.

◆ GetFieldFromDataSet() [1/2]

const VTKM_CONT vtkm::cont::Field& vtkm::filter::FilterField::GetFieldFromDataSet ( const vtkm::cont::DataSet input) const
inlineprotected

◆ GetFieldFromDataSet() [2/2]

const VTKM_CONT vtkm::cont::Field& vtkm::filter::FilterField::GetFieldFromDataSet ( vtkm::IdComponent  index,
const vtkm::cont::DataSet input 
) const
inlineprotected

◆ GetOutputFieldName()

const VTKM_CONT std::string& vtkm::filter::FilterField::GetOutputFieldName ( ) const
inline

◆ GetUseCoordinateSystemAsField()

VTKM_CONT bool vtkm::filter::FilterField::GetUseCoordinateSystemAsField ( vtkm::IdComponent  index = 0) const
inline

To simply use the active coordinate system as the field to operate on, set UseCoordinateSystemAsField to true.

◆ ResizeIfNeeded()

void vtkm::filter::FilterField::ResizeIfNeeded ( size_t  index_st)
private

◆ SetActiveCoordinateSystem() [1/2]

VTKM_CONT void vtkm::filter::FilterField::SetActiveCoordinateSystem ( vtkm::Id  coord_idx)
inline

Select the coordinate system coord_idx to make active to use when processing the input DataSet. This is used primarily by the Filter to select the coordinate system to use as a field when UseCoordinateSystemAsField is true.

◆ SetActiveCoordinateSystem() [2/2]

VTKM_CONT void vtkm::filter::FilterField::SetActiveCoordinateSystem ( vtkm::IdComponent  index,
vtkm::Id  coord_idx 
)
inline

Select the coordinate system coord_idx to make active to use when processing the input DataSet. This is used primarily by the Filter to select the coordinate system to use as a field when UseCoordinateSystemAsField is true.

◆ SetActiveField() [1/2]

VTKM_CONT void vtkm::filter::FilterField::SetActiveField ( const std::string &  name,
vtkm::cont::Field::Association  association = vtkm::cont::Field::Association::Any 
)
inline

Choose the field to operate on. Note, if this->UseCoordinateSystemAsField is true, then the active field is not used.

◆ SetActiveField() [2/2]

void vtkm::filter::FilterField::SetActiveField ( vtkm::IdComponent  index,
const std::string &  name,
vtkm::cont::Field::Association  association = vtkm::cont::Field::Association::Any 
)
inline

Choose the field to operate on. Note, if this->UseCoordinateSystemAsField is true, then the active field is not used.

◆ SetOutputFieldName()

VTKM_CONT void vtkm::filter::FilterField::SetOutputFieldName ( const std::string &  name)
inline

◆ SetUseCoordinateSystemAsField() [1/2]

VTKM_CONT void vtkm::filter::FilterField::SetUseCoordinateSystemAsField ( bool  val)
inline

To simply use the active coordinate system as the field to operate on, set UseCoordinateSystemAsField to true.

◆ SetUseCoordinateSystemAsField() [2/2]

VTKM_CONT void vtkm::filter::FilterField::SetUseCoordinateSystemAsField ( vtkm::IdComponent  index,
bool  val 
)
inline

To simply use the active coordinate system as the field to operate on, set UseCoordinateSystemAsField to true.

Member Data Documentation

◆ ActiveCoordinateSystemIndices

std::vector<vtkm::Id> vtkm::filter::FilterField::ActiveCoordinateSystemIndices
private

◆ ActiveFieldAssociation

std::vector<vtkm::cont::Field::Association> vtkm::filter::FilterField::ActiveFieldAssociation
private

◆ ActiveFieldNames

std::vector<std::string> vtkm::filter::FilterField::ActiveFieldNames
private

◆ OutputFieldName

std::string vtkm::filter::FilterField::OutputFieldName
private

◆ UseCoordinateSystemAsField

std::vector<bool> vtkm::filter::FilterField::UseCoordinateSystemAsField
private

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