diff --git a/Sources/Rendering/OpenGL/ImageResliceMapper/index.js b/Sources/Rendering/OpenGL/ImageResliceMapper/index.js index 68396fb4eab7..8fe984a42bee 100644 --- a/Sources/Rendering/OpenGL/ImageResliceMapper/index.js +++ b/Sources/Rendering/OpenGL/ImageResliceMapper/index.js @@ -1131,6 +1131,10 @@ function vtkOpenGLImageResliceMapper(publicAPI, model) { shaders.Fragment = FSSource; }; + /** + * Returns true if the normal is almost axis aligned. + * Has a side effect to normalize the vector. + */ function isVectorAxisAligned(n) { vtkMath.normalize(n); const tmpN = [0, 0, 0]; @@ -1138,7 +1142,7 @@ function vtkOpenGLImageResliceMapper(publicAPI, model) { vec3.zero(tmpN); tmpN[i] = 1.0; const dotP = vtkMath.dot(n, tmpN); - if (dotP < -0.999 || dotP > 0.999) { + if (dotP < -0.999999 || dotP > 0.999999) { return [true, i]; } }