[vtkusers] vtkQuadricDecimation does not propagate Pedigree IDs to output
Mikhail SAZONOV
mikhail.sazonov at opencascade.com
Tue Nov 20 05:02:01 EST 2018
Hello,
I am wondering if there is possibility to propagate Pedigree IDs of cells from input of vtkQuadricDecimation to its output. I was tried many ways, with and without pipelines. Every time the array of pedigree ids is a null pointer.
<pre>
vtkSmartPointer<vtkPolyData> aPolyData = vtkSmartPointer<vtkPolyData>::New ();
vtkSmartPointer<vtkPoints> aVertData = vtkSmartPointer<vtkPoints>::New ();
aPolyData->SetPoints (aVertData);
...
vtkSmartPointer<vtkIdFilter> aIdFilter = vtkIdFilter::New ();
aIdFilter->SetInputData (aPolyData);
aIdFilter->SetFieldData (1);
aIdFilter->SetPointIds (0);
aIdFilter->SetCellIds (1);
aIdFilter->SetIdsArrayName ("id");
vtkSmartPointer<vtkQuadricDecimation> anAlgo = vtkSmartPointer<vtkQuadricDecimation>::New();
anAlgo->SetInputConnection (aIdFilter->GetOutputPort ());
anAlgo->SetTargetReduction (theTargetRatio);
anAlgo->Update ();
auto* aNewPolyData = anAlgo->GetOutput();
vtkIntArray* aNewPedIds = static_cast<vtkIntArray*>(aNewPolyData->GetCellData()->GetPedigreeIds());
</pre>
aNewPedIds is null.
Thanks in advance.
Best regards,
Mikhail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181120/238c4dc4/attachment.html>
More information about the vtkusers
mailing list