# vtkPoints id re-ordering

**URL:** https://discourse.vtk.org/t/vtkpoints-id-re-ordering/11444
**Category:** Support
**Created:** [May 12, 2023, 3:06pm UTC](https://discourse.vtk.org/t/vtkpoints-id-re-ordering/11444 "2023-05-12T15:06:18Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [May 16, 2023, 1:49pm UTC](https://discourse.vtk.org/t/vtkpoints-id-re-ordering/11444/6 "2023-05-16T13:49:45Z")

</div>

Hello,

In that case, you need to pre-process the target mesh so they closely match in space and, hence, satisfies the algorithm’s pre-condition. This is an operation called **point set registration** ([Point-set registration - Wikipedia](https://en.wikipedia.org/wiki/Point-set_registration)). Chose one that only uses rigid transformations so the points’ relative distances remain the same.

Further reading:

Doing it in VTK:  
[https://vtk.org/doc/nightly/html/classvtkIterativeClosestPointTransform.html](https://vtk.org/doc/nightly/html/classvtkIterativeClosestPointTransform.html)

> [@Vtk point set registration](https://discourse.vtk.org/t/vtk-point-set-registration/2599):
>
> Does the ICP algorithm support deformable or non-rigid meshes?

Doing it in ITK:  
[https://examples.itk.org/src/registration/metricsv4/registertwopointsets/documentation](https://examples.itk.org/src/registration/metricsv4/registertwopointsets/documentation)  
Doing it in CGAL:  
[https://doc.cgal.org/latest/Point\_set\_processing\_3/index.html#Point\_set\_processing\_3Examples\_registration\_PointMatcher](https://doc.cgal.org/latest/Point_set_processing_3/index.html#Point_set_processing_3Examples_registration_PointMatcher)

You can do a duckduckgo search for other libraries out there with such operation implemented.

regards,

PC

---

_[View the full topic](https://discourse.vtk.org/t/vtkpoints-id-re-ordering/11444)._
