[Paraview] Timestep mixups with custom reader. [CVS Head]

Mike Jackson mike.jackson at imts.us
Tue Jul 29 13:51:29 EDT 2008


I have run into an issue with my custom reader with timestep support.  
Somehow the pipeline is not retrieving the proper value from the  
pipeline and my reader is erroring out.

Here is the relevent code sections:

vtkH5VizFileReader::RequestInformation(...)
{
   numTimesteps = 1; // This was read from a file
   this->TimeStepRange[0] = 0;
   this->TimeStepRange[1] = numTimesteps -1;
   outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(),  
&TimeStepValues.front(), (vtkTypeUInt32)numTimesteps);

   double timeRange[2];
   timeRange[0] = this->TimeStepValues.front();
   timeRange[1] = this->TimeStepValues.back();
// timeRange = {1000, 1000} at this point
   outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(),  
timeRange, 2);
}


int vtkH5VizFileReader::RequestData(...)
{
   // Check if a particular time was requested.
   if (outInfo0->Has 
(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()))
   {
     // Get the requested time step. We only supprt requests of a  
single time
     // step in this reader right now
     double *requestedTimeSteps =
       outInfo0->Get 
(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS());
     this->TimeValue = requestedTimeSteps[0];
     // At this point, 'this->TimeValue = 100' NOT 1000 like I would  
have thought.
   }

  // Later on there is a check to make sure the pipeline is asking  
for a time value
// within our range:

   if (this->TimeValue >= this->TimeStepValues.front()
         && this->TimeValue <= this->TimeStepValues.back() )
   {
   }
   else
   {
	return 0;
   }

return 1;
}

Stepping through with a debugger for another file with lots of  
timesteps works just fine. The proper time values are sent by the  
pipeline.
I am not sure if setting the this->TimeStepRange in the  
requestInformation is messing things up by having a range of 0 to 0?

Anybody have any thoughts?

Thanks
-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services





More information about the ParaView mailing list