[Paraview] XYZ to VTK

Mike Jackson imikejackson at gmail.com
Mon Feb 18 11:46:07 EST 2008


On Feb 18, 2008, at 11:24 AM, Dr Patricia Lozano-Casal wrote:

> 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.0
Unstructured Grid Example
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 5 float
0.0 0.0 0.0
1.0 0.0 0.0
2.0 0.0 0.0
0.0 1.0 0.0
1.0 1.0 0.0
CELLS 5 10
1 0
1 1
1 2
1 3
1 4
CELL_TYPES 5
1
1
1
1
1

# End VTK File



--
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services




More information about the ParaView mailing list