Non-rigid mesh registration of lung contour meshes

You can do it with vtkThinPlateSplineTransform, check out:

https://discourse.vtk.org/t/very-long-time-to-deform-fe-mesh-with-thin-plate-spline-transformation/

from vedo import *
msh = Mesh('liver.stl')
source = msh.clone().subsample(0.1)
target = source.clone().scale([1.4,0.7,1.4]).shift(0.2,0.1,0.3)
arrows = Arrows(source, target, s=0.3, c='k')
warped = msh.clone().warp(source, target).alpha(0.2)
show(msh, arrows, warped, axes=7)
#print(type(warped.transform))

liver.stl (550.9 KB)