You will need to compile ParaView with OS Mesa, otherwise a window will
always popup even if the offscreen rendering is turned ON. If so the window
content will stay black but the window will still show up.

Seb


On Mon, Mar 18, 2013 at 11:06 AM, Anton Shterenlikht <[email protected]>wrote:

> The script below works for me in paraveiw 3.10
> with pvpython and pvbatch. However, in pvbatch
> it still opens a graphical window for a short time.
> How can I modify the script to *not* open any
> graphical windows when run with pvbatch?
>
> Can I do away with CreateRenderView()?
>
> Thanks
>
> Anton
>
> from paraview.simple import *
> #Connect()
> reader=ImageReader(FilePrefix="z.raw")
> reader.DataByteOrder=1
> reader.DataExtent=[1,40,1,40,1,40]
> reader.DataScalarType=6
>
> view = GetActiveView()
> if not view:
>  view = CreateRenderView()
> view.ViewSize=[600,600]
>
> Show()
>
> dp = GetDisplayProperties(reader)
> dp.LookupTable = MakeBlueToRedLT(1,64)
> dp.ColorAttributeType = 'POINT_DATA'
> dp.ColorArrayName = 'ImageFile'
> dp.Representation="Surface"
>
> camera = GetActiveCamera()
> camera.SetViewUp(-1,0,0)
> camera.Azimuth(30)
> camera.Elevation(30)
>
> #camera.SetPosition(0,0,100)
> #camera.Roll(-90)
>
> Render()
>
> WriteImage("z.png")
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to