VTK/VTK 6 Migration/Removal of ShouldIReleaseData

From KitwarePublic
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Removal of ShouldIReleaseData() and ReleaseDataFlag methods from vtkDataObject

VTK 6 introduces a number of backwards-incompatible changes. The reasons behind these changes are described in more detail here. One of these changes is the removal of all pipeline related methods from vtkDataObject. Among these are the following vtkDataObject methods:

  • ShouldIReleaseData()
  • SetReleaseDataFlag()
  • GetReleaseDataFlag()
  • ReleaseDataFlagToOn()
  • ReleaseDataFlagToOff()

All of these methods (except ShouldIReleaseData) have always had their counterparts in vtkDemandDrivenPipeline and any code that uses them can be fixed by using the vtkDemandDrivenPipeline methods instead. ShouldIReleaseData is a convenience method that was used by pipeline executives and is not normally used outside this context.

Example 1


vtkDataObject* dobj = anAlgorithm->GetOutput();


vtkDemandDrivenPipeline* executive =
if (executive)
  executive->SetReleaseDataFlag(0, 1); // where 0 is the port index