[Paraview] Use one statefile for multiple time values
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Mon Aug 8 10:13:05 EDT 2011
That's odd. What type of reader is this? It's possible that the reader
has issues with changing the filename once it's set or something like
that.
Utkarsh
On Mon, Aug 8, 2011 at 5:46 AM, Eelco van Vliet <eelcovv at gmail.com> wrote:
> Hello paraviewers,
>
> According to the information I found here
> http://www.itk.org/Wiki/ParaView/Users_Guide/Batch_Processing (bottom page)
> it should be able to Load a state file and then to change the file name to
> apply the same state on multi files (for making an animation for instance)
>
> sm=servermanager
> sm.Connect()
>
> sm.LoadState(opt.statefile)
> view=GetRenderViews()[0]
> cnt=0
> for time in timesteps:
> ts=[]
> ts.append(filelist[cnt])
> reader.FileNames = ts
> reader.FileNameChanged()
> reader.UpdatePipeline()
>
> format="%%s/%%s/%%s/%%s_t%s%%s" % (opt.timeformat)
> jpgfile=format %
> (path,opt.casedir,opt.outputdir,opt.imbase,float(time),jpgext)
> view.ResetCamera()
> view.StillRender()
> view.WriteImage(jpgfile,"vtkPNGWriter",1)
> cnt=cnt+1
>
> However, the scrips keeps showing only the data associate with the first
> file in the state file. If I print the properties of the reader with
> for i in dir(reader):
> print "reader.%s = %s" % (i,getattr(reader,i))
> I can see that in the reader object the filename indeed has change, but the
> change are not reflected to the newly rendered image. I seems that
> UpdatePipe() does not work.
> Does anybody sees what goes wrong and how I can fix this ?
>
> Many thanks
>
> Regards
>
> Eelco
>
>
> _______________________________________________
> 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