bisweb icon indicating copy to clipboard operation
bisweb copied to clipboard

Math.floor v Math.round when setting slices

Open jackw1988 opened this issue 3 years ago • 2 comments

Hi,

Great piece of software - really enjoyed using it!

I think though that I have found an issue when setting overlay slices:

3DOrthogonalSlice:

var sl=Math.floor(slmm/internal.imagespa[internal.plane]);

OrthogonalViewerElement:

let sl = [util.range(Math.round(coords[0] / this.internal.imagespa[0]), 0, this.internal.imagedim[0] - 1),

I have some data where the affines differ in the 8th decimal place, this is enough to send the overlay to a different slice (floor vs round).

jackw1988 avatar Jan 20 '21 11:01 jackw1988

Will take a look. Thanks. Could you share the images?

XeniosP avatar Jan 21 '21 13:01 XeniosP

Hi, really sorry but I am not able to share the images.

If it helps, I could probably create some test cases that would reproduce the problem.

jackw1988 avatar Jan 21 '21 17:01 jackw1988