[Insight-users] question for itkMeanSquaresImageToImageMetric
   
    Zhiyong Xie
     
    zxie@grasp.cis.upenn.edu
       
    Mon, 31 Mar 2003 17:27:22 -0500
    
    
  
I got a question for source code of itkMeanSquaresImageToImageMetric.txx.
In function GetDerivative and GetValueAndDerivative, the index of gradient
image was computed as follows:
/**** source code*/
typename Superclass::OutputPointType tempPoint =
               movingImageTransform->TransformPoint( transformedPoint );
      typename MovingImageType::IndexType mappedIndex;
      for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ )
        {
        mappedIndex[j] = static_cast<long>( vnl_math_rnd( tempPoint[j] ) );
        }
      const GradientPixelType gradient =
                                m_GradientImage->GetPixel( mappedIndex );
/***  *  */
If the image spacing is not 1 (say 0.8), doese it generate correct result?
Thanks
Sean