48 vtkInformationVector **inputVector,
49 vtkInformationVector *outputVector) {
52 auto inputDataSet = vtkDataSet::GetData(inputVector[0]);
57 if(this->GetInputArrayAssociation(0, inputVector) != 0)
58 return !this->
printErr(
"Input array needs to be a point data array.");
60 auto inputScalars = this->GetInputArrayToProcess(0, inputVector);
62 return !this->
printErr(
"Unable to retrieve input array.");
64 if(inputScalars->GetNumberOfComponents() != 1)
65 return !this->
printErr(
"Input array needs to be a scalar array.");
73 auto inputOrder = this->
GetOrderArray(inputDataSet, 0, triangulation,
false);
80 outputScalars->DeepCopy(inputScalars);
83 outputOrder->DeepCopy(inputOrder);
85 double persistenceThreshold = this->PersistenceThreshold;
86 if(!this->ThresholdIsAbsolute) {
88 outputScalars->GetRange(range);
89 persistenceThreshold = (range[1] - range[0]) * persistenceThreshold;
95 outputScalars->GetDataType(), triangulation->getType(),
96 (status = this->removeNonPersistentExtrema<VTK_TT,
ttk::SimplexId, TTK_TT>(
97 ttkUtils::GetPointer<VTK_TT>(outputScalars),
98 ttkUtils::GetPointer<ttk::SimplexId>(outputOrder),
100 static_cast<TTK_TT *
>(triangulation->getData()), persistenceThreshold,
101 this->ComputePerturbation, this->PairType)));
107 auto outputDataSet = vtkDataSet::GetData(outputVector, 0);
108 outputDataSet->ShallowCopy(inputDataSet);
110 auto outputDataSetPD = outputDataSet->GetPointData();
111 outputDataSetPD->AddArray(outputScalars);
112 outputDataSetPD->AddArray(outputOrder);
vtkDataArray * GetOrderArray(vtkDataSet *const inputData, const int scalarArrayIdx, ttk::Triangulation *triangulation, const bool getGlobalOrder=false, const int orderArrayIdx=0, const bool enforceOrderArrayIdx=false)