Hello paraviewers, <br><br>According to the information I found here <a href="http://www.itk.org/Wiki/ParaView/Users_Guide/Batch_Processing">http://www.itk.org/Wiki/ParaView/Users_Guide/Batch_Processing</a> (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)<br>
<br><span style="color: rgb(51, 102, 255);">sm=servermanager</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">sm.Connect()</span><br style="color: rgb(51, 102, 255);"><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">sm.LoadState(opt.statefile)</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">view=GetRenderViews()[0]</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">cnt=0</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">for time in timesteps:</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> ts=[]</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> ts.append(filelist[cnt])</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> reader.FileNames = ts</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> reader.FileNameChanged()</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> reader.UpdatePipeline()</span><br style="color: rgb(51, 102, 255);">
<br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> format="%%s/%%s/%%s/%%s_t%s%%s" % (opt.timeformat)</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> jpgfile=format % (path,opt.casedir,opt.outputdir,opt.imbase,float(time),jpgext)</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> view.ResetCamera()</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> view.StillRender()</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> view.WriteImage(jpgfile,"vtkPNGWriter",1)</span><br>
<span style="color: rgb(51, 102, 255);">cnt=cnt+1</span><br><br>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 <br><span style="color: rgb(51, 102, 255);"> for i in dir(reader):</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> print "reader.%s = %s" % (i,getattr(reader,i))</span><br style="color: rgb(51, 102, 255);">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. <br>
Does anybody sees what goes wrong and how I can fix this ?<br><br>Many thanks<br><br>Regards<br><br>Eelco <br><br>