[Paraview] How to get array member data in python shell or programmable filter in paraview?

Mei Chen mei.chen.web at gmail.com
Tue Aug 7 19:23:10 EDT 2012


Hi,

I use GradientOfUnstructuredDataSet to get Gradients. I can see the
Gradients_0, ..., Gradients_8 on the Scalars part if I add a new Calculator
filter after the GradientOfUnstructuredDataSet filter. My question is how
to get these Gradients_0, ..., Gradients_8 in Python Shell or Programmable
Filter? I would like to do some data process with them.

I tried to get by this way:
reader = GetActiveSource()
gradientsAll = reader.PointData.GetArray(1) # suppose the Gradients is the
second variables in the data list
gradientsAll.GetRange(0) # I can see the range of the 9 gradient scalars
but I cannot access the data

I want to create a Jacobi matrix of these 9 gradients to calculate other
support matrix and the eigenvalues (for example, to get the Lambda2
criterion). I also need the number of points. I check the proxy but have no
idea which function can be used.
Any suggestion or example of codes will be very appreciated!


Thanks,
Mei Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120808/94bcf4ec/attachment.htm>


More information about the ParaView mailing list