[Paraview] Re: Export output from "plot over line" filter in a text file

Fabian Braennstroem f.braennstroem at gmx.de
Wed Jun 13 17:26:24 EDT 2007


Hi,

Olivier Ricou schrieb am 06/13/2007 11:41 AM:
> 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.

somehow, for my ensight data the 'plot over line' and 'probe' filter
is unavailable... I user version 3.0.1
Strange!?

> 
> 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").

Looks almost exactly like vtk-python. Do you have an hint, how I can
adopt my vtk-python knowlegde to
paraview's scripting? Would be nice!

Regards!
Fabian


More information about the ParaView mailing list