[vtkusers] Read unstructured data from ASCII file

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Aug 26 12:36:15 EDT 2004


Mirelle Mellqvist wrote:
> Hi,
> 
> Im currently working on a school project where I want to read in 
> unstructureddata from a preprocessor app called Nastran. It´s in ASCII 
> format.
> 
> My first idea is to use vtkUnstructuredGridReader or does it only 
> support *.vtk format, and in that case how do I convert it. If that is 
> not possible I guess I`ll have to write a new reader on my own, any 
> suggestions or any good guidance would be appriciated!

Mirelle,

	That looks like an excellent school project, I hope you will be able to 
contribute it to VTK.

	Anyway as a start, you could have a look at:

http://www.vtk.org/doc/nightly/html/classvtkGAMBITReader.html

or (but more complex)

http://www.vtk.org/doc/nightly/html/classvtkAVSucdReader.html

You're class needs do derive from vtkUnstructuredGridSource, then all 
you need to do is fill the Execute method with the proper NASTRAN parser.

HTH
Mathieu





More information about the vtkusers mailing list