[Insight-users] some questions with the ThinPlateSplineWarp.cxx
    Luis Ibanez 
    luis.ibanez at kitware.com
       
    Wed Apr 30 16:28:36 EDT 2008
    
    
  
Hi Feng,
Could you select a smaller set of landmarks that will still illustrate
the problem that you are encountering ?
In this way your attachment will make it to the mailing list.
--
About your concerns regarding the attenuation of the Kernel with respect
to the distance, please not that what is computed in the Method:
ComputeDeformationContribution() in the KernelTransform family, is the
G-matrix from equation (4) in the paper:
   "A Physics-Based Coordinate Transformation for 3-D Image Matching"
   by Davis, Khotanzad, Flamig, and Harms,
   IEEE TMI Vol. 16, No. 3 June 1997.
Matrix G is later use in the Method ComputeWMatrix() for solving
the following equation:
                 W = L^-1 . Y
Where
Y = the displacement among landmarks
W = Spline coefficients
L = is a matrix where G is a submatrix
G = is the function that we are computing in ComputeG
Since the coefficients W are use for mapping points in the
Transform, the values of G end up being used in their
inverse form. Which mean that the factors:
         r^2
and
         r^2 . log (r)
end up in the denominator of the contributions to the
deformation field.
See the calls to:
    SVDSolverType svd( this->m_LMatrix, 1e-8 );
    this->m_WMatrix = svd.solve( this->m_YMatrix );
in lines 206,207 of itkKernelTransform.txx
To put it short, the values computed in the G-matrix
are going to be used, in the form of G-inverse when
the effect of the Kernel is used for computing the
deformation field.
I would suggest you to play with the example:
   Insight/Examples/Registration/ThinPlateSplineWarp.cxx
and to call it with the following parameters:
ThinPlateSplineWarp  LandmarkWarping3Landmarks1.txt
    brainweb165a10f17.mha deformedImage.mha deformationField.mha
where
brainweb165a10f17.mha can be found in:
http://public.kitware.com/pub/itk/Data/BrainWeb/
and
LandmarkWarping3Landmarks1.txt can be found in
   Insight/Examples/Data/
Try this standard case first, and once you get it to work,
then you can move to apply the same method to your
images.
    Regards,
        Luis
-----------------
feng yang wrote:
> Hi, Luis,
>    I have sent email to the Insight-users list several days ago,but just 
> now I search in the mailing list, and there isn't the lettre I have 
> sent.Because the attaching files are too big?
>  
>    My input is just the Landmark of a heart vector field(I have deleted 
> the part for reading the input image and get the deformed image in the 
> ThinPlateSplineWarp.cxx,because I am not care about it), and the output 
> is the deformation field.
>     I attached you the input file and the ThinPlateSplineWarp.cxx I used 
> in my project. But it failed, so this time I just interpret the input 
> file and output file.The input file is the LandMark.txt,which includes 
> original coordinates and the terminal coordinates of the deformation.The 
> Landmark have located the heart in a local region,so it doesn't have the 
> problem "the landmarks are not located in space at the positions that 
> you expect them to be with respect to the image."
>     In addition, I thought the TPS transform will tend to zero when the 
> distance tend to infinity,because for 3D TPS, the sum of the wi*r will 
> be wero smaller as the pixel is farther from the original Landmark. But 
> I don't think it's true for the 2D TPS, because the sum of the 
> wi*r^2*logr will be larger as the pixel is farther from the original 
> Landmark. Is this a bug for the 2D TPS?
>  
> The best way is to send the landMark.txt and mytps.cxx to you, is there 
> any method to do this?(Because the attached files are larger than 40k)
>  
> Thanks!
>  
> Feng
    
    
More information about the Insight-users
mailing list