Commit 2ce1dddf authored by David Gobbi's avatar David Gobbi

Fix vtkImageStencilData::ChangeExtent() for X

The code for ChangeExtent would only call SetExtent() if the Y or
Z values had changed.  If the only change was to X, then Extent
would not be modified.
parent a55f53c8
......@@ -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
......
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