Dear all,<br><br>  When using Rigid2DTransform to transform an image, I seem to be getting a shearing of the result. I was actually trying to compare the results between an ITK prototype and an IPP implementation of an algorithm when I started noticing the difference. Please see the attached images. I drew in a grid into the image to see what was causing the difference and it seems like the image I obtain by transforming using the Rigid2DTransform has a shear in it while the IPP one does not have the shear as expected. All I am trying to do here is to rotate the image by 30 degrees around the center of the image. Any thoughts on what could be going wrong ? <br>
<br>This is the code I am using for the ITK transform function<br><br>    typedef itk::ResampleImageFilter&lt; enFaceImageType, enFaceImageType &gt; ResampleFilterType;<br>    // A resampling filter is created and the image is connected as its input:<br>
    ResampleFilterType::Pointer resampler = ResampleFilterType::New();<br>    resampler-&gt;SetInput( image );<br><br>    // Set the transformation according to our input values:<br>    typedef itk::Rigid2DTransform&lt; double &gt; TransformType;<br>
    TransformType::Pointer transform = TransformType::New();<br><br>    // Set the parameters of the transform by passing them in an array:<br>    typedef TransformType::ParametersType ParametersType;<br>    ParametersType manualParameters( transform-&gt;GetNumberOfParameters() );<br>
    manualParameters[0] = dRad;        // Angle<br>    manualParameters[1] = xTrans;    // Initial offset in mm along X<br>    manualParameters[2] = yTrans;    // Initial offset in mm along Y<br><br>    transform-&gt;SetParameters( manualParameters );<br>
<br>    TransformType::InputPointType center;<br>    center[0] = centerX;<br>    center[1] = centerY;<br>    transform-&gt;SetCenter(center);<br><br>    resampler-&gt;SetTransform( transform );<br>    <br><br>    // Take sizes from the fixed image, as that is what we are registering to:<br>
    resampler-&gt;SetSize( image-&gt;GetLargestPossibleRegion().GetSize() );<br>    resampler-&gt;SetOutputOrigin( image-&gt;GetOrigin() );<br>    resampler-&gt;SetOutputSpacing( image-&gt;GetSpacing() );<br>    resampler-&gt;SetDefaultPixelValue( 0.0 );<br>
<br>    <br>    if (interpolation==0)<br>    {<br>        typedef itk::NearestNeighborInterpolateImageFunction&lt;enFaceImageType, double &gt;  InterpolatorType;<br>        InterpolatorType::Pointer interpolator = InterpolatorType::New();<br>
        resampler-&gt;SetInterpolator(interpolator);<br>    }<br>    if (interpolation==1)<br>    {<br>        typedef itk::LinearInterpolateImageFunction&lt;enFaceImageType, double &gt;  InterpolatorType;<br>        InterpolatorType::Pointer interpolator = InterpolatorType::New();<br>
        resampler-&gt;SetInterpolator(interpolator);<br>    }<br><br>    resampler-&gt;Update();<br><br>    iStatus = EXIT_SUCCESS; <br>    return ( resampler-&gt;GetOutput() );<br><br><br>Thanks,<br>John<br>