Go to the documentation of this file.
   10 #ifndef vtk_m_filter_Filter_h 
   11 #define vtk_m_filter_Filter_h 
   21 #include <vtkm/filter/vtkm_filter_core_export.h> 
  225   virtual bool CanThread() 
const;
 
  240     return this->CanThread() && this->RunFilterWithMultipleThreads;
 
  246     if (this->CanThread())
 
  247       this->RunFilterWithMultipleThreads = val;
 
  251         "Multi threaded filter not supported for " + std::string(
typeid(*this).name());
 
  274     std::initializer_list<std::
string> fields,
 
  278     std::initializer_list<std::pair<std::
string, 
vtkm::cont::Field::Association>> fields,
 
  283     const std::
string& fieldname,
 
  284     vtkm::cont::Field::Association association,
 
  287   VTKM_CONT void SetFieldsToPass(const std::
string& fieldname,
 
  379   template <
typename FieldMapper>
 
  383     FieldMapper&& fieldMapper)
 const 
  386     this->MapFieldsOntoOutput(input, this->GetFieldsToPass(), output, fieldMapper);
 
  408   template <
typename FieldMapper>
 
  411                                              FieldMapper&& fieldMapper)
 const 
  415     this->MapFieldsOntoOutput(inDataSet, this->GetFieldsToPass(), outDataSet, fieldMapper);
 
  440   template <
typename FieldMapper>
 
  445     FieldMapper&& fieldMapper)
 const 
  450     if (this->GetPassCoordinateSystems() || fieldSelection.
HasField(resultCoordSystem))
 
  455     this->MapFieldsOntoOutput(inDataSet, fieldSelection, outDataSet, fieldMapper);
 
  459   template <
typename FieldMapper>
 
  463     const std::string& coordsName,
 
  465     FieldMapper&& fieldMapper)
 const 
  467     return this->CreateResultCoordinateSystem(
 
  480   template <
typename FieldMapper>
 
  484                                      FieldMapper&& fieldMapper)
 const 
  492         fieldMapper(output, field);
 
  511         if (!output.
HasPointField(coords.GetName()) && this->GetPassCoordinateSystems())
 
  513           fieldMapper(output, coords);
 
  523   template <
typename FieldMapper>
 
  527                                      FieldMapper&& fieldMapper)
 const 
  534         fieldMapper(output, field);
 
  544   bool PassCoordinateSystems = 
true;
 
  545   bool RunFilterWithMultipleThreads = 
false;
 
  
VTKM_CONT bool HasPointField(const std::string &name) const
Definition: DataSet.h:101
 
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.
Definition: Filter.h:441
 
Groups connected points that have the same field value.
Definition: Atomic.h:19
 
const VTKM_CONT std::vector< vtkm::cont::DataSet > & GetPartitions() const
Get an STL vector of all DataSet objects stored in PartitionedDataSet.
 
VTKM_CONT void AddField(const vtkm::cont::Field &inputField)
Definition: FieldSelection.h:116
 
const VTKM_CONT vtkm::cont::Field & GetField(vtkm::Id index) const
Definition: PartitionedDataSet.h:139
 
A FieldSelection stores information about fields to map for input dataset to output when a filter is ...
Definition: FieldSelection.h:31
 
VTKM_CONT void MapFieldsOntoOutput(const vtkm::cont::PartitionedDataSet &input, const vtkm::filter::FieldSelection &fieldSelection, vtkm::cont::PartitionedDataSet &output, FieldMapper &&fieldMapper) const
Definition: Filter.h:524
 
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
 
VTKM_CONT bool GetRunMultiThreadedFilter() const
Definition: Filter.h:238
 
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:406
 
VTKM_CONT vtkm::Id GetThreadsPerCPU() const
Definition: Filter.h:233
 
vtkm::cont::Invoker Invoke
Definition: Filter.h:335
 
VTKM_CONT vtkm::filter::FieldSelection & GetFieldsToPass()
Specify which fields get passed from input to output.
Definition: Filter.h:296
 
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
 
VTKM_CONT bool HasField(const vtkm::cont::Field &inputField) const
Returns true if the input field has been added to this selection.
Definition: FieldSelection.h:161
 
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.
Definition: Filter.h:409
 
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
 
Definition: CoordinateSystem.h:25
 
VTKM_CONT vtkm::Id GetThreadsPerGPU() const
Definition: Filter.h:235
 
@ Info
Information messages (detected hardware, etc) and temporary debugging output.
 
VTKM_CONT bool HasCellField(const std::string &name) const
Definition: DataSet.h:89
 
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.
Definition: Filter.h:460
 
const VTKM_CONT vtkm::filter::FieldSelection & GetFieldsToPass() const
Specify which fields get passed from input to output.
Definition: Filter.h:294
 
VTKM_CONT vtkm::cont::CoordinateSystem GetCoordinateSystem(vtkm::Id index=0) const
 
VTKM_CONT vtkm::IdComponent GetNumberOfCoordinateSystems() const
Definition: DataSet.h:371
 
Allows launching any worklet without a dispatcher.
Definition: Invoker.h:41
 
base class for all filters.
Definition: Filter.h:218
 
#define VTKM_CONT
Definition: ExportMacros.h:57
 
VTKM_CONT bool HasCoordinateSystem(const std::string &name) const
Definition: DataSet.h:333
 
#define VTKM_LOG_S(level,...)
Writes a message using stream syntax to the indicated log level.
Definition: Logging.h:261
 
VTKM_CONT void SetGhostCellFieldName(const std::string &name)
Sets the name of the field to use for cell ghost levels.
 
VTKM_CONT bool GetPassCoordinateSystems() const
Specify whether to always pass coordinate systems.
Definition: Filter.h:311
 
VTKM_CONT void SetRunMultiThreadedFilter(bool val)
Definition: Filter.h:244
 
VTKM_CONT void MapFieldsOntoOutput(const vtkm::cont::DataSet &input, const vtkm::filter::FieldSelection &fieldSelection, vtkm::cont::DataSet &output, FieldMapper &&fieldMapper) const
Definition: Filter.h:481
 
VTKM_CONT bool IsFieldSelected(const vtkm::cont::Field &inputField) const
Returns true if the input field should be mapped to the output dataset.
Definition: FieldSelection.h:104
 
const VTKM_CONT vtkm::cont::Field & GetField(vtkm::Id index) const
Retrieves a field by index.
Definition: DataSet.h:75
 
VTKM_CONT vtkm::IdComponent AddCoordinateSystem(const vtkm::cont::CoordinateSystem &cs)
Adds the given CoordinateSystem to the DataSet.
 
VTKM_CONT void SetCellSet(const CellSetType &cellSet)
Definition: DataSet.h:355
 
VTKM_CONT vtkm::IdComponent GetNumberOfFields() const
Definition: DataSet.h:368
 
VTKM_CONT void SetPassCoordinateSystems(bool flag)
Specify whether to always pass coordinate systems.
Definition: Filter.h:310
 
VTKM_CONT vtkm::IdComponent GetNumberOfFields() const
Definition: PartitionedDataSet.h:91
 
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.
Definition: Filter.h:380
 
VTKM_CONT void SetThreadsPerGPU(vtkm::Id numThreads)
Definition: Filter.h:230
 
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145
 
VTKM_CONT bool HasGhostCellField() const
 
void SetInvoker(vtkm::cont::Invoker inv)
Specify the vtkm::cont::Invoker to be used to execute worklets by this filter instance.
Definition: Filter.h:332
 
const VTKM_CONT std::string & GetGhostCellFieldName() const
 
VTKM_CONT void SetThreadsPerCPU(vtkm::Id numThreads)
Definition: Filter.h:228
 
Definition: PartitionedDataSet.h:25