[vtkusers] vtkGraphToTable

Wylie, Brian bnwylie at sandia.gov
Fri Apr 16 11:56:08 EDT 2010


Hi JB,

I think you could do something like...

vtkRandomGraphSource->vtkGraphLayout->vtkDataObjectToTable->vtkDelimitedTextWriter


Parameters to vtkDataObjectToTable allow you to specify if you want to make a table off edges, vertices, or whatever...

# Cleave off part of the graph
vertexDataTable = vtkDataObjectToTable()
vertexDataTable.SetInputConnection(graphLayout.GetOutputPort())
vertexDataTable.SetFieldType(3) # Vertex data


  Brian Wylie - Org 1424
  Sandia National Laboratories
  MS 1323 - Building CSRI/242
  (505)844-2238 FAX(505)284-2518
       _______ __
      /_  __(_) /_____ _____
       / / / / __/ __ `/ __ \
      / / / / /_/ /_/ / / / /
     /_/ /_/\__/\__,_/_/ /_/
            Informatics Toolkit

From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Jason BELLONE
Sent: Friday, April 16, 2010 9:24 AM
To: vtkusers at vtk.org
Subject: [vtkusers] vtkGraphToTable

Greetings,

May I have your advice in best approach for a use case of converting GraphLayout coordinates to a vtkTable.  For example,

vtkRandomGraphSource->vtkGraphLayout->vtkTable

where vtkTable is based on four columns  (id and 3d coordinates):

vertexId, X, Y, Z

I would be very appreciative for any suggestions to create this "vtkGraphToTable" functionality.

Cheers,

JB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100416/c5100e2e/attachment.htm>


More information about the vtkusers mailing list