Hi Utkarsh, <br><br>I am using the
<style type="text/css">p, li { white-space: pre-wrap; }</style> LegacyVTKReader. Looking at the reader properties I see that indeed the new filename is in the reader object, but still the first file as defined in the state file is used for plotting. <br>
<br>Regards<br>Eelco<br><br><br><div class="gmail_quote">On Mon, Aug 8, 2011 at 11:46 AM, Eelco van Vliet <span dir="ltr"><<a href="mailto:eelcovv@gmail.com">eelcovv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello paraviewers, <br><br>According to the information I found here <a href="http://www.itk.org/Wiki/ParaView/Users_Guide/Batch_Processing" target="_blank">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><font color="#888888"><br>Eelco <br><br>
</font></blockquote></div><br>