VTK/VTK 6 Migration/Changes to SetAxisUpdateExtent

From KitwarePublic
< VTK
Jump to navigationJump to 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

<source lang="cpp"> cache->SetAxisUpdateExtent(axis, idx, idx); </source>

with

<source lang="cpp"> int* updateExtent = vtkStreamingDemandDrivenPipeline::GetUpdateExtent(inInfo);

… int axisUpdateExtent[6]; cache->SetAxisUpdateExtent(axis, idx, idx, updateExtent, axisUpdateExtent); vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent); </source>

See vtkImageWriter.cxx for details

Example 2

Replace

<source lang="cpp"> cache->GetAxisUpdateExtent(axis, min, max); </source> with

<source lang="cpp"> int* updateExtent = vtkStreamingDemandDrivenPipeline::GetUpdateExtent(inInfo); cache->GetAxisUpdateExtent(axis, min, max, updateExtent); </source>

See vtkImageWriter.cxx for details