dipy/align/streamlinear.py
def bundle_sum_distance(t, static, moving):
    """ MDF distance optimization function (SUM)

    We minimize the distance between moving streamlines as they align
    with the static streamlines.

    Parameters
    -----------
    t : ndarray
        t is a vector of of affine transformation parameters with
        size at least 6.
        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 12, t is interpreted as translation + rotation +
        scaling + shearing.

    static : list
        Static streamlines

    moving : list
        Moving streamlines. These will be transform to align with
        the static streamlines

    Returns
    -------
    cost: float

    """

    aff = compose_matrix44(t)
    moving = transform_streamlines(moving, aff)
    d01 = distance_matrix_mdf(static, moving)
    return np.sum(d01)
 MDF distance optimization function (SUM)

    We minimize the distance between moving streamlines as they align
    with the static streamlines.

    Parameters
    -----------
    t : ndarray
        t is a vector of of affine transformation parameters with
        size at least 6.
        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 12, t is interpreted as translation + rotation +
        scaling + shearing.

    static : list
        Static streamlines

    moving : list
        Moving streamlines. These will be transform to align with
        the static streamlines

    Returns
    -------
    cost: float

    
MDF distance optimization function (SUM)
We minimize the distance between moving streamlines as they align
with the static streamlines.

Parameters

t : ndarray
t is a vector of of affine transformation parameters with
size at least 6.
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 12, t is interpreted as translation + rotation +
scaling + shearing.

static : list
Static streamlines

moving : list
Moving streamlines. These will be transform to align with
the static streamlines

Returns

float
MDF distance optimization function ( SUM ) We minimize the distance between moving streamlines as they align with the static streamlines . Parameters t : ndarray t is a vector of of affine transformation parameters with size at least 6 . 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 12 t is interpreted as translation + rotation + scaling + shearing . static : list Static streamlines moving : list Moving streamlines . These will be transform to align with the static streamlines Returns float
def bundle_sum_distance(t, static, moving):
    aff = compose_matrix44(t)
    moving = transform_streamlines(moving, aff)
    d01 = distance_matrix_mdf(static, moving)
    return np.sum(d01)
def bundle_sum_distance ( t , static , moving ) : aff = compose_matrix44 ( t ) moving = transform_streamlines ( moving , aff ) d01 = distance_matrix_mdf ( static , moving ) return np . sum ( d01 )
MDF distance optimization function (SUM)
We minimize the distance between moving streamlines as they align
with the static streamlines.
MDF distance optimization function ( SUM ) We minimize the distance between moving streamlines as they align with the static streamlines .
""" MDF distance optimization function (SUM)

    We minimize the distance between moving streamlines as they align
    with the static streamlines.

    Parameters
    -----------
    t : ndarray
        t is a vector of of affine transformation parameters with
        size at least 6.
        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 12, t is interpreted as translation + rotation +
        scaling + shearing.

    static : list
        Static streamlines

    moving : list
        Moving streamlines. These will be transform to align with
        the static streamlines

    Returns
    -------
    cost: float

    """
t
static
moving