[Insight-users] Re: how to read a vtk image file

Luis Ibanez luis.ibanez at kitware.com
Mon Apr 16 11:16:36 EDT 2007



Hi qf1234546


        If your VTK file has a vtkPolyData
      then you can't read it as an itkImage.


what you could do, is to use the itkVTKPolyDataReader
from


     Insight/Code/Review/
        itkVTKPolyDataReader.h
        itkVTKPolyDataReader.txx


and read the data as an itkMesh object.


You will find an example on the use of this class
in the directory:


     Insight/Testing/Code/Review
         itkVTKPolyDataReaderTest.cxx




Note that this is a class that was added recently,
so you will need ITK 3.0 or higher in order to
find these files.



You should also read the ITK Software Guide


     http://www.itk.org/ItkSoftwareGuide.pdf


In particular, the "Data Representation" Chapter.




   Regards,


       Luis



--------------------
qf1234546 wrote:
> Hi Luis Ibanez,
>  
> I'm very sorry to trouble you again. The problem is that I want to read 
> the .vtk file using ITK.
> Can you tell me how can I realize that ?
> Thank you!
>  
>  


More information about the Insight-users mailing list