[Insight-users] Pixel difference between two images

Cory Quammen cquammen at cs.unc.edu
Tue Oct 4 16:43:36 EDT 2011


This code snippet itself looks fine. There's probably a problem
elsewhere in your program.

Cory

On Fri, Sep 30, 2011 at 3:47 PM, soheilghafurian
<soheilghafurian at yahoo.com> wrote:
> I'm very thankful to you Cory for helping me with this. But the code is still
> not working. It is built without any error. But when running, I get this
> error:
>
> Debug Error!
>
> This application has requested the Runtime to terminate it in an unusual
> way.
>
> Here is the corrected code, as you said:
>
> void fitness( Tiff2dImageType::Pointer FixedImage ,
>                          C_DRRCr::TDOutputImageType::Pointer MovingImage )
> {
>        typedef itk::MeanSquaresImageToImageMetric < Tiff2dImageType ,
>                C_DRRCr::TDOutputImageType > MetricType ;
>    MetricType::Pointer metric = MetricType::New() ;
>
>    typedef itk::IdentityTransform < double , 2 > TransformType ;
>        TransformType::Pointer transform = TransformType::New() ;
>
>    metric->SetFixedImage( FixedImage ) ;
>    metric->SetMovingImage( MovingImage ) ;
>        metric->SetTransform( transform ) ;
>
>        TransformType::ParametersType params ;
>    std::cout<<endl<< metric->GetValue( params ) << endl ;
>
>        return ;
> }
>
> --
> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Pixel-difference-between-two-images-tp6832343p6849078.html
> Sent from the ITK Insight Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill


More information about the Insight-users mailing list