[vtkusers] file format for graphs
Jeff Baumes
jeff.baumes at kitware.com
Wed Apr 28 10:14:25 EDT 2010
>> - the POINTS coords are all 0? So they don't reflect the graph layout?
You are writing out the graph instance that has not gone through the
layout filter. VTK makes new graph objects (with mostly shallow-copied
data) for each component in the pipeline. To write out the graph with
coordinates, you need to manually create a vtkGraphLayout filter with
an associated layout strategy, send the graph through it, then set the
view's layout strategy to pass-through. Update the layout and send its
graph output to the writer and the view. Then the coordinates on the
screen would match the coordinates in the file.
>> - it seems that when I write binary, the EDGES list are still in ascii
Yes, there is only one path for outputting the edge list that writes plain text.
>> - any idea if there is a non-VTK format that's preferred for graphs?
vtkGraphReader/Writer is the only one that supports full
serialization/deserialization of vtkGraph. We have a few other graph
readers, but no other writers that I am aware of, so it is the
preferred format.
Jeff
More information about the vtkusers
mailing list