[vtk-developers] RELEASE_DATA doesn't?
Wilson, Andrew T
atwilso at sandia.gov
Fri Jan 14 13:54:48 EST 2011
Summary: the vtkDemandDrivenPipeline::RELEASE_DATA() key is always removed the first time a pipeline executes.
I'm working on a pipeline that needs to use RELEASE_DATA almost everywhere. If I use vtkDataObject::SetGlobalReleaseDataFlag() then ReleaseData() gets called. If I use vtkAlgorithm::SetReleaseDataFlag then ReleaseData() never gets called.
I've tracked this down to the following chain of events during pipeline execution:
- vtkDemandDrivenPipeline::ExecuteDataObject calls CheckDataObject to make sure the output object is there.
- CheckDataObject notices that there is no data object yet, creates one, and calls vtkExecutive::SetOutputData().
- SetOutputData puts in place the new output object and calls ResetPipelineInformation().
- vtkDemandDrivenPipeline::ResetPipelineInformation removes the RELEASE_DATA key.
The net result is that calls to SetReleaseDataFlag() before the pipeline is executed will have no effect. This seems like a bug. I have a couple of ideas regarding how to fix it but since this is at the heart of the pipeline I'd like input from pipeline hackers first.
Idea #1: Don't call ResetPipelineInformation() from SetOutputData(). If a filter wants to reset the pipeline keys make it do so itself.
Idea #2: Only call ResetPipelineInformation() if SetOutputData() is replacing an existing object.
Thoughts?
-- Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110114/b4040be3/attachment.html>
More information about the vtk-developers
mailing list