Commit 680d77c6 authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot
Browse files

Merge topic 'FlyingEdges-Overrun'

ccc82fcb Eliminate last advance operation on each voxel row
e181456d

 Fixed overrrun issue former MR 1120
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarRobert Maynard <robert.maynard@kitware.com>
Reviewed-by: default avatarRobert Maynard <robert.maynard@kitware.com>
Acked-by: Sean McBride's avatarSean McBride <sean@rogue-research.com>
Merge-request: !1634
parents 2f48b562 ccc82fcb
......@@ -1057,6 +1057,7 @@ GenerateOutput(double value, T* rowPtr, vtkIdType row, vtkIdType slice)
const T* sPtr = rowPtr + xL*incs[0];
const double xSpace = this->Spacing[0];
const vtkIdType dim0Wall = this->Dims[0]-2;
const vtkIdType endVoxel = xR-1;
for (i=xL; i < xR; ++i)
{
......@@ -1080,13 +1081,16 @@ GenerateOutput(double value, T* rowPtr, vtkIdType row, vtkIdType slice)
this->AdvanceVoxelIds(eCase,eIds);
}
// advance along voxel row
ePtr[0]++; ePtr[1]++; ePtr[2]++; ePtr[3]++;
eCase = this->GetEdgeCase(ePtr);
// Advance along voxel row if not at the end. Saves a little work.
if ( i < endVoxel )
{
ePtr[0]++; ePtr[1]++; ePtr[2]++; ePtr[3]++;
eCase = this->GetEdgeCase(ePtr);
++ijk[0];
sPtr += incs[0];
x[0] += xSpace;
++ijk[0];
sPtr += incs[0];
x[0] += xSpace;
}//if not at end of voxel row
} //for all non-trimmed cells along this x-edge
}
......
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