[Paraview] pvbatch + LoadState('..') +XDMF = empty image
Jens
jens-devel at gmx.de
Fri May 28 13:31:46 EDT 2010
Hi Utkarsh,
if I reload the state in paraview-gui it does not refresh ether.
I have to walk through the pipeline (bottom to top) and call "Apply".
Greetings
Jens
Utkarsh Ayachit schrieb:
> Jens,
>
> Is the non-refreshed part of the pipeline visible in the view?
>
> Utkarsh
>
> On Fri, May 28, 2010 at 3:23 AM, Jens <jens-devel at gmx.de> wrote:
>> Hi Utkarsh,
>>
>> thank you for that hint.
>> I can see the bounding box now ...
>>
>> But somehow it does not refresh the whole pipeline.
>> What do I have to do, that all parts of pipeline are updated before I
>> write the image. Any idea?
>>
>> Greetings
>> Jens
>>
>> Utkarsh Ayachit schrieb:
>>> Jens
>>>
>>> Here's an updated script:
>>> =================
>>> from paraview.simple import *
>>>
>>> # reload state
>>> servermanager.LoadState('/tmp/state.pvsm')
>>>
>>> view = GetRenderViews()[0]
>>>
>>> ## render png
>>> view.ResetCamera()
>>> view.StillRender()
>>> view.WriteImage( "/tmp/Test1.png", "vtkPNGWriter" )
>>> ==================
>>>
>>>
>>> The problem was that your script was creating a new view, and not
>>> using the view created by the state file.
>>>
>>> Utkarsh
>>>
>>> On Thu, May 27, 2010 at 2:56 PM, Jens <jens-devel at gmx.de> wrote:
>>>> Hi,
>>>>
>>>> I try to use pvbatch to render a whole bunch of screenshots using a
>>>> script. pvbatch works fine if I simply create a sphere and write that
>>>> image to disk.
>>>>
>>>> But loading a predefined pipeline using LoadState('pstate.pvsm') which
>>>> includes a datset in XDMF file format fails.
>>>>
>>>> Any idea what I am doing wrong?
>>>> This seems to be related to bug 6495
>>>> (http://www.itk.org/Bug/view.php?id=6495&nbn=2), but the suggested
>>>> solution cannot be used with LoadState(..).
>>>>
>>>> Greetings
>>>> Jens
>>>>
>>>> ====================
>>>> from paraview import servermanager
>>>>
>>>> # connect to pvserver
>>>> servermanager.Connect()
>>>>
>>>> # reload state
>>>> #r = servermanager.LoadState('paraview_state.pvsm')
>>>>
>>>> # render png
>>>> view = servermanager.CreateRenderView()
>>>> view.ResetCamera()
>>>> view.StillRender()
>>>> view.WriteImage( "Test1.png", "vtkPNGWriter" )
>>>> ====================
>>>> _______________________________________________
>>>> 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
>>>>
>
More information about the ParaView
mailing list