Commit ef280261 authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot

Merge topic 'stencil-extent'

2ce1dddf Fix vtkImageStencilData::ChangeExtent() for X
a55f53c8 Constify vtkImageStencilData::SetExtent.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Sean McBride's avatarSean McBride <sean@rogue-research.com>
Merge-request: !4717
parents 9a648c4c 2ce1dddf
......@@ -362,7 +362,7 @@ void vtkImageStencilData::CopyOriginAndSpacingFromPipeline(vtkInformation* info)
}
//----------------------------------------------------------------------------
void vtkImageStencilData::SetExtent(int extent[6])
void vtkImageStencilData::SetExtent(const int extent[6])
{
for (int i = 0; i < 6; i++)
{
......@@ -465,6 +465,7 @@ void vtkImageStencilData::ChangeExtent(const int extent[6])
{
int oldExtent[6];
this->GetExtent(oldExtent);
this->SetExtent(extent);
if (extent[2] != oldExtent[2] || extent[3] != oldExtent[3] ||
extent[4] != oldExtent[4] || extent[5] != oldExtent[5])
......@@ -480,9 +481,7 @@ void vtkImageStencilData::ChangeExtent(const int extent[6])
this->ExtentListLengths = nullptr;
this->ExtentLists = nullptr;
// Set the new extent and re-allocate
this->SetExtent(
extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]);
// Re-allocate
this->AllocateExtents();
// Get the location for storing single extents
......
......@@ -126,7 +126,7 @@ public:
* by vtkImageStencilSource, as it is part of the basic pipeline
* functionality.
*/
void SetExtent(int extent[6]);
void SetExtent(const int extent[6]);
void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2);
vtkGetVector6Macro(Extent, int);
//@}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment