[Insight-users] itkVTKPolyDataWriter

Arnaud Gelas arnaud_gelas at hms.harvard.edu
Fri May 15 15:17:46 EDT 2009


Hi Leila,

I have just fixed that bug.

Apparently one of these filters add vertices in the CellsContainer. In 
VTKPolyDataWriter, one variable was updated if the type of cell was 
different from a line (and that was true for a vertex).

Arnaud


Leila Baghdadi wrote:
> Arnaud,
>
> Here is how my mesh is created
>
> itkRegularSphere --> itkTriangleMeshtoSimplexMesh --> Deform mesh -->
> itkSimplexMesh --> itkSimplexMeshToTriangleMesh --> itkVTKPolyDataWriter
>
> I know that other than triangles , lines are also created  during this
> conevrsion process, it is possible that the writer gets confused and
> adds them all up hence the wrong polygon number.
>
> I will do some further investigation once I have a chance
>
> thanks for your help
>
> Leila
>
> On Wed, 2009-05-13 at 16:10 -0400, Arnaud Gelas wrote:
>   
>> Leila,
>>
>> Quick trick to be able to use your file with vtk:change in your file the 
>> line
>>     POLYGONS 512 2306
>> to
>>     POLYGONS 512 2048
>>
>> Now, I don't really understand what could be wrong with the writer in 
>> review...
>>
>> Which version of itk are you using?
>> Did you use it with itk::Mesh or itk::QuadEdgeMesh?
>> Can you explain shortly what kind of processing you are doing to get 
>> this mesh (in order to be able to reproduce the error)?
>>
>> Thanks,
>> Arnaud
>>
>>
>> Leila Baghdadi wrote:
>>     
>>> 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
>>>>>   
>>>>>       
>>>>>           
>
>   



More information about the Insight-users mailing list