[vtkusers] Infovis: CSV as float & edge weights?

Eric E. Monson emonson at cs.duke.edu
Tue Dec 2 10:29:07 EST 2008


Hey,

I'm trying to move some Matlab graph data into VTK by saving a sparse  
adjacency matrix as a CSV file, and then reading it in to a vtkTable  
and then convert to a vtkGraph.

1. Is there any way with vtkDelimitedTextReader to specify whether  
columns should be interpreted as strings or floats or ints --  
everything is reading in as strings. (Or, is there a way to change the  
data type of the table columns once they are in?)

2. Is there a way with vtkTableToGraph, when specifying edges, to  
define a column of the table which will be interpreted as an edge  
"weight"? The adjacency matrix I'm saving from Matlab doesn't just  
store a binary connection, but a connection weight between vertices.  
The AdjacencyMatrix.cxx example uses these values as labels rather  
than scalars.

Thanks,
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group






More information about the vtkusers mailing list