[Insight-users] SetFixedImage

tony hakki tony2007vtk at yahoo.com
Wed Jan 24 10:26:46 EST 2007


hi Luis;
I really want to thank to your kind replies. You answered mine three important questions. I would like to tell a little bit more. I converted my stl data into ITK mesh with vtkPolyDataToITKMesh.cxx ( Its output is "mesh", Right?) .on the other hand I read my volumetric data with vtk ,
vtkMetaImageReader* vtkMDHReader = vtkMetaImageReader::New(); 
vtkMDHReader->SetFileName(filename);
vtkMDHReader->Update(); So its output is vtkMDHReader, I think it is necessary to convert it ITK form,if yes please tell me how I can do that?

Finally ,you are right ,what I want to is to PointSet to Image Registration. and how can I Set the inputs without file names,because I have already read them,I just want to use output of reader,like vtkMDHReader.
 I am really looking forward to your answer .
Thank your very much.
Tony

 

----- Original Message ----
From: Luis Ibanez <luis.ibanez at kitware.com>
To: tony hakki <tony2007vtk at yahoo.com>
Cc: insight-users at itk.org
Sent: Wednesday, January 24, 2007 4:05:16 PM
Subject: Re: [Insight-users] SetFixedImage


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


 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070124/d4b392b2/attachment-0001.html


More information about the Insight-users mailing list