[vtk-developers] Loading an External Graph to VTK

Saeed Mahdizadeh Bakhshmand saeedbakhshmand at gmail.com
Wed Aug 12 18:22:18 EDT 2015


Right, what I am looking for is like this:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/InfoVis/XGMLReader
Here GML can load a full graph. But what I am looking for is to import
topology of the graph.
When I look into vtkGraphs that is what I see for VertexData and I assume
modirying topology of the graph depends on these variables:

 VertexData:

Debug: Off

Modified Time: 826248

Reference Count: 1

Registered Events: (none)

Number Of Arrays: 0

Number Of Components: 0

Number Of Tuples: 0

Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )

Interpolate Flags: ( 1 1 1 1 1 0 0 1 )

Pass Through Flags: ( 1 1 1 1 1 1 1 1 )

Scalars: (none)

Vectors: (none)

Normals: (none)

TCoords: (none)

Tensors: (none)

GlobalIds: (none)

PedigreeIds: (none)

EdgeFlag: (none)



On Wed, Aug 12, 2015 at 6:01 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> 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/ba0c35a6/attachment.html>


More information about the vtk-developers mailing list