vtkSubPixelPositionEdgels Boundary check-up
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
vtkSubPixelPositionEdgelnks::Move checks whether the edge point lies outside the image extent. The image extents are within the range [0 dim-1] and the correct boundary check should look like
for 2d-case (line 172 VTK 5.0.1):
if (x < 0 || y < 0 || x >= xdim || y >= ydim)
{
resultNormal[0] = 1;
resultNormal[1] = 0;
resultNormal[2] = 0;
}
for 3d-case (line 264 VTK 5.0.1):
if (x < 0 || y < 0 || z < 0 || x >= xdim || y >= ydim || z >= zdim) { resultNormal[0] = 1; resultNormal[1] = 1; resultNormal[2] = 1; }