4#include <vtkInformation.h>
6#include <vtkPointData.h>
7#include <vtkPointSet.h>
8#include <vtkUnsignedCharArray.h>
15 this->SetNumberOfInputPorts(1);
16 this->SetNumberOfOutputPorts(1);
22 vtkInformation *info) {
24 info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(),
"vtkPointSet");
31 vtkInformation *info) {
40 vtkInformationVector **inputVector,
41 vtkInformationVector *outputVector) {
43 auto inputPointSet = vtkPointSet::GetData(inputVector[0]);
44 auto outputPointSet = vtkPointSet::GetData(outputVector);
48 int const keepGoing = checkEmptyMPIInput<ttk::Triangulation>(triangulation);
60 outputPointSet->DeepCopy(inputPointSet);
63 auto inputPoints = inputPointSet->GetPoints();
64 auto outputPoints = outputPointSet->GetPoints();
70 const auto hasMask{this->UseMaskScalarField && inputMaskField !=
nullptr};
74 switch(outputPoints->GetDataType()) {
76 this->smooth<VTK_TT>(triangulation->getData(), this->NumberOfIterations));
#define ttkNotUsed(x)
Mark function/method parameters that are not used in the function body at all.
static vtkInformationIntegerKey * SAME_DATA_TYPE_AS_INPUT_PORT()
ttk::Triangulation * GetTriangulation(vtkDataSet *dataSet)
vtkDataArray * GetOptionalArray(const bool &enforceArrayIndex, const int &arrayIndex, const std::string &arrayName, vtkDataSet *const inputData, const int &inputPort=0)
TTK VTK-filter for geometry smoothing.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int FillInputPortInformation(int port, vtkInformation *info) override
int FillOutputPortInformation(int port, vtkInformation *info) override
~ttkGeometrySmoother() override
static void * GetVoidPointer(vtkDataArray *array, vtkIdType start=0)
void setDebugMsgPrefix(const std::string &prefix)
void setMaskDataPointer(const char *const mask)
int preconditionTriangulation(AbstractTriangulation *triangulation)
void setDimensionNumber(const int &dimensionNumber)
void setOutputDataPointer(void *data)
void setInputDataPointer(void *data)
const char MaskScalarFieldName[]
default name for mask scalar field
vtkStandardNewMacro(ttkGeometrySmoother)