<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If the time values change, then the view needs to be told to update with a new ‘time’ – you’ll need to force an update with something similar to<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>vtkPVView::SetViewTime<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>(You’ll also want to make sure the timekeeper refreshes itself when the reader updates – to ensure that paraview has the coorect times in it’s internal state).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>JB<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> paraview-bounces@paraview.org [mailto:paraview-bounces@paraview.org] <b>On Behalf Of </b>R M<br><b>Sent:</b> 25 November 2010 14:54<br><b>To:</b> paraview@paraview.org<br><b>Subject:</b> [Paraview] Re : How to update GUI/paraview when data and time change in a reader ?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>So, I use the Modified() method that updates the internal time stamp for the object (from "The VTK User's Guide"). <br>When I have attributes (points attributes of a vtkpolydata) with the same time steps, everything is fine and when I switch from one attribute to an other, the requested Time step is ok (because we have the same time steps).<br>But, when I have attributes with differents time steps (ex: A [1, 5, 10] and B [2, 6, 11]) there is a problem of update. If I switch from an attribute to an other, the requested time step for the new selected attribute is the requested time step of the previous attribute.<br><br>So how can I correctly update the requested time steps of the vtk pipeline when I updarte time steps and time range of the vtk pipeline ?<o:p></o:p></p><div><div class=MsoNormal align=center style='text-align:center'><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><hr size=1 width="100%" align=center></span></div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> R M <mlokida@yahoo.fr><br><b>À :</b> paraview@paraview.org<br><b>Envoyé le :</b> Mer 24 novembre 2010, 14h 49min 36s<br><b>Objet :</b> [Paraview] How to update GUI/paraview when data and time change in a reader ?<br></span><br><br><o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi,<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Here’s my problems. I have a reader that load a geometry and some attributes (at the points). These attributes changed in the time and I can select one of them in a combo box (GUI in the reader).<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>For example, I have 2 attributes «A» and «B». So In the reader, by default the first attribute is seleted (« A »). The selection in the reader GUI makes the call of a method doing the change of the selected attribute (« A ») and corresponding time values. For time values it looks like this :<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>vtkDemandDrivenPipeline* ddp = vtkDemandDrivenPipeline::SafeDownCast(<b>this</b>->GetExecutive());</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>vtkInformationVector* outputVector = ddp->GetOutputInformation();</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>vtkInformation* outInfo = outputVector->GetInformationObject(0);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), & timeData[0], numTimeData); </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><b><span style='font-size:10.0pt;font-family:Consolas;color:black'>double</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> timeRange[2];</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>timeRange[0] = timeData[0];</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>timeRange[1] = timData[numTimeData-1]; </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>The problems are the following. When I select «B» and make apply, timevalues corresponding to «B» are set and a new vtkPolyData is made with the corresponding point attribute data of «B» for the given time step. But, in paraview, the mapped variable of the toolbars is not update. «A» is always here (whereas I would like to have «B»). </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:Consolas;color:black'>-> How and where can we say to paraview to update the GUI and have the B appears in the mapped variable of the toolbars ?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>Moreover, Paraview has a geometry cache (Edit/settings /Animation). But when for example atributes «A» and «B» have the same time values and that we have selected all the time step for « A », when we select «B», nothing is done because paraview has cached data for the «A» and for the same time values than «B». So paraview doesn’t need to update beacause it considerer to have data for the requested time step.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>-> So, How can I say to Paraview that when a new attribute is selected, it needs to empty it’s cache and load data for requested time ?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:black'>Thank you.</span><o:p></o:p></p></div></div><p class=MsoNormal><br><br><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>