[Paraview] Time Range Skipping

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Apr 28 11:42:32 EDT 2011


In addition to TIME_RANGE(), put TIME_STEPS() in the outInfo during
RequestInformation. You'll have to compute the discrete timesteps
manually with appropriate increments.

Utkarsh


On Thu, Apr 28, 2011 at 11:31 AM, Brian C. Panneton (CONTR)
<brian.c.panneton.ctr at us.army.mil> wrote:
> 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
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list