[Insight-users] Computing the gradient in the Metric?

Neuner Markus neuner.markus at gmx.net
Sun Sep 6 07:01:54 EDT 2009


Hi,

To understand why the jacobian is used i would suggest to read pages 
249-251 in the Book "Insight Into Images" by Terry S. Yoo. Ther eis 
described how and why the jacobian is used.

Greets

motes motes wrote:
> In itkMeanSquaresImageToImageMetric.txx the metric value and the
> gradient is computed. I pretty much understand how the metric value is
> computed but am a bif confused on how the gradient is computed:
>
>
>
>
>       const RealType movingValue  = this->m_Interpolator->Evaluate(
> transformedPoint );
>       const TransformJacobianType & jacobian =
> this->m_Transform->GetJacobian( inputPoint );
>       const RealType fixedValue     = ti.Value();
>       this->m_NumberOfPixelsCounted++;
>       const RealType diff = movingValue - fixedValue;
>       measure += diff * diff;
>
>       for(unsigned int par=0; par<ParametersDimension; par++)
>         {
>         RealType sum = NumericTraits< RealType >::Zero;
>         for(unsigned int dim=0; dim<ImageDimension; dim++)
>           {
>           sum += 2.0 * diff * jacobian( dim, par ) * gradient[dim];
>           }
>         derivative[par] += sum;
>         }
>       }
>
> It basically comes down to this line:
>
>
>
>           sum += 2.0 * diff * jacobian( dim, par ) * gradient[dim];
>
> why is the jacobian multiplied with the current gradient?
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>   


More information about the Insight-users mailing list