VTK/Remove vtkTemporalDataSet: Difference between revisions

From KitwarePublic
< VTK
Jump to navigationJump to search
(Created page with "Previously, VTK pipeline supports multiple time steps in the pipeline: Filters can request data sets of multiple time steps from upstream using the key vtkStreamingDemandDrivenPi...")
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 5: Line 5:
data sets in a vtkTemporalDataSet object and setting the key
data sets in a vtkTemporalDataSet object and setting the key
vtkDataObject::DATA_TIME_STEPS on the object. Over time, we found that
vtkDataObject::DATA_TIME_STEPS on the object. Over time, we found that
the logic in the pipeline code to handle the multiple time steps is
the pipeline logic to handle multiple time steps is
too complicated to maintain, epecially considering the limited use of
too complicated to maintain, especially considering the limited use of
it. Therefore, the temporal support has been reduced to support only
it. Therefore, we have reduced the temporal support to handle only
single time step requets. Filters that need multiple steps still work
single time step requests. Filters that need multiple time steps still work,
by using the key vtkStreamingDemandPipeline::CONTINUE_EXECUTION() to loop the
by using the key vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTION() to loop the
upstream pipeline and cache the resulting data sets.  We have
upstream pipeline and caching the resulting data sets inside the filters.  We have
created a convenience super class vtkMultipleTimeStepAlgorithm that does
also created a convenience super class vtkMultipleTimeStepAlgorithm that does
exactly that.
exactly that.


In more details, the multiple time request keys:
In more details, the multiple time request keys:
* <source lang="cpp"> vtkInformationDoubleVectorKey* vtkStreamingDemandPipeline::UPDATE_TIME_STEPS() </source>
* <source lang="cpp"> vtkInformationDoubleVectorKey* vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS() </source>
* <source lang="cpp"> vtkInformationDoubleVectorKey* vtkDataObject::DATA_TIME_STEPS() </source>
* <source lang="cpp"> vtkInformationDoubleVectorKey* vtkDataObject::DATA_TIME_STEPS() </source>
are replaced by single time request keys:
are replaced by single time request keys:
* <source lang="cpp"> vtkInformationDoubleKey* vtkStreamingDemandPipeline::UPDATE_TIME_STEP() </source>
* <source lang="cpp"> vtkInformationDoubleKey* vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP() </source>
* <source lang="cpp"> vtkInformationDoubleKey* vtkDataObject::DATA_TIME_STEP()</source>
* <source lang="cpp"> vtkInformationDoubleKey* vtkDataObject::DATA_TIME_STEP()</source>


As a consequence of the changes, the following constructs are no longer used and depreicated:
As a consequence of the changes, the following constructs are no longer used and depreciated:
* <source lang="cpp"> #define VTK_TIME_EXTENT 2 </source>
* <source lang="cpp"> #define VTK_TIME_EXTENT 2 </source>
* <source lang="cpp"> class vtkTemporalDataSet </source>
* <source lang="cpp"> class vtkTemporalDataSet </source>
Line 27: Line 27:
   
   
After the changes, to request data sets of multiple time steps, a filter can  
After the changes, to request data sets of multiple time steps, a filter can  
loop the upstream pipeline by setting the key vtkStreamingDemandPipeline::CONTINUE_EXECUTION(). The simplest
loop the upstream pipeline by setting the key vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTION(). The simplest
usage example for the key can be found in the class
usage example for the key can be found in the class
vtkTemporalStatistics. Another example is the class
vtkTemporalStatistics. Another example is the class
vtkMultipleTimeStepAlgorithm, which can request multiple time steps, cache the multiple data sets in a vtkMultiBlockDataSet and
vtkMultiTimeStepAlgorithm, which can request multiple time steps, cache the multiple data sets in a vtkMultiBlockDataSet and
pass it to the child class when all the data sets are received. A
pass it to the child class when all the data sets are received. A
filter that wants to request multiple time step data can simply
filter that wants to request multiple time step data can simply
inherit this class and set the key
inherit this class and set the key
vtkMultipleTimeStepAlgorithm::UPDATE_TIME_STEPS(). An example is the class vtkTemporalInterpolator. We note that this is no more
vtkMultiTimeStepAlgorithm::UPDATE_TIME_STEPS(). An example is the class vtkTemporalInterpolator. We note that this is no more
work than before the pipeline changes.
work than before the pipeline changes.

Latest revision as of 14:38, 25 June 2015

Previously, VTK pipeline supports multiple time steps in the pipeline: Filters can request data sets of multiple time steps from upstream using the key vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS(); Upstream sources then fulfil the request by wrapping the data sets in a vtkTemporalDataSet object and setting the key vtkDataObject::DATA_TIME_STEPS on the object. Over time, we found that the pipeline logic to handle multiple time steps is too complicated to maintain, especially considering the limited use of it. Therefore, we have reduced the temporal support to handle only single time step requests. Filters that need multiple time steps still work, by using the key vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTION() to loop the upstream pipeline and caching the resulting data sets inside the filters. We have also created a convenience super class vtkMultipleTimeStepAlgorithm that does exactly that.

In more details, the multiple time request keys:

  • <source lang="cpp"> vtkInformationDoubleVectorKey* vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS() </source>
  • <source lang="cpp"> vtkInformationDoubleVectorKey* vtkDataObject::DATA_TIME_STEPS() </source>

are replaced by single time request keys:

  • <source lang="cpp"> vtkInformationDoubleKey* vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP() </source>
  • <source lang="cpp"> vtkInformationDoubleKey* vtkDataObject::DATA_TIME_STEP()</source>

As a consequence of the changes, the following constructs are no longer used and depreciated:

  • <source lang="cpp"> #define VTK_TIME_EXTENT 2 </source>
  • <source lang="cpp"> class vtkTemporalDataSet </source>
  • <source lang="cpp"> class vtkTemporalDataSetAlgorithm </source>

After the changes, to request data sets of multiple time steps, a filter can loop the upstream pipeline by setting the key vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTION(). The simplest usage example for the key can be found in the class vtkTemporalStatistics. Another example is the class vtkMultiTimeStepAlgorithm, which can request multiple time steps, cache the multiple data sets in a vtkMultiBlockDataSet and pass it to the child class when all the data sets are received. A filter that wants to request multiple time step data can simply inherit this class and set the key vtkMultiTimeStepAlgorithm::UPDATE_TIME_STEPS(). An example is the class vtkTemporalInterpolator. We note that this is no more work than before the pipeline changes.