[vtkusers] InfoVis: Graph to PolyData bugs?

Jeff Baumes jeff.baumes at kitware.com
Thu Jan 8 13:54:02 EST 2009


> 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)

This is because vtkGraphToPolyData may create new points for points
along edges that aren't straight lines, so polydata points don't
directly correspond to graph vertices. You would need the graph after
layout but before vtkGraphToPolyData. A simpler way would be to create
your own vtkGraphLayout with the vtkGraphLayoutStrategy you want to
use, set your graph as its input, then send the output of the layout
to the view. You can directly access the graph vertex locations by
updating the layout and looking at the output. If you set the view's
layout strategy to "PassThrough" it will just use the vertex locations
you have already assigned to the graph.

> 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)

That sounds very much like a bug in the XML writer. Please file a bug
for this with your example data and code.

Jeff



More information about the vtkusers mailing list