VTK/VTK 6 Migration/Changes to SetAxisUpdateExtent

From KitwarePublic
< VTK
Jump to: navigation, search

Changes to SetAxisUpdateExtent and GetAxisUpdateExtent in vtkImageData

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 several methods in vtkImageData that were used to facilitate meta-data management and memory allocation using pipeline meta-data. Since vtkImageData no longer has direct access to the pipeline information (see this document), these methods were changes to take the pipeline information as an argument.

Example 1

Replace

cache->SetAxisUpdateExtent(axis, idx, idx);

with

int* updateExtent = vtkStreamingDemandDrivenPipeline::GetUpdateExtent(inInfo);
 
…
int axisUpdateExtent[6];
cache->SetAxisUpdateExtent(axis, idx, idx, updateExtent, axisUpdateExtent);
vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent);

See vtkImageWriter.cxx for details

Example 2

Replace

cache->GetAxisUpdateExtent(axis, min, max);

with

int* updateExtent = vtkStreamingDemandDrivenPipeline::GetUpdateExtent(inInfo);
cache->GetAxisUpdateExtent(axis, min, max, updateExtent);

See vtkImageWriter.cxx for details