<div dir="ltr">Hi Hengda,<div><br></div><div>The thin-plate spline is not inverse-consistent, so switching the source</div><div>points with the target points will not give the inverse transform. There are</div><div>probably modified algorithms based on the thin-plate spline that actually</div><div>are inverse consistent, but vtkThinPlateSplineTransform only provides</div><div>the basic algorithm as described by Bookstein in 1989.</div><div><br></div><div>Inversion of the vtkThinPlateSplineTransform is done with an iterative</div><div>solver based on Newton's method, which uses the derivative of the</div><div>transform. Like all derivative-based solvers, it only works well if the</div><div>function is smooth. If the thin-plate spline is given densely-packed</div><div>landmarks, then perturbations in the landmark measurements can result</div><div>in a non-smooth transformation that is not invertible. The usual solution</div><div>to this is to use an approximating spline, but unfortunately this is not</div><div>provided by vtkThinPlateSplineTransform.</div><div><br></div><div> - David</div><div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 22, 2018 at 11:09 AM, Hengda He <span dir="ltr"><<a href="mailto:hh2699@columbia.edu" target="_blank">hh2699@columbia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David<br>
<br>
Thank you very much for the reply!<br>
Now I am wondering what's the difference between these two ways of using<br>
vtkThinPlateSplineTransform:<br>
(1) Getting vtkThinPlateSplineTransform and then inverse<br>
transform->SetSourceLandmarks( sourcepoints );<br>
transform->SetTargetLandmarks( targetpoints );<br>
transform->Inverse();<br>
And apply the transform to source image using vtkImageReslice<br>
<br>
(2) Getting inverse vtkThinPlateSplineTransform directly<br>
transform->SetSourceLandmarks( targetpoints );<br>
transform->SetTargetLandmarks( sourcepoints );<br>
And apply the transform to source image using vtkImageReslice<br>
<br>
When I tried the first one, "InverseTransformPoint: no convergence" happens<br>
and its very likely because that we have too many landmarks. And when I<br>
tried the second one, there are many voxels clearly outside the boundary in<br>
the deformed volume which is wrong. I am using vtkThinPlateSplineTransform<br>
in 3D on binary images. Any help would be appreciated!<br>
<br>
Best,<br>
Hengda<br></blockquote></div></div></div></div>