<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi,<br><br>&nbsp; I am trying to compute the Mean Square error between two images and have the following segment of code for it.<br><br>But I get an error, <br><br>"C:\Projects\CPP\Test\PreProcessor\Preproc.cpp(700): error C2039: 'setFixedImage' : is not a member of 'itk::MeanSquaresImageToImageMetric&lt;TFixedImage,TMovingImage&gt;'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TFixedImage=FixedImageType,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TMovingImage=MovingImageType<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br><br><br>Is setFixedImage() not a member of the MeanSquaresImageToImageMetric ?&nbsp; <br><br>Emma<br><br>The following
 is my piece of code.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typedef itk::MeanSquaresImageToImageMetric &lt;FixedImageType, MovingImageType&gt; MetricType;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typedef itk:: LinearInterpolateImageFunction &lt;MovingImageType,double &gt; InterpolatorType;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; MetricType::Pointer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metric&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = MetricType::New();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; InterpolatorType::Pointer&nbsp;&nbsp; interpolator&nbsp; = InterpolatorType::New();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; OptimizerType::ParametersType finalParameters = registration-&gt;GetLastTransformParameters();&nbsp;&nbsp;  <br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; metric-&gt;SetInterpolator(interpolator);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; metric-&gt;SetTransform(transform);<br>&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; metric-&gt;setFixedImage(fixedImageOrig);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; metric-&gt;setMovingImage(caster-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; metric-&gt;SetTransformParameters(finalParameters);&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MetricType::TransformParametersType finalParam = registration-&gt;GetLastTransformParameters();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; std::cout&lt;&lt;" MetricOnOriginalImage = "&lt;&lt;metric-&gt;GetValue(finalParam)&lt;&lt;std::endl;<br><br></div></div><br>
      <hr size=1>Got a little couch potato? <br>
Check out fun <a href="http://us.rd.yahoo.com/evt=48248/*http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz">summer activities for kids.</a></body></html>