VTK/VTK 6 Migration/Changes to SetAxisUpdateExtent

From KitwarePublic
< VTK
Revision as of 19:32, 6 April 2012 by Berk (talk | contribs) (Created page with "= Changes to SetAxisUpdateExtent and GetAxisUpdateExtent in vtkImageData = VTK 6 introduces a number of backwards-incompatible changes. The reasons behind these changes are desc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

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