Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math.floor v Math.round when setting slices #117

Open
jackw1988 opened this issue Jan 20, 2021 · 2 comments
Open

Math.floor v Math.round when setting slices #117

jackw1988 opened this issue Jan 20, 2021 · 2 comments

Comments

@jackw1988
Copy link

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).

@XeniosP
Copy link
Collaborator

XeniosP commented Jan 21, 2021

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

@jackw1988
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants