<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 style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Please ignore my email with the following message. It was a stupid one. The error was in using 's' instead of 'S' in SetFixedImage<br><br>Sorry to bother everyone,<br>Emma <br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hi,<br><br> 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<TFixedImage,TMovingImage>'<br> with<br> [<br> TFixedImage=FixedImageType,<br> TMovingImage=MovingImageType<br> ]<br><br><br>Is setFixedImage() not a member of the MeanSquaresImageToImageMetric ? <br><br>Emma<br><br>The following
is my piece of code.<br><br><br> typedef itk::MeanSquaresImageToImageMetric <FixedImageType, MovingImageType> MetricType;<br> typedef itk:: LinearInterpolateImageFunction <MovingImageType,double > InterpolatorType;<br> <br> MetricType::Pointer metric = MetricType::New();<br> InterpolatorType::Pointer interpolator = InterpolatorType::New();<br><br> OptimizerType::ParametersType finalParameters = registration->GetLastTransformParameters(); <br><br> metric->SetInterpolator(interpolator);<br> metric->SetTransform(transform);<br>
metric->setFixedImage(fixedImageOrig);<br> metric->setMovingImage(caster->GetOutput());<br> metric->SetTransformParameters(finalParameters); <br> MetricType::TransformParametersType finalParam = registration->GetLastTransformParameters();<br><br> std::cout<<" MetricOnOriginalImage = "<<metric->GetValue(finalParam)<<std::endl;<br><br></div></div><br>
<hr size="1">Got a little couch potato? <br>
Check out fun <a rel="nofollow" target="_blank" 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></div><br></div></div><br>
<hr size=1>Choose the right car based on your needs.
Check out <a href="http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg-- ">Yahoo! Autos new Car Finder tool.</a>
</body></html>