dipy/align/streamlinear.py
def compose_matrix44(t, dtype=np.double):
    """ Compose a 4x4 transformation matrix

    Parameters
    -----------
    t : ndarray
        This is a 1D vector of of affine transformation parameters with
        size at least 3.
        If size is 3, t is interpreted as translation.
        If size is 6, t is interpreted as translation + rotation.
        If size is 7, t is interpreted as translation + rotation +
        isotropic scaling.
        If size is 9, t is interpreted as translation + rotation + anisotropic
        scaling.
        If size is 12, t is interpreted as translation + rotation +
        scaling + shearing.

    Returns
    -------
    T : ndarray
        Homogeneous transformation matrix of size 4x4.

    """
    if isinstance(t, list):
        t = np.array(t)
    size = t.size

    if size not in [3, 6, 7, 9, 12]:
        raise ValueError('Accepted number of parameters is 3, 6, 7 and 12')

    scale, shear, angles, translate = (None, ) * 4
    translate = _threshold(t[0:3], MAX_DIST)
    if size in [6, 7, 9, 12]:
        angles = np.deg2rad(t[3:6])
    if size == 7:
        scale = np.array((t[6],) * 3)
    if size in [9, 12]:
        scale = t[6:9]
    if size == 12:
        shear = t[9:12]
    return compose_matrix(scale=scale, shear=shear,
                          angles=angles,
                          translate=translate)
 Compose a 4x4 transformation matrix

    Parameters
    -----------
    t : ndarray
        This is a 1D vector of of affine transformation parameters with
        size at least 3.
        If size is 3, t is interpreted as translation.
        If size is 6, t is interpreted as translation + rotation.
        If size is 7, t is interpreted as translation + rotation +
        isotropic scaling.
        If size is 9, t is interpreted as translation + rotation + anisotropic
        scaling.
        If size is 12, t is interpreted as translation + rotation +
        scaling + shearing.

    Returns
    -------
    T : ndarray
        Homogeneous transformation matrix of size 4x4.

    
Compose a 4x4 transformation matrix
Parameters

t : ndarray
This is a 1D vector of of affine transformation parameters with
size at least 3.
If size is 3, t is interpreted as translation.
If size is 6, t is interpreted as translation + rotation.
If size is 7, t is interpreted as translation + rotation +
isotropic scaling.
If size is 9, t is interpreted as translation + rotation + anisotropic
scaling.
If size is 12, t is interpreted as translation + rotation +
scaling + shearing.

Returns

T : ndarray
Homogeneous transformation matrix of size 4x4.
Compose a 4x4 transformation matrix Parameters t : ndarray This is a 1D vector of of affine transformation parameters with size at least 3 . If size is 3 t is interpreted as translation . If size is 6 t is interpreted as translation + rotation . If size is 7 t is interpreted as translation + rotation + isotropic scaling . If size is 9 t is interpreted as translation + rotation + anisotropic scaling . If size is 12 t is interpreted as translation + rotation + scaling + shearing . Returns T : ndarray Homogeneous transformation matrix of size 4x4 .
def compose_matrix44(t, dtype=np.double):
    if isinstance(t, list):
        t = np.array(t)
    size = t.size
    if size not in [3, 6, 7, 9, 12]:
        raise ValueError('Accepted number of parameters is 3, 6, 7 and 12')
    scale, shear, angles, translate = (None, ) * 4
    translate = _threshold(t[0:3], MAX_DIST)
    if size in [6, 7, 9, 12]:
        angles = np.deg2rad(t[3:6])
    if size == 7:
        scale = np.array((t[6],) * 3)
    if size in [9, 12]:
        scale = t[6:9]
    if size == 12:
        shear = t[9:12]
    return compose_matrix(scale=scale, shear=shear,
                          angles=angles,
                          translate=translate)
def compose_matrix44 ( t , dtype = np . double ) : if isinstance ( t , list ) : t = np . array ( t ) size = t . size if size not in [ 3 , 6 , 7 , 9 , 12 ] : raise ValueError ( 'Accepted number of parameters is 3, 6, 7 and 12' ) scale , shear , angles , translate = ( None , ) * 4 translate = _threshold ( t [ 0 : 3 ] , MAX_DIST ) if size in [ 6 , 7 , 9 , 12 ] : angles = np . deg2rad ( t [ 3 : 6 ] ) if size == 7 : scale = np . array ( ( t [ 6 ] , ) * 3 ) if size in [ 9 , 12 ] : scale = t [ 6 : 9 ] if size == 12 : shear = t [ 9 : 12 ] return compose_matrix ( scale = scale , shear = shear , angles = angles , translate = translate )
Compose a 4x4 transformation matrix
Parameters
Compose a 4x4 transformation matrix Parameters
""" Compose a 4x4 transformation matrix

    Parameters
    -----------
    t : ndarray
        This is a 1D vector of of affine transformation parameters with
        size at least 3.
        If size is 3, t is interpreted as translation.
        If size is 6, t is interpreted as translation + rotation.
        If size is 7, t is interpreted as translation + rotation +
        isotropic scaling.
        If size is 9, t is interpreted as translation + rotation + anisotropic
        scaling.
        If size is 12, t is interpreted as translation + rotation +
        scaling + shearing.

    Returns
    -------
    T : ndarray
        Homogeneous transformation matrix of size 4x4.

    """
t
dtype