[Paraview] Re : Re : Re : How to update GUI/paraview when data and time change in a reader ?
R M
mlokida at yahoo.fr
Thu Nov 25 10:25:08 EST 2010
when I use outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(),
&TimeStepValues[0], numTimeStepValues); it is for set all the time values of my
selected attribute.
Then I compare the requestedTimeValue obtain using
outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS())[0];
Then I try to look if the requestedTimeValue is in my TimeStepValues array. If
not, I use:
double newTime = TimeStepValues[0];
outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS(), &newTime,
1);
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).
In the gui the TimeStepValues are ok, but not the requestedTimeStep. There is
something wrong. But where, I don't know !
________________________________
De : "Biddiscombe, John A." <biddisco at cscs.ch>
À : R M <mlokida at yahoo.fr>; "paraview at paraview.org" <paraview at paraview.org>
Envoyé le : Jeu 25 novembre 2010, 16h 12min 30s
Objet : RE: Re : [Paraview] Re : How to update GUI/paraview when data and time
change in a reader ?
UPDATE_TIME STEPS is what is being requested from you. Are you sure yoy
shouldn’t be setting
outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(),
&this->TimeStepValues[0],
static_cast<int>(this->TimeStepValues.size()));
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)
JB
From:R M [mailto:mlokida at yahoo.fr]
Sent: 25 November 2010 15:33
To: Biddiscombe, John A.; paraview at paraview.org
Subject: Re : [Paraview] Re : How to update GUI/paraview when data and time
change in a reader ?
I though that the fact that using in RequestInfo :
outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &timedata[0],
numTimeData);
outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2);
outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS(),
&myRequestedTime, 1);
and using in RequestData:
int tsLength = outInfo->Length(vtkStreamingDemandDrivenPipeline::TIME_STEPS());
double* steps = outInfo->Get(vtkStreamingDemandDrivenPipeline::TIME_STEPS());
double *requestedTimeSteps =
outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS());
would make the job.
But In my tests, as if outinfo is the same object (same address), the use of
outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS(),
&myRequestedTime, 1); in RequestInfo doen't set my requestedTime but keep the
old requested time. Is-it Normal ?
________________________________
De :"Biddiscombe, John A." <biddisco at cscs.ch>
À : R M <mlokida at yahoo.fr>; "paraview at paraview.org" <paraview at paraview.org>
Envoyé le : Jeu 25 novembre 2010, 15h 18min 42s
Objet : RE: [Paraview] Re : How to update GUI/paraview when data and time change
in a reader ?
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
vtkPVView::SetViewTime
(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).
JB
From:paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On
Behalf Of R M
Sent: 25 November 2010 14:54
To: paraview at paraview.org
Subject: [Paraview] Re : How to update GUI/paraview when data and time change in
a reader ?
So, I use the Modified() method that updates the internal time stamp for the
object (from "The VTK User's Guide").
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).
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.
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 ?
________________________________
De :R M <mlokida at yahoo.fr>
À : paraview at paraview.org
Envoyé le : Mer 24 novembre 2010, 14h 49min 36s
Objet : [Paraview] How to update GUI/paraview when data and time change in a
reader ?
Hi,
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).
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 :
vtkDemandDrivenPipeline* ddp =
vtkDemandDrivenPipeline::SafeDownCast(this->GetExecutive());
vtkInformationVector* outputVector = ddp->GetOutputInformation();
vtkInformation* outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), & timeData[0],
numTimeData);
doubletimeRange[2];
timeRange[0] = timeData[0];
timeRange[1] = timData[numTimeData-1];
outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2);
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»).
-> How and where can we say to paraview to update the GUI and have the B appears
in the mapped variable of the toolbars ?
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.
-> 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 ?
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20101125/d1fa391a/attachment-0001.htm>
More information about the ParaView
mailing list