[vtkusers] Using vtkXMLStructuredGridReader to read only part of a data file

David E DeMarle dave.demarle at kitware.com
Fri Mar 12 11:10:05 EST 2010


I stand corrected. Thanks Jean!

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109


On Fri, Mar 12, 2010 at 11:03 AM, Favre  Jean <jfavre at cscs.ch> wrote:
>
> I believe It is possible to select which array to load or skip over, before executing Update().
>
> You must execute UpdateInformation() first, and then set or unset the arrays of your choice. Here is the example python code
>
> reader = vtkXMLUnstructuredGridReader()
> reader.SetFileName("/local/data/slice.vtu")
> reader.UpdateInformation()
>
> print reader.GetPointDataArraySelection()
>
> reader.SetPointArrayStatus('Temperature', 0)
> reader.GetPointArrayStatus('Temperature')
>
> reader.Update()
>
> -----------------
> Jean M. Favre
> Swiss National Supercomputing Center
>



More information about the vtkusers mailing list