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
Christian Butz
VTK
Commits
dd83524a
Commit
dd83524a
authored
Apr 20, 2011
by
David Gobbi
Committed by
David Partyka
Apr 21, 2011
Browse files
BUG: Fix vtkImageStencilIterator crash when extents don't overlap.
Change-Id: Ic6ce6861b3cda4dcff85a8ee397d616e6d5e4420
parent
ffe850c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Imaging/vtkImageStencilIterator.txx
View file @
dd83524a
...
...
@@ -115,6 +115,10 @@ void vtkImageStencilIterator<DType>::Initialize(
this->HasStencil = true;
this->InStencil = true;
this->SpanIndexX = 0;
this->SpanIndexY = 0;
this->SpanIndexZ = 0;
int stencilExtent[6];
stencil->GetExtent(stencilExtent);
...
...
@@ -186,20 +190,26 @@ void vtkImageStencilIterator<DType>::Initialize(
this->SpanMaxZ = stencilExtent[5] - extent[4];
}
this->SpanCountPointer =
vtkImageStencilIteratorFriendship::GetExtentListLengths(stencil) +
startOffset;
if (this->SpanMinY <= this->SpanMaxY &&
this->SpanMinZ <= this->SpanMaxZ)
{
this->SpanCountPointer =
vtkImageStencilIteratorFriendship::GetExtentListLengths(stencil) +
startOffset;
this->SpanListPointer =
vtkImageStencilIteratorFriendship::GetExtentLists(stencil) +
startOffset;
this->SpanListPointer =
vtkImageStencilIteratorFriendship::GetExtentLists(stencil) +
startOffset;
this->SpanIndexX = 0;
this->SpanIndexY = 0;
this->SpanIndexZ = 0;
// Holds the current position within the span list for the current row
this->SetSpanState(this->SpanMinX);
// Holds the current position within the span list for the current row
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