[Paraview] Time Range Skipping
Brian C. Panneton (CONTR)
brian.c.panneton.ctr at us.army.mil
Thu Apr 28 11:31:16 EDT 2011
I am attempting to set up a time range for my reader. However, it
increments the time range by 1/10ths instead of by 1. So if my range
start = 0 and range end = 4000, I get 10 steps instead of 4000.
My RequestInformation looks like such:
[code]
...
double timeRange[2];
timeRange[0] = this->TimeStepValues.front();
timeRange[1] = this->TimeStepValues.back();
outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(),
timeRange, 2);
...
[/code]
My RequestData looks like such:
[code]
...
int tsLength = outInfo->Length(
vtkStreamingDemandDrivenPipeline::TIME_STEPS());
double* steps = outInfo->Get(
vtkStreamingDemandDrivenPipeline::TIME_STEPS());
if(outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()))
{
double* requestedTimeSteps = outInfo->Get(
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS());
this->TimeValue = requestedTimeSteps[0];
int cnt = 0;
while(cnt < tsLength-1 && steps[cnt] < this->TimeValue) cnt++;
this->ActualTimeStep = cnt;
}
if(this->TimeStep > -1)
this->ActualTimeStep = this->TimeStep;
if(this->ActualTimeStep >= this->TimeStepRange[0] &&
this->ActualTimeStep <= this->TimeStepRange[1])
{
printf("RequestData: Found TimeStep -> %f\n", this->ActualTimeStep);
}
...
[/code]
I have the following in my xml:
[code]
...
<DoubleVectorProperty
name="TimeStepValues"
information_only="1">
<TimeStepsInformationHelper/>
<Documentation>
Available timestep values.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="TimeRange"
information_only="1">
<TimeRangeInformationHelper />
</DoubleVectorProperty>
...
[/code]
And finally in my header I have:
[code]
...
vtkSetMacro(TimeStep, int);
vtkGetMacro(TimeStep, int);
int GetNumberOfTimeSteps();
...
std::vector<double> TimeStepValues;
int TimeStepRange[2];
int TimeStep;
double TimeValue;
int ActualTimeStep;
...
[/code]
I have verified that RequestInformation does have the correct time range.
Any idea what I need to change to increment by 1?
Thanks
Brian Panneton
More information about the ParaView
mailing list