<HTML>
<HEAD>
<TITLE>RELEASE_DATA doesn't?</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Summary: the vtkDemandDrivenPipeline::RELEASE_DATA() key is always removed the first time a pipeline executes.<BR>
<BR>
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.<BR>
<BR>
I’ve tracked this down to the following chain of events during pipeline execution:<BR>
- vtkDemandDrivenPipeline::ExecuteDataObject calls CheckDataObject to make sure the output object is there.<BR>
- CheckDataObject notices that there is no data object yet, creates one, and calls vtkExecutive::SetOutputData().<BR>
- SetOutputData puts in place the new output object and calls ResetPipelineInformation().<BR>
- vtkDemandDrivenPipeline::ResetPipelineInformation removes the RELEASE_DATA key.<BR>
<BR>
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.<BR>
<BR>
Idea #1: Don’t call ResetPipelineInformation() from SetOutputData(). If a filter wants to reset the pipeline keys make it do so itself.<BR>
<BR>
Idea #2: Only call ResetPipelineInformation() if SetOutputData() is replacing an existing object. <BR>
<BR>
Thoughts? <BR>
<BR>
-- Andy<BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>