[Insight-users] MeanSquaresImageToImageMetric Error: SetFixedImage is not a member

Emma Ryan eryanvtk at yahoo.com
Tue Aug 7 10:32:46 EDT 2007


Hi,

  I am trying to compute the Mean Square error between two images and have the following segment of code for it.

But I get an error, 

"C:\Projects\CPP\Test\PreProcessor\Preproc.cpp(700): error C2039: 'setFixedImage' : is not a member of 'itk::MeanSquaresImageToImageMetric<TFixedImage,TMovingImage>'
        with
        [
            TFixedImage=FixedImageType,
            TMovingImage=MovingImageType
        ]


Is setFixedImage() not a member of the MeanSquaresImageToImageMetric ?  

Emma

The following is my piece of code.


       typedef itk::MeanSquaresImageToImageMetric <FixedImageType, MovingImageType> MetricType;
       typedef itk:: LinearInterpolateImageFunction <MovingImageType,double > InterpolatorType;
    
       MetricType::Pointer         metric        = MetricType::New();
       InterpolatorType::Pointer   interpolator  = InterpolatorType::New();

        OptimizerType::ParametersType finalParameters = registration->GetLastTransformParameters();    

        metric->SetInterpolator(interpolator);
        metric->SetTransform(transform);
        metric->setFixedImage(fixedImageOrig);
        metric->setMovingImage(caster->GetOutput());
        metric->SetTransformParameters(finalParameters);    
        MetricType::TransformParametersType finalParam = registration->GetLastTransformParameters();

        std::cout<<" MetricOnOriginalImage = "<<metric->GetValue(finalParam)<<std::endl;





      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070807/10ec606b/attachment.htm


More information about the Insight-users mailing list