From a17ebdf52ac04dc82c726a4dcaf54fdf86c94507 Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Sat, 10 Feb 2024 15:33:46 -0500 Subject: [PATCH] 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`. --- docs/changelog/deprecate-filter-field.md | 22 + .../examples/GuideExampleSimpleAlgorithm.cxx | 4 +- .../GuideExampleUseWorkletMapField.cxx | 5 +- ...uideExampleUseWorkletPointNeighborhood.cxx | 4 +- ...eExampleUseWorkletVisitCellsWithPoints.cxx | 4 +- examples/hello_worklet/HelloWorklet.cxx | 4 +- examples/multi_backend/MultiDeviceGradient.h | 4 +- tutorial/mag_grad.cxx | 4 +- tutorial/point_to_cell.cxx | 4 +- vtkm/filter/CMakeLists.txt | 3 +- vtkm/filter/Filter.cxx | 33 ++ vtkm/filter/Filter.h | 560 +++++++++++++----- vtkm/filter/FilterField.cxx | 46 -- vtkm/filter/FilterField.h | 372 +----------- vtkm/filter/clean_grid/CleanGrid.h | 4 +- .../CellSetConnectivity.h | 4 +- .../connected_components/ImageConnectivity.h | 4 +- vtkm/filter/contour/AbstractContour.h | 4 +- vtkm/filter/contour/ClipWithField.h | 4 +- .../filter/contour/ClipWithImplicitFunction.h | 4 +- vtkm/filter/contour/MIRFilter.h | 4 +- .../density_estimate/ContinuousScatterPlot.h | 4 +- vtkm/filter/density_estimate/Entropy.h | 4 +- vtkm/filter/density_estimate/Histogram.h | 4 +- vtkm/filter/density_estimate/NDEntropy.h | 4 +- vtkm/filter/density_estimate/NDHistogram.h | 4 +- .../density_estimate/ParticleDensityBase.h | 4 +- vtkm/filter/density_estimate/Statistics.cxx | 2 +- vtkm/filter/density_estimate/Statistics.h | 4 +- vtkm/filter/entity_extraction/ExternalFaces.h | 4 +- .../entity_extraction/ExtractGeometry.h | 4 +- vtkm/filter/entity_extraction/ExtractPoints.h | 4 +- .../entity_extraction/ExtractStructured.h | 4 +- .../entity_extraction/GhostCellRemove.h | 4 +- vtkm/filter/entity_extraction/Mask.h | 4 +- vtkm/filter/entity_extraction/MaskPoints.h | 4 +- vtkm/filter/entity_extraction/Threshold.h | 4 +- .../entity_extraction/ThresholdPoints.h | 4 +- vtkm/filter/field_conversion/CellAverage.h | 4 +- vtkm/filter/field_conversion/PointAverage.h | 4 +- .../filter/field_transform/CompositeVectors.h | 4 +- .../CylindricalCoordinateTransform.h | 4 +- vtkm/filter/field_transform/FieldToColors.h | 4 +- vtkm/filter/field_transform/LogValues.h | 4 +- vtkm/filter/field_transform/PointElevation.h | 4 +- vtkm/filter/field_transform/PointTransform.h | 4 +- .../SphericalCoordinateTransform.h | 5 +- vtkm/filter/field_transform/Warp.h | 4 +- vtkm/filter/flow/FilterParticleAdvection.h | 4 +- vtkm/filter/flow/Lagrangian.h | 4 +- vtkm/filter/flow/LagrangianStructures.h | 4 +- vtkm/filter/flow/StreamSurface.h | 4 +- vtkm/filter/geometry_refinement/Shrink.h | 4 +- .../geometry_refinement/SplitSharpEdges.h | 4 +- vtkm/filter/geometry_refinement/Tube.h | 4 +- vtkm/filter/image_processing/ComputeMoments.h | 4 +- .../filter/image_processing/ImageDifference.h | 4 +- vtkm/filter/image_processing/ImageMedian.h | 4 +- vtkm/filter/mesh_info/CellMeasures.h | 4 +- vtkm/filter/mesh_info/MeshQuality.cxx | 2 +- vtkm/filter/mesh_info/MeshQuality.h | 4 +- vtkm/filter/mesh_info/MeshQualityArea.h | 4 +- .../filter/mesh_info/MeshQualityAspectGamma.h | 4 +- .../filter/mesh_info/MeshQualityAspectRatio.h | 4 +- vtkm/filter/mesh_info/MeshQualityCondition.h | 4 +- .../mesh_info/MeshQualityDiagonalRatio.h | 4 +- vtkm/filter/mesh_info/MeshQualityDimension.h | 4 +- vtkm/filter/mesh_info/MeshQualityJacobian.h | 4 +- vtkm/filter/mesh_info/MeshQualityMaxAngle.h | 4 +- .../filter/mesh_info/MeshQualityMaxDiagonal.h | 4 +- vtkm/filter/mesh_info/MeshQualityMinAngle.h | 4 +- .../filter/mesh_info/MeshQualityMinDiagonal.h | 4 +- vtkm/filter/mesh_info/MeshQualityOddy.h | 4 +- .../MeshQualityRelativeSizeSquared.h | 4 +- .../mesh_info/MeshQualityScaledJacobian.h | 4 +- vtkm/filter/mesh_info/MeshQualityShape.h | 4 +- .../mesh_info/MeshQualityShapeAndSize.h | 4 +- vtkm/filter/mesh_info/MeshQualityShear.h | 4 +- vtkm/filter/mesh_info/MeshQualitySkew.h | 4 +- vtkm/filter/mesh_info/MeshQualityStretch.h | 4 +- vtkm/filter/mesh_info/MeshQualityTaper.h | 4 +- vtkm/filter/mesh_info/MeshQualityVolume.h | 4 +- vtkm/filter/mesh_info/MeshQualityWarpage.h | 4 +- vtkm/filter/resampling/HistSampling.h | 4 +- vtkm/filter/resampling/Probe.h | 4 +- .../scalar_topology/ContourTreeUniform.h | 6 +- .../ContourTreeUniformAugmented.h | 4 +- .../ContourTreeUniformDistributed.h | 5 +- .../DistributedBranchDecompositionFilter.h | 2 +- .../uncertainty/ContourUncertainUniform.h | 4 +- .../ContourUncertainUniformMonteCarlo.h | 5 +- vtkm/filter/vector_analysis/CrossProduct.h | 4 +- vtkm/filter/vector_analysis/DotProduct.h | 4 +- vtkm/filter/vector_analysis/Gradient.h | 4 +- vtkm/filter/vector_analysis/SurfaceNormals.h | 4 +- vtkm/filter/vector_analysis/VectorMagnitude.h | 4 +- vtkm/filter/zfp/ZFPCompressor1D.h | 4 +- vtkm/filter/zfp/ZFPCompressor2D.h | 4 +- vtkm/filter/zfp/ZFPCompressor3D.h | 4 +- vtkm/filter/zfp/ZFPDecompressor1D.h | 4 +- vtkm/filter/zfp/ZFPDecompressor2D.h | 4 +- vtkm/filter/zfp/ZFPDecompressor3D.h | 4 +- vtkm/source/PerlinNoise.cxx | 4 +- 103 files changed, 686 insertions(+), 738 deletions(-) create mode 100644 docs/changelog/deprecate-filter-field.md delete mode 100644 vtkm/filter/FilterField.cxx diff --git a/docs/changelog/deprecate-filter-field.md b/docs/changelog/deprecate-filter-field.md new file mode 100644 index 000000000..aa87c08e9 --- /dev/null +++ b/docs/changelog/deprecate-filter-field.md @@ -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`. diff --git a/docs/users-guide/examples/GuideExampleSimpleAlgorithm.cxx b/docs/users-guide/examples/GuideExampleSimpleAlgorithm.cxx index b9f83cc6d..e6e71cbda 100644 --- a/docs/users-guide/examples/GuideExampleSimpleAlgorithm.cxx +++ b/docs/users-guide/examples/GuideExampleSimpleAlgorithm.cxx @@ -10,7 +10,7 @@ #include -#include +#include #include @@ -94,7 +94,7 @@ namespace unit_conversion { class VTKM_FILTER_UNIT_CONVERSION_EXPORT PoundsPerSquareInchToNewtonsPerSquareMeterFilter - : public vtkm::filter::FilterField + : public vtkm::filter::Filter { public: VTKM_CONT PoundsPerSquareInchToNewtonsPerSquareMeterFilter(); diff --git a/docs/users-guide/examples/GuideExampleUseWorkletMapField.cxx b/docs/users-guide/examples/GuideExampleUseWorkletMapField.cxx index fefe895d2..d6872eece 100644 --- a/docs/users-guide/examples/GuideExampleUseWorkletMapField.cxx +++ b/docs/users-guide/examples/GuideExampleUseWorkletMapField.cxx @@ -41,7 +41,7 @@ public: } // anonymous namespace -#include +#include #define VTKM_FILTER_VECTOR_CALCULUS_EXPORT @@ -56,8 +56,7 @@ namespace vector_calculus { //// LABEL Export -class VTKM_FILTER_VECTOR_CALCULUS_EXPORT FieldMagnitude - : public vtkm::filter::FilterField +class VTKM_FILTER_VECTOR_CALCULUS_EXPORT FieldMagnitude : public vtkm::filter::Filter { public: VTKM_CONT FieldMagnitude(); diff --git a/docs/users-guide/examples/GuideExampleUseWorkletPointNeighborhood.cxx b/docs/users-guide/examples/GuideExampleUseWorkletPointNeighborhood.cxx index ecf7c76c6..a52ff5912 100644 --- a/docs/users-guide/examples/GuideExampleUseWorkletPointNeighborhood.cxx +++ b/docs/users-guide/examples/GuideExampleUseWorkletPointNeighborhood.cxx @@ -88,7 +88,7 @@ public: } // namespace boxfilter -#include +#include namespace vtkm { @@ -97,7 +97,7 @@ namespace filter namespace convolution { -class BoxFilter : public vtkm::filter::FilterField +class BoxFilter : public vtkm::filter::Filter { public: VTKM_CONT BoxFilter() = default; diff --git a/docs/users-guide/examples/GuideExampleUseWorkletVisitCellsWithPoints.cxx b/docs/users-guide/examples/GuideExampleUseWorkletVisitCellsWithPoints.cxx index 75d3aaafd..989099a17 100644 --- a/docs/users-guide/examples/GuideExampleUseWorkletVisitCellsWithPoints.cxx +++ b/docs/users-guide/examples/GuideExampleUseWorkletVisitCellsWithPoints.cxx @@ -50,7 +50,7 @@ public: //// END-EXAMPLE UseWorkletVisitCellsWithPoints //// -#include +#include #define VTKM_FILTER_FIELD_CONVERSION_EXPORT @@ -64,7 +64,7 @@ namespace filter 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: VTKM_CONT CellCenters(); diff --git a/examples/hello_worklet/HelloWorklet.cxx b/examples/hello_worklet/HelloWorklet.cxx index 8cfa49b9c..d136d3294 100644 --- a/examples/hello_worklet/HelloWorklet.cxx +++ b/examples/hello_worklet/HelloWorklet.cxx @@ -10,7 +10,7 @@ #include -#include +#include #include #include @@ -43,7 +43,7 @@ namespace vtkm namespace filter { -class HelloField : public vtkm::filter::FilterField +class HelloField : public vtkm::filter::Filter { public: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet) diff --git a/examples/multi_backend/MultiDeviceGradient.h b/examples/multi_backend/MultiDeviceGradient.h index 334873bb0..ff3c3595a 100644 --- a/examples/multi_backend/MultiDeviceGradient.h +++ b/examples/multi_backend/MultiDeviceGradient.h @@ -10,7 +10,7 @@ #ifndef vtk_m_examples_multibackend_MultiDeviceGradient_h #define vtk_m_examples_multibackend_MultiDeviceGradient_h -#include +#include #include "TaskQueue.h" @@ -22,7 +22,7 @@ using RuntimeTaskQueue = TaskQueue>; /// /// The Policy used with MultiDeviceGradient must include the TBB and CUDA /// backends. -class MultiDeviceGradient : public vtkm::filter::FilterField +class MultiDeviceGradient : public vtkm::filter::Filter { public: //Construct a MultiDeviceGradient and worker pool diff --git a/tutorial/mag_grad.cxx b/tutorial/mag_grad.cxx index 793e258ff..c2c9b8053 100644 --- a/tutorial/mag_grad.cxx +++ b/tutorial/mag_grad.cxx @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include @@ -32,7 +32,7 @@ struct ComputeMagnitude : vtkm::worklet::WorkletMapField // The filter class used by external code to run the algorithm. Normally the class definition // is in a separate header file. -class FieldMagnitude : public vtkm::filter::FilterField +class FieldMagnitude : public vtkm::filter::Filter { protected: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet) override; diff --git a/tutorial/point_to_cell.cxx b/tutorial/point_to_cell.cxx index acf9ee1dd..7c328b179 100644 --- a/tutorial/point_to_cell.cxx +++ b/tutorial/point_to_cell.cxx @@ -46,14 +46,14 @@ struct ConvertPointFieldToCells : vtkm::worklet::WorkletVisitCellsWithPoints } // namespace worklet } // namespace vtkm -#include +#include namespace vtkm { namespace filter { -struct ConvertPointFieldToCells : vtkm::filter::FilterField +struct ConvertPointFieldToCells : vtkm::filter::Filter { VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet) override; }; diff --git a/vtkm/filter/CMakeLists.txt b/vtkm/filter/CMakeLists.txt index af945fd15..4594777d7 100644 --- a/vtkm/filter/CMakeLists.txt +++ b/vtkm/filter/CMakeLists.txt @@ -11,14 +11,13 @@ set(core_headers FieldSelection.h Filter.h - FilterField.h + FilterField.h #deprecated MapFieldMergeAverage.h MapFieldPermutation.h TaskQueue.h ) set(core_sources FieldSelection.cxx - FilterField.cxx ) set(core_sources_device MapFieldMergeAverage.cxx diff --git a/vtkm/filter/Filter.cxx b/vtkm/filter/Filter.cxx index 924940775..623d2461c 100644 --- a/vtkm/filter/Filter.cxx +++ b/vtkm/filter/Filter.cxx @@ -42,6 +42,11 @@ void RunFilter(Filter* self, vtkm::filter::DataSetQueue& input, vtkm::filter::Da } // anonymous namespace +Filter::Filter() +{ + this->SetActiveCoordinateSystem(0); +} + Filter::~Filter() = default; bool Filter::CanThread() const @@ -161,6 +166,16 @@ vtkm::cont::PartitionedDataSet Filter::CreateResult( 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 numDS = input.GetNumberOfPartitions(); @@ -189,5 +204,23 @@ vtkm::Id Filter::DetermineNumberOfThreads(const vtkm::cont::PartitionedDataSet& 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 vtkm diff --git a/vtkm/filter/Filter.h b/vtkm/filter/Filter.h index c247a9f9f..37e2ecafd 100644 --- a/vtkm/filter/Filter.h +++ b/vtkm/filter/Filter.h @@ -10,6 +10,7 @@ #ifndef vtk_m_filter_Filter_h #define vtk_m_filter_Filter_h +#include #include #include #include @@ -24,19 +25,17 @@ namespace vtkm { 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 -/// the existing subclasses e.g. FilterField, FilterParticleAdvection, etc.) and implement relevant -/// methods. +/// This is the base class for all filters. To add a new filter, one can subclass this and +/// implement relevant methods. /// -/// \section FilterUsage Usage +/// @section FilterUsage Usage /// /// To execute a filter, one typically calls the `auto result = filter.Execute(input)`. Typical /// usage is as follows: /// -/// \code{cpp} -/// +/// ```cpp /// // create the concrete subclass (e.g. Contour). /// vtkm::filter::contour::Contour contour; /// @@ -51,7 +50,7 @@ namespace filter /// // or, execute on a vtkm::cont::PartitionedDataSet /// vtkm::cont::PartitionedDataSet mbInput = ... /// auto outputMB = contour.Execute(mbInput); -/// \endcode +/// ``` /// /// `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 @@ -74,69 +73,14 @@ namespace filter /// `DoExecutePartitions(PartitionedDataSet&)`. See the implementation of /// `FilterParticleAdvection::Execute(PartitionedDataSet&)` for an example. /// -/// \section FilterSubclassing Subclassing -/// -/// 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 +/// @section Creating results and mapping fields /// /// 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 -/// `Filter::CreateResult` or a similar method in a subclass (such as -/// `FilterField::CreateResultField`). +/// `Filter::CreateResult` or a similar method (such as +/// `Filter::CreateResultField`). /// -/// \code{cpp} +/// ```cpp /// VTKM_CONT DataSet SomeFilter::DoExecute(const vtkm::cont::DataSet& input) /// { /// vtkm::cont::UnknownCellSet outCellSet; @@ -152,7 +96,7 @@ namespace filter /// // the cell set change at all, they will have to be mapped by hand. /// return this->CreateResult(input, outCellSet, mapper); /// } -/// \endcode +/// ``` /// /// 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 @@ -162,7 +106,7 @@ namespace filter /// provided as a convenience that uses the default mapper which trivially adds input Field to /// 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 /// 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 /// `DoExecute(DataSet&)`. For example: /// -/// \code{cpp} +/// ```cpp /// struct SharedState; // shared states between mesh generation and field mapping. /// VTKM_CONT DataSet ThreadSafeFilter::DoExecute(const vtkm::cont::DataSet& input) /// { @@ -200,13 +144,13 @@ namespace filter /// /// return output; /// } -/// \endcode +/// ``` /// /// 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 /// `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 /// of DataSet and pool of *worker* threads. Implementation of Filter subclass can override the /// `DoExecutePartitions(PartitionedDataSet)` virtual method to provide implementation specific @@ -218,42 +162,21 @@ namespace filter class VTKM_FILTER_CORE_EXPORT Filter { public: - VTKM_CONT - virtual ~Filter(); + VTKM_CONT Filter(); - VTKM_CONT - virtual bool CanThread() const; + VTKM_CONT virtual ~Filter(); - VTKM_CONT - void SetThreadsPerCPU(vtkm::Id numThreads) { this->NumThreadsPerCPU = numThreads; } - VTKM_CONT - void SetThreadsPerGPU(vtkm::Id numThreads) { this->NumThreadsPerGPU = numThreads; } + /// @brief Executes the filter on the input and produces a result dataset. + /// + /// On success, this the dataset produced. On error, `vtkm::cont::ErrorExecution` will be thrown. + VTKM_CONT vtkm::cont::DataSet Execute(const vtkm::cont::DataSet& input); - VTKM_CONT - vtkm::Id GetThreadsPerCPU() const { return this->NumThreadsPerCPU; } - VTKM_CONT - vtkm::Id GetThreadsPerGPU() const { return this->NumThreadsPerGPU; } + /// @brief Executes the filter on the input PartitionedDataSet and produces a result PartitionedDataSet. + /// + /// On success, this the dataset produced. On error, `vtkm::cont::ErrorExecution` will be thrown. + VTKM_CONT vtkm::cont::PartitionedDataSet Execute(const vtkm::cont::PartitionedDataSet& input); - 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); - } - } - - /// \brief Specify which fields get passed from input to output. + /// @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 /// input to output. Depending on what operation the filter does, this could be a simple shallow @@ -301,7 +224,7 @@ public: VTKM_CONT 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 /// coordinate system. Thus, a coordinate system is passed if and only if the associated @@ -315,15 +238,137 @@ public: /// @copydoc SetPassCoordinateSystems 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. - VTKM_CONT vtkm::cont::DataSet Execute(const vtkm::cont::DataSet& input); + /// Not all filters create an output field. + 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. - VTKM_CONT vtkm::cont::PartitionedDataSet Execute(const vtkm::cont::PartitionedDataSet& input); + /// The number of input fields (or whether the filter operates on input fields at all) + /// 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(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(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(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(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(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(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(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? /// Specify the vtkm::cont::Invoker to be used to execute worklets by @@ -334,45 +379,136 @@ public: protected: 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 /// structure and coordinate system as the input and pass all fields (as requested /// 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 /// fields of `inDataSet` (as selected by the `FieldsToPass` state of the filter). /// 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 /// same partitions and pass all PartitionedDataSet fields (as requested by the /// `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`). - /// \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. /// VTKM_CONT vtkm::cont::PartitionedDataSet CreateResult( const vtkm::cont::PartitionedDataSet& input, 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 /// same partitions and pass all PartitionedDataSet fields (as requested by the /// `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`). - /// \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. - /// \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 /// created and will eventually be returned by `CreateResult`. The `Field` comes from `input`. /// @@ -387,18 +523,18 @@ protected: 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 /// 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 /// 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` /// (as selected by the `FieldsToPass` state of the filter). - /// \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] 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 /// 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 /// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then @@ -416,7 +552,7 @@ protected: 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` /// 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 /// 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` /// (as selected by the `FieldsToPass` state of the filter). - /// \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] fieldMapper A function or functor that takes a `DataSet` as its first + /// @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] 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 /// created and will eventually be returned by `CreateResult`. The `Field` comes from /// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then @@ -455,7 +591,7 @@ protected: 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` /// 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 /// 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` /// (as selected by the `FieldsToPass` state of the filter). - /// \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] 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] 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] coordsData The array containing the coordinates of the points. + /// @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 /// created and will eventually be returned by `CreateResult`. The `Field` comes from /// `inDataSet`. The function should map the `Field` to match `resultCellSet` and then @@ -491,10 +627,143 @@ protected: 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::PartitionedDataSet DoExecutePartitions( 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 + VTKM_CONT void CastAndCallScalarField(const vtkm::cont::UnknownArrayHandle& fieldArray, + Functor&& functor, + Args&&... args) const + { + fieldArray + .CastAndCallForTypesWithFloatFallback( + std::forward(functor), std::forward(args)...); + } + /// @copydoc CastAndCallScalarField + template + VTKM_CONT void CastAndCallScalarField(const vtkm::cont::Field& field, + Functor&& functor, + Args&&... args) const + { + this->CastAndCallScalarField( + field.GetData(), std::forward(functor), std::forward(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_CONT void CastAndCallVecField(const vtkm::cont::UnknownArrayHandle& fieldArray, + Functor&& functor, + Args&&... args) const + { + using VecList = + vtkm::ListTransform::template type>; + fieldArray.CastAndCallForTypesWithFloatFallback( + std::forward(functor), std::forward(args)...); + } + /// @copydoc CastAndCallVecField + template + VTKM_CONT void CastAndCallVecField(const vtkm::cont::Field& field, + Functor&& functor, + Args&&... args) const + { + this->CastAndCallVecField( + field.GetData(), std::forward(functor), std::forward(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 + VTKM_CONT void CastAndCallVariableVecField(const vtkm::cont::UnknownArrayHandle& fieldArray, + Functor&& functor, + Args&&... args) const + { + if (fieldArray.IsBaseComponentType()) + { + functor(fieldArray.ExtractArrayFromComponents(), std::forward(args)...); + } + else if (fieldArray.IsBaseComponentType()) + { + functor(fieldArray.ExtractArrayFromComponents(), std::forward(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(), + std::forward(args)...); + } + } + /// @copydoc CastAndCallVariableVecField + template + VTKM_CONT void CastAndCallVariableVecField(const vtkm::cont::Field& field, + Functor&& functor, + Args&&... args) const + { + this->CastAndCallVariableVecField( + field.GetData(), std::forward(functor), std::forward(args)...); + } + private: template VTKM_CONT void MapFieldsOntoOutput(const vtkm::cont::DataSet& input, @@ -555,16 +824,37 @@ private: } } + template + struct ScalarToVec + { + template + using type = vtkm::Vec; + }; + VTKM_CONT virtual vtkm::Id DetermineNumberOfThreads(const vtkm::cont::PartitionedDataSet& input); + void ResizeIfNeeded(size_t index_st); vtkm::filter::FieldSelection FieldsToPass = vtkm::filter::FieldSelection::Mode::All; bool PassCoordinateSystems = true; bool RunFilterWithMultipleThreads = false; vtkm::Id NumThreadsPerCPU = 4; vtkm::Id NumThreadsPerGPU = 8; + + std::string OutputFieldName; + + std::vector ActiveFieldNames; + std::vector ActiveFieldAssociation; + std::vector UseCoordinateSystemAsField; + std::vector ActiveCoordinateSystemIndices; }; + +class VTKM_DEPRECATED(2.2, "Inherit from `vtkm::cont::Filter` directly.") FilterField + : public vtkm::filter::Filter +{ +}; + } } // namespace vtkm::filter diff --git a/vtkm/filter/FilterField.cxx b/vtkm/filter/FilterField.cxx deleted file mode 100644 index 89d85e40f..000000000 --- a/vtkm/filter/FilterField.cxx +++ /dev/null @@ -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 - -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 diff --git a/vtkm/filter/FilterField.h b/vtkm/filter/FilterField.h index 62e56ae86..4741a617a 100644 --- a/vtkm/filter/FilterField.h +++ b/vtkm/filter/FilterField.h @@ -13,373 +13,27 @@ #include -#include +#include + namespace vtkm { namespace filter { -/// @brief A base class for filters that input and output fields. -class VTKM_FILTER_CORE_EXPORT FilterField : public vtkm::filter::Filter +struct VTKM_DEPRECATED( + 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(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(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(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(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(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(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(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 - VTKM_CONT void CastAndCallScalarField(const vtkm::cont::UnknownArrayHandle& fieldArray, - Functor&& functor, - Args&&... args) const - { - fieldArray - .CastAndCallForTypesWithFloatFallback( - std::forward(functor), std::forward(args)...); - } - /// @copydoc CastAndCallScalarField - template - VTKM_CONT void CastAndCallScalarField(const vtkm::cont::Field& field, - Functor&& functor, - Args&&... args) const - { - this->CastAndCallScalarField( - field.GetData(), std::forward(functor), std::forward(args)...); - } - - -private: - template - struct ScalarToVec - { - template - using type = vtkm::Vec; - }; - -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_CONT void CastAndCallVecField(const vtkm::cont::UnknownArrayHandle& fieldArray, - Functor&& functor, - Args&&... args) const - { - using VecList = - vtkm::ListTransform::template type>; - fieldArray.CastAndCallForTypesWithFloatFallback( - std::forward(functor), std::forward(args)...); - } - /// @copydoc CastAndCallVecField - template - VTKM_CONT void CastAndCallVecField(const vtkm::cont::Field& field, - Functor&& functor, - Args&&... args) const - { - this->CastAndCallVecField( - field.GetData(), std::forward(functor), std::forward(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 - VTKM_CONT void CastAndCallVariableVecField(const vtkm::cont::UnknownArrayHandle& fieldArray, - Functor&& functor, - Args&&... args) const - { - if (fieldArray.IsBaseComponentType()) - { - functor(fieldArray.ExtractArrayFromComponents(), std::forward(args)...); - } - else if (fieldArray.IsBaseComponentType()) - { - functor(fieldArray.ExtractArrayFromComponents(), std::forward(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(), - std::forward(args)...); - } - } - /// @copydoc CastAndCallVariableVecField - template - VTKM_CONT void CastAndCallVariableVecField(const vtkm::cont::Field& field, - Functor&& functor, - Args&&... args) const - { - this->CastAndCallVariableVecField( - field.GetData(), std::forward(functor), std::forward(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 ActiveFieldNames; - std::vector ActiveFieldAssociation; - std::vector UseCoordinateSystemAsField; - std::vector ActiveCoordinateSystemIndices; }; + +static vtkm_filter_FilterField_h_deprecated issue_deprecated_warning_filterfield() +{ + vtkm_filter_FilterField_h_deprecated x; + return x; +} + } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/clean_grid/CleanGrid.h b/vtkm/filter/clean_grid/CleanGrid.h index 2f19a2b62..98185f002 100644 --- a/vtkm/filter/clean_grid/CleanGrid.h +++ b/vtkm/filter/clean_grid/CleanGrid.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_clean_grid_CleanGrid_h #define vtk_m_filter_clean_grid_CleanGrid_h -#include +#include #include namespace vtkm @@ -39,7 +39,7 @@ struct SharedStates; /// by the coordinate system. If there are multiple coordinate systems, the desired /// 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: /// When the CompactPointFields flag is true, the filter will identify and remove any diff --git a/vtkm/filter/connected_components/CellSetConnectivity.h b/vtkm/filter/connected_components/CellSetConnectivity.h index 0cdc4f38e..a4b6dbad0 100644 --- a/vtkm/filter/connected_components/CellSetConnectivity.h +++ b/vtkm/filter/connected_components/CellSetConnectivity.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_connected_components_CellSetConnectivity_h #define vtk_m_filter_connected_components_CellSetConnectivity_h -#include +#include #include 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 /// "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. -class VTKM_FILTER_CONNECTED_COMPONENTS_EXPORT CellSetConnectivity : public vtkm::filter::FilterField +class VTKM_FILTER_CONNECTED_COMPONENTS_EXPORT CellSetConnectivity : public vtkm::filter::Filter { public: VTKM_CONT CellSetConnectivity() { this->SetOutputFieldName("component"); } diff --git a/vtkm/filter/connected_components/ImageConnectivity.h b/vtkm/filter/connected_components/ImageConnectivity.h index be6ca8d39..23255e47c 100644 --- a/vtkm/filter/connected_components/ImageConnectivity.h +++ b/vtkm/filter/connected_components/ImageConnectivity.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_connected_components_ImageConnectivity_h #define vtk_m_filter_connected_components_ImageConnectivity_h -#include +#include #include /// \brief Groups connected points that have the same field value. @@ -32,7 +32,7 @@ namespace filter { 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: VTKM_CONT ImageConnectivity() { this->SetOutputFieldName("component"); } diff --git a/vtkm/filter/contour/AbstractContour.h b/vtkm/filter/contour/AbstractContour.h index 871c57e79..5181f0ba5 100644 --- a/vtkm/filter/contour/AbstractContour.h +++ b/vtkm/filter/contour/AbstractContour.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_contour_AbstractContour_h #define vtk_m_filter_contour_AbstractContour_h -#include +#include #include #include #include @@ -26,7 +26,7 @@ namespace contour /// /// Provides common configuration & execution methods for contour filters /// 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: void SetNumberOfIsoValues(vtkm::Id num) diff --git a/vtkm/filter/contour/ClipWithField.h b/vtkm/filter/contour/ClipWithField.h index 431d5ca1c..0350a3452 100644 --- a/vtkm/filter/contour/ClipWithField.h +++ b/vtkm/filter/contour/ClipWithField.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_contour_ClipWithField_h #define vtk_m_filter_contour_ClipWithField_h -#include +#include #include namespace vtkm @@ -28,7 +28,7 @@ namespace contour /// /// 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: /// @brief Specifies the field value for the clip operation. diff --git a/vtkm/filter/contour/ClipWithImplicitFunction.h b/vtkm/filter/contour/ClipWithImplicitFunction.h index ccc93e5e4..1cc68e8fc 100644 --- a/vtkm/filter/contour/ClipWithImplicitFunction.h +++ b/vtkm/filter/contour/ClipWithImplicitFunction.h @@ -12,7 +12,7 @@ #include -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace contour /// 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`, /// 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: /// @brief Specifies the implicit function to be used to perform the clip operation. diff --git a/vtkm/filter/contour/MIRFilter.h b/vtkm/filter/contour/MIRFilter.h index 2cc2dcee4..2a0883bd3 100644 --- a/vtkm/filter/contour/MIRFilter.h +++ b/vtkm/filter/contour/MIRFilter.h @@ -11,7 +11,7 @@ #ifndef vtkm_m_filter_contour_MIRFilter_h #define vtkm_m_filter_contour_MIRFilter_h -#include +#include #include 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, /// 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). -class VTKM_FILTER_CONTOUR_EXPORT MIRFilter : public vtkm::filter::FilterField +class VTKM_FILTER_CONTOUR_EXPORT MIRFilter : public vtkm::filter::Filter { public: /// @brief Sets the name of the offset/position cellset field in the dataset passed to the filter diff --git a/vtkm/filter/density_estimate/ContinuousScatterPlot.h b/vtkm/filter/density_estimate/ContinuousScatterPlot.h index f5c978d25..545c19321 100644 --- a/vtkm/filter/density_estimate/ContinuousScatterPlot.h +++ b/vtkm/filter/density_estimate/ContinuousScatterPlot.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_density_estimate_ContinuousScatterPlot_h #define vtk_m_filter_density_estimate_ContinuousScatterPlot_h -#include +#include #include namespace vtkm @@ -36,7 +36,7 @@ namespace density_estimate /// vol. 14, no. 6, pp. 1428-1435, Nov.-Dec. 2008 /// 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: VTKM_CONT ContinuousScatterPlot() { this->SetOutputFieldName("density"); } diff --git a/vtkm/filter/density_estimate/Entropy.h b/vtkm/filter/density_estimate/Entropy.h index b97e78575..f43487714 100644 --- a/vtkm/filter/density_estimate/Entropy.h +++ b/vtkm/filter/density_estimate/Entropy.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_density_estimate_Entropy_h #define vtk_m_filter_density_estimate_Entropy_h -#include +#include #include 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 /// -class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Entropy : public vtkm::filter::FilterField +class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Entropy : public vtkm::filter::Filter { public: //currently the Entropy filter only works on scalar data. diff --git a/vtkm/filter/density_estimate/Histogram.h b/vtkm/filter/density_estimate/Histogram.h index c4d192681..43944ab6a 100644 --- a/vtkm/filter/density_estimate/Histogram.h +++ b/vtkm/filter/density_estimate/Histogram.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_density_estimate_Histogram_h #define vtk_m_filter_density_estimate_Histogram_h -#include +#include #include namespace vtkm @@ -37,7 +37,7 @@ namespace density_estimate /// `vtkm::cont::PartitionedDataSet` containing a single /// `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: VTKM_CONT Histogram(); diff --git a/vtkm/filter/density_estimate/NDEntropy.h b/vtkm/filter/density_estimate/NDEntropy.h index efb5e2b62..d8fd3735e 100644 --- a/vtkm/filter/density_estimate/NDEntropy.h +++ b/vtkm/filter/density_estimate/NDEntropy.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_density_estimate_NDEntropy_h #define vtk_m_filter_density_estimate_NDEntropy_h -#include +#include #include namespace vtkm @@ -23,7 +23,7 @@ namespace density_estimate /// /// 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: VTKM_CONT diff --git a/vtkm/filter/density_estimate/NDHistogram.h b/vtkm/filter/density_estimate/NDHistogram.h index ee63ff4e5..a42a49153 100644 --- a/vtkm/filter/density_estimate/NDHistogram.h +++ b/vtkm/filter/density_estimate/NDHistogram.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_density_estimate_NDHistogram_h #define vtk_m_filter_density_estimate_NDHistogram_h -#include +#include #include namespace vtkm @@ -31,7 +31,7 @@ namespace density_estimate /// 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]). /// -class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT NDHistogram : public vtkm::filter::FilterField +class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT NDHistogram : public vtkm::filter::Filter { public: VTKM_CONT diff --git a/vtkm/filter/density_estimate/ParticleDensityBase.h b/vtkm/filter/density_estimate/ParticleDensityBase.h index 154273226..7fc7dc42b 100644 --- a/vtkm/filter/density_estimate/ParticleDensityBase.h +++ b/vtkm/filter/density_estimate/ParticleDensityBase.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_density_estimate_ParticleDensityBase_h #define vtk_m_filter_density_estimate_ParticleDensityBase_h -#include +#include #include namespace vtkm @@ -20,7 +20,7 @@ namespace filter { 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: ParticleDensityBase() = default; diff --git a/vtkm/filter/density_estimate/Statistics.cxx b/vtkm/filter/density_estimate/Statistics.cxx index dd47822e5..dedb4f8d2 100644 --- a/vtkm/filter/density_estimate/Statistics.cxx +++ b/vtkm/filter/density_estimate/Statistics.cxx @@ -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 // 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. - vtkm::cont::PartitionedDataSet output = this->FilterField::DoExecutePartitions(input); + vtkm::cont::PartitionedDataSet output = this->Filter::DoExecutePartitions(input); vtkm::Id numPartitions = input.GetNumberOfPartitions(); DistributedStatistics helper(numPartitions); for (vtkm::Id i = 0; i < numPartitions; ++i) diff --git a/vtkm/filter/density_estimate/Statistics.h b/vtkm/filter/density_estimate/Statistics.h index 3f317c2fb..11cae818c 100644 --- a/vtkm/filter/density_estimate/Statistics.h +++ b/vtkm/filter/density_estimate/Statistics.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_density_estimate_Statistics_h #define vtk_m_filter_density_estimate_Statistics_h -#include +#include #include namespace vtkm @@ -65,7 +65,7 @@ namespace density_estimate /// `vtkm::cont::DataSet` can be computed by creating a `vtkm::cont::PartitionedDataSet` /// 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: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; diff --git a/vtkm/filter/entity_extraction/ExternalFaces.h b/vtkm/filter/entity_extraction/ExternalFaces.h index c7aa12b5f..02290d6c4 100644 --- a/vtkm/filter/entity_extraction/ExternalFaces.h +++ b/vtkm/filter/entity_extraction/ExternalFaces.h @@ -11,7 +11,7 @@ #ifndef vtkm_filter_entity_extraction_ExternalFaces_h #define vtkm_filter_entity_extraction_ExternalFaces_h -#include +#include #include 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 /// 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: ExternalFaces(); diff --git a/vtkm/filter/entity_extraction/ExtractGeometry.h b/vtkm/filter/entity_extraction/ExtractGeometry.h index 03f5c71ef..bc34e64ad 100644 --- a/vtkm/filter/entity_extraction/ExtractGeometry.h +++ b/vtkm/filter/entity_extraction/ExtractGeometry.h @@ -12,7 +12,7 @@ #define vtk_m_fulter_entity_extraction_ExtractGeometry_h #include -#include +#include #include namespace vtkm @@ -38,7 +38,7 @@ namespace entity_extraction /// cells into new cells whereas this filter will not, producing a more "crinkly" /// output. /// -class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractGeometry : public vtkm::filter::FilterField +class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractGeometry : public vtkm::filter::Filter { public: /// @brief Specifies the implicit function to be used to perform extract geometry. diff --git a/vtkm/filter/entity_extraction/ExtractPoints.h b/vtkm/filter/entity_extraction/ExtractPoints.h index b6549561d..a60718641 100644 --- a/vtkm/filter/entity_extraction/ExtractPoints.h +++ b/vtkm/filter/entity_extraction/ExtractPoints.h @@ -13,7 +13,7 @@ #include -#include +#include #include namespace vtkm @@ -31,7 +31,7 @@ namespace entity_extraction /// Note that while any geometry type can be provided as input, the output is /// represented by an explicit representation of points using /// `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: /// @brief Option to remove unused points and compact result int a smaller array. diff --git a/vtkm/filter/entity_extraction/ExtractStructured.h b/vtkm/filter/entity_extraction/ExtractStructured.h index c9e590ee5..5f38fb871 100644 --- a/vtkm/filter/entity_extraction/ExtractStructured.h +++ b/vtkm/filter/entity_extraction/ExtractStructured.h @@ -12,7 +12,7 @@ #define vtk_m_filter_entity_extraction_ExtractStructured_h #include -#include +#include #include namespace vtkm @@ -37,7 +37,7 @@ namespace entity_extraction /// for image processing, subsampling large volumes to reduce data size, or /// 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: /// @brief Specifies what volume of interest (VOI) should be extracted by the filter. diff --git a/vtkm/filter/entity_extraction/GhostCellRemove.h b/vtkm/filter/entity_extraction/GhostCellRemove.h index bd398466f..3c83112c0 100644 --- a/vtkm/filter/entity_extraction/GhostCellRemove.h +++ b/vtkm/filter/entity_extraction/GhostCellRemove.h @@ -13,7 +13,7 @@ #include #include -#include +#include #include namespace vtkm @@ -35,7 +35,7 @@ namespace entity_extraction /// 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. /// -class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT GhostCellRemove : public vtkm::filter::FilterField +class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT GhostCellRemove : public vtkm::filter::Filter { public: VTKM_CONT GhostCellRemove(); diff --git a/vtkm/filter/entity_extraction/Mask.h b/vtkm/filter/entity_extraction/Mask.h index ea3f91be2..d80736373 100644 --- a/vtkm/filter/entity_extraction/Mask.h +++ b/vtkm/filter/entity_extraction/Mask.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_entity_extraction_Mask_h #define vtk_m_filter_entity_extraction_Mask_h -#include +#include #include namespace vtkm @@ -23,7 +23,7 @@ namespace entity_extraction /// \brief Subselect cells using a stride /// /// 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: // When CompactPoints is set, instead of copying the points and point fields diff --git a/vtkm/filter/entity_extraction/MaskPoints.h b/vtkm/filter/entity_extraction/MaskPoints.h index 8c0c13803..c1c54864e 100644 --- a/vtkm/filter/entity_extraction/MaskPoints.h +++ b/vtkm/filter/entity_extraction/MaskPoints.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_entity_extraction_MaskPoints_h #define vtk_m_filter_entity_extraction_MaskPoints_h -#include +#include #include namespace vtkm @@ -23,7 +23,7 @@ namespace entity_extraction /// \brief Subselect points using a stride /// /// 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: // When CompactPoints is set, instead of copying the points and point fields diff --git a/vtkm/filter/entity_extraction/Threshold.h b/vtkm/filter/entity_extraction/Threshold.h index 0b2e7d603..60ffe04aa 100644 --- a/vtkm/filter/entity_extraction/Threshold.h +++ b/vtkm/filter/entity_extraction/Threshold.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_entity_extraction_Threshold_h #define vtk_m_filter_entity_extraction_Threshold_h -#include +#include #include namespace vtkm @@ -37,7 +37,7 @@ namespace entity_extraction /// methods for more information. /// /// 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: /// @brief Specifies the lower scalar value. diff --git a/vtkm/filter/entity_extraction/ThresholdPoints.h b/vtkm/filter/entity_extraction/ThresholdPoints.h index fa38df409..3da37c3cc 100644 --- a/vtkm/filter/entity_extraction/ThresholdPoints.h +++ b/vtkm/filter/entity_extraction/ThresholdPoints.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_entity_extraction_ThresholdPoints_h #define vtk_m_filter_entity_extraction_ThresholdPoints_h -#include +#include #include namespace vtkm @@ -20,7 +20,7 @@ namespace filter { 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: // When CompactPoints is set, instead of copying the points and point fields diff --git a/vtkm/filter/field_conversion/CellAverage.h b/vtkm/filter/field_conversion/CellAverage.h index 3c2b2bc71..1161f2946 100644 --- a/vtkm/filter/field_conversion/CellAverage.h +++ b/vtkm/filter/field_conversion/CellAverage.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_field_conversion_CellAverage_h #define vtk_m_filter_field_conversion_CellAverage_h -#include +#include #include namespace vtkm @@ -32,7 +32,7 @@ namespace field_conversion /// point field. The name can be overridden as always using the /// `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: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; diff --git a/vtkm/filter/field_conversion/PointAverage.h b/vtkm/filter/field_conversion/PointAverage.h index 2013b05f2..42c4c3a08 100644 --- a/vtkm/filter/field_conversion/PointAverage.h +++ b/vtkm/filter/field_conversion/PointAverage.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_field_conversion_PointAverage_h #define vtk_m_filter_field_conversion_PointAverage_h -#include +#include #include namespace vtkm @@ -32,7 +32,7 @@ namespace field_conversion /// point field. The name can be overridden as always using the /// `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: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; diff --git a/vtkm/filter/field_transform/CompositeVectors.h b/vtkm/filter/field_transform/CompositeVectors.h index 2481bb4d9..c19317806 100644 --- a/vtkm/filter/field_transform/CompositeVectors.h +++ b/vtkm/filter/field_transform/CompositeVectors.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_field_transform_CompositeVectors_h #define vtk_m_filter_field_transform_CompositeVectors_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace field_transform /// All of the input fields must be scalar values. The type of the first 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: diff --git a/vtkm/filter/field_transform/CylindricalCoordinateTransform.h b/vtkm/filter/field_transform/CylindricalCoordinateTransform.h index 1b460c4ba..20d4e39f7 100644 --- a/vtkm/filter/field_transform/CylindricalCoordinateTransform.h +++ b/vtkm/filter/field_transform/CylindricalCoordinateTransform.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_field_transform_CylindricalCoordinateTransform_h #define vtk_m_filter_field_transform_CylindricalCoordinateTransform_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace field_transform /// in the output. /// class VTKM_FILTER_FIELD_TRANSFORM_EXPORT CylindricalCoordinateTransform - : public vtkm::filter::FilterField + : public vtkm::filter::Filter { public: VTKM_CONT CylindricalCoordinateTransform(); diff --git a/vtkm/filter/field_transform/FieldToColors.h b/vtkm/filter/field_transform/FieldToColors.h index ea0b9dea8..0049b8d0c 100644 --- a/vtkm/filter/field_transform/FieldToColors.h +++ b/vtkm/filter/field_transform/FieldToColors.h @@ -12,7 +12,7 @@ #define vtk_m_filter_field_transform_FieldToColors_h #include -#include +#include #include namespace vtkm @@ -26,7 +26,7 @@ namespace field_transform /// This filter is useful for generating colors that could be used for rendering or /// 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: VTKM_CONT diff --git a/vtkm/filter/field_transform/LogValues.h b/vtkm/filter/field_transform/LogValues.h index daf871594..27ff39549 100644 --- a/vtkm/filter/field_transform/LogValues.h +++ b/vtkm/filter/field_transform/LogValues.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_field_transform_LogValues_h #define vtk_m_filter_field_transform_LogValues_h -#include +#include #include namespace vtkm @@ -32,7 +32,7 @@ namespace field_transform /// smallest numbers comparatively hard to see. Thus, `LogValues` supports setting a /// 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: /// @brief Identifies a type of logarithm as specified by its base. diff --git a/vtkm/filter/field_transform/PointElevation.h b/vtkm/filter/field_transform/PointElevation.h index a53cb9746..ea1859655 100644 --- a/vtkm/filter/field_transform/PointElevation.h +++ b/vtkm/filter/field_transform/PointElevation.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_field_transform_PointElevation_h #define vtk_m_filter_field_transform_PointElevation_h -#include +#include #include namespace vtkm @@ -32,7 +32,7 @@ namespace field_transform /// /// The default name for the output field is ``elevation'', but that can be /// 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: VTKM_CONT PointElevation(); diff --git a/vtkm/filter/field_transform/PointTransform.h b/vtkm/filter/field_transform/PointTransform.h index 4e31da7b8..6e98b47db 100644 --- a/vtkm/filter/field_transform/PointTransform.h +++ b/vtkm/filter/field_transform/PointTransform.h @@ -14,7 +14,7 @@ #include #include -#include +#include #include namespace vtkm @@ -40,7 +40,7 @@ namespace field_transform /// The default name for the output field is "transform", but that can be overridden as /// 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: VTKM_CONT diff --git a/vtkm/filter/field_transform/SphericalCoordinateTransform.h b/vtkm/filter/field_transform/SphericalCoordinateTransform.h index d94c56ba3..a1e0a0eeb 100644 --- a/vtkm/filter/field_transform/SphericalCoordinateTransform.h +++ b/vtkm/filter/field_transform/SphericalCoordinateTransform.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_field_transform_SphericalCoordinateTransform_h #define vtk_m_filter_field_transform_SphericalCoordinateTransform_h -#include +#include #include namespace vtkm @@ -29,8 +29,7 @@ namespace field_transform /// The resulting transformation will be set as the first coordinate system /// in the output. /// -class VTKM_FILTER_FIELD_TRANSFORM_EXPORT SphericalCoordinateTransform - : public vtkm::filter::FilterField +class VTKM_FILTER_FIELD_TRANSFORM_EXPORT SphericalCoordinateTransform : public vtkm::filter::Filter { public: VTKM_CONT SphericalCoordinateTransform(); diff --git a/vtkm/filter/field_transform/Warp.h b/vtkm/filter/field_transform/Warp.h index bf49f4df0..9abbd0030 100644 --- a/vtkm/filter/field_transform/Warp.h +++ b/vtkm/filter/field_transform/Warp.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_field_transform_Warp_h #define vtk_m_filter_field_transform_Warp_h -#include +#include #include namespace vtkm @@ -50,7 +50,7 @@ namespace field_transform /// this filter will save its results as the first coordinate system in the output /// 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: VTKM_CONT Warp(); diff --git a/vtkm/filter/flow/FilterParticleAdvection.h b/vtkm/filter/flow/FilterParticleAdvection.h index aef43bf37..8083905e3 100644 --- a/vtkm/filter/flow/FilterParticleAdvection.h +++ b/vtkm/filter/flow/FilterParticleAdvection.h @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -29,7 +29,7 @@ namespace flow /// Takes as input a vector field and seed locations and advects the seeds /// 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: VTKM_CONT diff --git a/vtkm/filter/flow/Lagrangian.h b/vtkm/filter/flow/Lagrangian.h index 09226dacd..3416f6c49 100644 --- a/vtkm/filter/flow/Lagrangian.h +++ b/vtkm/filter/flow/Lagrangian.h @@ -12,7 +12,7 @@ #define vtk_m_filter_flow_Lagrangian_h #include -#include +#include #include namespace vtkm @@ -22,7 +22,7 @@ namespace filter namespace flow { -class VTKM_FILTER_FLOW_EXPORT Lagrangian : public vtkm::filter::FilterField +class VTKM_FILTER_FLOW_EXPORT Lagrangian : public vtkm::filter::Filter { public: VTKM_CONT diff --git a/vtkm/filter/flow/LagrangianStructures.h b/vtkm/filter/flow/LagrangianStructures.h index 6887998d3..581500790 100644 --- a/vtkm/filter/flow/LagrangianStructures.h +++ b/vtkm/filter/flow/LagrangianStructures.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_flow_LagrangianStructures_h #define vtk_m_filter_flow_LagrangianStructures_h -#include +#include #include #include @@ -28,7 +28,7 @@ namespace flow /// 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. /// -class VTKM_FILTER_FLOW_EXPORT LagrangianStructures : public vtkm::filter::FilterField +class VTKM_FILTER_FLOW_EXPORT LagrangianStructures : public vtkm::filter::Filter { public: VTKM_CONT diff --git a/vtkm/filter/flow/StreamSurface.h b/vtkm/filter/flow/StreamSurface.h index e3fbaea88..a4c7d3515 100644 --- a/vtkm/filter/flow/StreamSurface.h +++ b/vtkm/filter/flow/StreamSurface.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_flow_StreamSurface_h #define vtk_m_filter_flow_StreamSurface_h -#include +#include #include #include @@ -32,7 +32,7 @@ namespace flow /// /// The output of this filter is a `vtkm::cont::DataSet` containing a mesh for the created /// surface. -class VTKM_FILTER_FLOW_EXPORT StreamSurface : public vtkm::filter::FilterField +class VTKM_FILTER_FLOW_EXPORT StreamSurface : public vtkm::filter::Filter { public: /// @brief Specifies the step size used for the numerical integrator. diff --git a/vtkm/filter/geometry_refinement/Shrink.h b/vtkm/filter/geometry_refinement/Shrink.h index 8bc01b4f4..50898aa53 100644 --- a/vtkm/filter/geometry_refinement/Shrink.h +++ b/vtkm/filter/geometry_refinement/Shrink.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_geometry_refinement_Shrink_h #define vtk_m_filter_geometry_refinement_Shrink_h -#include +#include #include namespace vtkm @@ -26,7 +26,7 @@ namespace geometry_refinement /// computed as the average position of the cell points. /// This filter disconnects the cells, duplicating the points connected to multiple cells. /// 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: /// @brief Specify the scale factor to size each cell. diff --git a/vtkm/filter/geometry_refinement/SplitSharpEdges.h b/vtkm/filter/geometry_refinement/SplitSharpEdges.h index 59ac60d61..f2ce7a286 100644 --- a/vtkm/filter/geometry_refinement/SplitSharpEdges.h +++ b/vtkm/filter/geometry_refinement/SplitSharpEdges.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_geometry_refinement_SplitSharpEdges_h #define vtk_m_filter_geometry_refinement_SplitSharpEdges_h -#include +#include #include namespace vtkm @@ -37,7 +37,7 @@ namespace geometry_refinement /// visually, but the topology becomes disconnectered there. Splitting sharp edges is most /// 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: /// @brief Specify the feature angle threshold to split on. diff --git a/vtkm/filter/geometry_refinement/Tube.h b/vtkm/filter/geometry_refinement/Tube.h index 61cd5dca1..9724b1fe7 100644 --- a/vtkm/filter/geometry_refinement/Tube.h +++ b/vtkm/filter/geometry_refinement/Tube.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_geometry_refinement_Tube_h #define vtk_m_filter_geometry_refinement_Tube_h -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace geometry_refinement /// The orientation of the geometry of the tube are computed automatically using /// 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: /// @brief Specify the radius of each tube. diff --git a/vtkm/filter/image_processing/ComputeMoments.h b/vtkm/filter/image_processing/ComputeMoments.h index f0e1ae6d3..9353da15a 100644 --- a/vtkm/filter/image_processing/ComputeMoments.h +++ b/vtkm/filter/image_processing/ComputeMoments.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_image_processing_ComputeMoments_h #define vtk_m_filter_image_processing_ComputeMoments_h -#include +#include #include namespace vtkm @@ -19,7 +19,7 @@ namespace filter { 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: VTKM_CONT ComputeMoments(); diff --git a/vtkm/filter/image_processing/ImageDifference.h b/vtkm/filter/image_processing/ImageDifference.h index bd473b670..7c88cd712 100644 --- a/vtkm/filter/image_processing/ImageDifference.h +++ b/vtkm/filter/image_processing/ImageDifference.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_image_processing_ImageDifference_h #define vtk_m_filter_image_processing_ImageDifference_h -#include +#include #include namespace vtkm @@ -29,7 +29,7 @@ namespace image_processing /// The threshold-output is calculated for each pixel using the `vtkm::Magnitude` vector function /// 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: VTKM_CONT ImageDifference(); diff --git a/vtkm/filter/image_processing/ImageMedian.h b/vtkm/filter/image_processing/ImageMedian.h index 46f8cde84..b5e6ed435 100644 --- a/vtkm/filter/image_processing/ImageMedian.h +++ b/vtkm/filter/image_processing/ImageMedian.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_image_processing_ImageMedian_h #define vtk_m_filter_image_processing_ImageMedian_h -#include +#include #include /// \brief Median algorithm for general image blur @@ -30,7 +30,7 @@ namespace filter { 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: VTKM_CONT ImageMedian() { this->SetOutputFieldName("median"); } diff --git a/vtkm/filter/mesh_info/CellMeasures.h b/vtkm/filter/mesh_info/CellMeasures.h index 92afb78a2..e2ae01ee1 100644 --- a/vtkm/filter/mesh_info/CellMeasures.h +++ b/vtkm/filter/mesh_info/CellMeasures.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_mesh_info_CellMeasures_h #define vtk_m_filter_mesh_info_CellMeasures_h -#include +#include #include 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). /// /// 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: VTKM_CONT diff --git a/vtkm/filter/mesh_info/MeshQuality.cxx b/vtkm/filter/mesh_info/MeshQuality.cxx index ed1a5d407..1c95760e8 100644 --- a/vtkm/filter/mesh_info/MeshQuality.cxx +++ b/vtkm/filter/mesh_info/MeshQuality.cxx @@ -89,7 +89,7 @@ VTKM_CONT MeshQuality::MeshQuality(CellMetric metric) VTKM_CONT vtkm::cont::DataSet MeshQuality::DoExecute(const vtkm::cont::DataSet& input) { - std::unique_ptr implementation; + std::unique_ptr implementation; switch (this->MyMetric) { case vtkm::filter::mesh_info::CellMetric::Area: diff --git a/vtkm/filter/mesh_info/MeshQuality.h b/vtkm/filter/mesh_info/MeshQuality.h index 50699509d..cddb98b22 100644 --- a/vtkm/filter/mesh_info/MeshQuality.h +++ b/vtkm/filter/mesh_info/MeshQuality.h @@ -21,7 +21,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQuality_h #define vtk_m_filter_mesh_info_MeshQuality_h -#include +#include #include namespace vtkm @@ -66,7 +66,7 @@ enum struct CellMetric * 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. */ -class VTKM_FILTER_MESH_INFO_EXPORT MeshQuality : public vtkm::filter::FilterField +class VTKM_FILTER_MESH_INFO_EXPORT MeshQuality : public vtkm::filter::Filter { public: VTKM_CONT explicit MeshQuality(CellMetric); diff --git a/vtkm/filter/mesh_info/MeshQualityArea.h b/vtkm/filter/mesh_info/MeshQualityArea.h index 85b7dbcf9..79799a714 100644 --- a/vtkm/filter/mesh_info/MeshQualityArea.h +++ b/vtkm/filter/mesh_info/MeshQualityArea.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityArea_h #define vtk_m_filter_mesh_info_MeshQualityArea_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityArea(); diff --git a/vtkm/filter/mesh_info/MeshQualityAspectGamma.h b/vtkm/filter/mesh_info/MeshQualityAspectGamma.h index b60b69e51..672ef3c3c 100644 --- a/vtkm/filter/mesh_info/MeshQualityAspectGamma.h +++ b/vtkm/filter/mesh_info/MeshQualityAspectGamma.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityAspectGamma_h #define vtk_m_filter_mesh_info_MeshQualityAspectGamma_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityAspectGamma(); diff --git a/vtkm/filter/mesh_info/MeshQualityAspectRatio.h b/vtkm/filter/mesh_info/MeshQualityAspectRatio.h index 5e3f4e4da..4645b5f6a 100644 --- a/vtkm/filter/mesh_info/MeshQualityAspectRatio.h +++ b/vtkm/filter/mesh_info/MeshQualityAspectRatio.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityAspectRatio_h #define vtk_m_filter_mesh_info_MeshQualityAspectRatio_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityAspectRatio(); diff --git a/vtkm/filter/mesh_info/MeshQualityCondition.h b/vtkm/filter/mesh_info/MeshQualityCondition.h index 811c3f7af..0d3f63e8f 100644 --- a/vtkm/filter/mesh_info/MeshQualityCondition.h +++ b/vtkm/filter/mesh_info/MeshQualityCondition.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityCondition_h #define vtk_m_filter_mesh_info_MeshQualityCondition_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityCondition(); diff --git a/vtkm/filter/mesh_info/MeshQualityDiagonalRatio.h b/vtkm/filter/mesh_info/MeshQualityDiagonalRatio.h index 48bd01419..052939e14 100644 --- a/vtkm/filter/mesh_info/MeshQualityDiagonalRatio.h +++ b/vtkm/filter/mesh_info/MeshQualityDiagonalRatio.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityDiagonalRatio_h #define vtk_m_filter_mesh_info_MeshQualityDiagonalRatio_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityDiagonalRatio(); diff --git a/vtkm/filter/mesh_info/MeshQualityDimension.h b/vtkm/filter/mesh_info/MeshQualityDimension.h index d55fe2375..c81cc3f83 100644 --- a/vtkm/filter/mesh_info/MeshQualityDimension.h +++ b/vtkm/filter/mesh_info/MeshQualityDimension.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityDimension_h #define vtk_m_filter_mesh_info_MeshQualityDimension_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityDimension(); diff --git a/vtkm/filter/mesh_info/MeshQualityJacobian.h b/vtkm/filter/mesh_info/MeshQualityJacobian.h index c5776a0a6..df27f4f31 100644 --- a/vtkm/filter/mesh_info/MeshQualityJacobian.h +++ b/vtkm/filter/mesh_info/MeshQualityJacobian.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityJacobian_h #define vtk_m_filter_mesh_info_MeshQualityJacobian_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityJacobian(); diff --git a/vtkm/filter/mesh_info/MeshQualityMaxAngle.h b/vtkm/filter/mesh_info/MeshQualityMaxAngle.h index 84ff3bed7..ce2d80b27 100644 --- a/vtkm/filter/mesh_info/MeshQualityMaxAngle.h +++ b/vtkm/filter/mesh_info/MeshQualityMaxAngle.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityMaxAngle_h #define vtk_m_filter_mesh_info_MeshQualityMaxAngle_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityMaxAngle(); diff --git a/vtkm/filter/mesh_info/MeshQualityMaxDiagonal.h b/vtkm/filter/mesh_info/MeshQualityMaxDiagonal.h index 4be5a3f08..695a7fac8 100644 --- a/vtkm/filter/mesh_info/MeshQualityMaxDiagonal.h +++ b/vtkm/filter/mesh_info/MeshQualityMaxDiagonal.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityMaxDiagonal_h #define vtk_m_filter_mesh_info_MeshQualityMaxDiagonal_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityMaxDiagonal(); diff --git a/vtkm/filter/mesh_info/MeshQualityMinAngle.h b/vtkm/filter/mesh_info/MeshQualityMinAngle.h index 84bcdb603..d0c1af6f5 100644 --- a/vtkm/filter/mesh_info/MeshQualityMinAngle.h +++ b/vtkm/filter/mesh_info/MeshQualityMinAngle.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityMinAngle_h #define vtk_m_filter_mesh_info_MeshQualityMinAngle_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityMinAngle(); diff --git a/vtkm/filter/mesh_info/MeshQualityMinDiagonal.h b/vtkm/filter/mesh_info/MeshQualityMinDiagonal.h index d9cb986a9..08c05547f 100644 --- a/vtkm/filter/mesh_info/MeshQualityMinDiagonal.h +++ b/vtkm/filter/mesh_info/MeshQualityMinDiagonal.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityMinDiagonal_h #define vtk_m_filter_mesh_info_MeshQualityMinDiagonal_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityMinDiagonal(); diff --git a/vtkm/filter/mesh_info/MeshQualityOddy.h b/vtkm/filter/mesh_info/MeshQualityOddy.h index 880007652..4794b9f4b 100644 --- a/vtkm/filter/mesh_info/MeshQualityOddy.h +++ b/vtkm/filter/mesh_info/MeshQualityOddy.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityOddy_h #define vtk_m_filter_mesh_info_MeshQualityOddy_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityOddy(); diff --git a/vtkm/filter/mesh_info/MeshQualityRelativeSizeSquared.h b/vtkm/filter/mesh_info/MeshQualityRelativeSizeSquared.h index 7870573c5..c8dc53e36 100644 --- a/vtkm/filter/mesh_info/MeshQualityRelativeSizeSquared.h +++ b/vtkm/filter/mesh_info/MeshQualityRelativeSizeSquared.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityRelativeSizeSquared_h #define vtk_m_filter_mesh_info_MeshQualityRelativeSizeSquared_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityRelativeSizeSquared(); diff --git a/vtkm/filter/mesh_info/MeshQualityScaledJacobian.h b/vtkm/filter/mesh_info/MeshQualityScaledJacobian.h index 7ca0cbefc..ab35ff208 100644 --- a/vtkm/filter/mesh_info/MeshQualityScaledJacobian.h +++ b/vtkm/filter/mesh_info/MeshQualityScaledJacobian.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityScaledJacobian_h #define vtk_m_filter_mesh_info_MeshQualityScaledJacobian_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityScaledJacobian(); diff --git a/vtkm/filter/mesh_info/MeshQualityShape.h b/vtkm/filter/mesh_info/MeshQualityShape.h index 33e6ee3dc..59da2f15f 100644 --- a/vtkm/filter/mesh_info/MeshQualityShape.h +++ b/vtkm/filter/mesh_info/MeshQualityShape.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityShape_h #define vtk_m_filter_mesh_info_MeshQualityShape_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityShape(); diff --git a/vtkm/filter/mesh_info/MeshQualityShapeAndSize.h b/vtkm/filter/mesh_info/MeshQualityShapeAndSize.h index 75b70d290..f8cab7f23 100644 --- a/vtkm/filter/mesh_info/MeshQualityShapeAndSize.h +++ b/vtkm/filter/mesh_info/MeshQualityShapeAndSize.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityShapeAndSize_h #define vtk_m_filter_mesh_info_MeshQualityShapeAndSize_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityShapeAndSize(); diff --git a/vtkm/filter/mesh_info/MeshQualityShear.h b/vtkm/filter/mesh_info/MeshQualityShear.h index f8b0e5dbb..4664d3fed 100644 --- a/vtkm/filter/mesh_info/MeshQualityShear.h +++ b/vtkm/filter/mesh_info/MeshQualityShear.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityShear_h #define vtk_m_filter_mesh_info_MeshQualityShear_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityShear(); diff --git a/vtkm/filter/mesh_info/MeshQualitySkew.h b/vtkm/filter/mesh_info/MeshQualitySkew.h index d8201fcc9..beb3172f6 100644 --- a/vtkm/filter/mesh_info/MeshQualitySkew.h +++ b/vtkm/filter/mesh_info/MeshQualitySkew.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualitySkew_h #define vtk_m_filter_mesh_info_MeshQualitySkew_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualitySkew(); diff --git a/vtkm/filter/mesh_info/MeshQualityStretch.h b/vtkm/filter/mesh_info/MeshQualityStretch.h index e42550c0b..7866dd453 100644 --- a/vtkm/filter/mesh_info/MeshQualityStretch.h +++ b/vtkm/filter/mesh_info/MeshQualityStretch.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityStretch_h #define vtk_m_filter_mesh_info_MeshQualityStretch_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityStretch(); diff --git a/vtkm/filter/mesh_info/MeshQualityTaper.h b/vtkm/filter/mesh_info/MeshQualityTaper.h index eaeea6f34..cfeece1c4 100644 --- a/vtkm/filter/mesh_info/MeshQualityTaper.h +++ b/vtkm/filter/mesh_info/MeshQualityTaper.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityTaper_h #define vtk_m_filter_mesh_info_MeshQualityTaper_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityTaper(); diff --git a/vtkm/filter/mesh_info/MeshQualityVolume.h b/vtkm/filter/mesh_info/MeshQualityVolume.h index 107eaacc2..1b1d66aef 100644 --- a/vtkm/filter/mesh_info/MeshQualityVolume.h +++ b/vtkm/filter/mesh_info/MeshQualityVolume.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityVolume_h #define vtk_m_filter_mesh_info_MeshQualityVolume_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityVolume(); diff --git a/vtkm/filter/mesh_info/MeshQualityWarpage.h b/vtkm/filter/mesh_info/MeshQualityWarpage.h index d98884dd9..7a6a5f198 100644 --- a/vtkm/filter/mesh_info/MeshQualityWarpage.h +++ b/vtkm/filter/mesh_info/MeshQualityWarpage.h @@ -20,7 +20,7 @@ #ifndef vtk_m_filter_mesh_info_MeshQualityWarpage_h #define vtk_m_filter_mesh_info_MeshQualityWarpage_h -#include +#include #include namespace vtkm @@ -30,7 +30,7 @@ namespace filter 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: MeshQualityWarpage(); diff --git a/vtkm/filter/resampling/HistSampling.h b/vtkm/filter/resampling/HistSampling.h index 0658b05d9..1ad7505b4 100644 --- a/vtkm/filter/resampling/HistSampling.h +++ b/vtkm/filter/resampling/HistSampling.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_resampling_HistSampling_h #define vtk_m_filter_resampling_HistSampling_h -#include +#include #include #include @@ -37,7 +37,7 @@ namespace resampling /// /// 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. -class VTKM_FILTER_RESAMPLING_EXPORT HistSampling : public vtkm::filter::FilterField +class VTKM_FILTER_RESAMPLING_EXPORT HistSampling : public vtkm::filter::Filter { public: /// @brief Specify the number of bins used when computing the histogram. diff --git a/vtkm/filter/resampling/Probe.h b/vtkm/filter/resampling/Probe.h index 813eabd49..865727bbe 100644 --- a/vtkm/filter/resampling/Probe.h +++ b/vtkm/filter/resampling/Probe.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_resampling_Probe_h #define vtk_m_filter_resampling_Probe_h -#include +#include #include namespace vtkm @@ -33,7 +33,7 @@ namespace resampling /// transferred to it. The fields are transfered by probing the input data /// 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: /// @brief Specify the geometry to probe with. diff --git a/vtkm/filter/scalar_topology/ContourTreeUniform.h b/vtkm/filter/scalar_topology/ContourTreeUniform.h index fdf0c4dc0..8c56d79b0 100644 --- a/vtkm/filter/scalar_topology/ContourTreeUniform.h +++ b/vtkm/filter/scalar_topology/ContourTreeUniform.h @@ -57,7 +57,7 @@ #ifndef vtk_m_filter_scalar_topology_ContourTreeUniform_h #define vtk_m_filter_scalar_topology_ContourTreeUniform_h -#include +#include #include namespace vtkm @@ -72,7 +72,7 @@ namespace scalar_topology /// peak of contour /// Based on the algorithm presented in the paper: // “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: VTKM_CONT @@ -89,7 +89,7 @@ private: /// peak of contour /// Based on the algorithm presented in the paper: // “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: VTKM_CONT diff --git a/vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h b/vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h index c47121de9..bd98b6960 100644 --- a/vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h +++ b/vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h @@ -56,7 +56,7 @@ #include #include -#include +#include #include #include @@ -85,7 +85,7 @@ namespace scalar_topology /// 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 /// 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: VTKM_CONT bool CanThread() const override diff --git a/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h b/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h index 0f7fa1e06..23610971a 100644 --- a/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h +++ b/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h @@ -63,7 +63,7 @@ #include #include -#include +#include #include namespace vtkm @@ -87,8 +87,7 @@ namespace scalar_topology /// 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 /// constructed on rank 0. -class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeUniformDistributed - : public vtkm::filter::FilterField +class VTKM_FILTER_SCALAR_TOPOLOGY_EXPORT ContourTreeUniformDistributed : public vtkm::filter::Filter { public: VTKM_CONT bool CanThread() const override diff --git a/vtkm/filter/scalar_topology/DistributedBranchDecompositionFilter.h b/vtkm/filter/scalar_topology/DistributedBranchDecompositionFilter.h index 774c8ae35..be1b677a0 100644 --- a/vtkm/filter/scalar_topology/DistributedBranchDecompositionFilter.h +++ b/vtkm/filter/scalar_topology/DistributedBranchDecompositionFilter.h @@ -42,7 +42,7 @@ #ifndef vtk_m_filter_scalar_topology_DistributedBranchDecompositionFilter_h #define vtk_m_filter_scalar_topology_DistributedBranchDecompositionFilter_h -#include +#include #include namespace vtkm diff --git a/vtkm/filter/uncertainty/ContourUncertainUniform.h b/vtkm/filter/uncertainty/ContourUncertainUniform.h index ed08ba5ed..5da8bc433 100644 --- a/vtkm/filter/uncertainty/ContourUncertainUniform.h +++ b/vtkm/filter/uncertainty/ContourUncertainUniform.h @@ -21,7 +21,7 @@ #ifndef vtk_m_filter_uncertainty_ContourUncertainUniform_h #define vtk_m_filter_uncertainty_ContourUncertainUniform_h -#include +#include #include namespace vtkm @@ -40,7 +40,7 @@ namespace uncertainty /// isosurface uncertainty corresponds to uncertainty in topology cases in /// 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"; diff --git a/vtkm/filter/uncertainty/ContourUncertainUniformMonteCarlo.h b/vtkm/filter/uncertainty/ContourUncertainUniformMonteCarlo.h index 673b1b94d..df4e60280 100644 --- a/vtkm/filter/uncertainty/ContourUncertainUniformMonteCarlo.h +++ b/vtkm/filter/uncertainty/ContourUncertainUniformMonteCarlo.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_uncertainty_ContourUncertainUniformMonteCarlo_h #define vtk_m_filter_uncertainty_ContourUncertainUniformMonteCarlo_h -#include +#include #include namespace vtkm @@ -25,8 +25,7 @@ namespace uncertainty /// We encourage usage of the ContourUncertainUniform filter because the Monte Carlo approach implemented /// in this filter is computationally inefficient. /// -class VTKM_FILTER_UNCERTAINTY_EXPORT ContourUncertainUniformMonteCarlo - : public vtkm::filter::FilterField +class VTKM_FILTER_UNCERTAINTY_EXPORT ContourUncertainUniformMonteCarlo : public vtkm::filter::Filter { std::string NumberNonzeroProbabilityName = "num_nonzero_probability"; std::string EntropyName = "entropy"; diff --git a/vtkm/filter/vector_analysis/CrossProduct.h b/vtkm/filter/vector_analysis/CrossProduct.h index e203ff23e..89151fef2 100644 --- a/vtkm/filter/vector_analysis/CrossProduct.h +++ b/vtkm/filter/vector_analysis/CrossProduct.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_vector_analysis_CrossProduct_h #define vtk_m_filter_vector_analysis_CrossProduct_h -#include +#include #include @@ -26,7 +26,7 @@ namespace vector_analysis /// /// The left part of the operand is the "primary" field and the right part of the operand /// 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: VTKM_CONT diff --git a/vtkm/filter/vector_analysis/DotProduct.h b/vtkm/filter/vector_analysis/DotProduct.h index e555f40bc..a1ed750de 100644 --- a/vtkm/filter/vector_analysis/DotProduct.h +++ b/vtkm/filter/vector_analysis/DotProduct.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_vector_analysis_DotProduct_h #define vtk_m_filter_vector_analysis_DotProduct_h -#include +#include #include namespace vtkm @@ -28,7 +28,7 @@ namespace vector_analysis /// primary and secondary seldom matters). /// /// 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: VTKM_CONT DotProduct(); diff --git a/vtkm/filter/vector_analysis/Gradient.h b/vtkm/filter/vector_analysis/Gradient.h index fe792210e..7f6ddb300 100644 --- a/vtkm/filter/vector_analysis/Gradient.h +++ b/vtkm/filter/vector_analysis/Gradient.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_vector_analysis_Gradient_h #define vtk_m_filter_vector_analysis_Gradient_h -#include +#include #include namespace vtkm @@ -31,7 +31,7 @@ namespace vector_analysis /// /// If no explicit name for the output field is provided the filter will /// 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: /// @brief Specify whether to compute gradients diff --git a/vtkm/filter/vector_analysis/SurfaceNormals.h b/vtkm/filter/vector_analysis/SurfaceNormals.h index 989912bb7..5256c3a8f 100644 --- a/vtkm/filter/vector_analysis/SurfaceNormals.h +++ b/vtkm/filter/vector_analysis/SurfaceNormals.h @@ -10,7 +10,7 @@ #ifndef vtk_m_filter_vector_analysis_SurfaceNormal_h #define vtk_m_filter_vector_analysis_SurfaceNormal_h -#include +#include #include namespace vtkm @@ -41,7 +41,7 @@ namespace vector_analysis /// the `SetCellNormalsName()` and `SetPointNormalsName()` methods. The filter will also /// 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: /// Create SurfaceNormals filter. This calls diff --git a/vtkm/filter/vector_analysis/VectorMagnitude.h b/vtkm/filter/vector_analysis/VectorMagnitude.h index d178f65a0..0208e28ec 100644 --- a/vtkm/filter/vector_analysis/VectorMagnitude.h +++ b/vtkm/filter/vector_analysis/VectorMagnitude.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_vector_analysis_VectorMagnitude_h #define vtk_m_filter_vector_analysis_VectorMagnitude_h -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace vector_analysis /// name for the output field is ``magnitude``, but that can be overridden using /// 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: VectorMagnitude(); diff --git a/vtkm/filter/zfp/ZFPCompressor1D.h b/vtkm/filter/zfp/ZFPCompressor1D.h index fb0c4f61f..ae53f2b8f 100644 --- a/vtkm/filter/zfp/ZFPCompressor1D.h +++ b/vtkm/filter/zfp/ZFPCompressor1D.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_zfp_ZFPCompressor1D_h #define vtk_m_filter_zfp_ZFPCompressor1D_h -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace zfp /// output of compressed data. /// @warning /// 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: /// @brief Specifies the rate of compression. diff --git a/vtkm/filter/zfp/ZFPCompressor2D.h b/vtkm/filter/zfp/ZFPCompressor2D.h index 964853b52..f21273c0f 100644 --- a/vtkm/filter/zfp/ZFPCompressor2D.h +++ b/vtkm/filter/zfp/ZFPCompressor2D.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_zfp_ZFPCompressor2D_h #define vtk_m_filter_zfp_ZFPCompressor2D_h -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace zfp /// output of compressed data. /// @warning /// 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: /// @brief Specifies the rate of compression. diff --git a/vtkm/filter/zfp/ZFPCompressor3D.h b/vtkm/filter/zfp/ZFPCompressor3D.h index 6e38c8383..159a1e9cb 100644 --- a/vtkm/filter/zfp/ZFPCompressor3D.h +++ b/vtkm/filter/zfp/ZFPCompressor3D.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_zfp_ZFPCompressor3D_h #define vtk_m_filter_zfp_ZFPCompressor3D_h -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace zfp /// output of compressed data. /// @warning /// 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: /// @brief Specifies the rate of compression. diff --git a/vtkm/filter/zfp/ZFPDecompressor1D.h b/vtkm/filter/zfp/ZFPDecompressor1D.h index ae7da1e01..66a1be90e 100644 --- a/vtkm/filter/zfp/ZFPDecompressor1D.h +++ b/vtkm/filter/zfp/ZFPDecompressor1D.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_zfp_ZFPDecompressor1D_h #define vtk_m_filter_zfp_ZFPDecompressor1D_h -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace zfp /// the decompressed version of the data. /// @warning /// 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: /// @brief Specifies the rate of compression. diff --git a/vtkm/filter/zfp/ZFPDecompressor2D.h b/vtkm/filter/zfp/ZFPDecompressor2D.h index 44ecd3e1a..d590e4a61 100644 --- a/vtkm/filter/zfp/ZFPDecompressor2D.h +++ b/vtkm/filter/zfp/ZFPDecompressor2D.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_zfp_ZFPDecompressor2D_h #define vtk_m_filter_zfp_ZFPDecompressor2D_h -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace zfp /// the decompressed version of the data. /// @warning /// This filter is currently only supports 2D structured cell sets. -class VTKM_FILTER_ZFP_EXPORT ZFPDecompressor2D : public vtkm::filter::FilterField +class VTKM_FILTER_ZFP_EXPORT ZFPDecompressor2D : public vtkm::filter::Filter { public: /// @brief Specifies the rate of compression. diff --git a/vtkm/filter/zfp/ZFPDecompressor3D.h b/vtkm/filter/zfp/ZFPDecompressor3D.h index fb5baa4db..8263a4123 100644 --- a/vtkm/filter/zfp/ZFPDecompressor3D.h +++ b/vtkm/filter/zfp/ZFPDecompressor3D.h @@ -11,7 +11,7 @@ #ifndef vtk_m_filter_zfp_ZFPDecompressor3D_h #define vtk_m_filter_zfp_ZFPDecompressor3D_h -#include +#include #include namespace vtkm @@ -27,7 +27,7 @@ namespace zfp /// the decompressed version of the data. /// @warning /// This filter is currently only supports 3D structured cell sets. -class VTKM_FILTER_ZFP_EXPORT ZFPDecompressor3D : public vtkm::filter::FilterField +class VTKM_FILTER_ZFP_EXPORT ZFPDecompressor3D : public vtkm::filter::Filter { public: /// @brief Specifies the rate of compression. diff --git a/vtkm/source/PerlinNoise.cxx b/vtkm/source/PerlinNoise.cxx index 3b667b26b..ddaa6e65f 100644 --- a/vtkm/source/PerlinNoise.cxx +++ b/vtkm/source/PerlinNoise.cxx @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -125,7 +125,7 @@ struct PerlinNoiseWorklet : public vtkm::worklet::WorkletVisitPointsWithCells vtkm::Id Repeat; }; -class PerlinNoiseField : public vtkm::filter::FilterField +class PerlinNoiseField : public vtkm::filter::Filter { public: VTKM_CONT PerlinNoiseField(vtkm::IdComponent tableSize, vtkm::IdComponent seed)