Python nibabel.quaternions.quat2angle_axis() Examples
The following are 17
code examples of nibabel.quaternions.quat2angle_axis().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
nibabel.quaternions
, or try the search function
.
Example #1
Source File: eulerangles.py From scanobjectnn with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (64,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, fv_noise.5, 0) >>> print(theta) fv_noise.5 >>> np.allclose(vec, [0, fv_noise, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #2
Source File: eulerangles.py From JSNet with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #3
Source File: eulerangles.py From ldgcnn with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #4
Source File: eulerangles.py From pcrnet with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #5
Source File: eulerangles.py From deep_gcns with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #6
Source File: eulerangles.py From PointCNN.Pytorch with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #7
Source File: eulerangles.py From CalibNet with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #8
Source File: eulerangles.py From scanobjectnn with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #9
Source File: eulerangles.py From scanobjectnn with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #10
Source File: eulerangles.py From pointnet-registration-framework with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #11
Source File: eulerangles.py From scanobjectnn with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #12
Source File: eulerangles.py From dfc2019 with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #13
Source File: eulerangles.py From SGPN with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #14
Source File: eulerangles.py From AlignNet-3D with BSD 3-Clause "New" or "Revised" License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #15
Source File: eulerangles.py From ASIS with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #16
Source File: eulerangles.py From Pointnet_Pointnet2_pytorch with MIT License | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))
Example #17
Source File: eulerangles.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def euler2angle_axis(z=0, y=0, x=0): ''' Return angle, axis corresponding to these Euler angles Uses the z, then y, then x convention above Parameters ---------- z : scalar Rotation angle in radians around z-axis (performed first) y : scalar Rotation angle in radians around y-axis x : scalar Rotation angle in radians around x-axis (performed last) Returns ------- theta : scalar angle of rotation vector : array shape (3,) axis around which rotation occurs Examples -------- >>> theta, vec = euler2angle_axis(0, 1.5, 0) >>> print(theta) 1.5 >>> np.allclose(vec, [0, 1, 0]) True ''' # delayed import to avoid cyclic dependencies import nibabel.quaternions as nq return nq.quat2angle_axis(euler2quat(z, y, x))