[Paraview] Time Range Skipping

Moreland, Kenneth kmorel at sandia.gov
Thu Apr 28 11:48:22 EDT 2011


I assume that you left out of your example code where you also set
TIME_STEPS in RequestInformation.  If you had not done that, you would not
have a TIME_STEPS key to read from in RequestData.  (Incidentally, I don't
think your check to make sure the UPDATE_TIME_STEPS value is in
TIME_STEPS.  The VTK pipeline should already do that for you.)

To actually answer your question, you are probably missing the special
TimestepValues property in the SeverManager XML.  Without it, ParaView
won't know to pick up the TIME_STEPS reported by the reader and will visit
arbitrary time steps.  So, add the following to your reader's XML:

     <DoubleVectorProperty
        name="TimestepValues"
        repeatable="1"
        information_only="1">
        <TimeStepsInformationHelper/>
        <Documentation>
          Available timestep values.
        </Documentation>
     </DoubleVectorProperty>


-Ken


   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********  
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel




On 4/28/11 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