[Paraview] Export output from "plot over line" filter in a text
file
Olivier Ricou
olivier at ricou.eu.org
Wed Jun 13 07:41:18 EDT 2007
die 13/06/07, ad 12h13, Jul D <juliolatengo at gmail.com> dixit :
> Hello all,
>
> I'm currently using Paraview 3.0.0 to visualize Ensight data. I am able to
> plot a 1D graph with the "plot over line" filter. I would like to process
> those results but unlike in Paraview 2.x, it is here not possible to export
> the data in a *.csv file. Do you think a Python script would do this? I
> found very few documentation on Python scripting in Paraview.
do you plot with ProbeLine then with that element activated, choose
Programmable Filter and put this script :
print "------------------"
pdi = self.GetInput()
nbp = pdi.GetNumberOfPoints()
vals = pdi.GetPointData().GetScalars("p")
for i in range(0,nbp):
print "%d : %e" % (i,vals.GetValue(i))
print "------ done ----------"
of course you have to print in the csv format and to choose your variable
(instead of "p").
Olivier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://public.kitware.com/pipermail/paraview/attachments/20070613/ab8c4034/attachment.pgp
More information about the ParaView
mailing list