[Paraview] XYZ to VTK

Lester Anderson lester_anderson1963 at hotmail.com
Fri Feb 22 04:16:50 EST 2008


Hello
 
Following on from Mike Jackson's info:
 
> Hi everyone,>> I am finding some problems when trying to convert my three column  > ASCII data (XYZ) into vtk format. I know I have to define poligones  > and normals but I don't really know how. Is there any program that  > converts general raw data files to vtk files? If not, any advice on  > how to get the poligones and normals would be very appreciated.  > Thank you very much in advance for your help.>> Patty>> -- > Dr Patricia Lozano-Casal> Institute for Materials and Processes> School of Engineering and Electronics> University of Edinburgh> Kenneth Denbigh Building> The King's Buildings> Mayfield Road> Edinburgh, EH9 3JL, United Kingdom> Phone: ++44 (0)131 650 4859> Fax:   ++44 (0)131 650 6551> E-mail: P.Lozano-Casal at ed.ac.uk>> -- > The University of Edinburgh is a charitable body, registered in> Scotland, with registration number SC005336.> --Is your data just points in space? And you want to show those points  in ParaView?I might be inclined to try an unstructured grid with only VTK_VERTEX  as cell types.<http://www.vtk.org/pdf/file-formats.pdf>  may help you figure out  what to write. Page 4 explains about the UnstructuredGrid format,  while there is an example starting at the bottom of page 8.# Example VTK file for general XYZ data# vtk DataFile Version 2.0Unstructured Grid ExampleASCIIDATASET UNSTRUCTURED_GRIDPOINTS 5 float0.0 0.0 0.01.0 0.0 0.02.0 0.0 0.00.0 1.0 0.01.0 1.0 0.0CELLS 5 101 01 11 21 31 4CELL_TYPES 511111# End VTK File
I tried the test file as given and it certainly did not like the first line which I deleted, and then the file would run and generate 5 points. An error message was generated but did not stop the plotting:
 
ERROR: In C:\berk\ReleaseBuilds\ParaView3\VTK\IO\vtkUnstructuredGridReader.cxx, line 350
vtkUnstructuredGridReader (05BAC7B0): Unrecognized keyword: #
 
I think this is definitely something that would be a big help to many of us that work on XYZ data, if Paraview could automatically load XYZ data without the need to compile a separate reformatted structure. Clearly if it is only a few data points etc then the file could be done manually, but for more complex and large datasets this gets to be a problem.
 
Perhaps a stand-alone application could be written to convert from XYZ (or even netCDF) formats to ones that Paraview can  load without issue. There also appears to be a issue of legacy formats and the newer structures to contend with.
 
Lester
 
 
_________________________________________________________________
Free games, great prizes - get gaming at Gamesbox. 
http://www.searchgamesbox.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20080222/90168392/attachment.htm


More information about the ParaView mailing list