21#ifndef vtkCellAttributeCalculator_h
22#define vtkCellAttributeCalculator_h
24#include "vtkCommonDataModelModule.h"
28#include <unordered_map>
30VTK_ABI_NAMESPACE_BEGIN
43 template <
typename CalculatorType>
46 auto result = this->PrepareForGrid(cell, field);
47 return CalculatorType::SafeDownCast(result);
Perform a per-cell calculation on a vtkCellAttribute.
static vtkCellAttributeCalculator * New()
vtkSmartPointer< CalculatorType > Prepare(vtkCellMetadata *cell, vtkCellAttribute *field)
Return an instance of a calculator ready to work on cell and field.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkCellAttributeCalculator() override=default
vtkCellAttributeCalculator()=default
virtual vtkSmartPointer< vtkCellAttributeCalculator > PrepareForGrid(vtkCellMetadata *vtkNotUsed(cell), vtkCellAttribute *vtkNotUsed(field))
Subclasses should override this to create an instance of their class with member variables set to per...
A function defined over the physical domain of a vtkCellGrid.
Visualization data composed of cells of arbitrary type.
a simple class to control print indentation
abstract base class for most VTK objects
Hold a reference to a vtkObjectBase instance.