[Insight-developers] Re: Kernel transforms. K symmetric?

Luis Ibanez luis.ibanez@kitware.com
Thu, 12 Dec 2002 14:17:56 -0500


Hi Jim,

The Kernel matrix is noted as "G" in the code

Here is what I can see:

- ElasticBodySpline            is symmetric
- ElasticBodyReciprocalSpline  is symmetric
- VolumeSpline                 is diagonal
- ThinPlateSpline              is diagonal
- ThinPlateR2LogSpline         is diagonal


The ComputG( vector ) method is virtual
in KernelTranform. It is overloaded in
every particular KernelSplineTransform.

The method is only invoked in

    ComputeDeformationContribution()

Here seems to be the place where we could
take advantage of the matrix being symmetric
or diagonal in order to reduce the number
of operations.

ComputeDeformationContribution() is however,
already overloaded in :

- ThinPlateR2LogSpline
- VolumeSpline
- ThinPlateSpline

To take advantage of the diagonal property.

It may be a matter then, of overloading
this method in the ElasticBody and
ElasticBodySpline in order to take advantage
of the symmetry.


Thanks for improving this code.


    Luis


----------------------------

Miller, James V (Research) wrote:
> Luis,
> 
>  
> 
> Is the K matrix of the various kernel transforms (thin plate, elastic 
> body, volume spline) always symmetric?
> 
>  
> 
> I think it is for the TPS.  If it is always symmetric, I am going to 
> rewrite it so that it only evaluates the upper triagular part of K and 
> copies values into the lower triangle.
> 
>  
> 
> Jim   
> 
>  
>