VTK/VTK 6 Migration/Changes to SetAxisUpdateExtent: Difference between revisions

From KitwarePublic
< VTK
Jump to navigationJump to search
(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...")
 
No edit summary
 
Line 3: Line 3:
VTK 6 introduces a number of backwards-incompatible changes. The reasons behind these changes are described in more detail [[VTK/VTK 6 Migration/Overview | 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 [[VTK/VTK 6 Migration/Removal_of_GetPipelineInformation | this document]]), these methods were changes to take the pipeline information as an argument.
VTK 6 introduces a number of backwards-incompatible changes. The reasons behind these changes are described in more detail [[VTK/VTK 6 Migration/Overview | 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 [[VTK/VTK 6 Migration/Removal_of_GetPipelineInformation | this document]]), these methods were changes to take the pipeline information as an argument.


Example 1
== Example 1 ==


Replace
Replace


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


with
with


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


Line 17: Line 20:
cache->SetAxisUpdateExtent(axis, idx, idx, updateExtent, axisUpdateExtent);
cache->SetAxisUpdateExtent(axis, idx, idx, updateExtent, axisUpdateExtent);
vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent);
vtkStreamingDemandDrivenPipeline::SetUpdateExtent(inInfo, axisUpdateExtent);
</source>


See vtkImageWriter.cxx for details
See vtkImageWriter.cxx for details


Example 2
== Example 2 ==


Replace
Replace


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


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


See vtkImageWriter.cxx for details
See vtkImageWriter.cxx for details

Latest revision as of 19:33, 6 April 2012

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