[Insight-users] Re: Save as VTK

Luis Ibanez luis.ibanez at kitware.com
Thu, 18 Mar 2004 17:32:17 -0500


Hi Mohammed,

Just use the ImageFileWriter<> and provide a
filename with extension  ".vtk". That should
be enough. The image factories will take care
of instantiating the apropriate writer.


You can also be more explicit and directly
se the ImageIO object to be a VTKImageIO.


Please look at the examples in the SoftwareGuide


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


Chapter 7, pdf-page 219, for the description
of the IO architecture in ITK.

Please look at section 7.9, pdf-page 237 for a
description on how to explicitly set a VTKImageIO
object. The associated example is available at


    Examples/IO/ImageReadExportVTK.cxx



   Regards,


      Luis




--------------------
Alam, Mohammed wrote:

> Hello:
> I have a separate application that generates a 3D object using ITK
> segmentation libraries. I will appreciate if anyone can help me in saving
> this 3D object as a VTK format?  
> 
> Best Regards,
> Mohammed Alam
>