[Paraview] XYZ to VTK

Andrew Maclean andrew.amaclean at gmail.com
Sun Feb 24 22:10:23 EST 2008


Here is the link to the small converter that I posted a while back:

http://public.kitware.com/pipermail/vtk-developers/2007-October/004746.html

I wrote it.
I have also entered this as a feature request for ParaView as it crops up
quite often.



Andrew

On Sat, Feb 23, 2008 at 12:24 AM, Mike Jackson <imikejackson at gmail.com>
wrote:

> Actually,
>    All was fixed with her data set. I do agree that a small convertor
> would be nice. If I had time I could hack something together with a Qt
> Gui. Maybe read CSV files with xyz and optional point data? Shouldn't
> be too hard to do just need the time.
>
> Also some one posted some code earlier to do just this type of
> conversion. I think you will need to look in the list archives for the
> code though. I don't remember exactly when it was posted.
>
> Mike
>
> On Fri, Feb 22, 2008 at 4:16 AM, Lester Anderson
> <lester_anderson1963 at hotmail.com> wrote:
> >
> >  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.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
> >
> >  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
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>



-- 
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.acfr.usyd.edu.au/
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20080225/c1885e57/attachment.htm


More information about the ParaView mailing list