[Insight-users] itkVTKPolyDataWriter

Arnaud Gelas arnaud_gelas at hms.harvard.edu
Wed May 13 16:17:09 EDT 2009


Hi Noe,

To write a vtk file, you may use

    * itk::VTKPolyDataWriter             see
      http://www.itk.org/Doxygen/html/classitk_1_1VTKPolyDataWriter.html

For example how to use it, you can have a look at:

    * Testing/Code/Review/itkVTKPolyDataWriterTest.cxx 
    * Testing/Code/Review/itkVTKPolyDataWriterTest2.cxx

Arnaud

Noé Jimenez wrote:
> Hi,
>
> I'm new Itk user. I want to convert itkMesh to VtkPolyData, and write a 
> file, because i want to see the mesh. Can you help me?? Where can I find the 
> code for do that?? Did you that for Mesh5.vtk?
>
> Sorry for me english!!
> Thanks
>
>
> --------------------------------------------------
> From: "Leila Baghdadi" <baghdadi at phenogenomics.ca>
> Sent: Wednesday, May 13, 2009 9:36 PM
> To: "Arnaud Gelas" <arnaud_gelas at hms.harvard.edu>
> Cc: <insight-users at itk.org>
> Subject: Re: [Insight-users] itkVTKPolyDataWriter
>
>   
>> On Wed, 2009-05-13 at 15:33 -0400, Arnaud Gelas wrote:
>>     
>>> Hi Leila,
>>>
>>> Can you join your file (MESH5.vtk), please?
>>>
>>> Thanks
>>> Arnaud
>>>
>>> Leila Baghdadi wrote:
>>>       
>>>> Hi guys
>>>>
>>>> I used the class itkVTKPolyDataWriter in Review directory
>>>> to write my meshes as vtkPolyData but when I try to read them using
>>>> vtkPolyDataReader I get the following error,
>>>>
>>>> I checked the file and it seemed to have the format of vtkPolyData
>>>>
>>>>
>>>>         
>>>>>>> a = vtkPolyDataReader()
>>>>>>> a.SetFileName("MESH5.vtk")
>>>>>>> a.Update()
>>>>>>>
>>>>>>>               
>>>> ERROR: In /build/buildd/vtk-5.0.3/IO/vtkDataReader.cxx, line 1631
>>>> vtkPolyDataReader (0x95c650): Error reading ascii cell data! for file:
>>>> MESH5.vtk
>>>>
>>>>
>>>>
>>>> any ideas
>>>>
>>>> Leila
>>>>
>>>> _____________________________________
>>>> 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
>>>>
>>>>         
>
>
>
>   
>> _____________________________________
>> 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