Deprecated vtkm::filter::FilterField

The original design of the filter base class required several specialized
base classes to control what information was pulled from the input
`DataSet` and provided to the derived class. Since the filter base class was
redesigned, the derived classes all get a `DataSet` and pull their own
information from it. Thus, most specialized filter base classes became
unnecessary and removed.

The one substantial exception was the `FilterField`. This filter base class
managed input and output arrays. This was kept separate from the base
`Filter` because not all filters need the ability to select this
information.

That said, this separation has not been particularly helpful. There are
several other features of `Filter` that does not apply to all subclasses.
Furthermore, there are several derived filters that are using `FilterField`
merely to pick a single part, like selecting a coordinate system, and
ignoring the rest of the abilities.

Thus, it makes more sense to deprecate `FilterField` and have these classes
inherit directly from `Filter`.
This commit is contained in:
Kenneth Moreland 2024-02-10 15:33:46 -05:00
parent fa2eb79b07
commit a17ebdf52a
103 changed files with 686 additions and 738 deletions

@ -0,0 +1,22 @@
# Deprecated `vtkm::filter::FilterField`
The original design of the filter base class required several specialized
base classes to control what information was pulled from the input
`DataSet` and provided to the derived class. Since the filter base class was
redesigned, the derived classes all get a `DataSet` and pull their own
information from it. Thus, most specialized filter base classes became
unnecessary and removed.
The one substantial exception was the `FilterField`. This filter base class
managed input and output arrays. This was kept separate from the base
`Filter` because not all filters need the ability to select this
information.
That said, this separation has not been particularly helpful. There are
several other features of `Filter` that does not apply to all subclasses.
Furthermore, there are several derived filters that are using `FilterField`
merely to pick a single part, like selecting a coordinate system, and
ignoring the rest of the abilities.
Thus, it makes more sense to deprecate `FilterField` and have these classes
inherit directly from `Filter`.

@ -10,7 +10,7 @@
#include <vtkm/worklet/WorkletMapField.h> #include <vtkm/worklet/WorkletMapField.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/cont/Invoker.h> #include <vtkm/cont/Invoker.h>
@ -94,7 +94,7 @@ namespace unit_conversion
{ {
class VTKM_FILTER_UNIT_CONVERSION_EXPORT PoundsPerSquareInchToNewtonsPerSquareMeterFilter class VTKM_FILTER_UNIT_CONVERSION_EXPORT PoundsPerSquareInchToNewtonsPerSquareMeterFilter
: public vtkm::filter::FilterField : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT PoundsPerSquareInchToNewtonsPerSquareMeterFilter(); VTKM_CONT PoundsPerSquareInchToNewtonsPerSquareMeterFilter();

@ -41,7 +41,7 @@ public:
} // anonymous namespace } // anonymous namespace
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#define VTKM_FILTER_VECTOR_CALCULUS_EXPORT #define VTKM_FILTER_VECTOR_CALCULUS_EXPORT
@ -56,8 +56,7 @@ namespace vector_calculus
{ {
//// LABEL Export //// LABEL Export
class VTKM_FILTER_VECTOR_CALCULUS_EXPORT FieldMagnitude class VTKM_FILTER_VECTOR_CALCULUS_EXPORT FieldMagnitude : public vtkm::filter::Filter
: public vtkm::filter::FilterField
{ {
public: public:
VTKM_CONT FieldMagnitude(); VTKM_CONT FieldMagnitude();

@ -88,7 +88,7 @@ public:
} // namespace boxfilter } // namespace boxfilter
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
namespace vtkm namespace vtkm
{ {
@ -97,7 +97,7 @@ namespace filter
namespace convolution namespace convolution
{ {
class BoxFilter : public vtkm::filter::FilterField class BoxFilter : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT BoxFilter() = default; VTKM_CONT BoxFilter() = default;

@ -50,7 +50,7 @@ public:
//// END-EXAMPLE UseWorkletVisitCellsWithPoints //// END-EXAMPLE UseWorkletVisitCellsWithPoints
//// ////
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#define VTKM_FILTER_FIELD_CONVERSION_EXPORT #define VTKM_FILTER_FIELD_CONVERSION_EXPORT
@ -64,7 +64,7 @@ namespace filter
namespace field_conversion namespace field_conversion
{ {
class VTKM_FILTER_FIELD_CONVERSION_EXPORT CellCenters : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_CONVERSION_EXPORT CellCenters : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT CellCenters(); VTKM_CONT CellCenters();

@ -10,7 +10,7 @@
#include <vtkm/worklet/WorkletMapField.h> #include <vtkm/worklet/WorkletMapField.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/io/VTKDataSetReader.h> #include <vtkm/io/VTKDataSetReader.h>
#include <vtkm/io/VTKDataSetWriter.h> #include <vtkm/io/VTKDataSetWriter.h>
@ -43,7 +43,7 @@ namespace vtkm
namespace filter namespace filter
{ {
class HelloField : public vtkm::filter::FilterField class HelloField : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet) VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet)

@ -10,7 +10,7 @@
#ifndef vtk_m_examples_multibackend_MultiDeviceGradient_h #ifndef vtk_m_examples_multibackend_MultiDeviceGradient_h
#define vtk_m_examples_multibackend_MultiDeviceGradient_h #define vtk_m_examples_multibackend_MultiDeviceGradient_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include "TaskQueue.h" #include "TaskQueue.h"
@ -22,7 +22,7 @@ using RuntimeTaskQueue = TaskQueue<std::function<void()>>;
/// ///
/// The Policy used with MultiDeviceGradient must include the TBB and CUDA /// The Policy used with MultiDeviceGradient must include the TBB and CUDA
/// backends. /// backends.
class MultiDeviceGradient : public vtkm::filter::FilterField class MultiDeviceGradient : public vtkm::filter::Filter
{ {
public: public:
//Construct a MultiDeviceGradient and worker pool //Construct a MultiDeviceGradient and worker pool

@ -12,7 +12,7 @@
#include <vtkm/cont/Initialize.h> #include <vtkm/cont/Initialize.h>
#include <vtkm/cont/Invoker.h> #include <vtkm/cont/Invoker.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/vector_analysis/Gradient.h> #include <vtkm/filter/vector_analysis/Gradient.h>
#include <vtkm/io/VTKDataSetReader.h> #include <vtkm/io/VTKDataSetReader.h>
#include <vtkm/io/VTKDataSetWriter.h> #include <vtkm/io/VTKDataSetWriter.h>
@ -32,7 +32,7 @@ struct ComputeMagnitude : vtkm::worklet::WorkletMapField
// The filter class used by external code to run the algorithm. Normally the class definition // The filter class used by external code to run the algorithm. Normally the class definition
// is in a separate header file. // is in a separate header file.
class FieldMagnitude : public vtkm::filter::FilterField class FieldMagnitude : public vtkm::filter::Filter
{ {
protected: protected:
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet) override; VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet) override;

@ -46,14 +46,14 @@ struct ConvertPointFieldToCells : vtkm::worklet::WorkletVisitCellsWithPoints
} // namespace worklet } // namespace worklet
} // namespace vtkm } // namespace vtkm
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
namespace vtkm namespace vtkm
{ {
namespace filter namespace filter
{ {
struct ConvertPointFieldToCells : vtkm::filter::FilterField struct ConvertPointFieldToCells : vtkm::filter::Filter
{ {
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet) override; VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet) override;
}; };

@ -11,14 +11,13 @@
set(core_headers set(core_headers
FieldSelection.h FieldSelection.h
Filter.h Filter.h
FilterField.h FilterField.h #deprecated
MapFieldMergeAverage.h MapFieldMergeAverage.h
MapFieldPermutation.h MapFieldPermutation.h
TaskQueue.h TaskQueue.h
) )
set(core_sources set(core_sources
FieldSelection.cxx FieldSelection.cxx
FilterField.cxx
) )
set(core_sources_device set(core_sources_device
MapFieldMergeAverage.cxx MapFieldMergeAverage.cxx

@ -42,6 +42,11 @@ void RunFilter(Filter* self, vtkm::filter::DataSetQueue& input, vtkm::filter::Da
} // anonymous namespace } // anonymous namespace
Filter::Filter()
{
this->SetActiveCoordinateSystem(0);
}
Filter::~Filter() = default; Filter::~Filter() = default;
bool Filter::CanThread() const bool Filter::CanThread() const
@ -161,6 +166,16 @@ vtkm::cont::PartitionedDataSet Filter::CreateResult(
return this->CreateResult(input, resultPartitions, fieldMapper); return this->CreateResult(input, resultPartitions, fieldMapper);
} }
vtkm::cont::DataSet Filter::CreateResultField(const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::Field& resultField) const
{
vtkm::cont::DataSet outDataSet = this->CreateResult(inDataSet);
outDataSet.AddField(resultField);
VTKM_ASSERT(!resultField.GetName().empty());
VTKM_ASSERT(outDataSet.HasField(resultField.GetName(), resultField.GetAssociation()));
return outDataSet;
}
vtkm::Id Filter::DetermineNumberOfThreads(const vtkm::cont::PartitionedDataSet& input) vtkm::Id Filter::DetermineNumberOfThreads(const vtkm::cont::PartitionedDataSet& input)
{ {
vtkm::Id numDS = input.GetNumberOfPartitions(); vtkm::Id numDS = input.GetNumberOfPartitions();
@ -189,5 +204,23 @@ vtkm::Id Filter::DetermineNumberOfThreads(const vtkm::cont::PartitionedDataSet&
return numThreads; return numThreads;
} }
void Filter::ResizeIfNeeded(size_t index_st)
{
if (this->ActiveFieldNames.size() <= index_st)
{
auto oldSize = this->ActiveFieldNames.size();
this->ActiveFieldNames.resize(index_st + 1);
this->ActiveFieldAssociation.resize(index_st + 1);
this->UseCoordinateSystemAsField.resize(index_st + 1);
this->ActiveCoordinateSystemIndices.resize(index_st + 1);
for (std::size_t i = oldSize; i <= index_st; ++i)
{
this->ActiveFieldAssociation[i] = cont::Field::Association::Any;
this->UseCoordinateSystemAsField[i] = false;
this->ActiveCoordinateSystemIndices[i] = 0;
}
}
}
} // namespace filter } // namespace filter
} // namespace vtkm } // namespace vtkm

@ -10,6 +10,7 @@
#ifndef vtk_m_filter_Filter_h #ifndef vtk_m_filter_Filter_h
#define vtk_m_filter_Filter_h #define vtk_m_filter_Filter_h
#include <vtkm/cont/ArrayCopy.h>
#include <vtkm/cont/DataSet.h> #include <vtkm/cont/DataSet.h>
#include <vtkm/cont/Field.h> #include <vtkm/cont/Field.h>
#include <vtkm/cont/Invoker.h> #include <vtkm/cont/Invoker.h>
@ -24,19 +25,17 @@ namespace vtkm
{ {
namespace filter namespace filter
{ {
/// \brief base class for all filters. /// @brief base class for all filters.
/// ///
/// This is the base class for all filters. To add a new filter, one can subclass this (or any of /// This is the base class for all filters. To add a new filter, one can subclass this and
/// the existing subclasses e.g. FilterField, FilterParticleAdvection, etc.) and implement relevant /// implement relevant methods.
/// methods.
/// ///
/// \section FilterUsage Usage /// @section FilterUsage Usage
/// ///
/// To execute a filter, one typically calls the `auto result = filter.Execute(input)`. Typical /// To execute a filter, one typically calls the `auto result = filter.Execute(input)`. Typical
/// usage is as follows: /// usage is as follows:
/// ///
/// \code{cpp} /// ```cpp
///
/// // create the concrete subclass (e.g. Contour). /// // create the concrete subclass (e.g. Contour).
/// vtkm::filter::contour::Contour contour; /// vtkm::filter::contour::Contour contour;
/// ///
@ -51,7 +50,7 @@ namespace filter
/// // or, execute on a vtkm::cont::PartitionedDataSet /// // or, execute on a vtkm::cont::PartitionedDataSet
/// vtkm::cont::PartitionedDataSet mbInput = ... /// vtkm::cont::PartitionedDataSet mbInput = ...
/// auto outputMB = contour.Execute(mbInput); /// auto outputMB = contour.Execute(mbInput);
/// \endcode /// ```
/// ///
/// `Execute` methods take in the input DataSet or PartitionedDataSet to process and return the /// `Execute` methods take in the input DataSet or PartitionedDataSet to process and return the
/// result. The type of the result is same as the input type, thus `Execute(DataSet&)` returns /// result. The type of the result is same as the input type, thus `Execute(DataSet&)` returns
@ -74,69 +73,14 @@ namespace filter
/// `DoExecutePartitions(PartitionedDataSet&)`. See the implementation of /// `DoExecutePartitions(PartitionedDataSet&)`. See the implementation of
/// `FilterParticleAdvection::Execute(PartitionedDataSet&)` for an example. /// `FilterParticleAdvection::Execute(PartitionedDataSet&)` for an example.
/// ///
/// \section FilterSubclassing Subclassing /// @section Creating results and mapping fields
///
/// In many uses cases, one subclasses one of the immediate subclasses of this class such as
/// FilterField, FilterParticleAdvection, etc. Those may impose additional constraints on the
/// methods to implement in the subclasses. Here, we describes the things to consider when directly
/// subclassing vtkm::filter::Filter.
///
/// \subsection FilterExecution Execute
///
/// A concrete subclass of Filter must provide `DoExecute` implementation that provides the meat
/// for the filter i.e. the implementation for the filter's data processing logic. There are two
/// signatures available; which one to implement depends on the nature of the filter.
///
/// Let's consider simple filters that do not need to do anything special to handle
/// PartitionedDataSet e.g. clip, contour, etc. These are the filters where executing the filter
/// on a PartitionedDataSet simply means executing the filter on one partition at a time and
/// packing the output for each iteration info the result PartitionedDataSet. For such filters,
/// one must implement the following signature.
///
/// \code{cpp}
///
/// vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input);
///
/// \endcode
///
/// The role of this method is to execute on the input dataset and generate the result and return
/// it. If there are any errors, the subclass must throw an exception
/// (e.g. `vtkm::cont::ErrorFilterExecution`).
///
/// In this simple case, the Filter superclass handles iterating over multiple partitions in the
/// input PartitionedDataSet and calling `DoExecute(DataSet&)` iteratively.
///
/// The aforementioned approach is also suitable for filters that need special handling for
/// PartitionedDataSets that requires certain cross DataSet operations (usually scatter/gather
/// and reduction on DataSets) before and/or after the per DataSet operation. This can be done by
/// overriding `DoExecutePartitions(PartitionedDataSet&)` while calling to the base class
/// `DoExecutePartitions(PartitionedDataSet&) as helper function for iteration on DataSets.
///
/// \code{cpp}
/// vtkm::cont::PartitionedDataSet FooFilter::DoExecutePartitions(
/// const vtkm::cont::PartitionedDataSet& input)
/// {
/// // Do pre execute stuff, e.g. scattering to each DataSet
/// auto output = this->Filter::DoExecutePartitions(input);
/// // Do post execute stuff, e.g gather/reduce from DataSets
/// return output;
/// }
/// \endcode
///
/// For more complex filters, like streamlines, particle tracking, where the processing of
/// PartitionedDataSets cannot be modelled as mapping and reduction operation on DataSet, one
/// needs fully implement `DoExecutePartitions(PartitionedDataSet&)`. Now the subclass is given
/// full control over the execution, including any mapping of fields to output (described in next
/// sub-section).
///
/// \subsection Creating results and mapping fields
/// ///
/// For subclasses that map input fields into output fields, the implementation of its /// For subclasses that map input fields into output fields, the implementation of its
/// `DoExecute(DataSet&)` should create the `DataSet` to be returned with a call to /// `DoExecute(DataSet&)` should create the `DataSet` to be returned with a call to
/// `Filter::CreateResult` or a similar method in a subclass (such as /// `Filter::CreateResult` or a similar method (such as
/// `FilterField::CreateResultField`). /// `Filter::CreateResultField`).
/// ///
/// \code{cpp} /// ```cpp
/// VTKM_CONT DataSet SomeFilter::DoExecute(const vtkm::cont::DataSet& input) /// VTKM_CONT DataSet SomeFilter::DoExecute(const vtkm::cont::DataSet& input)
/// { /// {
/// vtkm::cont::UnknownCellSet outCellSet; /// vtkm::cont::UnknownCellSet outCellSet;
@ -152,7 +96,7 @@ namespace filter
/// // the cell set change at all, they will have to be mapped by hand. /// // the cell set change at all, they will have to be mapped by hand.
/// return this->CreateResult(input, outCellSet, mapper); /// return this->CreateResult(input, outCellSet, mapper);
/// } /// }
/// \endcode /// ```
/// ///
/// In addition to creating a new `DataSet` filled with the proper cell structure and coordinate /// In addition to creating a new `DataSet` filled with the proper cell structure and coordinate
/// systems, `CreateResult` iterates through each `FieldToPass` in the input DataSet and calls the /// systems, `CreateResult` iterates through each `FieldToPass` in the input DataSet and calls the
@ -162,7 +106,7 @@ namespace filter
/// provided as a convenience that uses the default mapper which trivially adds input Field to /// provided as a convenience that uses the default mapper which trivially adds input Field to
/// output DataSet (via a shallow copy). /// output DataSet (via a shallow copy).
/// ///
/// \subsection FilterThreadSafety CanThread /// @section FilterThreadSafety CanThread
/// ///
/// By default, the implementation of `DoExecute(DataSet&)` should model a *pure function*, i.e. it /// By default, the implementation of `DoExecute(DataSet&)` should model a *pure function*, i.e. it
/// does not have any mutable shared state. This makes it thread-safe by default and allows /// does not have any mutable shared state. This makes it thread-safe by default and allows
@ -178,7 +122,7 @@ namespace filter
/// require passing information between these two phases can now use local variables within the /// require passing information between these two phases can now use local variables within the
/// `DoExecute(DataSet&)`. For example: /// `DoExecute(DataSet&)`. For example:
/// ///
/// \code{cpp} /// ```cpp
/// struct SharedState; // shared states between mesh generation and field mapping. /// struct SharedState; // shared states between mesh generation and field mapping.
/// VTKM_CONT DataSet ThreadSafeFilter::DoExecute(const vtkm::cont::DataSet& input) /// VTKM_CONT DataSet ThreadSafeFilter::DoExecute(const vtkm::cont::DataSet& input)
/// { /// {
@ -200,13 +144,13 @@ namespace filter
/// ///
/// return output; /// return output;
/// } /// }
/// \endcode /// ```
/// ///
/// In the rare cases that filter implementation can not be made thread-safe, the implementation /// In the rare cases that filter implementation can not be made thread-safe, the implementation
/// needs to override the `CanThread()` virtual method to return `false`. The default /// needs to override the `CanThread()` virtual method to return `false`. The default
/// `Execute(PartitionedDataSet&)` implementation will fallback to a serial for loop execution. /// `Execute(PartitionedDataSet&)` implementation will fallback to a serial for loop execution.
/// ///
/// \subsection FilterThreadScheduling DoExecute /// @subsection FilterThreadScheduling DoExecute
/// The default multi-threaded execution of `Execute(PartitionedDataSet&)` uses a simple FIFO queue /// The default multi-threaded execution of `Execute(PartitionedDataSet&)` uses a simple FIFO queue
/// of DataSet and pool of *worker* threads. Implementation of Filter subclass can override the /// of DataSet and pool of *worker* threads. Implementation of Filter subclass can override the
/// `DoExecutePartitions(PartitionedDataSet)` virtual method to provide implementation specific /// `DoExecutePartitions(PartitionedDataSet)` virtual method to provide implementation specific
@ -218,42 +162,21 @@ namespace filter
class VTKM_FILTER_CORE_EXPORT Filter class VTKM_FILTER_CORE_EXPORT Filter
{ {
public: public:
VTKM_CONT VTKM_CONT Filter();
virtual ~Filter();
VTKM_CONT VTKM_CONT virtual ~Filter();
virtual bool CanThread() const;
VTKM_CONT /// @brief Executes the filter on the input and produces a result dataset.
void SetThreadsPerCPU(vtkm::Id numThreads) { this->NumThreadsPerCPU = numThreads; } ///
VTKM_CONT /// On success, this the dataset produced. On error, `vtkm::cont::ErrorExecution` will be thrown.
void SetThreadsPerGPU(vtkm::Id numThreads) { this->NumThreadsPerGPU = numThreads; } VTKM_CONT vtkm::cont::DataSet Execute(const vtkm::cont::DataSet& input);
VTKM_CONT /// @brief Executes the filter on the input PartitionedDataSet and produces a result PartitionedDataSet.
vtkm::Id GetThreadsPerCPU() const { return this->NumThreadsPerCPU; } ///
VTKM_CONT /// On success, this the dataset produced. On error, `vtkm::cont::ErrorExecution` will be thrown.
vtkm::Id GetThreadsPerGPU() const { return this->NumThreadsPerGPU; } VTKM_CONT vtkm::cont::PartitionedDataSet Execute(const vtkm::cont::PartitionedDataSet& input);
VTKM_CONT /// @brief Specify which fields get passed from input to output.
bool GetRunMultiThreadedFilter() const
{
return this->CanThread() && this->RunFilterWithMultipleThreads;
}
VTKM_CONT
void SetRunMultiThreadedFilter(bool val)
{
if (this->CanThread())
this->RunFilterWithMultipleThreads = val;
else
{
std::string msg =
"Multi threaded filter not supported for " + std::string(typeid(*this).name());
VTKM_LOG_S(vtkm::cont::LogLevel::Info, msg);
}
}
/// \brief Specify which fields get passed from input to output.
/// ///
/// After a filter successfully executes and returns a new data set, fields are mapped from /// After a filter successfully executes and returns a new data set, fields are mapped from
/// input to output. Depending on what operation the filter does, this could be a simple shallow /// input to output. Depending on what operation the filter does, this could be a simple shallow
@ -301,7 +224,7 @@ public:
VTKM_CONT VTKM_CONT
vtkm::filter::FieldSelection& GetFieldsToPass() { return this->FieldsToPass; } vtkm::filter::FieldSelection& GetFieldsToPass() { return this->FieldsToPass; }
/// \brief Specify whether to always pass coordinate systems. /// @brief Specify whether to always pass coordinate systems.
/// ///
/// `vtkm::cont::CoordinateSystem`s in a `DataSet` are really just point fields marked as being a /// `vtkm::cont::CoordinateSystem`s in a `DataSet` are really just point fields marked as being a
/// coordinate system. Thus, a coordinate system is passed if and only if the associated /// coordinate system. Thus, a coordinate system is passed if and only if the associated
@ -315,15 +238,137 @@ public:
/// @copydoc SetPassCoordinateSystems /// @copydoc SetPassCoordinateSystems
VTKM_CONT bool GetPassCoordinateSystems() const { return this->PassCoordinateSystems; } VTKM_CONT bool GetPassCoordinateSystems() const { return this->PassCoordinateSystems; }
/// Executes the filter on the input and produces a result dataset. /// @brief Specifies the name of the output field generated.
/// ///
/// On success, this the dataset produced. On error, `vtkm::cont::ErrorExecution` will be thrown. /// Not all filters create an output field.
VTKM_CONT vtkm::cont::DataSet Execute(const vtkm::cont::DataSet& input); VTKM_CONT void SetOutputFieldName(const std::string& name) { this->OutputFieldName = name; }
/// Executes the filter on the input PartitionedDataSet and produces a result PartitionedDataSet. /// @copydoc SetOutputFieldName
VTKM_CONT const std::string& GetOutputFieldName() const { return this->OutputFieldName; }
/// @brief Specifies a field to operate on.
/// ///
/// On success, this the dataset produced. On error, `vtkm::cont::ErrorExecution` will be thrown. /// The number of input fields (or whether the filter operates on input fields at all)
VTKM_CONT vtkm::cont::PartitionedDataSet Execute(const vtkm::cont::PartitionedDataSet& input); /// is specific to each particular filter.
VTKM_CONT void SetActiveField(
const std::string& name,
vtkm::cont::Field::Association association = vtkm::cont::Field::Association::Any)
{
this->SetActiveField(0, name, association);
}
/// @copydoc SetActiveField
VTKM_CONT void SetActiveField(
vtkm::IdComponent index,
const std::string& name,
vtkm::cont::Field::Association association = vtkm::cont::Field::Association::Any)
{
auto index_st = static_cast<std::size_t>(index);
this->ResizeIfNeeded(index_st);
this->ActiveFieldNames[index_st] = name;
this->ActiveFieldAssociation[index_st] = association;
}
/// @copydoc SetActiveField
VTKM_CONT const std::string& GetActiveFieldName(vtkm::IdComponent index = 0) const
{
VTKM_ASSERT((index >= 0) &&
(index < static_cast<vtkm::IdComponent>(this->ActiveFieldNames.size())));
return this->ActiveFieldNames[index];
}
/// @copydoc SetActiveField
VTKM_CONT vtkm::cont::Field::Association GetActiveFieldAssociation(
vtkm::IdComponent index = 0) const
{
return this->ActiveFieldAssociation[index];
}
/// Specifies the coordinate system index to make active to use when processing the input
/// `vtkm::cont::DataSet`. This is used primarily by the Filter to select the
/// coordinate system to use as a field when `UseCoordinateSystemAsField` is true.
VTKM_CONT void SetActiveCoordinateSystem(vtkm::Id coord_idx)
{
this->SetActiveCoordinateSystem(0, coord_idx);
}
/// @copydoc SetActiveCoordinateSystem
VTKM_CONT void SetActiveCoordinateSystem(vtkm::IdComponent index, vtkm::Id coord_idx)
{
auto index_st = static_cast<std::size_t>(index);
this->ResizeIfNeeded(index_st);
this->ActiveCoordinateSystemIndices[index_st] = coord_idx;
}
/// @copydoc SetActiveCoordinateSystem
VTKM_CONT vtkm::Id GetActiveCoordinateSystemIndex(vtkm::IdComponent index = 0) const
{
auto index_st = static_cast<std::size_t>(index);
return this->ActiveCoordinateSystemIndices[index_st];
}
/// Specifies whether to use point coordinates as the input field. When true, the values
/// for the active field are ignored and the active coordinate system is used instead.
VTKM_CONT void SetUseCoordinateSystemAsField(bool val) { SetUseCoordinateSystemAsField(0, val); }
/// @copydoc SetUseCoordinateSystemAsField
VTKM_CONT void SetUseCoordinateSystemAsField(vtkm::IdComponent index, bool val)
{
auto index_st = static_cast<std::size_t>(index);
this->ResizeIfNeeded(index_st);
this->UseCoordinateSystemAsField[index] = val;
}
/// @copydoc SetUseCoordinateSystemAsField
VTKM_CONT
bool GetUseCoordinateSystemAsField(vtkm::IdComponent index = 0) const
{
VTKM_ASSERT((index >= 0) &&
(index < static_cast<vtkm::IdComponent>(this->ActiveFieldNames.size())));
return this->UseCoordinateSystemAsField[index];
}
/// @brief Return the number of active fields currently set.
///
/// The general interface to `Filter` allows a user to set an arbitrary number
/// of active fields (indexed 0 and on). This method returns the number of active
/// fields that are set. Note that the filter implementation is free to ignore
/// any active fields it does not support. Also note that an active field can be
/// set to be either a named field or a coordinate system.
vtkm::IdComponent GetNumberOfActiveFields() const
{
VTKM_ASSERT(this->ActiveFieldNames.size() == this->UseCoordinateSystemAsField.size());
return static_cast<vtkm::IdComponent>(this->UseCoordinateSystemAsField.size());
}
/// @brief Returns whether the filter can execute on partitions in concurrent threads.
///
/// If a derived class's implementation of `DoExecute` cannot run on multiple threads,
/// then the derived class should override this method to return false.
VTKM_CONT virtual bool CanThread() const;
VTKM_CONT void SetThreadsPerCPU(vtkm::Id numThreads) { this->NumThreadsPerCPU = numThreads; }
VTKM_CONT void SetThreadsPerGPU(vtkm::Id numThreads) { this->NumThreadsPerGPU = numThreads; }
VTKM_CONT vtkm::Id GetThreadsPerCPU() const { return this->NumThreadsPerCPU; }
VTKM_CONT vtkm::Id GetThreadsPerGPU() const { return this->NumThreadsPerGPU; }
VTKM_CONT bool GetRunMultiThreadedFilter() const
{
return this->CanThread() && this->RunFilterWithMultipleThreads;
}
VTKM_CONT void SetRunMultiThreadedFilter(bool val)
{
if (this->CanThread())
this->RunFilterWithMultipleThreads = val;
else
{
std::string msg =
"Multi threaded filter not supported for " + std::string(typeid(*this).name());
VTKM_LOG_S(vtkm::cont::LogLevel::Info, msg);
}
}
// FIXME: Is this actually materialize? Are there different kinds of Invoker? // FIXME: Is this actually materialize? Are there different kinds of Invoker?
/// Specify the vtkm::cont::Invoker to be used to execute worklets by /// Specify the vtkm::cont::Invoker to be used to execute worklets by
@ -334,45 +379,136 @@ public:
protected: protected:
vtkm::cont::Invoker Invoke; vtkm::cont::Invoker Invoke;
/// \brief Create the output data set for `DoExecute`. /// @brief Create the output data set for `DoExecute`.
/// ///
/// This form of `CreateResult` will create an output data set with the same cell /// 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 /// structure and coordinate system as the input and pass all fields (as requested
/// by the `Filter` state). /// by the `Filter` state).
/// ///
/// \param[in] inDataSet The input data set being modified (usually the one passed into /// @param[in] inDataSet The input data set being modified (usually the one passed into
/// `DoExecute`). The returned `DataSet` is filled with the cell set, coordinate system, and /// `DoExecute`). The returned `DataSet` is filled with the cell set, coordinate system, and
/// fields of `inDataSet` (as selected by the `FieldsToPass` state of the filter). /// fields of `inDataSet` (as selected by the `FieldsToPass` state of the filter).
/// ///
VTKM_CONT vtkm::cont::DataSet CreateResult(const vtkm::cont::DataSet& inDataSet) const; VTKM_CONT vtkm::cont::DataSet CreateResult(const vtkm::cont::DataSet& inDataSet) const;
/// @brief 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.
///
/// @param[in] inDataSet The 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).
/// @param[in] resultField A `Field` that is added to the returned `DataSet`.
///
VTKM_CONT vtkm::cont::DataSet CreateResultField(const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::Field& resultField) const;
/// \brief Create the output data set for `DoExecute`. /// @brief 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.
///
/// @param[in] inDataSet The 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).
/// @param[in] resultFieldName The name of the field added to the returned `DataSet`.
/// @param[in] resultFieldAssociation The association of the field (e.g. point or cell)
/// added to the returned `DataSet`.
/// @param[in] resultFieldArray An array containing the data for the field added to the
/// returned `DataSet`.
///
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
{
return this->CreateResultField(
inDataSet, vtkm::cont::Field{ resultFieldName, resultFieldAssociation, resultFieldArray });
}
/// @brief 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.
///
/// @param[in] inDataSet The 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).
/// @param[in] resultFieldName The name of the field added to the returned `DataSet`.
/// @param[in] resultFieldArray An array containing the data for the field added to the
/// returned `DataSet`.
///
VTKM_CONT vtkm::cont::DataSet CreateResultFieldPoint(
const vtkm::cont::DataSet& inDataSet,
const std::string& resultFieldName,
const vtkm::cont::UnknownArrayHandle& resultFieldArray) const
{
return this->CreateResultField(inDataSet,
vtkm::cont::Field{ resultFieldName,
vtkm::cont::Field::Association::Points,
resultFieldArray });
}
/// @brief 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.
///
/// @param[in] inDataSet The 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).
/// @param[in] resultFieldName The name of the field added to the returned `DataSet`.
/// @param[in] resultFieldArray An array containing the data for the field added to the
/// returned `DataSet`.
///
VTKM_CONT vtkm::cont::DataSet CreateResultFieldCell(
const vtkm::cont::DataSet& inDataSet,
const std::string& resultFieldName,
const vtkm::cont::UnknownArrayHandle& resultFieldArray) const
{
return this->CreateResultField(inDataSet,
vtkm::cont::Field{ resultFieldName,
vtkm::cont::Field::Association::Cells,
resultFieldArray });
}
/// @brief Create the output data set for `DoExecute`.
/// ///
/// This form of `CreateResult` will create an output PartitionedDataSet with the /// This form of `CreateResult` will create an output PartitionedDataSet with the
/// same partitions and pass all PartitionedDataSet fields (as requested by the /// same partitions and pass all PartitionedDataSet fields (as requested by the
/// `Filter` state). /// `Filter` state).
/// ///
/// \param[in] input The input data set being modified (usually the one passed into /// @param[in] input The input data set being modified (usually the one passed into
/// `DoExecute`). /// `DoExecute`).
/// \param[in] resultPartitions The output data created by the filter. Fields from the input are /// @param[in] resultPartitions The output data created by the filter. Fields from the input are
/// passed onto the return result partition as requested by the `Filter` state. /// passed onto the return result partition as requested by the `Filter` state.
/// ///
VTKM_CONT vtkm::cont::PartitionedDataSet CreateResult( VTKM_CONT vtkm::cont::PartitionedDataSet CreateResult(
const vtkm::cont::PartitionedDataSet& input, const vtkm::cont::PartitionedDataSet& input,
const vtkm::cont::PartitionedDataSet& resultPartitions) const; const vtkm::cont::PartitionedDataSet& resultPartitions) const;
/// \brief Create the output data set for `DoExecute`. /// @brief Create the output data set for `DoExecute`.
/// ///
/// This form of `CreateResult` will create an output PartitionedDataSet with the /// This form of `CreateResult` will create an output PartitionedDataSet with the
/// same partitions and pass all PartitionedDataSet fields (as requested by the /// same partitions and pass all PartitionedDataSet fields (as requested by the
/// `Filter` state). /// `Filter` state).
/// ///
/// \param[in] input The input data set being modified (usually the one passed into /// @param[in] input The input data set being modified (usually the one passed into
/// `DoExecute`). /// `DoExecute`).
/// \param[in] resultPartitions The output data created by the filter. Fields from the input are /// @param[in] resultPartitions The output data created by the filter. Fields from the input are
/// passed onto the return result partition as requested by the `Filter` state. /// passed onto the return result partition as requested by the `Filter` state.
/// \param[in] fieldMapper A function or functor that takes a `PartitionedDataSet` as its first /// @param[in] fieldMapper A function or functor that takes a `PartitionedDataSet` as its first
/// argument and a `Field` as its second argument. The `PartitionedDataSet` is the data being /// argument and a `Field` as its second argument. The `PartitionedDataSet` is the data being
/// created and will eventually be returned by `CreateResult`. The `Field` comes from `input`. /// created and will eventually be returned by `CreateResult`. The `Field` comes from `input`.
/// ///
@ -387,18 +523,18 @@ protected:
return output; return output;
} }
/// \brief Create the output data set for `DoExecute`. /// @brief Create the output data set for `DoExecute`.
/// ///
/// This form of `CreateResult` will create an output data set with the given `CellSet`. You must /// This form of `CreateResult` will create an output data set with the given `CellSet`. You must
/// also provide a field mapper function, which is a function that takes the output `DataSet` /// also provide a field mapper function, which is a function that takes the output `DataSet`
/// being created and a `Field` from the input and then applies any necessary transformations to /// being created and a `Field` from the input and then applies any necessary transformations to
/// the field array and adds it to the `DataSet`. /// the field array and adds it to the `DataSet`.
/// ///
/// \param[in] inDataSet The input data set being modified (usually the one passed /// @param[in] inDataSet The input data set being modified (usually the one passed
/// into `DoExecute`). The returned `DataSet` is filled with fields of `inDataSet` /// into `DoExecute`). The returned `DataSet` is filled with fields of `inDataSet`
/// (as selected by the `FieldsToPass` state of the filter). /// (as selected by the `FieldsToPass` state of the filter).
/// \param[in] resultCellSet The `CellSet` of the output will be set to this. /// @param[in] resultCellSet The `CellSet` of the output will be set to this.
/// \param[in] fieldMapper A function or functor that takes a `DataSet` as its first /// @param[in] fieldMapper A function or functor that takes a `DataSet` as its first
/// argument and a `Field` as its second argument. The `DataSet` is the data being /// argument and a `Field` as its second argument. The `DataSet` is the data being
/// created and will eventually be returned by `CreateResult`. The `Field` comes from /// created and will eventually be returned by `CreateResult`. The `Field` comes from
/// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then /// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then
@ -416,7 +552,7 @@ protected:
return outDataSet; return outDataSet;
} }
/// \brief Create the output data set for `DoExecute`. /// @brief Create the output data set for `DoExecute`.
/// ///
/// This form of `CreateResult` will create an output data set with the given `CellSet` /// This form of `CreateResult` will create an output data set with the given `CellSet`
/// and `CoordinateSystem`. You must also provide a field mapper function, which is a /// and `CoordinateSystem`. You must also provide a field mapper function, which is a
@ -424,12 +560,12 @@ protected:
/// and then applies any necessary transformations to the field array and adds it to /// and then applies any necessary transformations to the field array and adds it to
/// the `DataSet`. /// the `DataSet`.
/// ///
/// \param[in] inDataSet The input data set being modified (usually the one passed /// @param[in] inDataSet The input data set being modified (usually the one passed
/// into `DoExecute`). The returned `DataSet` is filled with fields of `inDataSet` /// into `DoExecute`). The returned `DataSet` is filled with fields of `inDataSet`
/// (as selected by the `FieldsToPass` state of the filter). /// (as selected by the `FieldsToPass` state of the filter).
/// \param[in] resultCellSet The `CellSet` of the output will be set to this. /// @param[in] resultCellSet The `CellSet` of the output will be set to this.
/// \param[in] resultCoordSystem This `CoordinateSystem` will be added to the output. /// @param[in] resultCoordSystem This `CoordinateSystem` will be added to the output.
/// \param[in] fieldMapper A function or functor that takes a `DataSet` as its first /// @param[in] fieldMapper A function or functor that takes a `DataSet` as its first
/// argument and a `Field` as its second argument. The `DataSet` is the data being /// argument and a `Field` as its second argument. The `DataSet` is the data being
/// created and will eventually be returned by `CreateResult`. The `Field` comes from /// created and will eventually be returned by `CreateResult`. The `Field` comes from
/// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then /// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then
@ -455,7 +591,7 @@ protected:
return outDataSet; return outDataSet;
} }
/// \brief Create the output data set for `DoExecute`. /// @brief Create the output data set for `DoExecute`.
/// ///
/// This form of `CreateResult` will create an output data set with the given `CellSet` /// This form of `CreateResult` will create an output data set with the given `CellSet`
/// and `CoordinateSystem`. You must also provide a field mapper function, which is a /// and `CoordinateSystem`. You must also provide a field mapper function, which is a
@ -463,13 +599,13 @@ protected:
/// and then applies any necessary transformations to the field array and adds it to /// and then applies any necessary transformations to the field array and adds it to
/// the `DataSet`. /// the `DataSet`.
/// ///
/// \param[in] inDataSet The input data set being modified (usually the one passed /// @param[in] inDataSet The input data set being modified (usually the one passed
/// into `DoExecute`). The returned `DataSet` is filled with fields of `inDataSet` /// into `DoExecute`). The returned `DataSet` is filled with fields of `inDataSet`
/// (as selected by the `FieldsToPass` state of the filter). /// (as selected by the `FieldsToPass` state of the filter).
/// \param[in] resultCellSet The `CellSet` of the output will be set to this. /// @param[in] resultCellSet The `CellSet` of the output will be set to this.
/// \param[in] coordsName The name of the coordinate system to be added to the output. /// @param[in] coordsName The name of the coordinate system to be added to the output.
/// \param[in] coordsData The array containing the coordinates of the points. /// @param[in] coordsData The array containing the coordinates of the points.
/// \param[in] fieldMapper A function or functor that takes a `DataSet` as its first /// @param[in] fieldMapper A function or functor that takes a `DataSet` as its first
/// argument and a `Field` as its second argument. The `DataSet` is the data being /// argument and a `Field` as its second argument. The `DataSet` is the data being
/// created and will eventually be returned by `CreateResult`. The `Field` comes from /// created and will eventually be returned by `CreateResult`. The `Field` comes from
/// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then /// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then
@ -491,10 +627,143 @@ protected:
fieldMapper); fieldMapper);
} }
/// @brief Retrieve an input field from a `vtkm::cont::DataSet` object.
///
/// When a filter operates on fields, it should use this method to get the input fields that
/// the use has selected with `SetActiveField()` and related methods.
VTKM_CONT const vtkm::cont::Field& GetFieldFromDataSet(const vtkm::cont::DataSet& input) const
{
return this->GetFieldFromDataSet(0, input);
}
/// @copydoc GetFieldFromDataSet
VTKM_CONT const vtkm::cont::Field& GetFieldFromDataSet(vtkm::IdComponent index,
const vtkm::cont::DataSet& input) const
{
if (this->UseCoordinateSystemAsField[index])
{
// Note that we cannot use input.GetCoordinateSystem because that does not return
// a reference to a field. Instead, get the field name for the coordinate system
// and return the field.
const std::string& coordSystemName =
input.GetCoordinateSystemName(this->GetActiveCoordinateSystemIndex(index));
return input.GetPointField(coordSystemName);
}
else
{
return input.GetField(this->GetActiveFieldName(index),
this->GetActiveFieldAssociation(index));
}
}
VTKM_CONT virtual vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) = 0; VTKM_CONT virtual vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) = 0;
VTKM_CONT virtual vtkm::cont::PartitionedDataSet DoExecutePartitions( VTKM_CONT virtual vtkm::cont::PartitionedDataSet DoExecutePartitions(
const vtkm::cont::PartitionedDataSet& inData); const vtkm::cont::PartitionedDataSet& inData);
/// @brief Convenience method to get the array from a filter's input scalar field.
///
/// A field filter typically gets its input fields using the internal `GetFieldFromDataSet`.
/// To use this field in a worklet, it eventually needs to be converted to an
/// `vtkm::cont::ArrayHandle`. If the input field is limited to be a scalar field,
/// then this method provides a convenient way to determine the correct array type.
/// Like other `CastAndCall` methods, it takes as input a `vtkm::cont::Field` (or
/// `vtkm::cont::UnknownArrayHandle`) and a function/functor to call with the appropriate
/// `vtkm::cont::ArrayHandle` type.
///
template <typename Functor, typename... Args>
VTKM_CONT void CastAndCallScalarField(const vtkm::cont::UnknownArrayHandle& fieldArray,
Functor&& functor,
Args&&... args) const
{
fieldArray
.CastAndCallForTypesWithFloatFallback<vtkm::TypeListFieldScalar, VTKM_DEFAULT_STORAGE_LIST>(
std::forward<Functor>(functor), std::forward<Args>(args)...);
}
/// @copydoc CastAndCallScalarField
template <typename Functor, typename... Args>
VTKM_CONT void CastAndCallScalarField(const vtkm::cont::Field& field,
Functor&& functor,
Args&&... args) const
{
this->CastAndCallScalarField(
field.GetData(), std::forward<Functor>(functor), std::forward<Args>(args)...);
}
/// @brief Convenience method to get the array from a filter's input vector field.
///
/// A field filter typically gets its input fields using the internal `GetFieldFromDataSet`.
/// To use this field in a worklet, it eventually needs to be converted to an
/// `vtkm::cont::ArrayHandle`. If the input field is limited to be a vector field with
/// vectors of a specific size, then this method provides a convenient way to determine
/// the correct array type. Like other `CastAndCall` methods, it takes as input a
/// `vtkm::cont::Field` (or `vtkm::cont::UnknownArrayHandle`) and a function/functor to
/// call with the appropriate `vtkm::cont::ArrayHandle` type. You also have to provide the
/// vector size as the first template argument. For example
/// `CastAndCallVecField<3>(field, functor);`.
///
template <vtkm::IdComponent VecSize, typename Functor, typename... Args>
VTKM_CONT void CastAndCallVecField(const vtkm::cont::UnknownArrayHandle& fieldArray,
Functor&& functor,
Args&&... args) const
{
using VecList =
vtkm::ListTransform<vtkm::TypeListFieldScalar, ScalarToVec<VecSize>::template type>;
fieldArray.CastAndCallForTypesWithFloatFallback<VecList, VTKM_DEFAULT_STORAGE_LIST>(
std::forward<Functor>(functor), std::forward<Args>(args)...);
}
/// @copydoc CastAndCallVecField
template <vtkm::IdComponent VecSize, typename Functor, typename... Args>
VTKM_CONT void CastAndCallVecField(const vtkm::cont::Field& field,
Functor&& functor,
Args&&... args) const
{
this->CastAndCallVecField<VecSize>(
field.GetData(), std::forward<Functor>(functor), std::forward<Args>(args)...);
}
/// This method is like `CastAndCallVecField` except that it can be used for a
/// field of unknown vector size (or scalars). This method will call the given
/// functor with an `vtkm::cont::ArrayHandleRecombineVec`.
///
/// Note that there are limitations with using `vtkm::cont::ArrayHandleRecombineVec`
/// within a worklet. Because the size of the vectors are not known at compile time,
/// you cannot just create an intermediate `vtkm::Vec` of the correct size. Typically,
/// you must allocate the output array (for example, with
/// `vtkm::cont::ArrayHandleRuntimeVec`), and the worklet must iterate over the
/// components and store them in the prealocated output.
///
template <typename Functor, typename... Args>
VTKM_CONT void CastAndCallVariableVecField(const vtkm::cont::UnknownArrayHandle& fieldArray,
Functor&& functor,
Args&&... args) const
{
if (fieldArray.IsBaseComponentType<vtkm::Float32>())
{
functor(fieldArray.ExtractArrayFromComponents<vtkm::Float32>(), std::forward<Args>(args)...);
}
else if (fieldArray.IsBaseComponentType<vtkm::Float64>())
{
functor(fieldArray.ExtractArrayFromComponents<vtkm::Float64>(), std::forward<Args>(args)...);
}
else
{
// Field component type is not directly supported. Copy to floating point array.
vtkm::cont::UnknownArrayHandle floatArray = fieldArray.NewInstanceFloatBasic();
vtkm::cont::ArrayCopy(fieldArray, floatArray);
functor(floatArray.ExtractArrayFromComponents<vtkm::FloatDefault>(),
std::forward<Args>(args)...);
}
}
/// @copydoc CastAndCallVariableVecField
template <typename Functor, typename... Args>
VTKM_CONT void CastAndCallVariableVecField(const vtkm::cont::Field& field,
Functor&& functor,
Args&&... args) const
{
this->CastAndCallVariableVecField(
field.GetData(), std::forward<Functor>(functor), std::forward<Args>(args)...);
}
private: private:
template <typename FieldMapper> template <typename FieldMapper>
VTKM_CONT void MapFieldsOntoOutput(const vtkm::cont::DataSet& input, VTKM_CONT void MapFieldsOntoOutput(const vtkm::cont::DataSet& input,
@ -555,16 +824,37 @@ private:
} }
} }
template <vtkm::IdComponent VecSize>
struct ScalarToVec
{
template <typename T>
using type = vtkm::Vec<T, VecSize>;
};
VTKM_CONT VTKM_CONT
virtual vtkm::Id DetermineNumberOfThreads(const vtkm::cont::PartitionedDataSet& input); virtual vtkm::Id DetermineNumberOfThreads(const vtkm::cont::PartitionedDataSet& input);
void ResizeIfNeeded(size_t index_st);
vtkm::filter::FieldSelection FieldsToPass = vtkm::filter::FieldSelection::Mode::All; vtkm::filter::FieldSelection FieldsToPass = vtkm::filter::FieldSelection::Mode::All;
bool PassCoordinateSystems = true; bool PassCoordinateSystems = true;
bool RunFilterWithMultipleThreads = false; bool RunFilterWithMultipleThreads = false;
vtkm::Id NumThreadsPerCPU = 4; vtkm::Id NumThreadsPerCPU = 4;
vtkm::Id NumThreadsPerGPU = 8; vtkm::Id NumThreadsPerGPU = 8;
std::string OutputFieldName;
std::vector<std::string> ActiveFieldNames;
std::vector<vtkm::cont::Field::Association> ActiveFieldAssociation;
std::vector<bool> UseCoordinateSystemAsField;
std::vector<vtkm::Id> ActiveCoordinateSystemIndices;
}; };
class VTKM_DEPRECATED(2.2, "Inherit from `vtkm::cont::Filter` directly.") FilterField
: public vtkm::filter::Filter
{
};
} }
} // namespace vtkm::filter } // namespace vtkm::filter

@ -1,46 +0,0 @@
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#include <vtkm/filter/FilterField.h>
namespace vtkm
{
namespace filter
{
vtkm::cont::DataSet FilterField::CreateResultField(const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::Field& resultField) const
{
vtkm::cont::DataSet outDataSet = this->CreateResult(inDataSet);
outDataSet.AddField(resultField);
VTKM_ASSERT(!resultField.GetName().empty());
VTKM_ASSERT(outDataSet.HasField(resultField.GetName(), resultField.GetAssociation()));
return outDataSet;
}
void FilterField::ResizeIfNeeded(size_t index_st)
{
if (this->ActiveFieldNames.size() <= index_st)
{
auto oldSize = this->ActiveFieldNames.size();
this->ActiveFieldNames.resize(index_st + 1);
this->ActiveFieldAssociation.resize(index_st + 1);
this->UseCoordinateSystemAsField.resize(index_st + 1);
this->ActiveCoordinateSystemIndices.resize(index_st + 1);
for (std::size_t i = oldSize; i <= index_st; ++i)
{
this->ActiveFieldAssociation[i] = cont::Field::Association::Any;
this->UseCoordinateSystemAsField[i] = false;
this->ActiveCoordinateSystemIndices[i] = 0;
}
}
}
} // namespace filter
} // namespace vtkm

@ -13,373 +13,27 @@
#include <vtkm/filter/Filter.h> #include <vtkm/filter/Filter.h>
#include <vtkm/cont/ArrayCopy.h> #include <vtkm/Deprecated.h>
namespace vtkm namespace vtkm
{ {
namespace filter namespace filter
{ {
/// @brief A base class for filters that input and output fields. struct VTKM_DEPRECATED(
class VTKM_FILTER_CORE_EXPORT FilterField : public vtkm::filter::Filter 2.2,
"FilterField.h (and its class) are deprecated. Use Filter.h (and its class).")
vtkm_filter_FilterField_h_deprecated
{ {
public:
FilterField() { this->SetActiveCoordinateSystem(0); }
/// Specifies the name of the output field generated.
VTKM_CONT
void SetOutputFieldName(const std::string& name) { this->OutputFieldName = name; }
/// Specifies the name of the output field generated.
VTKM_CONT
const std::string& GetOutputFieldName() const { return this->OutputFieldName; }
/// Choose the field to operate on.
VTKM_CONT
void SetActiveField(
const std::string& name,
vtkm::cont::Field::Association association = vtkm::cont::Field::Association::Any)
{
this->SetActiveField(0, name, association);
}
/// Choose the field to operate on.
void SetActiveField(
vtkm::IdComponent index,
const std::string& name,
vtkm::cont::Field::Association association = vtkm::cont::Field::Association::Any)
{
auto index_st = static_cast<std::size_t>(index);
this->ResizeIfNeeded(index_st);
this->ActiveFieldNames[index_st] = name;
this->ActiveFieldAssociation[index_st] = association;
}
/// Choose the field to operate on.
VTKM_CONT const std::string& GetActiveFieldName(vtkm::IdComponent index = 0) const
{
VTKM_ASSERT((index >= 0) &&
(index < static_cast<vtkm::IdComponent>(this->ActiveFieldNames.size())));
return this->ActiveFieldNames[index];
}
/// Choose the field to operate on.
VTKM_CONT vtkm::cont::Field::Association GetActiveFieldAssociation(
vtkm::IdComponent index = 0) const
{
return this->ActiveFieldAssociation[index];
}
/// Select the coordinate system index to make active to use when processing the input
/// `vtkm::cont::DataSet`. This is used primarily by the Filter to select the
/// coordinate system to use as a field when `UseCoordinateSystemAsField` is true.
VTKM_CONT
void SetActiveCoordinateSystem(vtkm::Id coord_idx)
{
this->SetActiveCoordinateSystem(0, coord_idx);
}
/// Select the coordinate system index to make active to use when processing the input
/// `vtkm::cont::DataSet`. This is used primarily by the Filter to select the
/// coordinate system to use as a field when `UseCoordinateSystemAsField` is true.
VTKM_CONT
void SetActiveCoordinateSystem(vtkm::IdComponent index, vtkm::Id coord_idx)
{
auto index_st = static_cast<std::size_t>(index);
this->ResizeIfNeeded(index_st);
this->ActiveCoordinateSystemIndices[index_st] = coord_idx;
}
/// Select the coordinate system index to make active to use when processing the input
/// `vtkm::cont::DataSet`. This is used primarily by the Filter to select the
/// coordinate system to use as a field when `UseCoordinateSystemAsField` is true.
VTKM_CONT
vtkm::Id GetActiveCoordinateSystemIndex(vtkm::IdComponent index = 0) const
{
auto index_st = static_cast<std::size_t>(index);
return this->ActiveCoordinateSystemIndices[index_st];
}
/// Specifies whether to use point coordinates as the input field. When true, the values
/// for the active field are ignored and the active coordinate system is used instead.
VTKM_CONT
void SetUseCoordinateSystemAsField(bool val) { SetUseCoordinateSystemAsField(0, val); }
/// Specifies whether to use point coordinates as the input field. When true, the values
/// for the active field are ignored and the active coordinate system is used instead.
VTKM_CONT
void SetUseCoordinateSystemAsField(vtkm::IdComponent index, bool val)
{
auto index_st = static_cast<std::size_t>(index);
this->ResizeIfNeeded(index_st);
this->UseCoordinateSystemAsField[index] = val;
}
/// Specifies whether to use point coordinates as the input field. When true, the values
/// for the active field are ignored and the active coordinate system is used instead.
VTKM_CONT
bool GetUseCoordinateSystemAsField(vtkm::IdComponent index = 0) const
{
VTKM_ASSERT((index >= 0) &&
(index < static_cast<vtkm::IdComponent>(this->ActiveFieldNames.size())));
return this->UseCoordinateSystemAsField[index];
}
/// \brief Return the number of active fields currently set.
///
/// The general interface to `FilterField` allows a user to set an arbitrary number
/// of active fields (indexed 0 and on). This method returns the number of active
/// fields that are set. Note that the filter implementation is free to ignore
/// any active fields it does not support. Also note that an active field can be
/// set to be either a named field or a coordinate system.
vtkm::IdComponent GetNumberOfActiveFields() const
{
VTKM_ASSERT(this->ActiveFieldNames.size() == this->UseCoordinateSystemAsField.size());
return static_cast<vtkm::IdComponent>(this->UseCoordinateSystemAsField.size());
}
protected:
VTKM_CONT
const vtkm::cont::Field& GetFieldFromDataSet(const vtkm::cont::DataSet& input) const
{
return this->GetFieldFromDataSet(0, input);
}
VTKM_CONT
const vtkm::cont::Field& GetFieldFromDataSet(vtkm::IdComponent index,
const vtkm::cont::DataSet& input) const
{
if (this->UseCoordinateSystemAsField[index])
{
// Note that we cannot use input.GetCoordinateSystem because that does not return
// a reference to a field. Instead, get the field name for the coordinate system
// and return the field.
const std::string& coordSystemName =
input.GetCoordinateSystemName(this->GetActiveCoordinateSystemIndex(index));
return input.GetPointField(coordSystemName);
}
else
{
return input.GetField(this->GetActiveFieldName(index),
this->GetActiveFieldAssociation(index));
}
}
/// \brief Convenience method to get the array from a filter's input scalar field.
///
/// A field filter typically gets its input fields using the internal `GetFieldFromDataSet`.
/// To use this field in a worklet, it eventually needs to be converted to an
/// `vtkm::cont::ArrayHandle`. If the input field is limited to be a scalar field,
/// then this method provides a convenient way to determine the correct array type.
/// Like other `CastAndCall` methods, it takes as input a `vtkm::cont::Field` (or
/// `vtkm::cont::UnknownArrayHandle`) and a function/functor to call with the appropriate
/// `vtkm::cont::ArrayHandle` type.
///
template <typename Functor, typename... Args>
VTKM_CONT void CastAndCallScalarField(const vtkm::cont::UnknownArrayHandle& fieldArray,
Functor&& functor,
Args&&... args) const
{
fieldArray
.CastAndCallForTypesWithFloatFallback<vtkm::TypeListFieldScalar, VTKM_DEFAULT_STORAGE_LIST>(
std::forward<Functor>(functor), std::forward<Args>(args)...);
}
/// @copydoc CastAndCallScalarField
template <typename Functor, typename... Args>
VTKM_CONT void CastAndCallScalarField(const vtkm::cont::Field& field,
Functor&& functor,
Args&&... args) const
{
this->CastAndCallScalarField(
field.GetData(), std::forward<Functor>(functor), std::forward<Args>(args)...);
}
private:
template <vtkm::IdComponent VecSize>
struct ScalarToVec
{
template <typename T>
using type = vtkm::Vec<T, VecSize>;
};
protected:
/// \brief Convenience method to get the array from a filter's input vector field.
///
/// A field filter typically gets its input fields using the internal `GetFieldFromDataSet`.
/// To use this field in a worklet, it eventually needs to be converted to an
/// `vtkm::cont::ArrayHandle`. If the input field is limited to be a vector field with
/// vectors of a specific size, then this method provides a convenient way to determine
/// the correct array type. Like other `CastAndCall` methods, it takes as input a
/// `vtkm::cont::Field` (or `vtkm::cont::UnknownArrayHandle`) and a function/functor to
/// call with the appropriate `vtkm::cont::ArrayHandle` type. You also have to provide the
/// vector size as the first template argument. For example
/// `CastAndCallVecField<3>(field, functor);`.
///
template <vtkm::IdComponent VecSize, typename Functor, typename... Args>
VTKM_CONT void CastAndCallVecField(const vtkm::cont::UnknownArrayHandle& fieldArray,
Functor&& functor,
Args&&... args) const
{
using VecList =
vtkm::ListTransform<vtkm::TypeListFieldScalar, ScalarToVec<VecSize>::template type>;
fieldArray.CastAndCallForTypesWithFloatFallback<VecList, VTKM_DEFAULT_STORAGE_LIST>(
std::forward<Functor>(functor), std::forward<Args>(args)...);
}
/// @copydoc CastAndCallVecField
template <vtkm::IdComponent VecSize, typename Functor, typename... Args>
VTKM_CONT void CastAndCallVecField(const vtkm::cont::Field& field,
Functor&& functor,
Args&&... args) const
{
this->CastAndCallVecField<VecSize>(
field.GetData(), std::forward<Functor>(functor), std::forward<Args>(args)...);
}
/// This method is like `CastAndCallVecField` except that it can be used for a
/// field of unknown vector size (or scalars). This method will call the given
/// functor with an `vtkm::cont::ArrayHandleRecombineVec`.
///
/// Note that there are limitations with using `vtkm::cont::ArrayHandleRecombineVec`
/// within a worklet. Because the size of the vectors are not known at compile time,
/// you cannot just create an intermediate `vtkm::Vec` of the correct size. Typically,
/// you must allocate the output array (for example, with
/// `vtkm::cont::ArrayHandleRuntimeVec`), and the worklet must iterate over the
/// components and store them in the prealocated output.
///
template <typename Functor, typename... Args>
VTKM_CONT void CastAndCallVariableVecField(const vtkm::cont::UnknownArrayHandle& fieldArray,
Functor&& functor,
Args&&... args) const
{
if (fieldArray.IsBaseComponentType<vtkm::Float32>())
{
functor(fieldArray.ExtractArrayFromComponents<vtkm::Float32>(), std::forward<Args>(args)...);
}
else if (fieldArray.IsBaseComponentType<vtkm::Float64>())
{
functor(fieldArray.ExtractArrayFromComponents<vtkm::Float64>(), std::forward<Args>(args)...);
}
else
{
// Field component type is not directly supported. Copy to floating point array.
vtkm::cont::UnknownArrayHandle floatArray = fieldArray.NewInstanceFloatBasic();
vtkm::cont::ArrayCopy(fieldArray, floatArray);
functor(floatArray.ExtractArrayFromComponents<vtkm::FloatDefault>(),
std::forward<Args>(args)...);
}
}
/// @copydoc CastAndCallVariableVecField
template <typename Functor, typename... Args>
VTKM_CONT void CastAndCallVariableVecField(const vtkm::cont::Field& field,
Functor&& functor,
Args&&... args) const
{
this->CastAndCallVariableVecField(
field.GetData(), std::forward<Functor>(functor), std::forward<Args>(args)...);
}
/// \brief 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.
///
/// \param[in] inDataSet The 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).
/// \param[in] resultField A `Field` that is added to the returned `DataSet`.
///
VTKM_CONT vtkm::cont::DataSet CreateResultField(const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::Field& resultField) const;
/// \brief 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.
///
/// \param[in] inDataSet The 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).
/// \param[in] resultFieldName The name of the field added to the returned `DataSet`.
/// \param[in] resultFieldAssociation The association of the field (e.g. point or cell)
/// added to the returned `DataSet`.
/// \param[in] resultFieldArray An array containing the data for the field added to the
/// returned `DataSet`.
///
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
{
return this->CreateResultField(
inDataSet, vtkm::cont::Field{ resultFieldName, resultFieldAssociation, resultFieldArray });
}
/// \brief 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.
///
/// \param[in] inDataSet The 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).
/// \param[in] resultFieldName The name of the field added to the returned `DataSet`.
/// \param[in] resultFieldArray An array containing the data for the field added to the
/// returned `DataSet`.
///
VTKM_CONT vtkm::cont::DataSet CreateResultFieldPoint(
const vtkm::cont::DataSet& inDataSet,
const std::string& resultFieldName,
const vtkm::cont::UnknownArrayHandle& resultFieldArray) const
{
return this->CreateResultField(inDataSet,
vtkm::cont::Field{ resultFieldName,
vtkm::cont::Field::Association::Points,
resultFieldArray });
}
/// \brief 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.
///
/// \param[in] inDataSet The 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).
/// \param[in] resultFieldName The name of the field added to the returned `DataSet`.
/// \param[in] resultFieldArray An array containing the data for the field added to the
/// returned `DataSet`.
///
VTKM_CONT vtkm::cont::DataSet CreateResultFieldCell(
const vtkm::cont::DataSet& inDataSet,
const std::string& resultFieldName,
const vtkm::cont::UnknownArrayHandle& resultFieldArray) const
{
return this->CreateResultField(inDataSet,
vtkm::cont::Field{ resultFieldName,
vtkm::cont::Field::Association::Cells,
resultFieldArray });
}
private:
void ResizeIfNeeded(size_t index_st);
std::string OutputFieldName;
std::vector<std::string> ActiveFieldNames;
std::vector<vtkm::cont::Field::Association> ActiveFieldAssociation;
std::vector<bool> UseCoordinateSystemAsField;
std::vector<vtkm::Id> ActiveCoordinateSystemIndices;
}; };
static vtkm_filter_FilterField_h_deprecated issue_deprecated_warning_filterfield()
{
vtkm_filter_FilterField_h_deprecated x;
return x;
}
} // namespace filter } // namespace filter
} // namespace vtkm } // namespace vtkm

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_clean_grid_CleanGrid_h #ifndef vtk_m_filter_clean_grid_CleanGrid_h
#define vtk_m_filter_clean_grid_CleanGrid_h #define vtk_m_filter_clean_grid_CleanGrid_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/clean_grid/vtkm_filter_clean_grid_export.h> #include <vtkm/filter/clean_grid/vtkm_filter_clean_grid_export.h>
namespace vtkm namespace vtkm
@ -39,7 +39,7 @@ struct SharedStates;
/// by the coordinate system. If there are multiple coordinate systems, the desired /// by the coordinate system. If there are multiple coordinate systems, the desired
/// coordinate system can be selected with the `SetActiveCoordinateSystem()` method. /// coordinate system can be selected with the `SetActiveCoordinateSystem()` method.
/// ///
class VTKM_FILTER_CLEAN_GRID_EXPORT CleanGrid : public vtkm::filter::FilterField class VTKM_FILTER_CLEAN_GRID_EXPORT CleanGrid : public vtkm::filter::Filter
{ {
public: public:
/// When the CompactPointFields flag is true, the filter will identify and remove any /// When the CompactPointFields flag is true, the filter will identify and remove any

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_connected_components_CellSetConnectivity_h #ifndef vtk_m_filter_connected_components_CellSetConnectivity_h
#define vtk_m_filter_connected_components_CellSetConnectivity_h #define vtk_m_filter_connected_components_CellSetConnectivity_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/connected_components/vtkm_filter_connected_components_export.h> #include <vtkm/filter/connected_components/vtkm_filter_connected_components_export.h>
namespace vtkm namespace vtkm
@ -29,7 +29,7 @@ namespace connected_components
/// The result of the filter is a cell field of type `vtkm::Id` with the default name of /// The result of the filter is a cell field of type `vtkm::Id` with the default name of
/// "component" (which can be changed with the `SetOutputFieldName` method). Each entry in /// "component" (which can be changed with the `SetOutputFieldName` method). Each entry in
/// the cell field will be a number that identifies to which component the cell belongs. /// the cell field will be a number that identifies to which component the cell belongs.
class VTKM_FILTER_CONNECTED_COMPONENTS_EXPORT CellSetConnectivity : public vtkm::filter::FilterField class VTKM_FILTER_CONNECTED_COMPONENTS_EXPORT CellSetConnectivity : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT CellSetConnectivity() { this->SetOutputFieldName("component"); } VTKM_CONT CellSetConnectivity() { this->SetOutputFieldName("component"); }

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_connected_components_ImageConnectivity_h #ifndef vtk_m_filter_connected_components_ImageConnectivity_h
#define vtk_m_filter_connected_components_ImageConnectivity_h #define vtk_m_filter_connected_components_ImageConnectivity_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/connected_components/vtkm_filter_connected_components_export.h> #include <vtkm/filter/connected_components/vtkm_filter_connected_components_export.h>
/// \brief Groups connected points that have the same field value. /// \brief Groups connected points that have the same field value.
@ -32,7 +32,7 @@ namespace filter
{ {
namespace connected_components namespace connected_components
{ {
class VTKM_FILTER_CONNECTED_COMPONENTS_EXPORT ImageConnectivity : public vtkm::filter::FilterField class VTKM_FILTER_CONNECTED_COMPONENTS_EXPORT ImageConnectivity : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT ImageConnectivity() { this->SetOutputFieldName("component"); } VTKM_CONT ImageConnectivity() { this->SetOutputFieldName("component"); }

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_contour_AbstractContour_h #ifndef vtk_m_filter_contour_AbstractContour_h
#define vtk_m_filter_contour_AbstractContour_h #define vtk_m_filter_contour_AbstractContour_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/MapFieldPermutation.h> #include <vtkm/filter/MapFieldPermutation.h>
#include <vtkm/filter/contour/vtkm_filter_contour_export.h> #include <vtkm/filter/contour/vtkm_filter_contour_export.h>
#include <vtkm/filter/vector_analysis/SurfaceNormals.h> #include <vtkm/filter/vector_analysis/SurfaceNormals.h>
@ -26,7 +26,7 @@ namespace contour
/// ///
/// Provides common configuration & execution methods for contour filters /// Provides common configuration & execution methods for contour filters
/// Only the method `DoExecute` executing the contour algorithm needs to be implemented /// Only the method `DoExecute` executing the contour algorithm needs to be implemented
class VTKM_FILTER_CONTOUR_EXPORT AbstractContour : public vtkm::filter::FilterField class VTKM_FILTER_CONTOUR_EXPORT AbstractContour : public vtkm::filter::Filter
{ {
public: public:
void SetNumberOfIsoValues(vtkm::Id num) void SetNumberOfIsoValues(vtkm::Id num)

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_contour_ClipWithField_h #ifndef vtk_m_filter_contour_ClipWithField_h
#define vtk_m_filter_contour_ClipWithField_h #define vtk_m_filter_contour_ClipWithField_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/contour/vtkm_filter_contour_export.h> #include <vtkm/filter/contour/vtkm_filter_contour_export.h>
namespace vtkm namespace vtkm
@ -28,7 +28,7 @@ namespace contour
/// ///
/// To select the scalar field, use the `SetActiveField()` and related methods. /// To select the scalar field, use the `SetActiveField()` and related methods.
/// ///
class VTKM_FILTER_CONTOUR_EXPORT ClipWithField : public vtkm::filter::FilterField class VTKM_FILTER_CONTOUR_EXPORT ClipWithField : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the field value for the clip operation. /// @brief Specifies the field value for the clip operation.

@ -12,7 +12,7 @@
#include <vtkm/ImplicitFunction.h> #include <vtkm/ImplicitFunction.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/contour/vtkm_filter_contour_export.h> #include <vtkm/filter/contour/vtkm_filter_contour_export.h>
namespace vtkm namespace vtkm
@ -27,7 +27,7 @@ namespace contour
/// or `vtkm::Frustum`. The implicit function uses the point coordinates as its values. /// or `vtkm::Frustum`. The implicit function uses the point coordinates as its values.
/// If there is more than one coordinate system in the input `vtkm::cont::DataSet`, /// If there is more than one coordinate system in the input `vtkm::cont::DataSet`,
/// it can be selected with `SetActiveCoordinateSystem()`. /// it can be selected with `SetActiveCoordinateSystem()`.
class VTKM_FILTER_CONTOUR_EXPORT ClipWithImplicitFunction : public vtkm::filter::FilterField class VTKM_FILTER_CONTOUR_EXPORT ClipWithImplicitFunction : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the implicit function to be used to perform the clip operation. /// @brief Specifies the implicit function to be used to perform the clip operation.

@ -11,7 +11,7 @@
#ifndef vtkm_m_filter_contour_MIRFilter_h #ifndef vtkm_m_filter_contour_MIRFilter_h
#define vtkm_m_filter_contour_MIRFilter_h #define vtkm_m_filter_contour_MIRFilter_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/contour/vtkm_filter_contour_export.h> #include <vtkm/filter/contour/vtkm_filter_contour_export.h>
namespace vtkm namespace vtkm
@ -48,7 +48,7 @@ namespace contour
/// total error % of the entire dataset is less than the specified amount (defaults to 1.0, returns after first iteration). Finally, /// total error % of the entire dataset is less than the specified amount (defaults to 1.0, returns after first iteration). Finally,
/// the error scaling and scaling decay allows for setting how much the cell VFs should react to the delta between target and calculated cell VFs. /// the error scaling and scaling decay allows for setting how much the cell VFs should react to the delta between target and calculated cell VFs.
/// the error scaling will decay by the decay variable every iteration (multiplicitively). /// the error scaling will decay by the decay variable every iteration (multiplicitively).
class VTKM_FILTER_CONTOUR_EXPORT MIRFilter : public vtkm::filter::FilterField class VTKM_FILTER_CONTOUR_EXPORT MIRFilter : public vtkm::filter::Filter
{ {
public: public:
/// @brief Sets the name of the offset/position cellset field in the dataset passed to the filter /// @brief Sets the name of the offset/position cellset field in the dataset passed to the filter

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_density_estimate_ContinuousScatterPlot_h #ifndef vtk_m_filter_density_estimate_ContinuousScatterPlot_h
#define vtk_m_filter_density_estimate_ContinuousScatterPlot_h #define vtk_m_filter_density_estimate_ContinuousScatterPlot_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h> #include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h>
namespace vtkm namespace vtkm
@ -36,7 +36,7 @@ namespace density_estimate
/// vol. 14, no. 6, pp. 1428-1435, Nov.-Dec. 2008 /// vol. 14, no. 6, pp. 1428-1435, Nov.-Dec. 2008
/// doi: 10.1109/TVCG.2008.119. /// doi: 10.1109/TVCG.2008.119.
class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT ContinuousScatterPlot : public vtkm::filter::FilterField class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT ContinuousScatterPlot : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT ContinuousScatterPlot() { this->SetOutputFieldName("density"); } VTKM_CONT ContinuousScatterPlot() { this->SetOutputFieldName("density"); }

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_density_estimate_Entropy_h #ifndef vtk_m_filter_density_estimate_Entropy_h
#define vtk_m_filter_density_estimate_Entropy_h #define vtk_m_filter_density_estimate_Entropy_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h> #include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h>
namespace vtkm namespace vtkm
@ -24,7 +24,7 @@ namespace density_estimate
/// ///
/// Construct a histogram which is used to compute the entropy with a default of 10 bins /// Construct a histogram which is used to compute the entropy with a default of 10 bins
/// ///
class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Entropy : public vtkm::filter::FilterField class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Entropy : public vtkm::filter::Filter
{ {
public: public:
//currently the Entropy filter only works on scalar data. //currently the Entropy filter only works on scalar data.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_density_estimate_Histogram_h #ifndef vtk_m_filter_density_estimate_Histogram_h
#define vtk_m_filter_density_estimate_Histogram_h #define vtk_m_filter_density_estimate_Histogram_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h> #include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h>
namespace vtkm namespace vtkm
@ -37,7 +37,7 @@ namespace density_estimate
/// `vtkm::cont::PartitionedDataSet` containing a single /// `vtkm::cont::PartitionedDataSet` containing a single
/// `vtkm::cont::DataSet` as previously described. /// `vtkm::cont::DataSet` as previously described.
/// ///
class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Histogram : public vtkm::filter::FilterField class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Histogram : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT Histogram(); VTKM_CONT Histogram();

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_density_estimate_NDEntropy_h #ifndef vtk_m_filter_density_estimate_NDEntropy_h
#define vtk_m_filter_density_estimate_NDEntropy_h #define vtk_m_filter_density_estimate_NDEntropy_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h> #include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h>
namespace vtkm namespace vtkm
@ -23,7 +23,7 @@ namespace density_estimate
/// ///
/// This filter calculate the entropy of input N-Dims fields. /// This filter calculate the entropy of input N-Dims fields.
/// ///
class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT NDEntropy : public vtkm::filter::FilterField class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT NDEntropy : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_density_estimate_NDHistogram_h #ifndef vtk_m_filter_density_estimate_NDHistogram_h
#define vtk_m_filter_density_estimate_NDHistogram_h #define vtk_m_filter_density_estimate_NDHistogram_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h> #include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h>
namespace vtkm namespace vtkm
@ -31,7 +31,7 @@ namespace density_estimate
/// The first three numbers are binIDs for FieldA, FieldB and FieldC. Frequency[i] stores /// The first three numbers are binIDs for FieldA, FieldB and FieldC. Frequency[i] stores
/// the frequency for this bin (FieldA[i], FieldB[i], FieldC[i]). /// the frequency for this bin (FieldA[i], FieldB[i], FieldC[i]).
/// ///
class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT NDHistogram : public vtkm::filter::FilterField class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT NDHistogram : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_density_estimate_ParticleDensityBase_h #ifndef vtk_m_filter_density_estimate_ParticleDensityBase_h
#define vtk_m_filter_density_estimate_ParticleDensityBase_h #define vtk_m_filter_density_estimate_ParticleDensityBase_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h> #include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h>
namespace vtkm namespace vtkm
@ -20,7 +20,7 @@ namespace filter
{ {
namespace density_estimate namespace density_estimate
{ {
class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT ParticleDensityBase : public vtkm::filter::FilterField class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT ParticleDensityBase : public vtkm::filter::Filter
{ {
protected: protected:
ParticleDensityBase() = default; ParticleDensityBase() = default;

@ -195,7 +195,7 @@ VTKM_CONT vtkm::cont::PartitionedDataSet Statistics::DoExecutePartitions(
// containing the local statistics. It will iterate through each partition in the input and call the // containing the local statistics. It will iterate through each partition in the input and call the
// DoExecute function. This is the same behavior as if we did not implement `DoExecutePartitions`. // DoExecute function. This is the same behavior as if we did not implement `DoExecutePartitions`.
// It has the added benefit of optimizations for concurrently executing small blocks. // It has the added benefit of optimizations for concurrently executing small blocks.
vtkm::cont::PartitionedDataSet output = this->FilterField::DoExecutePartitions(input); vtkm::cont::PartitionedDataSet output = this->Filter::DoExecutePartitions(input);
vtkm::Id numPartitions = input.GetNumberOfPartitions(); vtkm::Id numPartitions = input.GetNumberOfPartitions();
DistributedStatistics helper(numPartitions); DistributedStatistics helper(numPartitions);
for (vtkm::Id i = 0; i < numPartitions; ++i) for (vtkm::Id i = 0; i < numPartitions; ++i)

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_density_estimate_Statistics_h #ifndef vtk_m_filter_density_estimate_Statistics_h
#define vtk_m_filter_density_estimate_Statistics_h #define vtk_m_filter_density_estimate_Statistics_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h> #include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h>
namespace vtkm namespace vtkm
@ -65,7 +65,7 @@ namespace density_estimate
/// `vtkm::cont::DataSet` can be computed by creating a `vtkm::cont::PartitionedDataSet` /// `vtkm::cont::DataSet` can be computed by creating a `vtkm::cont::PartitionedDataSet`
/// with that as a single partition. /// with that as a single partition.
/// ///
class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Statistics : public vtkm::filter::FilterField class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Statistics : public vtkm::filter::Filter
{ {
private: private:
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;

@ -11,7 +11,7 @@
#ifndef vtkm_filter_entity_extraction_ExternalFaces_h #ifndef vtkm_filter_entity_extraction_ExternalFaces_h
#define vtkm_filter_entity_extraction_ExternalFaces_h #define vtkm_filter_entity_extraction_ExternalFaces_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace entity_extraction
/// data set. An external face is defined is defined as a face/side of a cell /// data set. An external face is defined is defined as a face/side of a cell
/// that belongs only to one cell in the entire mesh. /// that belongs only to one cell in the entire mesh.
/// ///
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExternalFaces : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExternalFaces : public vtkm::filter::Filter
{ {
public: public:
ExternalFaces(); ExternalFaces();

@ -12,7 +12,7 @@
#define vtk_m_fulter_entity_extraction_ExtractGeometry_h #define vtk_m_fulter_entity_extraction_ExtractGeometry_h
#include <vtkm/ImplicitFunction.h> #include <vtkm/ImplicitFunction.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -38,7 +38,7 @@ namespace entity_extraction
/// cells into new cells whereas this filter will not, producing a more "crinkly" /// cells into new cells whereas this filter will not, producing a more "crinkly"
/// output. /// output.
/// ///
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractGeometry : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractGeometry : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the implicit function to be used to perform extract geometry. /// @brief Specifies the implicit function to be used to perform extract geometry.

@ -13,7 +13,7 @@
#include <vtkm/ImplicitFunction.h> #include <vtkm/ImplicitFunction.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -31,7 +31,7 @@ namespace entity_extraction
/// Note that while any geometry type can be provided as input, the output is /// Note that while any geometry type can be provided as input, the output is
/// represented by an explicit representation of points using /// represented by an explicit representation of points using
/// `vtkm::cont::CellSetSingleType` with one vertex cell per point. /// `vtkm::cont::CellSetSingleType` with one vertex cell per point.
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractPoints : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractPoints : public vtkm::filter::Filter
{ {
public: public:
/// @brief Option to remove unused points and compact result int a smaller array. /// @brief Option to remove unused points and compact result int a smaller array.

@ -12,7 +12,7 @@
#define vtk_m_filter_entity_extraction_ExtractStructured_h #define vtk_m_filter_entity_extraction_ExtractStructured_h
#include <vtkm/RangeId3.h> #include <vtkm/RangeId3.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -37,7 +37,7 @@ namespace entity_extraction
/// for image processing, subsampling large volumes to reduce data size, or /// for image processing, subsampling large volumes to reduce data size, or
/// extracting regions of a volume with interesting data. /// extracting regions of a volume with interesting data.
/// ///
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractStructured : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractStructured : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies what volume of interest (VOI) should be extracted by the filter. /// @brief Specifies what volume of interest (VOI) should be extracted by the filter.

@ -13,7 +13,7 @@
#include <vtkm/CellClassification.h> #include <vtkm/CellClassification.h>
#include <vtkm/Deprecated.h> #include <vtkm/Deprecated.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -35,7 +35,7 @@ namespace entity_extraction
/// boundary are marked as ghost cells together, which is common. If creating a /// boundary are marked as ghost cells together, which is common. If creating a
/// structured data set is not possible, an explicit data set is produced. /// structured data set is not possible, an explicit data set is produced.
/// ///
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT GhostCellRemove : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT GhostCellRemove : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT GhostCellRemove(); VTKM_CONT GhostCellRemove();

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_entity_extraction_Mask_h #ifndef vtk_m_filter_entity_extraction_Mask_h
#define vtk_m_filter_entity_extraction_Mask_h #define vtk_m_filter_entity_extraction_Mask_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -23,7 +23,7 @@ namespace entity_extraction
/// \brief Subselect cells using a stride /// \brief Subselect cells using a stride
/// ///
/// Extract only every Nth cell where N is equal to a stride value /// Extract only every Nth cell where N is equal to a stride value
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT Mask : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT Mask : public vtkm::filter::Filter
{ {
public: public:
// When CompactPoints is set, instead of copying the points and point fields // When CompactPoints is set, instead of copying the points and point fields

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_entity_extraction_MaskPoints_h #ifndef vtk_m_filter_entity_extraction_MaskPoints_h
#define vtk_m_filter_entity_extraction_MaskPoints_h #define vtk_m_filter_entity_extraction_MaskPoints_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -23,7 +23,7 @@ namespace entity_extraction
/// \brief Subselect points using a stride /// \brief Subselect points using a stride
/// ///
/// Extract only every Nth point where N is equal to a stride value /// Extract only every Nth point where N is equal to a stride value
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT MaskPoints : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT MaskPoints : public vtkm::filter::Filter
{ {
public: public:
// When CompactPoints is set, instead of copying the points and point fields // When CompactPoints is set, instead of copying the points and point fields

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_entity_extraction_Threshold_h #ifndef vtk_m_filter_entity_extraction_Threshold_h
#define vtk_m_filter_entity_extraction_Threshold_h #define vtk_m_filter_entity_extraction_Threshold_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -37,7 +37,7 @@ namespace entity_extraction
/// methods for more information. /// methods for more information.
/// ///
/// Use `SetActiveField()` and related methods to set the field to threshold on. /// Use `SetActiveField()` and related methods to set the field to threshold on.
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT Threshold : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT Threshold : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the lower scalar value. /// @brief Specifies the lower scalar value.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_entity_extraction_ThresholdPoints_h #ifndef vtk_m_filter_entity_extraction_ThresholdPoints_h
#define vtk_m_filter_entity_extraction_ThresholdPoints_h #define vtk_m_filter_entity_extraction_ThresholdPoints_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h> #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
namespace vtkm namespace vtkm
@ -20,7 +20,7 @@ namespace filter
{ {
namespace entity_extraction namespace entity_extraction
{ {
class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ThresholdPoints : public vtkm::filter::FilterField class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ThresholdPoints : public vtkm::filter::Filter
{ {
public: public:
// When CompactPoints is set, instead of copying the points and point fields // When CompactPoints is set, instead of copying the points and point fields

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_field_conversion_CellAverage_h #ifndef vtk_m_filter_field_conversion_CellAverage_h
#define vtk_m_filter_field_conversion_CellAverage_h #define vtk_m_filter_field_conversion_CellAverage_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_conversion/vtkm_filter_field_conversion_export.h> #include <vtkm/filter/field_conversion/vtkm_filter_field_conversion_export.h>
namespace vtkm namespace vtkm
@ -32,7 +32,7 @@ namespace field_conversion
/// point field. The name can be overridden as always using the /// point field. The name can be overridden as always using the
/// `SetOutputFieldName()` method. /// `SetOutputFieldName()` method.
/// ///
class VTKM_FILTER_FIELD_CONVERSION_EXPORT CellAverage : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_CONVERSION_EXPORT CellAverage : public vtkm::filter::Filter
{ {
private: private:
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_field_conversion_PointAverage_h #ifndef vtk_m_filter_field_conversion_PointAverage_h
#define vtk_m_filter_field_conversion_PointAverage_h #define vtk_m_filter_field_conversion_PointAverage_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_conversion/vtkm_filter_field_conversion_export.h> #include <vtkm/filter/field_conversion/vtkm_filter_field_conversion_export.h>
namespace vtkm namespace vtkm
@ -32,7 +32,7 @@ namespace field_conversion
/// point field. The name can be overridden as always using the /// point field. The name can be overridden as always using the
/// `SetOutputFieldName()` method. /// `SetOutputFieldName()` method.
/// ///
class VTKM_FILTER_FIELD_CONVERSION_EXPORT PointAverage : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_CONVERSION_EXPORT PointAverage : public vtkm::filter::Filter
{ {
private: private:
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_field_transform_CompositeVectors_h #ifndef vtk_m_filter_field_transform_CompositeVectors_h
#define vtk_m_filter_field_transform_CompositeVectors_h #define vtk_m_filter_field_transform_CompositeVectors_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h> #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace field_transform
/// All of the input fields must be scalar values. The type of the first field /// All of the input fields must be scalar values. The type of the first field
/// determines the type of the output vector field. /// determines the type of the output vector field.
/// ///
class VTKM_FILTER_FIELD_TRANSFORM_EXPORT CompositeVectors : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_TRANSFORM_EXPORT CompositeVectors : public vtkm::filter::Filter
{ {
public: public:

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_field_transform_CylindricalCoordinateTransform_h #ifndef vtk_m_filter_field_transform_CylindricalCoordinateTransform_h
#define vtk_m_filter_field_transform_CylindricalCoordinateTransform_h #define vtk_m_filter_field_transform_CylindricalCoordinateTransform_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h> #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace field_transform
/// in the output. /// in the output.
/// ///
class VTKM_FILTER_FIELD_TRANSFORM_EXPORT CylindricalCoordinateTransform class VTKM_FILTER_FIELD_TRANSFORM_EXPORT CylindricalCoordinateTransform
: public vtkm::filter::FilterField : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT CylindricalCoordinateTransform(); VTKM_CONT CylindricalCoordinateTransform();

@ -12,7 +12,7 @@
#define vtk_m_filter_field_transform_FieldToColors_h #define vtk_m_filter_field_transform_FieldToColors_h
#include <vtkm/cont/ColorTable.h> #include <vtkm/cont/ColorTable.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h> #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
namespace vtkm namespace vtkm
@ -26,7 +26,7 @@ namespace field_transform
/// This filter is useful for generating colors that could be used for rendering or /// This filter is useful for generating colors that could be used for rendering or
/// other purposes. /// other purposes.
/// ///
class VTKM_FILTER_FIELD_TRANSFORM_EXPORT FieldToColors : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_TRANSFORM_EXPORT FieldToColors : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_field_transform_LogValues_h #ifndef vtk_m_filter_field_transform_LogValues_h
#define vtk_m_filter_field_transform_LogValues_h #define vtk_m_filter_field_transform_LogValues_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h> #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
namespace vtkm namespace vtkm
@ -32,7 +32,7 @@ namespace field_transform
/// smallest numbers comparatively hard to see. Thus, `LogValues` supports setting a /// smallest numbers comparatively hard to see. Thus, `LogValues` supports setting a
/// minimum value (with `SetMinValue()`) that will clamp any smaller values to that. /// minimum value (with `SetMinValue()`) that will clamp any smaller values to that.
/// ///
class VTKM_FILTER_FIELD_TRANSFORM_EXPORT LogValues : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_TRANSFORM_EXPORT LogValues : public vtkm::filter::Filter
{ {
public: public:
/// @brief Identifies a type of logarithm as specified by its base. /// @brief Identifies a type of logarithm as specified by its base.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_field_transform_PointElevation_h #ifndef vtk_m_filter_field_transform_PointElevation_h
#define vtk_m_filter_field_transform_PointElevation_h #define vtk_m_filter_field_transform_PointElevation_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h> #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
namespace vtkm namespace vtkm
@ -32,7 +32,7 @@ namespace field_transform
/// ///
/// The default name for the output field is ``elevation'', but that can be /// The default name for the output field is ``elevation'', but that can be
/// overridden as always using the `SetOutputFieldName()` method. /// overridden as always using the `SetOutputFieldName()` method.
class VTKM_FILTER_FIELD_TRANSFORM_EXPORT PointElevation : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_TRANSFORM_EXPORT PointElevation : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT PointElevation(); VTKM_CONT PointElevation();

@ -14,7 +14,7 @@
#include <vtkm/Matrix.h> #include <vtkm/Matrix.h>
#include <vtkm/Transform3D.h> #include <vtkm/Transform3D.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h> #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
namespace vtkm namespace vtkm
@ -40,7 +40,7 @@ namespace field_transform
/// The default name for the output field is "transform", but that can be overridden as /// The default name for the output field is "transform", but that can be overridden as
/// always using the `SetOutputFieldName()` method. /// always using the `SetOutputFieldName()` method.
/// ///
class VTKM_FILTER_FIELD_TRANSFORM_EXPORT PointTransform : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_TRANSFORM_EXPORT PointTransform : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_field_transform_SphericalCoordinateTransform_h #ifndef vtk_m_filter_field_transform_SphericalCoordinateTransform_h
#define vtk_m_filter_field_transform_SphericalCoordinateTransform_h #define vtk_m_filter_field_transform_SphericalCoordinateTransform_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h> #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
namespace vtkm namespace vtkm
@ -29,8 +29,7 @@ namespace field_transform
/// The resulting transformation will be set as the first coordinate system /// The resulting transformation will be set as the first coordinate system
/// in the output. /// in the output.
/// ///
class VTKM_FILTER_FIELD_TRANSFORM_EXPORT SphericalCoordinateTransform class VTKM_FILTER_FIELD_TRANSFORM_EXPORT SphericalCoordinateTransform : public vtkm::filter::Filter
: public vtkm::filter::FilterField
{ {
public: public:
VTKM_CONT SphericalCoordinateTransform(); VTKM_CONT SphericalCoordinateTransform();

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_field_transform_Warp_h #ifndef vtk_m_filter_field_transform_Warp_h
#define vtk_m_filter_field_transform_Warp_h #define vtk_m_filter_field_transform_Warp_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h> #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
namespace vtkm namespace vtkm
@ -50,7 +50,7 @@ namespace field_transform
/// this filter will save its results as the first coordinate system in the output /// this filter will save its results as the first coordinate system in the output
/// unless `SetChangeCoordinateSystem()` is set to say otherwise. /// unless `SetChangeCoordinateSystem()` is set to say otherwise.
/// ///
class VTKM_FILTER_FIELD_TRANSFORM_EXPORT Warp : public vtkm::filter::FilterField class VTKM_FILTER_FIELD_TRANSFORM_EXPORT Warp : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT Warp(); VTKM_CONT Warp();

@ -13,7 +13,7 @@
#include <vtkm/Particle.h> #include <vtkm/Particle.h>
#include <vtkm/cont/ErrorFilterExecution.h> #include <vtkm/cont/ErrorFilterExecution.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/flow/FlowTypes.h> #include <vtkm/filter/flow/FlowTypes.h>
#include <vtkm/filter/flow/vtkm_filter_flow_export.h> #include <vtkm/filter/flow/vtkm_filter_flow_export.h>
@ -29,7 +29,7 @@ namespace flow
/// Takes as input a vector field and seed locations and advects the seeds /// Takes as input a vector field and seed locations and advects the seeds
/// through the flow field. /// through the flow field.
class VTKM_FILTER_FLOW_EXPORT FilterParticleAdvection : public vtkm::filter::FilterField class VTKM_FILTER_FLOW_EXPORT FilterParticleAdvection : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -12,7 +12,7 @@
#define vtk_m_filter_flow_Lagrangian_h #define vtk_m_filter_flow_Lagrangian_h
#include <vtkm/Particle.h> #include <vtkm/Particle.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/flow/vtkm_filter_flow_export.h> #include <vtkm/filter/flow/vtkm_filter_flow_export.h>
namespace vtkm namespace vtkm
@ -22,7 +22,7 @@ namespace filter
namespace flow namespace flow
{ {
class VTKM_FILTER_FLOW_EXPORT Lagrangian : public vtkm::filter::FilterField class VTKM_FILTER_FLOW_EXPORT Lagrangian : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_flow_LagrangianStructures_h #ifndef vtk_m_filter_flow_LagrangianStructures_h
#define vtk_m_filter_flow_LagrangianStructures_h #define vtk_m_filter_flow_LagrangianStructures_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/flow/FlowTypes.h> #include <vtkm/filter/flow/FlowTypes.h>
#include <vtkm/filter/flow/vtkm_filter_flow_export.h> #include <vtkm/filter/flow/vtkm_filter_flow_export.h>
@ -28,7 +28,7 @@ namespace flow
/// where they diverge or converge. By default, the points of the input `vtkm::cont::DataSet` /// where they diverge or converge. By default, the points of the input `vtkm::cont::DataSet`
/// are all advected for this computation unless an auxiliary grid is established. /// are all advected for this computation unless an auxiliary grid is established.
/// ///
class VTKM_FILTER_FLOW_EXPORT LagrangianStructures : public vtkm::filter::FilterField class VTKM_FILTER_FLOW_EXPORT LagrangianStructures : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_flow_StreamSurface_h #ifndef vtk_m_filter_flow_StreamSurface_h
#define vtk_m_filter_flow_StreamSurface_h #define vtk_m_filter_flow_StreamSurface_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/flow/FlowTypes.h> #include <vtkm/filter/flow/FlowTypes.h>
#include <vtkm/filter/flow/vtkm_filter_flow_export.h> #include <vtkm/filter/flow/vtkm_filter_flow_export.h>
@ -32,7 +32,7 @@ namespace flow
/// ///
/// The output of this filter is a `vtkm::cont::DataSet` containing a mesh for the created /// The output of this filter is a `vtkm::cont::DataSet` containing a mesh for the created
/// surface. /// surface.
class VTKM_FILTER_FLOW_EXPORT StreamSurface : public vtkm::filter::FilterField class VTKM_FILTER_FLOW_EXPORT StreamSurface : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the step size used for the numerical integrator. /// @brief Specifies the step size used for the numerical integrator.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_geometry_refinement_Shrink_h #ifndef vtk_m_filter_geometry_refinement_Shrink_h
#define vtk_m_filter_geometry_refinement_Shrink_h #define vtk_m_filter_geometry_refinement_Shrink_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/geometry_refinement/vtkm_filter_geometry_refinement_export.h> #include <vtkm/filter/geometry_refinement/vtkm_filter_geometry_refinement_export.h>
namespace vtkm namespace vtkm
@ -26,7 +26,7 @@ namespace geometry_refinement
/// computed as the average position of the cell points. /// computed as the average position of the cell points.
/// This filter disconnects the cells, duplicating the points connected to multiple cells. /// This filter disconnects the cells, duplicating the points connected to multiple cells.
/// The resulting CellSet is always an `ExplicitCellSet`. /// The resulting CellSet is always an `ExplicitCellSet`.
class VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT Shrink : public vtkm::filter::FilterField class VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT Shrink : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specify the scale factor to size each cell. /// @brief Specify the scale factor to size each cell.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_geometry_refinement_SplitSharpEdges_h #ifndef vtk_m_filter_geometry_refinement_SplitSharpEdges_h
#define vtk_m_filter_geometry_refinement_SplitSharpEdges_h #define vtk_m_filter_geometry_refinement_SplitSharpEdges_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/geometry_refinement/vtkm_filter_geometry_refinement_export.h> #include <vtkm/filter/geometry_refinement/vtkm_filter_geometry_refinement_export.h>
namespace vtkm namespace vtkm
@ -37,7 +37,7 @@ namespace geometry_refinement
/// visually, but the topology becomes disconnectered there. Splitting sharp edges is most /// visually, but the topology becomes disconnectered there. Splitting sharp edges is most
/// useful to duplicate normal shading vectors to make a sharp shading effect. /// useful to duplicate normal shading vectors to make a sharp shading effect.
/// ///
class VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT SplitSharpEdges : public vtkm::filter::FilterField class VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT SplitSharpEdges : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specify the feature angle threshold to split on. /// @brief Specify the feature angle threshold to split on.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_geometry_refinement_Tube_h #ifndef vtk_m_filter_geometry_refinement_Tube_h
#define vtk_m_filter_geometry_refinement_Tube_h #define vtk_m_filter_geometry_refinement_Tube_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/geometry_refinement/vtkm_filter_geometry_refinement_export.h> #include <vtkm/filter/geometry_refinement/vtkm_filter_geometry_refinement_export.h>
namespace vtkm namespace vtkm
@ -27,7 +27,7 @@ namespace geometry_refinement
/// The orientation of the geometry of the tube are computed automatically using /// The orientation of the geometry of the tube are computed automatically using
/// a heuristic to minimize the twisting along the input data set. /// a heuristic to minimize the twisting along the input data set.
/// ///
class VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT Tube : public vtkm::filter::FilterField class VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT Tube : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specify the radius of each tube. /// @brief Specify the radius of each tube.

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_image_processing_ComputeMoments_h #ifndef vtk_m_filter_image_processing_ComputeMoments_h
#define vtk_m_filter_image_processing_ComputeMoments_h #define vtk_m_filter_image_processing_ComputeMoments_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/image_processing/vtkm_filter_image_processing_export.h> #include <vtkm/filter/image_processing/vtkm_filter_image_processing_export.h>
namespace vtkm namespace vtkm
@ -19,7 +19,7 @@ namespace filter
{ {
namespace image_processing namespace image_processing
{ {
class VTKM_FILTER_IMAGE_PROCESSING_EXPORT ComputeMoments : public vtkm::filter::FilterField class VTKM_FILTER_IMAGE_PROCESSING_EXPORT ComputeMoments : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT ComputeMoments(); VTKM_CONT ComputeMoments();

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_image_processing_ImageDifference_h #ifndef vtk_m_filter_image_processing_ImageDifference_h
#define vtk_m_filter_image_processing_ImageDifference_h #define vtk_m_filter_image_processing_ImageDifference_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/image_processing/vtkm_filter_image_processing_export.h> #include <vtkm/filter/image_processing/vtkm_filter_image_processing_export.h>
namespace vtkm namespace vtkm
@ -29,7 +29,7 @@ namespace image_processing
/// The threshold-output is calculated for each pixel using the `vtkm::Magnitude` vector function /// The threshold-output is calculated for each pixel using the `vtkm::Magnitude` vector function
/// on the individual pixel difference. /// on the individual pixel difference.
/// ///
class VTKM_FILTER_IMAGE_PROCESSING_EXPORT ImageDifference : public vtkm::filter::FilterField class VTKM_FILTER_IMAGE_PROCESSING_EXPORT ImageDifference : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT ImageDifference(); VTKM_CONT ImageDifference();

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_image_processing_ImageMedian_h #ifndef vtk_m_filter_image_processing_ImageMedian_h
#define vtk_m_filter_image_processing_ImageMedian_h #define vtk_m_filter_image_processing_ImageMedian_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/image_processing/vtkm_filter_image_processing_export.h> #include <vtkm/filter/image_processing/vtkm_filter_image_processing_export.h>
/// \brief Median algorithm for general image blur /// \brief Median algorithm for general image blur
@ -30,7 +30,7 @@ namespace filter
{ {
namespace image_processing namespace image_processing
{ {
class VTKM_FILTER_IMAGE_PROCESSING_EXPORT ImageMedian : public vtkm::filter::FilterField class VTKM_FILTER_IMAGE_PROCESSING_EXPORT ImageMedian : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT ImageMedian() { this->SetOutputFieldName("median"); } VTKM_CONT ImageMedian() { this->SetOutputFieldName("median"); }

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_mesh_info_CellMeasures_h #ifndef vtk_m_filter_mesh_info_CellMeasures_h
#define vtk_m_filter_mesh_info_CellMeasures_h #define vtk_m_filter_mesh_info_CellMeasures_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -47,7 +47,7 @@ VTKM_EXEC_CONT inline IntegrationType operator|(IntegrationType left, Integratio
/// or 0 (if measure is not well defined or the cell type is unsupported). /// or 0 (if measure is not well defined or the cell type is unsupported).
/// ///
/// By default, the new cell-data array is named "measure". /// By default, the new cell-data array is named "measure".
class VTKM_FILTER_MESH_INFO_EXPORT CellMeasures : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT CellMeasures : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -89,7 +89,7 @@ VTKM_CONT MeshQuality::MeshQuality(CellMetric metric)
VTKM_CONT vtkm::cont::DataSet MeshQuality::DoExecute(const vtkm::cont::DataSet& input) VTKM_CONT vtkm::cont::DataSet MeshQuality::DoExecute(const vtkm::cont::DataSet& input)
{ {
std::unique_ptr<vtkm::filter::FilterField> implementation; std::unique_ptr<vtkm::filter::Filter> implementation;
switch (this->MyMetric) switch (this->MyMetric)
{ {
case vtkm::filter::mesh_info::CellMetric::Area: case vtkm::filter::mesh_info::CellMetric::Area:

@ -21,7 +21,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQuality_h #ifndef vtk_m_filter_mesh_info_MeshQuality_h
#define vtk_m_filter_mesh_info_MeshQuality_h #define vtk_m_filter_mesh_info_MeshQuality_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -66,7 +66,7 @@ enum struct CellMetric
* Each field contains the metric summary statistics for the cell type. * Each field contains the metric summary statistics for the cell type.
* Summary statists with all 0 values imply that the specified metric does not support the cell type. * Summary statists with all 0 values imply that the specified metric does not support the cell type.
*/ */
class VTKM_FILTER_MESH_INFO_EXPORT MeshQuality : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQuality : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT explicit MeshQuality(CellMetric); VTKM_CONT explicit MeshQuality(CellMetric);

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityArea_h #ifndef vtk_m_filter_mesh_info_MeshQualityArea_h
#define vtk_m_filter_mesh_info_MeshQualityArea_h #define vtk_m_filter_mesh_info_MeshQualityArea_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityArea : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityArea : public vtkm::filter::Filter
{ {
public: public:
MeshQualityArea(); MeshQualityArea();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityAspectGamma_h #ifndef vtk_m_filter_mesh_info_MeshQualityAspectGamma_h
#define vtk_m_filter_mesh_info_MeshQualityAspectGamma_h #define vtk_m_filter_mesh_info_MeshQualityAspectGamma_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityAspectGamma : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityAspectGamma : public vtkm::filter::Filter
{ {
public: public:
MeshQualityAspectGamma(); MeshQualityAspectGamma();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityAspectRatio_h #ifndef vtk_m_filter_mesh_info_MeshQualityAspectRatio_h
#define vtk_m_filter_mesh_info_MeshQualityAspectRatio_h #define vtk_m_filter_mesh_info_MeshQualityAspectRatio_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityAspectRatio : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityAspectRatio : public vtkm::filter::Filter
{ {
public: public:
MeshQualityAspectRatio(); MeshQualityAspectRatio();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityCondition_h #ifndef vtk_m_filter_mesh_info_MeshQualityCondition_h
#define vtk_m_filter_mesh_info_MeshQualityCondition_h #define vtk_m_filter_mesh_info_MeshQualityCondition_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityCondition : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityCondition : public vtkm::filter::Filter
{ {
public: public:
MeshQualityCondition(); MeshQualityCondition();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityDiagonalRatio_h #ifndef vtk_m_filter_mesh_info_MeshQualityDiagonalRatio_h
#define vtk_m_filter_mesh_info_MeshQualityDiagonalRatio_h #define vtk_m_filter_mesh_info_MeshQualityDiagonalRatio_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityDiagonalRatio : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityDiagonalRatio : public vtkm::filter::Filter
{ {
public: public:
MeshQualityDiagonalRatio(); MeshQualityDiagonalRatio();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityDimension_h #ifndef vtk_m_filter_mesh_info_MeshQualityDimension_h
#define vtk_m_filter_mesh_info_MeshQualityDimension_h #define vtk_m_filter_mesh_info_MeshQualityDimension_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityDimension : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityDimension : public vtkm::filter::Filter
{ {
public: public:
MeshQualityDimension(); MeshQualityDimension();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityJacobian_h #ifndef vtk_m_filter_mesh_info_MeshQualityJacobian_h
#define vtk_m_filter_mesh_info_MeshQualityJacobian_h #define vtk_m_filter_mesh_info_MeshQualityJacobian_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityJacobian : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityJacobian : public vtkm::filter::Filter
{ {
public: public:
MeshQualityJacobian(); MeshQualityJacobian();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityMaxAngle_h #ifndef vtk_m_filter_mesh_info_MeshQualityMaxAngle_h
#define vtk_m_filter_mesh_info_MeshQualityMaxAngle_h #define vtk_m_filter_mesh_info_MeshQualityMaxAngle_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityMaxAngle : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityMaxAngle : public vtkm::filter::Filter
{ {
public: public:
MeshQualityMaxAngle(); MeshQualityMaxAngle();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityMaxDiagonal_h #ifndef vtk_m_filter_mesh_info_MeshQualityMaxDiagonal_h
#define vtk_m_filter_mesh_info_MeshQualityMaxDiagonal_h #define vtk_m_filter_mesh_info_MeshQualityMaxDiagonal_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityMaxDiagonal : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityMaxDiagonal : public vtkm::filter::Filter
{ {
public: public:
MeshQualityMaxDiagonal(); MeshQualityMaxDiagonal();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityMinAngle_h #ifndef vtk_m_filter_mesh_info_MeshQualityMinAngle_h
#define vtk_m_filter_mesh_info_MeshQualityMinAngle_h #define vtk_m_filter_mesh_info_MeshQualityMinAngle_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityMinAngle : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityMinAngle : public vtkm::filter::Filter
{ {
public: public:
MeshQualityMinAngle(); MeshQualityMinAngle();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityMinDiagonal_h #ifndef vtk_m_filter_mesh_info_MeshQualityMinDiagonal_h
#define vtk_m_filter_mesh_info_MeshQualityMinDiagonal_h #define vtk_m_filter_mesh_info_MeshQualityMinDiagonal_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityMinDiagonal : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityMinDiagonal : public vtkm::filter::Filter
{ {
public: public:
MeshQualityMinDiagonal(); MeshQualityMinDiagonal();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityOddy_h #ifndef vtk_m_filter_mesh_info_MeshQualityOddy_h
#define vtk_m_filter_mesh_info_MeshQualityOddy_h #define vtk_m_filter_mesh_info_MeshQualityOddy_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityOddy : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityOddy : public vtkm::filter::Filter
{ {
public: public:
MeshQualityOddy(); MeshQualityOddy();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityRelativeSizeSquared_h #ifndef vtk_m_filter_mesh_info_MeshQualityRelativeSizeSquared_h
#define vtk_m_filter_mesh_info_MeshQualityRelativeSizeSquared_h #define vtk_m_filter_mesh_info_MeshQualityRelativeSizeSquared_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityRelativeSizeSquared : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityRelativeSizeSquared : public vtkm::filter::Filter
{ {
public: public:
MeshQualityRelativeSizeSquared(); MeshQualityRelativeSizeSquared();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityScaledJacobian_h #ifndef vtk_m_filter_mesh_info_MeshQualityScaledJacobian_h
#define vtk_m_filter_mesh_info_MeshQualityScaledJacobian_h #define vtk_m_filter_mesh_info_MeshQualityScaledJacobian_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityScaledJacobian : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityScaledJacobian : public vtkm::filter::Filter
{ {
public: public:
MeshQualityScaledJacobian(); MeshQualityScaledJacobian();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityShape_h #ifndef vtk_m_filter_mesh_info_MeshQualityShape_h
#define vtk_m_filter_mesh_info_MeshQualityShape_h #define vtk_m_filter_mesh_info_MeshQualityShape_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityShape : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityShape : public vtkm::filter::Filter
{ {
public: public:
MeshQualityShape(); MeshQualityShape();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityShapeAndSize_h #ifndef vtk_m_filter_mesh_info_MeshQualityShapeAndSize_h
#define vtk_m_filter_mesh_info_MeshQualityShapeAndSize_h #define vtk_m_filter_mesh_info_MeshQualityShapeAndSize_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityShapeAndSize : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityShapeAndSize : public vtkm::filter::Filter
{ {
public: public:
MeshQualityShapeAndSize(); MeshQualityShapeAndSize();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityShear_h #ifndef vtk_m_filter_mesh_info_MeshQualityShear_h
#define vtk_m_filter_mesh_info_MeshQualityShear_h #define vtk_m_filter_mesh_info_MeshQualityShear_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityShear : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityShear : public vtkm::filter::Filter
{ {
public: public:
MeshQualityShear(); MeshQualityShear();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualitySkew_h #ifndef vtk_m_filter_mesh_info_MeshQualitySkew_h
#define vtk_m_filter_mesh_info_MeshQualitySkew_h #define vtk_m_filter_mesh_info_MeshQualitySkew_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualitySkew : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualitySkew : public vtkm::filter::Filter
{ {
public: public:
MeshQualitySkew(); MeshQualitySkew();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityStretch_h #ifndef vtk_m_filter_mesh_info_MeshQualityStretch_h
#define vtk_m_filter_mesh_info_MeshQualityStretch_h #define vtk_m_filter_mesh_info_MeshQualityStretch_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityStretch : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityStretch : public vtkm::filter::Filter
{ {
public: public:
MeshQualityStretch(); MeshQualityStretch();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityTaper_h #ifndef vtk_m_filter_mesh_info_MeshQualityTaper_h
#define vtk_m_filter_mesh_info_MeshQualityTaper_h #define vtk_m_filter_mesh_info_MeshQualityTaper_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityTaper : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityTaper : public vtkm::filter::Filter
{ {
public: public:
MeshQualityTaper(); MeshQualityTaper();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityVolume_h #ifndef vtk_m_filter_mesh_info_MeshQualityVolume_h
#define vtk_m_filter_mesh_info_MeshQualityVolume_h #define vtk_m_filter_mesh_info_MeshQualityVolume_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityVolume : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityVolume : public vtkm::filter::Filter
{ {
public: public:
MeshQualityVolume(); MeshQualityVolume();

@ -20,7 +20,7 @@
#ifndef vtk_m_filter_mesh_info_MeshQualityWarpage_h #ifndef vtk_m_filter_mesh_info_MeshQualityWarpage_h
#define vtk_m_filter_mesh_info_MeshQualityWarpage_h #define vtk_m_filter_mesh_info_MeshQualityWarpage_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h> #include <vtkm/filter/mesh_info/vtkm_filter_mesh_info_export.h>
namespace vtkm namespace vtkm
@ -30,7 +30,7 @@ namespace filter
namespace mesh_info namespace mesh_info
{ {
class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityWarpage : public vtkm::filter::FilterField class VTKM_FILTER_MESH_INFO_EXPORT MeshQualityWarpage : public vtkm::filter::Filter
{ {
public: public:
MeshQualityWarpage(); MeshQualityWarpage();

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_resampling_HistSampling_h #ifndef vtk_m_filter_resampling_HistSampling_h
#define vtk_m_filter_resampling_HistSampling_h #define vtk_m_filter_resampling_HistSampling_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/resampling/vtkm_filter_resampling_export.h> #include <vtkm/filter/resampling/vtkm_filter_resampling_export.h>
#include <vtkm/Deprecated.h> #include <vtkm/Deprecated.h>
@ -37,7 +37,7 @@ namespace resampling
/// ///
/// The cell set of the input data is removed and replaced with a set with a vertex /// The cell set of the input data is removed and replaced with a set with a vertex
/// cell for each point. This effectively converts the data to a point cloud. /// cell for each point. This effectively converts the data to a point cloud.
class VTKM_FILTER_RESAMPLING_EXPORT HistSampling : public vtkm::filter::FilterField class VTKM_FILTER_RESAMPLING_EXPORT HistSampling : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specify the number of bins used when computing the histogram. /// @brief Specify the number of bins used when computing the histogram.

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_resampling_Probe_h #ifndef vtk_m_filter_resampling_Probe_h
#define vtk_m_filter_resampling_Probe_h #define vtk_m_filter_resampling_Probe_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/resampling/vtkm_filter_resampling_export.h> #include <vtkm/filter/resampling/vtkm_filter_resampling_export.h>
namespace vtkm namespace vtkm
@ -33,7 +33,7 @@ namespace resampling
/// transferred to it. The fields are transfered by probing the input data /// transferred to it. The fields are transfered by probing the input data
/// set at the point locations of the geometry. /// set at the point locations of the geometry.
/// ///
class VTKM_FILTER_RESAMPLING_EXPORT Probe : public vtkm::filter::FilterField class VTKM_FILTER_RESAMPLING_EXPORT Probe : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specify the geometry to probe with. /// @brief Specify the geometry to probe with.

@ -57,7 +57,7 @@
#ifndef vtk_m_filter_scalar_topology_ContourTreeUniform_h #ifndef vtk_m_filter_scalar_topology_ContourTreeUniform_h
#define vtk_m_filter_scalar_topology_ContourTreeUniform_h #define vtk_m_filter_scalar_topology_ContourTreeUniform_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/scalar_topology/vtkm_filter_scalar_topology_export.h> #include <vtkm/filter/scalar_topology/vtkm_filter_scalar_topology_export.h>
namespace vtkm namespace vtkm
@ -72,7 +72,7 @@ namespace scalar_topology
/// peak of contour /// peak of contour
/// Based on the algorithm presented in the paper: /// Based on the algorithm presented in the paper:
// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” // “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.”
class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeMesh2D : public vtkm::filter::FilterField class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeMesh2D : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT
@ -89,7 +89,7 @@ private:
/// peak of contour /// peak of contour
/// Based on the algorithm presented in the paper: /// Based on the algorithm presented in the paper:
// “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.” // “Parallel Peak Pruning for Scalable SMP Contour Tree Computation.”
class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeMesh3D : public vtkm::filter::FilterField class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeMesh3D : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -56,7 +56,7 @@
#include <vtkm/Types.h> #include <vtkm/Types.h>
#include <vtkm/cont/ArrayHandle.h> #include <vtkm/cont/ArrayHandle.h>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/scalar_topology/vtkm_filter_scalar_topology_export.h> #include <vtkm/filter/scalar_topology/vtkm_filter_scalar_topology_export.h>
#include <vtkm/filter/scalar_topology/worklet/contourtree_augmented/ContourTree.h> #include <vtkm/filter/scalar_topology/worklet/contourtree_augmented/ContourTree.h>
@ -85,7 +85,7 @@ namespace scalar_topology
/// tree are merged progressively using a binary-reduction scheme to compute the /// tree are merged progressively using a binary-reduction scheme to compute the
/// final contour tree. I.e., in the multi-block context, the final tree is /// final contour tree. I.e., in the multi-block context, the final tree is
/// constructed on rank 0. /// constructed on rank 0.
class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeAugmented : public vtkm::filter::FilterField class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeAugmented : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT bool CanThread() const override VTKM_CONT bool CanThread() const override

@ -63,7 +63,7 @@
#include <vtkm/filter/scalar_topology/worklet/contourtree_distributed/InteriorForest.h> #include <vtkm/filter/scalar_topology/worklet/contourtree_distributed/InteriorForest.h>
#include <memory> #include <memory>
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/scalar_topology/vtkm_filter_scalar_topology_export.h> #include <vtkm/filter/scalar_topology/vtkm_filter_scalar_topology_export.h>
namespace vtkm namespace vtkm
@ -87,8 +87,7 @@ namespace scalar_topology
/// tree are merged progressively using a binary-reduction scheme to compute the /// tree are merged progressively using a binary-reduction scheme to compute the
/// final contour tree. I.e., in the multi-block context, the final tree is /// final contour tree. I.e., in the multi-block context, the final tree is
/// constructed on rank 0. /// constructed on rank 0.
class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeUniformDistributed class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeUniformDistributed : public vtkm::filter::Filter
: public vtkm::filter::FilterField
{ {
public: public:
VTKM_CONT bool CanThread() const override VTKM_CONT bool CanThread() const override

@ -42,7 +42,7 @@
#ifndef vtk_m_filter_scalar_topology_DistributedBranchDecompositionFilter_h #ifndef vtk_m_filter_scalar_topology_DistributedBranchDecompositionFilter_h
#define vtk_m_filter_scalar_topology_DistributedBranchDecompositionFilter_h #define vtk_m_filter_scalar_topology_DistributedBranchDecompositionFilter_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/scalar_topology/vtkm_filter_scalar_topology_export.h> #include <vtkm/filter/scalar_topology/vtkm_filter_scalar_topology_export.h>
namespace vtkm namespace vtkm

@ -21,7 +21,7 @@
#ifndef vtk_m_filter_uncertainty_ContourUncertainUniform_h #ifndef vtk_m_filter_uncertainty_ContourUncertainUniform_h
#define vtk_m_filter_uncertainty_ContourUncertainUniform_h #define vtk_m_filter_uncertainty_ContourUncertainUniform_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/uncertainty/vtkm_filter_uncertainty_export.h> #include <vtkm/filter/uncertainty/vtkm_filter_uncertainty_export.h>
namespace vtkm namespace vtkm
@ -40,7 +40,7 @@ namespace uncertainty
/// isosurface uncertainty corresponds to uncertainty in topology cases in /// isosurface uncertainty corresponds to uncertainty in topology cases in
/// the marching cubes algorithm. /// the marching cubes algorithm.
/// ///
class VTKM_FILTER_UNCERTAINTY_EXPORT ContourUncertainUniform : public vtkm::filter::FilterField class VTKM_FILTER_UNCERTAINTY_EXPORT ContourUncertainUniform : public vtkm::filter::Filter
{ {
std::string NumberNonzeroProbabilityName = "num_nonzero_probability"; std::string NumberNonzeroProbabilityName = "num_nonzero_probability";

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_uncertainty_ContourUncertainUniformMonteCarlo_h #ifndef vtk_m_filter_uncertainty_ContourUncertainUniformMonteCarlo_h
#define vtk_m_filter_uncertainty_ContourUncertainUniformMonteCarlo_h #define vtk_m_filter_uncertainty_ContourUncertainUniformMonteCarlo_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/uncertainty/vtkm_filter_uncertainty_export.h> #include <vtkm/filter/uncertainty/vtkm_filter_uncertainty_export.h>
namespace vtkm namespace vtkm
@ -25,8 +25,7 @@ namespace uncertainty
/// We encourage usage of the ContourUncertainUniform filter because the Monte Carlo approach implemented /// We encourage usage of the ContourUncertainUniform filter because the Monte Carlo approach implemented
/// in this filter is computationally inefficient. /// in this filter is computationally inefficient.
/// ///
class VTKM_FILTER_UNCERTAINTY_EXPORT ContourUncertainUniformMonteCarlo class VTKM_FILTER_UNCERTAINTY_EXPORT ContourUncertainUniformMonteCarlo : public vtkm::filter::Filter
: public vtkm::filter::FilterField
{ {
std::string NumberNonzeroProbabilityName = "num_nonzero_probability"; std::string NumberNonzeroProbabilityName = "num_nonzero_probability";
std::string EntropyName = "entropy"; std::string EntropyName = "entropy";

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_vector_analysis_CrossProduct_h #ifndef vtk_m_filter_vector_analysis_CrossProduct_h
#define vtk_m_filter_vector_analysis_CrossProduct_h #define vtk_m_filter_vector_analysis_CrossProduct_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h> #include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h>
@ -26,7 +26,7 @@ namespace vector_analysis
/// ///
/// The left part of the operand is the "primary" field and the right part of the operand /// The left part of the operand is the "primary" field and the right part of the operand
/// is the "secondary" field. /// is the "secondary" field.
class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT CrossProduct : public vtkm::filter::FilterField class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT CrossProduct : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_vector_analysis_DotProduct_h #ifndef vtk_m_filter_vector_analysis_DotProduct_h
#define vtk_m_filter_vector_analysis_DotProduct_h #define vtk_m_filter_vector_analysis_DotProduct_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h> #include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h>
namespace vtkm namespace vtkm
@ -28,7 +28,7 @@ namespace vector_analysis
/// primary and secondary seldom matters). /// primary and secondary seldom matters).
/// ///
/// The dot product can operate on vectors of any length. /// The dot product can operate on vectors of any length.
class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT DotProduct : public vtkm::filter::FilterField class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT DotProduct : public vtkm::filter::Filter
{ {
public: public:
VTKM_CONT DotProduct(); VTKM_CONT DotProduct();

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_vector_analysis_Gradient_h #ifndef vtk_m_filter_vector_analysis_Gradient_h
#define vtk_m_filter_vector_analysis_Gradient_h #define vtk_m_filter_vector_analysis_Gradient_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h> #include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h>
namespace vtkm namespace vtkm
@ -31,7 +31,7 @@ namespace vector_analysis
/// ///
/// If no explicit name for the output field is provided the filter will /// If no explicit name for the output field is provided the filter will
/// default to "Gradients" /// default to "Gradients"
class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT Gradient : public vtkm::filter::FilterField class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT Gradient : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specify whether to compute gradients /// @brief Specify whether to compute gradients

@ -10,7 +10,7 @@
#ifndef vtk_m_filter_vector_analysis_SurfaceNormal_h #ifndef vtk_m_filter_vector_analysis_SurfaceNormal_h
#define vtk_m_filter_vector_analysis_SurfaceNormal_h #define vtk_m_filter_vector_analysis_SurfaceNormal_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h> #include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h>
namespace vtkm namespace vtkm
@ -41,7 +41,7 @@ namespace vector_analysis
/// the `SetCellNormalsName()` and `SetPointNormalsName()` methods. The filter will also /// the `SetCellNormalsName()` and `SetPointNormalsName()` methods. The filter will also
/// respect the name in `SetOutputFieldName()` if neither of the others are set. /// respect the name in `SetOutputFieldName()` if neither of the others are set.
/// ///
class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT SurfaceNormals : public vtkm::filter::FilterField class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT SurfaceNormals : public vtkm::filter::Filter
{ {
public: public:
/// Create SurfaceNormals filter. This calls /// Create SurfaceNormals filter. This calls

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_vector_analysis_VectorMagnitude_h #ifndef vtk_m_filter_vector_analysis_VectorMagnitude_h
#define vtk_m_filter_vector_analysis_VectorMagnitude_h #define vtk_m_filter_vector_analysis_VectorMagnitude_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h> #include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h>
namespace vtkm namespace vtkm
@ -27,7 +27,7 @@ namespace vector_analysis
/// name for the output field is ``magnitude``, but that can be overridden using /// name for the output field is ``magnitude``, but that can be overridden using
/// the `SetOutputFieldName()` method. /// the `SetOutputFieldName()` method.
/// ///
class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT VectorMagnitude : public vtkm::filter::FilterField class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT VectorMagnitude : public vtkm::filter::Filter
{ {
public: public:
VectorMagnitude(); VectorMagnitude();

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_zfp_ZFPCompressor1D_h #ifndef vtk_m_filter_zfp_ZFPCompressor1D_h
#define vtk_m_filter_zfp_ZFPCompressor1D_h #define vtk_m_filter_zfp_ZFPCompressor1D_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/zfp/vtkm_filter_zfp_export.h> #include <vtkm/filter/zfp/vtkm_filter_zfp_export.h>
namespace vtkm namespace vtkm
@ -27,7 +27,7 @@ namespace zfp
/// output of compressed data. /// output of compressed data.
/// @warning /// @warning
/// This filter currently only supports 1D structured cell sets. /// This filter currently only supports 1D structured cell sets.
class VTKM_FILTER_ZFP_EXPORT ZFPCompressor1D : public vtkm::filter::FilterField class VTKM_FILTER_ZFP_EXPORT ZFPCompressor1D : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the rate of compression. /// @brief Specifies the rate of compression.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_zfp_ZFPCompressor2D_h #ifndef vtk_m_filter_zfp_ZFPCompressor2D_h
#define vtk_m_filter_zfp_ZFPCompressor2D_h #define vtk_m_filter_zfp_ZFPCompressor2D_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/zfp/vtkm_filter_zfp_export.h> #include <vtkm/filter/zfp/vtkm_filter_zfp_export.h>
namespace vtkm namespace vtkm
@ -27,7 +27,7 @@ namespace zfp
/// output of compressed data. /// output of compressed data.
/// @warning /// @warning
/// This filter is currently only supports 2D structured cell sets. /// This filter is currently only supports 2D structured cell sets.
class VTKM_FILTER_ZFP_EXPORT ZFPCompressor2D : public vtkm::filter::FilterField class VTKM_FILTER_ZFP_EXPORT ZFPCompressor2D : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the rate of compression. /// @brief Specifies the rate of compression.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_zfp_ZFPCompressor3D_h #ifndef vtk_m_filter_zfp_ZFPCompressor3D_h
#define vtk_m_filter_zfp_ZFPCompressor3D_h #define vtk_m_filter_zfp_ZFPCompressor3D_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/zfp/vtkm_filter_zfp_export.h> #include <vtkm/filter/zfp/vtkm_filter_zfp_export.h>
namespace vtkm namespace vtkm
@ -27,7 +27,7 @@ namespace zfp
/// output of compressed data. /// output of compressed data.
/// @warning /// @warning
/// This filter is currently only supports 3D structured cell sets. /// This filter is currently only supports 3D structured cell sets.
class VTKM_FILTER_ZFP_EXPORT ZFPCompressor3D : public vtkm::filter::FilterField class VTKM_FILTER_ZFP_EXPORT ZFPCompressor3D : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the rate of compression. /// @brief Specifies the rate of compression.

@ -11,7 +11,7 @@
#ifndef vtk_m_filter_zfp_ZFPDecompressor1D_h #ifndef vtk_m_filter_zfp_ZFPDecompressor1D_h
#define vtk_m_filter_zfp_ZFPDecompressor1D_h #define vtk_m_filter_zfp_ZFPDecompressor1D_h
#include <vtkm/filter/FilterField.h> #include <vtkm/filter/Filter.h>
#include <vtkm/filter/zfp/vtkm_filter_zfp_export.h> #include <vtkm/filter/zfp/vtkm_filter_zfp_export.h>
namespace vtkm namespace vtkm
@ -27,7 +27,7 @@ namespace zfp
/// the decompressed version of the data. /// the decompressed version of the data.
/// @warning /// @warning
/// This filter is currently only supports 1D structured cell sets. /// This filter is currently only supports 1D structured cell sets.
class VTKM_FILTER_ZFP_EXPORT ZFPDecompressor1D : public vtkm::filter::FilterField class VTKM_FILTER_ZFP_EXPORT ZFPDecompressor1D : public vtkm::filter::Filter
{ {
public: public:
/// @brief Specifies the rate of compression. /// @brief Specifies the rate of compression.

Some files were not shown because too many files have changed in this diff Show More