<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>when I use 
outInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), 
&amp;TimeStepValues[0], numTimeStepValues); it is for set all the time 
values of my selected attribute.<br>
<br>
Then I compare the requestedTimeValue obtain using&nbsp; outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS())[0];<br>
<br>
Then I try to look if the requestedTimeValue is in my TimeStepValues array. If not, I use: <br>
double newTime = TimeStepValues[0];<br>
outInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS(), &amp;newTime, 1);<br>
<br>
Doing this two last operation in RequestInfo doesn't set the newTime. 
but doing this in RequestData works (and outInfo has the same address in
 RequestInfo and RequestData).<br>
<br>
In the gui the TimeStepValues are ok, but not the requestedTimeStep. There is something wrong. But where, I don't know !</div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> "Biddiscombe, John A." &lt;biddisco@cscs.ch&gt;<br><b><span style="font-weight: bold;">À :</span></b> R M &lt;mlokida@yahoo.fr&gt;; "paraview@paraview.org" &lt;paraview@paraview.org&gt;<br><b><span style="font-weight: bold;">Envoyé le :</span></b> Jeu 25 novembre 2010, 16h 12min 30s<br><b><span style="font-weight: bold;">Objet&nbsp;:</span></b> RE: Re : [Paraview] Re : How to update GUI/paraview when data and time change in a reader ?<br></font><br><meta http-equiv="x-dns-prefetch-control" content="off"><style><!--
 
 _filtered {font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered {font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered {font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
 _filtered {font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
 
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"serif";}
a:link, span.MsoHyperlink
        {
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {
color:purple;
text-decoration:underline;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {

margin-right:0cm;

margin-left:0cm;
font-size:10.0pt;
font-family:"serif";}
span.emailstyle17
        {
font-family:"sans-serif";
color:#1F497D;}
span.EmailStyle19
        {
font-family:"sans-serif";
color:#1F497D;}
.MsoChpDefault
        {
font-size:10.0pt;}
 _filtered {
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {}
--></style><div class="WordSection1"><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">UPDATE_TIME STEPS is what is being requested from you. Are you sure yoy shouldn’t be setting </span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);"> &nbsp;</span></p><p class="MsoNormal" style=""><b><span style="font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp; <span style="color: green;">outInfo</span>-&gt;<span style="color: green;">Set</span>(<span style="color: green;">vtkStreamingDemandDrivenPipeline</span>::<span style="color: green;">TIME_STEPS</span>(),</span></b><span style="font-family: &quot;Courier New&quot;;"></span></p><p class="MsoNormal" style=""><b><span style="font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;<span style="color: maroon;">this</span>-&gt;<span style="color:
 green;">TimeStepValues</span>[<span style="color: red;">0</span>],</span></b><span style="font-family: &quot;Courier New&quot;;"></span></p><p class="MsoNormal" style=""><b><span style="font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: maroon;">static_cast</span>&lt;<span style="color: maroon;">int</span>&gt;(<span style="color: maroon;">this</span>-&gt;<span style="color: green;">TimeStepValues</span>.<span style="color: green;">size</span>()));</span></b><span style="font-family: &quot;Courier New&quot;;"></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);"> &nbsp;</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">or similar in your request information? When this changes, the time keeper should refresh, and then the GUI ought to change the time it asks for (assuming
 there’s some whay it can know the correct time)</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);"> &nbsp;</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">JB</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);"> &nbsp;</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);"> &nbsp;</span></p><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;"><p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;" lang="EN-US">From:</span></b><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;" lang="EN-US"> R M
 [mailto:mlokida@yahoo.fr] <br><b>Sent:</b> 25 November 2010 15:33<br><b>To:</b> Biddiscombe, John A.; paraview@paraview.org<br><b>Subject:</b> Re : [Paraview] Re : How to update GUI/paraview when data and time change in a reader ?</span></p></div></div><p class="MsoNormal"> &nbsp;</p><div><div><p class="MsoNormal" style="margin-bottom: 12pt;">I though that the fact that using in RequestInfo :<br><br>outInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &amp;timedata[0], numTimeData); <br>outInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2);<br>outInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS(), &amp;myRequestedTime, 1);<br><br>and using in RequestData:<br><br>int tsLength = outInfo-&gt;Length(vtkStreamingDemandDrivenPipeline::TIME_STEPS());<br>double* steps = outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::TIME_STEPS());<br>double *requestedTimeSteps =
 outInfo-&gt;Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS());<br><br>would make the job.<br><br>But In my tests, as if outinfo is the same object (same address), the use of outInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS(), &amp;myRequestedTime, 1); in RequestInfo doen't set my requestedTime but keep the old requested time.&nbsp; Is-it Normal ?</p><div><div class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;"><hr align="center" size="1" width="100%"></span></div><p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;">De :</span></b><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;"> "Biddiscombe, John A." &lt;biddisco@cscs.ch&gt;<br><b>À :</b> R M &lt;mlokida@yahoo.fr&gt;; "paraview@paraview.org" &lt;paraview@paraview.org&gt;<br><b>Envoyé le :</b> Jeu 25 novembre 2010, 15h 18min
 42s<br><b>Objet&nbsp;:</b> RE: [Paraview] Re : How to update GUI/paraview when data and time change in a reader ?<br></span><br><br></p><div><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">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</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">vtkPVView::SetViewTime</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">(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).</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73,
 125);">&nbsp;</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">JB</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">&nbsp;</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">&nbsp;</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">&nbsp;</span></p><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: windowtext -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;"><p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;" lang="EN-US">From:</span></b><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;" lang="EN-US"> 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 ?</span></p></div></div><p class="MsoNormal">&nbsp;</p><div><div><p class="MsoNormal" style="margin-bottom: 12pt;">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&nbsp; of a&nbsp; 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.&nbsp; 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&nbsp; the requested time steps of the vtk pipeline when I updarte time steps and time range of the vtk pipeline ?</p><div><div class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;"><hr align="center" size="1" width="100%"></span></div><p class="MsoNormal" style="margin-bottom: 12pt;"><b><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;">De :</span></b><span style="font-size: 10pt; font-family: &quot;sans-serif&quot;;"> R M &lt;mlokida@yahoo.fr&gt;<br><b>À :</b> paraview@paraview.org<br><b>Envoyé le :</b> Mer 24 novembre 2010, 14h 49min 36s<br><b>Objet&nbsp;:</b> [Paraview] How to update GUI/paraview when data and time change in a reader ?<br><br></span></p><div><div><p class="MsoNormal">Hi,</p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal">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).</p><p class="MsoNormal">For example, I have 2 attributes «A» and «B».&nbsp; So In the reader, by default the first attribute is seleted («&nbsp;A&nbsp;»). &nbsp;The&nbsp; selection in the reader GUI makes &nbsp;the call of a method doing the change of the selected attribute («&nbsp;A&nbsp;») and corresponding time values. For time values it looks like this&nbsp;:</p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">vtkDemandDrivenPipeline* ddp = vtkDemandDrivenPipeline::SafeDownCast(<b>this</b>-&gt;GetExecutive());</span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">vtkInformationVector* outputVector = ddp-&gt;GetOutputInformation();</span></p><p class="MsoNormal"><span
 style="font-size: 10pt; font-family: Consolas; color: black;">vtkInformation* outInfo = outputVector-&gt;GetInformationObject(0);</span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">outInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &amp; timeData[0], numTimeData);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p><p
 class="MsoNormal"><b><span style="font-size: 10pt; font-family: Consolas; color: black;">double</span></b><span style="font-size: 10pt; font-family: Consolas; color: black;"> timeRange[2];</span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">&nbsp;</span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">timeRange[0] = timeData[0];</span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">timeRange[1] = timData[numTimeData-1];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p><p class="MsoNormal"><span style="font-size: 10pt;
 font-family: Consolas; color: black;">outInfo-&gt;Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2);</span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">&nbsp;</span></p><p class="MsoNormal"><span style="font-size: 10pt; 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></p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal"><span style="font-size: 10pt; font-family: Consolas; color: black;">-&gt; How and where can we say to paraview to update the GUI and have the B appears in the mapped variable of the toolbars&nbsp;?</span></p><p
 class="MsoNormal">&nbsp;</p><p class="MsoNormal"><span style="color: black;">Moreover, Paraview has a geometry cache &nbsp;(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 «&nbsp;A&nbsp;», 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></p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal"><span style="color: black;">-&gt; 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&nbsp;?</span></p><p class="MsoNormal"><span style="color: black;">&nbsp;</span></p><p class="MsoNormal"><span style="color: black;">Thank you.</span></p></div></div><p class="MsoNormal" style="margin-bottom: 12pt;">
 &nbsp;</p></div></div></div><p class="MsoNormal">&nbsp;</p></div></div></div></div><p class="MsoNormal"> &nbsp;</p></div><meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div><br>




      </body></html>