[Paraview] examples of pvbatch?

Berk Geveci berk.geveci at kitware.com
Sun Feb 3 15:58:00 EST 2008


Try this:

from paraview import servermanager

connection=servermanager.Connect()

reader=servermanager.sources.LegacyVTKFileReader(FileNames="/tmp/He.vtk")
linesource = servermanager.sources.LineSource()
linesource.Point1 = [ ... ] # set point 1
linesource.Point2 = [ ... ] # set point 2
linesource.Resolution = ...

prob = servermanager.filters.Probe()
prob.Input = reader
prob.Source = linesource
probe.UpdatePipeline() # this should produce the result


I am leaving the use of the writer as an exercise :-)

-berk

On 1/30/08, Olivier Ricou <olivier at ricou.eu.org> wrote:
> Hi,
>
>  Does someone have examples of python script (pvpython or pvbatch)?
>
>  I need to load a VTK file, filter is thru ProbeLine and save the
> result in a png file (snapshot). I look at Servermanager2 tutorial
> but didn't succeed to do what I want. Here what I guessed from the
> interactive help:
>
> from paraview import servermanager
>
> connection=servermanager.Connect('localhost')
>
> reader=servermanager.sources.LegacyVTKFileReader(FileNames="/tmp/He.vtk")
> reader.UpdateVTKObkject()
> filter=servermanager.filters.ProbeLine(Input=reader, Source=
>
>                                        TIA,
>
>                                           Olivier.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iD8DBQFHoK7bXwl5UewLtBARAn4gAKCmkjXNMIhypSbXGj8WgMLt6oWwQQCglTrW
> P4W7ynl4x3NBYCZhmf85QMY=
> =5ybz
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
>


More information about the ParaView mailing list