algorithm/vol_tools.py
def MNI2vox(mni, affine):
    """
    MNI coordintes transformed to voxel coordinates
    ----------------------------------------------
    Parameters:
        mni: mni coordinates
        affine: affine matrix
    Return:
        vox
    """
    mni = np.append(mni,1)
    vox = np.dot(mni, np.linalg.inv(affine.T))
    return vox[:3]

    MNI coordintes transformed to voxel coordinates
    ----------------------------------------------
    Parameters:
        mni: mni coordinates
        affine: affine matrix
    Return:
        vox
    
MNI coordintes transformed to voxel coordinates
MNI coordintes transformed to voxel coordinates
def MNI2vox(mni, affine):
    mni = np.append(mni,1)
    vox = np.dot(mni, np.linalg.inv(affine.T))
    return vox[:3]
def MNI2vox ( mni , affine ) : mni = np . append ( mni , 1 ) vox = np . dot ( mni , np . linalg . inv ( affine . T ) ) return vox [ : 3 ]
MNI coordintes transformed to voxel coordinates
MNI coordintes transformed to voxel coordinates
"""
    MNI coordintes transformed to voxel coordinates
    ----------------------------------------------
    Parameters:
        mni: mni coordinates
        affine: affine matrix
    Return:
        vox
    """
mni
None
affine
None