60 vtkInformationVector **inputVector,
61 vtkInformationVector *outputVector) {
63 vtkDataSet *input = vtkDataSet::GetData(inputVector[0]);
64 vtkDataSet *output = vtkDataSet::GetData(outputVector);
66 output->ShallowCopy(input);
68 vtkPointData *inputPointData = input->GetPointData();
69 vtkNew<vtkPointData> outputPointData{};
71#ifndef TTK_ENABLE_KAMIKAZE
73 this->
printErr(
"Input has no point data.");
77 if(!outputPointData) {
78 this->
printErr(
"vtkPointData memory allocation problem.");
83 if(AvailableFields.empty()) {
89 for(
auto &scalar : SelectedFields) {
95 std::ptrdiff_t
const pos
96 = std::find(AvailableFields.begin(), AvailableFields.end(), scalar)
97 - AvailableFields.begin();
98 if(pos < RangeId[0] || pos > RangeId[1]) {
102 if(!std::regex_match(scalar, std::regex(RegexpString))) {
106 vtkDataArray *arr = inputPointData->GetArray(scalar.c_str());
110 if(SelectedFields.size() != 1 && RangeId[1] - RangeId[0] != 0) {
111 this->
printErr(
"Can't rename more than one field.");
118 localFieldCopy->DeepCopy(arr);
119 localFieldCopy->SetName(SelectedFieldName.data());
120 arr = localFieldCopy;
124 outputPointData->AddArray(arr);
127 }
catch(std::regex_error &) {
131 output->GetPointData()->ShallowCopy(outputPointData);