<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 12, 2015 at 3:32 PM, Saeed Mahdizadeh Bakhshmand <span dir="ltr"><<a href="mailto:saeedbakhshmand@gmail.com" target="_blank">saeedbakhshmand@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Experts,<div><br></div><div>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?</div><div>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?</div></div></blockquote><div><br></div><div>Let's back up a bit, because GetEdgeData() and GetVertexData() are not the first methods to look at.</div><div><br></div><div>A VTK data set is always considered to be made of these:</div><div><br></div><div>1) Geometry (points (or vertices/nodes), and connectivity between points)</div><div>2) Attribute arrays (colors, scalars, etc. to associate with points, edges, faces, etc).</div><div><br></div><div>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.</div><div><br></div><div>Unfortunately, I really don't know anything specific about dealing with graphs in VTK, all I know is how VTK deals with data generically. </div><div><br></div><div> - David</div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div></div><br></div></div>