[Insight-developers] Re: [Insight-users] about TPS and EBS
Luis Ibanez
luis.ibanez@kitware.com
Wed, 20 Mar 2002 11:34:47 -0500
Hi zhangzhijun
Thank you for sending us your code, it has been very useful
for reproducing your results. Based on it, we added an
example to ITK. So....
First the good news:
the "ThinPlateSpline" Example is now complete. It is located at:
Insight/Examples/ThinPlateSpline
It is comparing computing time between ITK and VTK for a set
of 36 landmarks placed in a plane. Both the landmarks and a set
of points are displayed. VTK mapped points are displayed on
green and the ITK mapped points are displayed on red.
Now the bad news:
You are right ! , ITK's TPS is much slower that VTK's.
The timing we are getting is:
- ITK TPS : 2.69 sec
- VTK TPS : 0.026 sec
and as you mention, there could be a problem in the computation
of the Matrix given that the points are not mapped correctly.
We are looking into the implementation and searching for a
way to speed it up. The original implementation trying to follow
closely the notation used in Davis's paper. It seems that this is
good for clarity but not for performance. We expect to get it
running faster soon.
Thanks
Luis
====================================
zhangzhijun wrote:
>Dear Mr Luis and Mr David:
> Here is my program. It rans with VC++6.0, latest VTK and ITK.
>When run the program, first click file-->new to open a new window, then
>choose the menu "add" to add the 3 kind of splines, The menu item and the
>functions are like these:
> add thin plate transformation for VTK4.0 TPS
> add thin plate spline itk way for ITK TPS.
> add elastic body spline for ITK EBS.
> I checked the 3 methods and roughly speaking the ITK TPS and EBS
>are more than thirty times slower than VTK TPS, the vtk TPS takes less than
>one minute with 252 landmarks and the TPS and EBS results in ITK takes 30
>minutes
>or so with the same numbers of landmarks. the 2 method in ITK takes same
>time. the EBS result are neally with the vtk TPS result. but the ITK TPS
>result are totally different with the VTK TPS result. I checked for the
>"computeG" function, and I wonder whether it's properly implemented.
>According to M.H.Davis's paper the G function for the TPS should be
>G(x)=r(x)I, with r(x) a scalar value and I a identity matrix of 3 times 3,
>but the computeG funtion in the itkThinplatesplineKernelTransform seems use
>the 3 times 3 matrix with the 3 diagonal element x[0]*x[0], x[1]*x[1], and
>x[2]*x[2]. in my sense the matrix calculating in itk is slow, even slower
>than matlab. I think there should be much space
>for speed improvement.
>
>
>regards,
>zhang zhijun
>
>