<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 style="font-family: times new roman,new york,times,serif; font-size: 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 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 ?<br><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> R M <mlokida@yahoo.fr><br><b><span style="font-weight: bold;">À :</span></b> paraview@paraview.org<br><b><span style="font-weight: bold;">Envoyé le :</span></b> Mer 24 novembre 2010, 14h 49min 36s<br><b><span style="font-weight: bold;">Objet :</span></b> [Paraview] 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"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal"><br></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».<span style=""> </span>So In the reader, by default the first
attribute is seleted (« A »). <span style=""> </span>The<span style="">
</span>selection in the reader GUI makes <span style=""> </span>the call of a method doing the change of the
selected attribute (« A ») and corresponding time values. For time values it looks
like this :</p><p class="MsoNormal"><br></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;">vtkDemandDrivenPipeline* ddp = vtkDemandDrivenPipeline::SafeDownCast(<b>this</b>->GetExecutive());</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;">vtkInformationVector* outputVector = ddp->GetOutputInformation();</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;">vtkInformation* outInfo = outputVector->GetInformationObject(0);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;"><span style=""> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;">outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(),
& timeData[0], numTimeData);<span style=""> </span><span style=""> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;"><span style=""> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><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" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;">timeRange[0] = timeData[0];</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;">timeRange[1] = timData[numTimeData-1];<span style=""> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: Consolas; color: black;"><span style=""> </span></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Consolas; color: black;">outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(),
timeRange, 2);</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Consolas; color: black;"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; 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 </span><span style="font-size: 10pt; line-height: 115%; font-family: Consolas; color: black;">«B»</span><span style="font-size: 10pt; line-height: 115%; font-family: Consolas; color: black;">). </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Consolas; color: black;"><br></span></p><p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; 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></p>
<p class="MsoNormal"><span style="color: black;"><br></span></p><p class="MsoNormal"><span style="color: black;">Moreover,
Paraview has a geometry cache <span style=""> </span>(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 </span><span style="color: black;">«B»</span><span style="color: black;">. So paraview doesn’t need to update beacause it
considerer to have data for the requested time step.</span></p>
<p class="MsoNormal"><span style="color: black;"><br></span></p><p class="MsoNormal"><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></p>
<p class="MsoNormal"><span style="color: black;"> </span></p>
<p class="MsoNormal"><span style="color: black;">Thank you.</span></p>
</div>
</div><br>
<meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div><br>
</body></html>