[Insight-users] itkPointSetFileWriter?

Bill Lorensen bill.lorensen at gmail.com
Sun Jul 5 08:37:48 EDT 2009


David,

We use the legacy format because it is simple and a polydata
reader/writer can be written without requiring any vtk code. The XML
formats are more complex and would probably require us to use vtk code
to implement them. We don't want to require itk developers to build
vtk.

That said, in InsightApplications, we have applications that use both
vtk and itk. Perhaps such a reader/writer could go there.

Bill

On Sat, Jul 4, 2009 at 4:49 PM, David Doria<daviddoria+itk at gmail.com> wrote:
> 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
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list