Hi ITK users,<br>     <br>      I am trying to implement, following the example given in the ITK guide, an affine registration<br>routine. Somewhere at the top of the code, I set<br><br>    typedef itk::AffineTransform&lt;unsigned char, 2&gt; TransformType;<br>
    typedef itk::RegularStepGradientDescentOptimizer OptimizerType;<br>    typedef itk::LinearInterpolateImageFunction&lt; BFrameType, double &gt; InterpolatorType;<br>    typedef itk::MeanSquaresImageToImageMetric&lt; BFrameType, BFrameType &gt; MetricType;<br>
    typedef itk::ImageRegistrationMethod&lt;BFrameType, BFrameType&gt; RegistrationType;<br><br>// then I create the necessary smart pointers to objects<br><br>    TransformType::Pointer transform = TransformType::New();<br>
    OptimizerType::Pointer optimizer = OptimizerType::New();<br>    InterpolatorType::Pointer interpolator = InterpolatorType::New();<br>    RegistrationType::Pointer registration = RegistrationType::New();<br>    MetricType::Pointer metric = MetricType::New();<br>
<br>// and then I associate them to the registration filter:<br>     registration-&gt;SetOptimizer( optimizer );<br>    registration-&gt;SetTransform( transform ); // <b>error on this line</b><br>    registration-&gt;SetInterpolator (interpolator ); <br>
    registration-&gt;SetMetric( metric ); <br><br>// including the reference and floating images<br><br>    registration-&gt;SetFixedImage(  ref ) ; <br>    registration-&gt;SetMovingImage( flt );<br><br>during the build (on MS Visual studio 2010) I get the following error:<br>
<br>Error    12    error C2664: &#39;itk::ImageRegistrationMethod&lt;TFixedImage,TMovingImage&gt;::SetTransform&#39; : cannot convert parameter 1 from &#39;itk::SmartPointer&lt;TObjectType&gt;&#39; to &#39;itk::Transform&lt;TScalarType,NInputDimensions,NOutputDimensions&gt; *&#39;    <br>
<br>Can anyone help with useful insights? <br><br>Thanks,<br>Sid.<br>