I want to read a VTR file and work with its data. In my case it has 3
Components,

source = XMLRectilinearGridReader(FileName=['test.vtr'])
arrayName = 'M'
arrayComponents = 3
data = source.GetCellDataInformation()
array = data.GetArray(arrayName)
dataRange = array.GetRange(component)
FieldData = source.GetFieldData()
print FieldData

gives me:

vtkPVDataSetAttributesInformation (000000000EAE6FC0)

Debug: Off

Modified Time: 1066787

Reference Count: 2

Registered Events: (none)

RootOnly: 0

ArrayInformation, number of arrays: 1

Debug: Off

Modified Time: 1068264

Reference Count: 1

Registered Events: (none)

RootOnly: 0

Name: M

DataType: 11

NumberOfComponents: 3

NumberOfTuples: 2500000

IsPartial: 0

Ranges :

0, 1.53585e+006

-1.53585e+006, 1.53585e+006

-1.53585e+006, 1.53585e+006

-306523, 1.53393e+006

InformationKeys :

vtkAbstractArray::PER_COMPONENT

vtkDataArray::L2_NORM_RANGE


SortArrays: 1

Now I would like to access this data, best case for me would be if I can
use it in numpy, with the

from vtk.util.numpy_support import vtk_to_numpy

methods...

Or should I work with a Programmable Filter Option instead?

Thanks
Richard
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to