42 vtkInformationVector **inputVector,
43 vtkInformationVector *outputVector) {
45 auto input = vtkDataSet::GetData(inputVector[0]);
46 auto output = vtkDataSet::GetData(outputVector);
48#ifndef TTK_ENABLE_KAMIKAZE
49 if(input ==
nullptr) {
50 this->
printErr(
"Input pointer is NULL.");
53 if(input->GetNumberOfPoints() == 0) {
54 this->
printErr(
"Input has no point.");
57 if(input->GetPointData() ==
nullptr) {
58 this->
printErr(
"Input has no point data.");
61 if(output ==
nullptr) {
62 this->
printErr(
"Output pointer is NULL.");
69 if(triangulation ==
nullptr) {
76 output->ShallowCopy(input);
82 const auto inputScalarField = this->GetInputArrayToProcess(0, inputVector);
84#ifndef TTK_ENABLE_KAMIKAZE
85 if(inputScalarField ==
nullptr) {
86 this->
printErr(
"Input scalar field pointer is NULL.");
91 const auto vertexNumber = inputScalarField->GetNumberOfTuples();
93 const auto inputOffsets
94 = this->
GetOrderArray(input, 0, triangulation,
false, 1,
false);
99 switch(inputScalarField->GetDataType()) {
116 this->
printErr(
"Unsupported data type :(");
120 outputScalarField->SetNumberOfTuples(vertexNumber);
121 outputScalarField->SetName(inputScalarField->GetName());
123 vtkNew<vtkIntArray> outputOffsetField{};
124 outputOffsetField->SetNumberOfTuples(vertexNumber);
128 std::array<double, 2> sfRange{};
129 inputScalarField->GetRange(sfRange.data());
134 inputScalarField->GetDataType(), triangulation->getType(),
139 *
static_cast<TTK_TT *
>(triangulation->getData())));
142 outputOffsetField->SetTuple1(i, this->compressedOffsets_[i]);
144 output->GetPointData()->AddArray(outputScalarField);
145 output->GetPointData()->AddArray(outputOffsetField);
vtkDataArray * GetOrderArray(vtkDataSet *const inputData, const int scalarArrayIdx, ttk::Triangulation *triangulation, const bool getGlobalOrder=false, const int orderArrayIdx=0, const bool enforceOrderArrayIdx=false)