[Insight-users] Re: Q: Metric's derivative + ITK implementation

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 5 15:24:57 EDT 2007



Hi Lisa,


1) Yes, the gradient of the Moving image should only be
    computed *once* as part of the Metric initialization.


2) The derivative that we are computing are for the
    Metric with respect to the transform parameters.

    A change of the transform parameters results in a
    displacement of the projections of the fixed image
    points on top of the moving image reference system.

    Displacements of these projections result in changes
    in the intensity that is recovered from the Moving
    image. This last variation is

                     dM / dx'

    where x' are the coordinates of a point in the Moving
    image coordinate system, and M is the metric.

    There is no need for resampling the moving image
    before applying the derivative. As you pointed out:

              dM/dp = dM/dx' * dx'/dp

    where x' are the coordinates of points in the
    moving image coordinate system. The moving image
    does not move with respect to its coordinate system.
    Nothing changes in that coordinate system, therefore
    there is no need for recomputing the image gradient.


3) You will follow better the logic if you analyze a
    very simple metric, such as the MeanSquaresMetric.


    The metric value for transform parameters "p" is:

    M(p) = Sum over all pixels ( FI(x) - MI( T(p,x) )^2

    FI = fixed image
    MI = moving image
    x = coordinates of one pixel in Fixed reference system
    x' = T(p,x) = x transformed by T with parameters p

    then the derivative is

    dM(p)/dp = 2 * Sum (FI(x)-MI(T(p,x))* dMI(T(p,x))/dp


           where

    dMI(T(p,x))/dp = dMI(x')/dp = dMI(x')/dx' * dx'/dp


        where dMI(x')/dx' = gradient of moving image

        and

    dx'/dp = dT(p,x)/dp = Jacobian of the transformed point
                    with respect to the transform parameters.






   Regards,


      Luis




-------------------
Lisa Tang wrote:
> Hello Luis and Lydia,
> 
> I have some questions on formulating the derivative of a similarity metric. 
> 
> In your contribution in "Insight into Images", you stated that "the first
> term of dS(F,M,T,p)/dx' is dependent on the gradient of the moving image and
> the values of the fixed image. These values remain constant during the
> registration..." (p. 249-251). Do you mean that the gradient of the moving
> image needs to be calculated only once (when the metric is initialized)?
> That is, in ITK, the call GetGradientImage() in
> metric->GetValueAndDerivative()/ metric->GetDerivative() does not
> recalculate the gradient of the moving image?
> 
> Does this suggest dM/dp = dM/dx * dT(x,p)/dp? However, my intuition is that
> dM/dp = dM/dx' * dx'/dp, that is, M should be differentiated w.r.t. x'
> (transformed coordinates)? Don't we then need to recalculate gradient of the
> **transformed** moving image per iteration?
> 
> Could you also clarify why "it is valid to compute derviatives w.r.t the
> coordinates xi considering pj to be fixed parameters or compute derivatives
> w.r.t the parameters pj considering the input coordinates to be fixed"
> (p.249)?
> 
> Thanks so much for your help,
> Lisa
> 


More information about the Insight-users mailing list