[Insight-users] itkPointSetFileWriter?

David Doria daviddoria+itk at gmail.com
Sat Jul 4 16:49:45 EDT 2009


On Sat, Jul 4, 2009 at 4:41 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:

>
>
> Hi David,
>
>
> 1) They are "legacy" readers in VTK.
>   They are now replaced (in VTK) with
>   an XML-based file format that supports
>   compression of binary data.
>
>   That said, the legacy reader in VTK
>   is still available:
>
>          vtkPolyDataReader
>          vtkPolyDataWriter
>
>
> 2) Good point, we should have Examples,
>   for all the classes we put into review.
>
>   Tests are not always good examples...
>
>
>
> 3) The VTP file format is indeed the
>   XML-based compressed file format
>   mentioned in (1).
>   (that is, VTP is not the legacy format).
>
>   You will have to convert your VTP file
>   into a VTK file in order to pass it
>   as input to the ITK reader.
>
>   From your VTK code, use the vtkPolyDataWriter
>   and save your mesh in a file with extension
>   ".vtk". That file should be readable with
>   the ITK poly data reader.
>
>
>
>  Regards,
>
>
>     Luis
>


Luis,

Does it make sense for me to put together a class for ITK that uses
vtkXMLPolyDataReader to construct an itkMesh/itkPointSet? It should be
pretty easy - just copy most of itkVTKPolyDataReader but change the usage of
vtkPolyDataReader to vtkXMLPolyDataReader? Or is there some reason for ITK
code to continue using the legacy vtk format? I'm not addicted to this XML
vtp format, but I already have a lot of code that uses it, and I haven't
heard suggestions for "better" formats :)

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090704/6f0df5b3/attachment.htm>


More information about the Insight-users mailing list