[vtkusers] Reading EnSight files

Marzio Sala marzio.sala at gmail.com
Fri Mar 30 08:39:55 EDT 2007


Jean,

thank you very much. I downloaded and installed VTK 5.1 (out of ParaView
2.6.0), and your suggestions work perfectly!

-Marzio

On 3/29/07, Jean Favre <jfavre at cscs.ch> wrote:
>
> On 28, Mar 2007 03:22 PM, Marzio Sala <marzio.sala at gmail.com> wrote:
>
> >Hello,
> >
> >I am using VTK (through Python) to read EnSight files, using something
> >like
> >
> >>>>reader = vtk.vtkEnSightGoldReader()
> >>>>reader.SetCaseFileName('test.case')
> >>>>reader.Update()
> >
> >The files are composed by more than one part (or dataset), and they are
> >correctly stored in reader.GetOutput().
> >
> >However, I cannot find the part name anywhere... Anybody knows how to
> >get
> >the part name?
>
>
> The part name is stored in FieldData in an array called "Name"
>
> So, the answer to both of your questions are:
>
> 1) get a specific output, for example the 0th output
>
> reader.GetOutput().GetDataSet(0,0)
>
> 2) get the name of the part
>
>
> reader.getOutput
> ().GetDataSet(0,0).GetFieldData().GetArray("Name").GetPointer(0)
>
> the command above gives the following answer when run with EnSight's
> demo file ami.case
>
> 'external flow field'
>
> hope this helps.
>
>
> --
> Dr. Jean M. Favre, email:favre @ cscs.ch
> http://www.cscs.ch/about/Favre.php
> CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.40
> Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
>
>
>


-- 
http://marzio.sala.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070330/cff62021/attachment.htm>


More information about the vtkusers mailing list