[vtkusers] InfoVis: Graph to PolyData bugs?

Eric E. Monson emonson at cs.duke.edu
Thu Jan 8 10:33:25 EST 2009


Hey,

Recently I was testing methods for saving the results of a graph  
layout and ran into a couple strange problems trying to write XML  
PolyData files after GraphToPolyData. I'm attaching two python scripts  
that demonstrate the problems.

1.  The first one is a loss of Vertex Data when I convert the graph  
that I dug out of a GraphLayoutView to PolyData. Edge data is  
converted to Cell data, but Vertex data doesn't show up as Point data  
in the PolyData. (Attached: write_polydata2.py)

Note: If someone knows a better way of getting at the coordinates of  
the graph after layout within a GraphLayoutView, let me know. It may  
be nice to have a getter method for the Mapper, or something...

2.  The second problem leads to a Bus Error during the XML PolyData  
Write(). It didn't happen when I was using a random graph source, but  
appeared when I switched to a combination of CSV reader and  
TableToGraph. The PolyData seems to look fine before the write, but  
the writer craps out writing the <Piece section. The error doesn't  
occur when using the legacy writer, only with the XML. (Attached:  
write_polydata4.py and sc_small.csv)

Thanks,
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group

-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_polydata4.py
Type: text/x-python-script
Size: 1774 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090108/8551ae1f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_polydata2.py
Type: text/x-python-script
Size: 1484 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090108/8551ae1f/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sc_small.csv
Type: application/octet-stream
Size: 627 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090108/8551ae1f/attachment.obj>
-------------- next part --------------



More information about the vtkusers mailing list