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 diffeomorphic registration test failures #489

Merged
merged 12 commits into from
Dec 8, 2014

Conversation

omarocegueda
Copy link
Contributor

This PR fixes issue #464. This issue was caused by differences in floating-point operations when using double precision (64 bits), extended precision (80 bits) or a combination of both, whcih depends on the platform, compiler and compilation options used.

In summary, these are the proposals implemented in this PR:

  1. We always attempt to compile with SSE2 instruction set when available, so double precision will be used instead of x87, this way we obtain more consistent results across platforms in general, not only the registration module. If SSE2 is not available, the regression tests (only 10 test cases) are skipped .
  2. We modified the interpolation methods to make them more stable when attempting to interpolate beyond the image boundaries. Here is a discussion related to this: Edge treatment in map_coordinates scipy/scipy#4075.
  3. In addition to adding the user-defined DEF's for optional compilation in the .pxi file, we write the same defs to dipy/config.py file to have access to that information from python. These defs are used in the tests to select the appropriate "oracle" energy profile.

@@ -1452,8 +1452,11 @@ def _iterate(self):
#set zero displacements at the boundary
fw_step[0, ...] = 0
fw_step[:, 0, ...] = 0
fw_step[-1, ...] = 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to set to zero all the boundaries. I missed the other side!

@Garyfallidis
Copy link
Contributor

Hi @omarocegueda this is really great work that you did here with the SSE and the boundary interpolation. Great also to be able know compiler options both from cython and python. This is a game changer for Dipy. Please correct the minor pep8 issues and will go ahead and merge your PR. Thx brother!!! This is really cool!

@omarocegueda
Copy link
Contributor Author

Thank you Elef!,
yes, Matthew's extension to know compiler options from python is very helpful! =). I just made the corrections, let me see if it requires a rebase...

@omarocegueda
Copy link
Contributor Author

Rebased =)

@Garyfallidis
Copy link
Contributor

Travis happy, let's hear the bots! Thx man!

Garyfallidis added a commit that referenced this pull request Dec 8, 2014
Fix diffeomorphic registration test failures
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

Successfully merging this pull request may close these issues.

3 participants