[Paraview] Getting point values on pvbatch

Magician f_magician at mac.com
Sat Sep 8 01:51:15 EDT 2012

Hi all,

I'm trying to get point values from several sources on pvbatch.
I'm using ParaView 3.14.1 with local client (single CPU) mode.

My pipeline is as below:

| --CellDatatoPointData1
|   |-/ResampleWithDataset1 (Input)
|   --IntegrateVariables1
| --/ResampleWithDataset1 (Source)

The original source (source.vtm) is XML MultiBlock including "Pressure" values.

Now I'm debugging my codes on Python Shell.
First I get sources as below:
>>> GetSources().keys()
[('IntegrateVariables1', '2579'), ('CellDatatoPointData1', '2293'), ('source.vtm', '2175'), ('ResampleWithDataset1', '2490'), ('Line1', '2305')]
>>> original = GetSources()[("source.vtm", "2175")]
>>> source = GetSources()[("CellDatatoPointData1", "2293")]
>>> integrate = GetSources()[("IntegrateVariables1", "2579")]
>>> line = GetSources()[("Line1", "2305")]
>>> resample = GetSources()[("ResampleWithDataset1", "2490")]

And all sources are grabbed successfully:
>>> original
<paraview.servermanager.XMLMultiBlockDataReader object at 0x11d81c4d0>
>>> source
<paraview.servermanager.CellDatatoPointData object at 0x11d81c490>
>>> integrate
<paraview.servermanager.IntegrateVariables object at 0x11d81c3d0>
>>> line
<paraview.servermanager.Line object at 0x11d81c450>
>>> resample
<paraview.servermanager.ResampleWithDataset object at 0x11d81c390>

Next I want to get these values:
a) original's coordXs, coordYs, coordZs
b) source's Pressures
c) integrate's Pressures
d) resample's Pressures

For example, I can get Pressure's range as below:
>>> source.PointData.GetArray("Pressure").GetRange()
But I'm missing to get each points' raw values,
and I can't find where the points' coordinates are.
Fortunately I can only get integrated value with GetRange()[0],
but I think it's not a good way.

How can I get each points' or integrated raw values and coordinates with Python?


More information about the ParaView mailing list