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

Ben Medina ben.medina at gmail.com
Mon Mar 15 19:18:51 EDT 2010


Yes, that works perfectly. Thanks Jean!

Now to get the mapper downstream to use the newly-loaded array for
color mapping....

- Ben

On Fri, Mar 12, 2010 at 9:10 AM, David E DeMarle
<dave.demarle at kitware.com> wrote:
> 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