[Insight-users] Computing the Metric?

Geoff Topping g_topping at hotmail.com
Mon Aug 17 20:12:53 EDT 2009


Hi,

The line:

      OutputPointType transformedPoint = this->m_Transform->TransformPoint( inputPoint );

takes inputPoint, which is a point in the fixed image, and uses the transform to find the corresponding transfomred point in the moving image.


The following line:

      const RealType movingValue  = this->m_Interpolator->Evaluate( transformedPoint );

uses the interpolator to find the value of the moving image at the transformed point.  Since the transformed point in the moving image is the point corresponding to the original point in the fixed image, the resulting fixed and moving values correspond  and are used pairwise to compute the metric.


For reference, see ImageToImageMetric.txx, in which the line can be found in the Initialize function:

      m_Interpolator->SetInputImage( m_MovingImage );

Geoff Topping


>GetValueAndDerivative(const TransformParametersType & parameters, 
>                        MeasureType & value, DerivativeType  &>derivative) const
>
>computes
>the metric value and the gradient. Its basically done by running
>through the fixed image and summing the difference between the>fixed
>image values and the transformed fixed image values:
>
>      const RealType diff = movingValue - fixedValue;   
>      measure += diff * diff;
>
>where:
>
>OutputPointType transformedPoint =
>this->m_Transform->TransformPoint( inputPoint );  // Using the
>current fixed image inputPoint
>
>const RealType movingValue  = this->m_Interpolator->Evaluate(>transformedPoint );
>const RealType fixedValue     = ti.Value(); // The current value>of the pixel in the fixed image.
>
>As I understand the current transform parameters are applied to
>the fixed image and the corresponding transformed pixel value is
>computed. So the 'measure' is actually the difference between
>the fixed and the transformed fixed image:


_________________________________________________________________
Stay in the loop and chat with friends, right from your inbox!
http://go.microsoft.com/?linkid=9671354


More information about the Insight-users mailing list