VTK-m  2.2
Namespaces | Classes | Functions
vtkm::filter Namespace Reference

VTK-m Filters. More...

Namespaces

 clean_grid
 
 connected_components
 
 contour
 
 density_estimate
 
 entity_extraction
 
 field_conversion
 
 field_transform
 
 flow
 
 geometry_refinement
 
 image_processing
 
 mesh_info
 
 multi_block
 
 resampling
 
 scalar_topology
 
 uncertainty
 
 vector_analysis
 
 zfp
 

Classes

class  DataSetQueue
 
class  FieldSelection
 A FieldSelection stores information about fields to map for input dataset to output when a filter is executed. More...
 
class  Filter
 Base class for all filters. More...
 
class  FilterField
 
class  TaskQueue
 
struct  vtkm_filter_FilterField_h_deprecated
 

Functions

bool MapFieldMergeAverage (const vtkm::cont::Field &inputField, const vtkm::worklet::internal::KeysBase &keys, vtkm::cont::Field &outputField)
 Maps a field by merging entries based on a keys object. More...
 
bool MapFieldMergeAverage (const vtkm::cont::Field &inputField, const vtkm::worklet::internal::KeysBase &keys, vtkm::cont::DataSet &outputData)
 Maps a field by merging entries based on a keys object. More...
 
bool MapFieldPermutation (const vtkm::cont::Field &inputField, const vtkm::cont::ArrayHandle< vtkm::Id > &permutation, vtkm::cont::Field &outputField, vtkm::Float64 invalidValue=vtkm::Nan< vtkm::Float64 >())
 Maps a field by permuting it by a given index array. More...
 
bool MapFieldPermutation (const vtkm::cont::CoordinateSystem &inputCoords, const vtkm::cont::ArrayHandle< vtkm::Id > &permutation, vtkm::cont::CoordinateSystem &outputCoords, vtkm::Float64 invalidValue=vtkm::Nan< vtkm::Float64 >())
 
bool MapFieldPermutation (const vtkm::cont::Field &inputField, const vtkm::cont::ArrayHandle< vtkm::Id > &permutation, vtkm::cont::DataSet &outputData, vtkm::Float64 invalidValue=vtkm::Nan< vtkm::Float64 >())
 Maps a field by permuting it by a given index array. More...
 

Detailed Description

VTK-m Filters.

vtkm::filter is the collection of predefined filters that take data as input and write new data as output. Filters operate on vtkm::cont::DataSet objects, vtkm::cont::Fields, and other runtime typeless objects.

Function Documentation

◆ MapFieldMergeAverage() [1/2]

bool vtkm::filter::MapFieldMergeAverage ( const vtkm::cont::Field inputField,
const vtkm::worklet::internal::KeysBase &  keys,
vtkm::cont::DataSet outputData 
)

Maps a field by merging entries based on a keys object.

This method will create a new field containing the data from the provided inputField but but with groups of entities merged together. The input keys object encapsulates which elements should be merged together. A group of elements merged together will be averaged.

The intention of this method is to implement the MapFieldOntoOutput methods in filters (many of which require this merge of a field), but can be used in other places as well. The resulting field is put in the given DataSet.

The returned Field has the same metadata as the input. If the metadata needs to change (such as the name or the association), then a different form of MapFieldMergeAverage should be used.

This function returns whether the field was successfully merged. If the returned result is true, then outputData has the merged field. If it is false, then the field is not placed in outputData.

◆ MapFieldMergeAverage() [2/2]

bool vtkm::filter::MapFieldMergeAverage ( const vtkm::cont::Field inputField,
const vtkm::worklet::internal::KeysBase &  keys,
vtkm::cont::Field outputField 
)

Maps a field by merging entries based on a keys object.

This method will create a new field containing the data from the provided inputField but but with groups of entities merged together. The input keys object encapsulates which elements should be merged together. A group of elements merged together will be averaged. The result is placed in outputField.

The intention of this method is to implement the MapFieldOntoOutput methods in filters (many of which require this merge of a field), but can be used in other places as well.

outputField is set to have the same metadata as the input. If the metadata needs to change (such as the name or the association) that should be done after the function returns.

This function returns whether the field was successfully merged. If the returned result is true, then the results in outputField are valid. If it is false, then outputField should not be used.

◆ MapFieldPermutation() [1/3]

bool vtkm::filter::MapFieldPermutation ( const vtkm::cont::CoordinateSystem inputCoords,
const vtkm::cont::ArrayHandle< vtkm::Id > &  permutation,
vtkm::cont::CoordinateSystem outputCoords,
vtkm::Float64  invalidValue = vtkm::Nan< vtkm::Float64 >() 
)

◆ MapFieldPermutation() [2/3]

bool vtkm::filter::MapFieldPermutation ( const vtkm::cont::Field inputField,
const vtkm::cont::ArrayHandle< vtkm::Id > &  permutation,
vtkm::cont::DataSet outputData,
vtkm::Float64  invalidValue = vtkm::Nan< vtkm::Float64 >() 
)

Maps a field by permuting it by a given index array.

This method will create a new field containing the data from the provided inputField but reorded by the given permutation index array. The value in the resulting field for index i will be be a value from inputField, but comes from the index that comes from permutation at position i.

The intention of this method is to implement the MapFieldOntoOutput methods in filters (many of which require this permutation of a field), but can be used in other places as well. The resulting field is put in the given DataSet.

The returned Field has the same metadata as the input. If the metadata needs to change (such as the name or the association), then a different form of MapFieldPermutation should be used.

This function returns whether the field was successfully permuted. If the returned result is true, then outputData has the permuted field. If it is false, then the field is not placed in outputData.

If an invalid index is given in the permutation array (i.e. less than 0 or greater than the size of the array), then the resulting outputField will be given invalidValue (converted as best as possible to the correct data type).

◆ MapFieldPermutation() [3/3]

bool vtkm::filter::MapFieldPermutation ( const vtkm::cont::Field inputField,
const vtkm::cont::ArrayHandle< vtkm::Id > &  permutation,
vtkm::cont::Field outputField,
vtkm::Float64  invalidValue = vtkm::Nan< vtkm::Float64 >() 
)

Maps a field by permuting it by a given index array.

This method will create a new field containing the data from the provided inputField but reorded by the given permutation index array. The value in the resulting field for index i will be be a value from inputField, but comes from the index that comes from permutation at position i. The result is placed in outputField.

The intention of this method is to implement the mapping of fields from the input to the output in filters (many of which require this permutation of a field), but can be used in other places as well.

outputField is set to have the same metadata as the input. If the metadata needs to change (such as the name or the association) that should be done after the function returns.

This function returns whether the field was successfully permuted. If the returned result is true, then the results in outputField are valid. If it is false, then outputField should not be used.

If an invalid index is given in the permutation array (i.e. less than 0 or greater than the size of the array), then the resulting outputField will be given invalidValue (converted as best as possible to the correct data type).