[vtk-developers] Loading an External Graph to VTK
David Gobbi
david.gobbi at gmail.com
Wed Aug 12 18:01:30 EDT 2015
On Wed, Aug 12, 2015 at 3:32 PM, Saeed Mahdizadeh Bakhshmand <
saeedbakhshmand at gmail.com> wrote:
> Hello Experts,
>
> Is there a known way of loading a graph (3D node-link graph) that is
> defined and saved outside of VTK(position of vertices and adjacency matrix
> of the graph are stored in a text file e.g.) to be loaded to VTK and
> visualized?
> My guess is that GetEdgeData and GetVertexData are responsible for
> accepting vtk arrays, but not sure how those arrays can perfectly contain
> details of a graph and what happens if this graph is being imported from
> elsewhere?
>
Let's back up a bit, because GetEdgeData() and GetVertexData() are not the
first methods to look at.
A VTK data set is always considered to be made of these:
1) Geometry (points (or vertices/nodes), and connectivity between points)
2) Attribute arrays (colors, scalars, etc. to associate with points, edges,
faces, etc).
The GetEdgeData() and GetVertexData() method are for dealing with
attributes. But from your question, it sounds like your main concern is
loading the geometry. In other words, first you have to set the geometry
(the vertices, edges, and perhaps the points). Only after that is done
should you worry about setting the attributes to go along with them.
Unfortunately, I really don't know anything specific about dealing with
graphs in VTK, all I know is how VTK deals with data generically.
- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150812/336e3b10/attachment.html>
More information about the vtk-developers
mailing list