[Paraview] pvbatch + LoadState('..') +XDMF = empty image

Jens jens-devel at gmx.de
Mon Jun 14 09:13:42 EDT 2010


Hi,

Miguel Fosas send an other patch assigne to the related bug
http://www.itk.org/Bug/view.php?id=10775#c20932

Instead of "XdmfConstString Value=0;", he moves the variable in the
case-section.

Greetings
Jens


--- XdmfDataItem.cxx	2010-06-07 18:11:50.954700131 +0200
+++ XdmfDataItem-patched.cxx	2010-06-07 18:11:22.709716046 +0200
@@ -145,18 +145,18 @@
 }

 XdmfInt32 XdmfDataItem::UpdateInformationFunction(){
-    XdmfConstString Value;
     switch(this->ItemType){
         case XDMF_ITEM_FUNCTION :
+           XdmfConstString Value;
            Value = this->Get("Function");
            this->SetFunction(Value);
+           delete Value;
            break;
         case XDMF_ITEM_HYPERSLAB :
             break;
         case XDMF_ITEM_COORDINATES :
             break;
     }
-    delete Value;
     return(XDMF_SUCCESS);
 }

Dave Partyka schrieb:
> Hi Ken, Kenji and Jens, 
> 
> I pulled the fix to UpdateInformationUniform that Ken committed into
> ParaView a few weeks ago. I just now also applied the fix to
> UpdateInformationFunction and pulled the change into ParaView as well.
> 
> I apologize for some of the confusion. Since the transition to Git, Xdmf
> work is done on master and has to be manually pulled onto the 'pv'
> branch that ParaView uses due to structural issues with Xdmf and how it
> was circumvented using CVS symlinks.
> 
> Anyway, Please let myself or Ken know if there are any more problems.
> 
> Thanks!
> 
> On Sat, May 29, 2010 at 4:41 AM, Kenji Takizawa
> <Kenji.Takizawa at tafsm.org <mailto:Kenji.Takizawa at tafsm.org>> wrote:
> 
>     Dear Ken, and dear Utkarsh,
> 
>     I sent an email for the bug fix. But Kenneth applied it to different
>     location.
>     Instead of line 148 (which is in UpdateInformationFunction), it was
>     applied to 172 (which is in UpdateInformationUniform).
> 
>     So I would like to inform you this again. I believe this issue is also
>     related to this bug.
>     I had been fixed on my servers and working well. I am also using state
>     loadings with sever and client system.
> 
>     Thank you,
>     Kenji Takizawa
> 
> 
>     On Fri, May 28, 2010 at 2:36 PM, Utkarsh Ayachit
>     <utkarsh.ayachit at kitware.com <mailto:utkarsh.ayachit at kitware.com>>
>     wrote:
>     > Jens,
>     >
>     > I'd recommend not relying on Xdmf state loading or Python API in 3.6
>     > (or before) since that was broken. It has since been fixed for 3.8. I
>     > have requested the ARL/Xdmf folks to take a look at the hyperslab
>     > issue. I'll keep you posted. Once that segfault is fixed, state
>     > loading should not be an issue.
>     >
>     > Utkarsh
>     >
>     > On Fri, May 28, 2010 at 3:27 PM, Jens <jens-devel at gmx.de
>     <mailto:jens-devel at gmx.de>> wrote:
>     >> Hi Utkarsh,
>     >>
>     >> The problem is related to bug 10775
>     >> (http://public.kitware.com/Bug/view.php?id=10775) and hyperslabs
>     in XDMF.
>     >> I attached an example which should reproduce the problems I
>     discribe now:
>     >>
>     >> hyperslab on its own:
>     >> pv 3.6.2: loading test.xmf->dataset u_without_hyperslab works fine
>     >> pv 3.8.0: loading test.xmf->dataset u_without_hyperslab works fine
>     >> pv 3.6.2: loading test.xmf->dataset u_with_hyperslab works fine
>     >> =>!! pv 3.8.0: loading test.xmf->dataset u_with_hyperslab _segfaults_
>     >>
>     >> hyperslab and "Load/Save State":
>     >> pv 3.6.2: loading test_nohyper.pvsm works fine (contour is visible)
>     >> pv 3.8.0: loading test_nohyper.pvsm works fine (contour is visible)
>     >> =>! pv 3.6.2: loading test_withhyper.pvsm fails (contour _NOT_
>     visible)
>     >> =>!! pv 3.8.0: loading test_withhyper.pvsm _segfaults_
>     >>
>     >> XDMF+hyperslab never worked with "Load State". pv 3.6.2 loads the
>     >> pipeline but does not load the hyperslab-dataset. pv 3.8.0
>     segfaults as
>     >> it does loading hyperslab-datasets anyway.
>     >>
>     >> I hope you can reproduce the behaviour (the bugreport also has a
>     >> backtrace attached).
>     >> It would be great, if this problem could be fixed. But I am happy
>     now to
>     >> know its the hyperslab .. that's the first step to a bugfix :)
>     >>
>     >> Greetings
>     >> Jens
>     >>
>     >> Utkarsh Ayachit schrieb:
>     >>> Jens,
>     >>>
>     >>> It would be great if you could post a state to reproduce this issue.
>     >>>
>     >>> Utkarsh
>     >>>
>     >>> On Fri, May 28, 2010 at 1:31 PM, Jens <jens-devel at gmx.de
>     <mailto:jens-devel at gmx.de>> wrote:
>     >>>> 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
>     <mailto: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
>     <mailto: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
>     <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 <http://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 <http://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 <http://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
>     >
> 
> 
> 
>     --
>     Kenji Takizawa
>     http://www.tafsm.org/ktaki
>     http://www.tafsm.org
>     _______________________________________________
>     Powered by www.kitware.com <http://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