Skip to content

Use geodesic distance to compute Frame Displacements for rigid registration of images #2606

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

Open
ninamiolane opened this issue Jun 4, 2018 · 0 comments
Milestone

Comments

@ninamiolane
Copy link

Summary

FramewiseDisplacement computes distances between frames at time t and frames at time (t+1). A frame is characterized by 3 degrees of freedom of translations and 3 degrees of freedom of rotations, a frame is thus a 6D vector.

The distance between two successive frames is currently computed as a L1 (weighted) norm of the element-wise difference between frames at (t+1) and frames at t. This does not respect the geometry of the 6D space of frames, which is the space of 3D rigid transformations, also called Special Euclidean group in 3D, or SE(3).

We suggest to compute the distance between two frames using a (weighted) geodesic distance that respects the geometry of the 6D space of frames SE(3), i.e. SE3_GROUP = SpecialEuclideanGroup(n=3).

Script/Workflow details

First convert the parameterization of frames given as input to a parameterization understandable by geomstats.

     se3pars = np.hstack(
           [mpars[:, DIM_TRANSLATIONS:], mpars[:, :DIM_TRANSLATIONS]])

Construct the metric on the space of frames SE3_GROUP:

     diag_rotations = self.inputs.radius * np.ones(DIM_ROTATIONS)
     diag_translations = np.ones(DIM_TRANSLATIONS)
     diag = np.concatenate([diag_rotations, diag_translations])
     inner_product = np.diag(diag)
     metric = InvariantMetric(
                       group=SE3_GROUP,
                       inner_product_mat_at_identity=inner_product,
                       left_or_right='left')

Use the metric to compute the geodesic distance between frames at t+1 and frames at t.

     fd_res = metric.dist(se3pars[:-1], se3pars[1:])

Platform details:

Please paste the output of: python -c "import nipype; print(nipype.get_info()); print(nipype.__version__)"

{'pkg_path': '/Users/nina/code/nipype/nipype', 'commit_source': 'repository', 'commit_hash': '422fbdd', 'nipype_version': '1.1.0-dev+g422fbdd', 'sys_version': '3.6.5 (default, Mar 30 2018, 06:42:10) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]', 'sys_executable': '/usr/local/opt/python/bin/python3.6', 'sys_platform': 'darwin', 'numpy_version': '1.14.3', 'scipy_version': '0.19.0', 'networkx_version': '2.1', 'nibabel_version': '2.2.1', 'traits_version': '4.6.0'} 1.1.0-dev+g422fbdd

Execution environment

  • My python environment outside container
@effigies effigies added this to the 1.1.2 milestone Jul 30, 2018
@effigies effigies modified the milestones: 1.1.2, 1.1.3 Aug 10, 2018
@effigies effigies modified the milestones: 1.1.3, 1.1.4 Sep 21, 2018
@effigies effigies modified the milestones: 1.1.4, 1.1.5 Oct 31, 2018
@effigies effigies modified the milestones: 1.1.5, 1.1.6 Nov 7, 2018
@effigies effigies modified the milestones: 1.1.6, 1.1.7 Nov 26, 2018
@effigies effigies modified the milestones: 1.1.7, 1.1.8 Dec 14, 2018
@effigies effigies modified the milestones: 1.1.8, future Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants