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

fix: 🐛 relax condition in nearlyEquals check for detecting numbers near to zero #304

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

Punzo
Copy link
Contributor

@Punzo Punzo commented Aug 26, 2022

@Punzo
Copy link
Contributor Author

Punzo commented Aug 26, 2022

@pieper can you please review and merge, please?

@pieper
Copy link
Collaborator

pieper commented Aug 26, 2022

@Punzo thanks for quick action on this 👍

Let's review it together on Thursday to make sure we fully understand what we want the behavior to be here. At the least we should update the comment since we are no longer following the logic of the source function from here: https://floating-point-gui.de/errors/comparison/. The current comment implies the code is still just a transliteration to javascript.

What I want to get a handle on is what a valid value of tolerance should be for data we reasonably expect to be displayed.

Since a common use case seems to be going to and from 32-bit float in a nifti1 header I'd like to take into account what rounding errors we are likely to see and set the tolerance to something that will be reasonable and robust.

@Punzo
Copy link
Contributor Author

Punzo commented Aug 26, 2022

@Punzo thanks for quick action on this +1

Let's review it together on Thursday to make sure we fully understand what we want the behavior to be here. At the least we should update the comment since we are no longer following the logic of the source function from here: https://floating-point-gui.de/errors/comparison/. The current comment implies the code is still just a transliteration to javascript.

What I want to get a handle on is what a valid value of tolerance should be for data we reasonably expect to be displayed.

Since a common use case seems to be going to and from 32-bit float in a nifti1 header I'd like to take into account what rounding errors we are likely to see and set the tolerance to something that will be reasonable and robust.

Sure, let's discuss it next Thursday at the OHIF-IDC call.

@pieper pieper merged commit 7852832 into dcmjs-org:master Sep 1, 2022
@github-actions
Copy link

github-actions bot commented Sep 1, 2022

🎉 This PR is included in version 0.24.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Segmentations converted from nii to dcm not rendered in OHIF Viewer
2 participants