[Paraview] csv to geometry

fredrikaustin fredrikaustin at yahoo.com
Fri Oct 5 22:54:46 EDT 2007

Thanks for the info.  It occured to me also that there is likely a lot of literature about various approaches for turning this type of data into geometry in the field of computer games, which routinely use 'height field' information generated by artist tools into terrain for the purpose of rendering via triangle lists.

John Biddiscombe <biddisco at cscs.ch> wrote:        If you look in 
 at the vtkCSV files, I have some old code which will load CVS as polydata or as a structured points (image).
 not maintained much, but the code still compiles. I use the CSV reader for turning arbitrary ascii into particles, there used to be an option to generate polygons from every N or after a scalar was read in column M - but I probably broke it recently when playing with some ASCII data. 
 The user can set XColumn,Y,Z etc to tell it which to use for coordinates. There is another class which is a subclass of cvsreader called AscciParticleReader which I keep elsewhere but which uses regex patterns to find the fields you want to use for x/y/z etc
 vtk has it's own vtkCSVxxx files (+vtkDelimited text reader)and vtkTable related stuff now, so probably these are uninteresting/obsolete, but I thought I'd mention it.
 Just in case it helps anyone.
If the values are in the form of an n x m matrix, perhaps we could
make an n column by m row spreadsheet. The column headers can be given
labels and if three of those are POINT_X, POINT_Y, POINT_Z then the
output would become a pointset. The rest of the columns would be point
data values.

Similar controls would let the user specify the geometry for the
structured data types.


On 10/3/07, Moreland, Kenneth <kmorel at sandia.gov> wrote:
 You are not the first person to ask about this.  I was going to bring up to the development team possible ways of deriving geometric data from table/csv data.  My thought was to have a simple filter that allowed the user to identify columns in a table and then produce a poly data containing the points.  From there you could apply other filters (such as Delaunay triangulation) to construct a topology.    Do you (or anyone else) have an opinion on how to interpret tables as geometry?    -Ken      ________________________________   From: fredrikaustin [mailto:fredrikaustin at yahoo.com]
 Sent: Wednesday, October 03, 2007 10:15 AM
 To: Moreland, Kenneth; paraview at paraview.org  Subject: RE: [Paraview] paraview novice attempts 1st viz    Thanks for the reply, Ken.   Of course I know paraview cannot interpret the data; perhaps I should have said "I was looking for a way to tell paraview that I have three columns of data, and that they correspond to points in x,y,z space respectively. Please plot the data".  This is a simple enough request, provides all the information necessary, but I could not find any UI that seemed designed for this simple purpose.   If there is not a simple way to plot such csv 3d data (as points in space, as a surface, etc), I would think there should be.  It seems a lot of data would start in this very straight-forward format.   -thomas blom   "Moreland, Kenneth" <kmorel at sandia.gov> wrote:

Sorry Thomas, but you are asking for the impossible.  You cannot expect
ParaView to magically apply semantic meaning to the columns of your data and
generate a topology that is not nonsense (at least, not without a lot of
help).  You have asked ParaView to read in a table (a csv holds a table of
data, no more, no less) and that is exactly what ParaView has done.  You can
view the data in a spreadsheet-type view and you can plot the columns of

You should use a data format that gives the topological nature of your data.
 If your data is arranged in a 2D grid, you can store the data in a simple
image format.  The simplest image format is just a 2D array written out as
binary data to a file (read in with the "Raw (binary) Files" reader).
ParaView also reads in .png files and it's pretty easy to extend it to read
other image files.

You can also stuff your data into VTK Legacy File format.  This is a simple
file format that supports most of the types of data that VTK can handle and
is pretty easy to build by hand.  You can get information about hat format
from the VTK User's Guide or in the following link.

http://www.vtk.org/pdf/file-formats.pdf      -Ken          ________________________________    From: paraview-bounces+kmorel=sandia.gov at paraview.org [mailto:paraview-bounces+kmorel=sandia.gov at paraview.org] On
Behalf Of fredrikaustin
 Sent: Wednesday, October 03, 2007 7:14 AM
 To: paraview at paraview.org  Subject: [Paraview] paraview novice attempts 1st viz      Hello all,   I'm having a difficult time viewing what must be the simplest data set possible.  I have a csv file that includes 3 columns of numbers which I'd like to view as 'elevation' type data: 1st two columns give x & y coord (regular, though step-size for x and y are different), and 3rd column gives a height (the data is actually error vs. 2 different params).   I can open the file, and  see that it has read the columns of data correctly, but can't get a plot of this surface.   Seems this should be simple to view, but after blundering around the interface for too long, it is not as obvious as one would hope.   Thanks,  Thomas Blom     ________________________________    Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.      look, advertising! ->    ________________________________   Shape Yahoo! in your own image. Join our Network Research Panel today!
 _______________________________________________ ParaView mailing list ParaView at paraview.org http://www.paraview.org/mailman/listinfo/paraview       
ParaView mailing list
ParaView at paraview.org http://www.paraview.org/mailman/listinfo/paraview   
John Biddiscombe,                            email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07 Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82

look, advertising! ->

Need a vacation? Get great deals to amazing places on Yahoo! Travel. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20071005/11819ca1/attachment.htm

More information about the ParaView mailing list