44 vtkInformationVector **inputVector,
45 vtkInformationVector *outputVector) {
47 auto quads = vtkPolyData::GetData(inputVector[0]);
48 auto mesh = vtkDataSet::GetData(inputVector[1]);
49 auto output = vtkPolyData::GetData(outputVector);
52 if(triangulation ==
nullptr) {
57 auto inputCells = quads->GetPolys();
58 if(inputCells ==
nullptr || inputCells->GetData() ==
nullptr) {
59 this->
printErr(
"Invalid input quadrangle cells");
63 auto inputPoints = quads->GetPoints();
64 auto pointData = quads->GetPointData();
65 if(inputPoints ==
nullptr || inputPoints->GetData() ==
nullptr
66 || pointData ==
nullptr) {
67 this->
printErr(
"Invalid input quadrangle points");
71 auto identifiers = pointData->GetArray(
73 if(identifiers ==
nullptr) {
74 this->
printErr(
"Missing point data array named "
82 inputCells->GetNumberOfCells());
84 inputPoints->GetNumberOfPoints());
90 triangulation->getType(),
91 res = this->execute(*
static_cast<TTK_TT *
>(triangulation->getData())));
94 this->
printWrn(
"Please increase the number of relaxation iterations, of "
95 "subdivision levels or consider another function (higher "
102 vtkNew<vtkCellArray> cells{};
109 output->SetPolys(cells);
111 vtkNew<vtkPoints> points{};
117 output->SetPoints(points);
120 vtkNew<ttkSimplexIdTypeArray> valences{};
121 valences->SetName(
"Valence");
124 output->GetPointData()->AddArray(valences);
126 vtkNew<vtkFloatArray> density{};
127 density->SetName(
"Density");
130 output->GetPointData()->AddArray(density);
132 vtkNew<vtkFloatArray> deformity{};
133 deformity->SetName(
"Deformity");
136 output->GetPointData()->AddArray(deformity);
139 vtkNew<ttkSimplexIdTypeArray> infos{};
140 infos->SetName(
"Type");
143 output->GetPointData()->AddArray(infos);
145 vtkNew<ttkSimplexIdTypeArray> subd{};
146 subd->SetName(
"Subdivision");
149 output->GetPointData()->AddArray(subd);
151 vtkNew<ttkSimplexIdTypeArray> nearestVert{};
155 output->GetPointData()->AddArray(nearestVert);
158 vtkNew<vtkFloatArray> quadArea{};
159 quadArea->SetName(
"Quad Area");
161 output->GetCellData()->AddArray(quadArea);
163 vtkNew<vtkFloatArray> diagsRatio{};
164 diagsRatio->SetName(
"Diagonals Ratio");
167 output->GetCellData()->AddArray(diagsRatio);
169 vtkNew<vtkFloatArray> edgesRatio{};
170 edgesRatio->SetName(
"Edges Ratio");
173 output->GetCellData()->AddArray(edgesRatio);
175 vtkNew<vtkFloatArray> anglesRatio{};
176 anglesRatio->SetName(
"Angles Ratio");
179 output->GetCellData()->AddArray(anglesRatio);
181 vtkNew<vtkFloatArray> hausDist{};
182 hausDist->SetName(
"Hausdorff");
184 output->GetPointData()->AddArray(hausDist);
188 output->GetFieldData()->ShallowCopy(mesh->GetFieldData());