Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
debian
VTK
Commits
dcd024ed
Commit
dcd024ed
authored
Feb 04, 2016
by
David Gobbi
Browse files
Merge branch 'stencil-iterator-overrun-6.3' into stencil-iterator-overrun
parents
a2ae0a10
2a652eb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Imaging/Core/vtkImageStencilIterator.txx
View file @
dcd024ed
...
...
@@ -111,7 +111,7 @@ void vtkImageStencilIterator<DType>::Initialize(
if (stencil)
{
this->HasStencil = true;
this->InStencil =
tru
e;
this->InStencil =
fals
e;
this->SpanIndexX = 0;
this->SpanIndexY = 0;
...
...
@@ -152,11 +152,15 @@ void vtkImageStencilIterator<DType>::Initialize(
if (yOffset >= 0)
{
this->SpanMinY = 0;
// starting partway into the stencil, so add an offset
startOffset += yOffset;
}
else
{
this->SpanMinY = -yOffset;
// starting before start of stencil: subtract the increment that
// will be added in NextSpan() upon entry into stencil extent
startOffset -= 1;
}
if (stencilExtent[3] > extent[3])
...
...
@@ -172,11 +176,18 @@ void vtkImageStencilIterator<DType>::Initialize(
if (zOffset >= 0)
{
this->SpanMinZ = 0;
// starting partway into the stencil, so add an offset
startOffset += zOffset*this->SpanSliceIncrement;
}
else
{
this->SpanMinZ = -zOffset;
// starting before start of stencil: subtract the increment that
// will be added in NextSpan() upon entry into stencil extent
if (yOffset >= 0)
{
startOffset -= 1 + this->SpanSliceEndIncrement;
}
}
if (stencilExtent[5] > extent[5])
...
...
@@ -199,14 +210,18 @@ void vtkImageStencilIterator<DType>::Initialize(
vtkImageStencilIteratorFriendship::GetExtentLists(stencil) +
startOffset;
// Holds the current position within the span list for the current row
this->SetSpanState(this->SpanMinX);
// Get the current position within the span list for the current row
if (yOffset >= 0 && zOffset >= 0)
{
// If starting within stencil extent, check stencil immediately
this->InStencil = true;
this->SetSpanState(this->SpanMinX);
}
}
else
{
this->SpanCountPointer = 0;
this->SpanListPointer = 0;
this->InStencil = false;
}
}
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment