[Insight-users] SetFixedImage

Luis Ibanez luis.ibanez at kitware.com
Wed Jan 24 10:05:16 EST 2007


Hi Tony


Is the variable "mesh" a Mesh reader ?

Is the variable vtkMDHReader a reader that will produce an itk::Image ?

Is your registration class a ImageToImageRegistration ?


If you are doing ImageToImage registration, you
*should not* pass a Mesh as the FixedImage, because
a Mesh is not an Image.

If your image reader is a VTK image reader, that
returns a vtkImageData, then you must first convert
this image to an itkImage before passing it as
argument to the SetMovingImage method.

It seems that what you want to do is


     PointSet to Image Registration


You may want to look at

    Insight/Testing/Code/Algorithms
        itkPointSetToImageRegistrationTest_1.cxx



   Regards,


      Luis



-----------------
tony hakki wrote:
> Hi;
> I don't want to set the name of the file names . I have already written 
> the datas.  
>  
> 
> typedef itk::ImageFileReader< FixedImageType  > FixedImageReaderType;
> 
>   typedef itk::ImageFileReader< MovingImageType > MovingImageReaderType;
> 
>  
> 
>   FixedImageReaderType::Pointer  fixedImageReader  = 
> FixedImageReaderType::New();
> 
>   MovingImageReaderType::Pointer movingImageReader = 
> MovingImageReaderType::New();
> 
>   fixedImageReader->SetFileName(  argv[1] );
> 
>   movingImageReader->SetFileName( argv[2] );
> 
>  registration->SetFixedImage( fixedImageReader->GetOutput() );
> 
>  registration->SetMovingImage( movingImageReader->GetOutput() );
> 
>  fixedImageReader->Update();
> 
>  
> 
>  
> 
> So is it possible to Set Fixed Images Like this instead of above;
> 
>  
> 
> typedef itk::ImageFileReader< FixedImageType  > FixedImageReaderType;
> 
>   typedef itk::ImageFileReader< MovingImageType > MovingImageReaderType;
> 
> registration->SetFixedImage( mesh->GetOutput() );//ITK mesh data (I have 
> already written before
> 
> registration->SetMovingImage( vtkMDHReader->GetOutput() ); //Volume data
> 
>  
> 
> *Thank you very much*
> 
> *Tony*
> 
> 
> ------------------------------------------------------------------------
> Finding fabulous fares is fun.
> Let Yahoo! FareChase search your favorite travel sites 
> <http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw-- 
>  > to find flight and hotel bargains.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list