<div dir="ltr"><div class="gmail_extra">I'm fairly certain that VertexData has nothing to do with the topology.</div><div class="gmail_extra"><br></div><div class="gmail_extra">If you already have 3D coordinates for the nodes in your graph, I suspect that what you need to do is set the Points along with adding all your vertices and edges.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> - David</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 12, 2015 at 4:22 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">Right, what I am looking for is like this:<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/InfoVis/XGMLReader" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/InfoVis/XGMLReader</a><br></div><div>Here GML can load a full graph. But what I am looking for is to import topology of the graph.</div><div>When I look into vtkGraphs that is what I see for VertexData and I assume modirying topology of the graph depends on these variables:</div><div><p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600"> VertexData: </span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Debug: Off</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Modified Time: 826248</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Reference Count: 1</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Registered Events: (none)</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Number Of Arrays: 0</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Number Of Components: 0</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Number Of Tuples: 0</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Interpolate Flags: ( 1 1 1 1 1 0 0 1 )</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Pass Through Flags: ( 1 1 1 1 1 1 1 1 )</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Scalars: (none)</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Vectors: (none)</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Normals: (none)</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    TCoords: (none)</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    Tensors: (none)</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    GlobalIds: (none)</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    PedigreeIds: (none)</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:12pt;color:#009600">    EdgeFlag: (none)</span></p>
<p style="margin:0px"><br></p></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 12, 2015 at 6:01 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@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"><div class="gmail_extra"><div class="gmail_quote"><span>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></span><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><span><font color="#888888"><div><br></div><div> - David</div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div></font></span></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>