VTK/VTK 6 Migration/Removal of SetExtentTranslator

From KitwarePublic
< VTK
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Removal of SetExtentTranslator and GetExtentTranslator 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 methods are SetExtentTranslator() and GetExtentTranslator(). This functionality is still available through vtkStreamingDemandDrivenPipeline.

Example 1

Replace

vtkDataObject* dobj = algorithm->GetOutput();
dobj->GetExtentTranslator();

with

vtkStreamingDemandDrivenPipeline::GetExtentTranslator(
         algorithm->GetExecutive()->GetOutputPort());

Example 2

vtkDataObject* dobj = algorithm->GetOutput();
dobj->SetExtentTranslator(translator);

with

vtkStreamingDemandDrivenPipeline::SetExtentTranslator(
         algorithm->GetExecutive()->GetOutputPort(),
         translator);