def _make_voxel_ras_trans(move, ras, voxel_size):
 assert (voxel_size.ndim == 1)
 assert (voxel_size.size == 3)
 rot = (ras.T * voxel_size[np.newaxis, :])
 assert (rot.ndim == 2)
 assert (rot.shape[0] == 3)
 assert (rot.shape[1] == 3)
 trans = np.c_[(np.r_[(rot, np.zeros((1, 3)))], np.r_[(move, 1.0)])]
 t = Transform('mri_voxel', 'mri', trans)
 return t

def _make_voxel_ras_trans ( move , ras , voxel_size ) : assert ( voxel_size . ndim == 1 ) assert ( voxel_size . size == 3 ) rot = ( ras . T * voxel_size [ np . newaxis , : ] ) assert ( rot . ndim == 2 ) assert ( rot . shape [ 0 ] == 3 ) assert ( rot . shape [ 1 ] == 3 ) trans = np . c_ [ ( np . r_ [ ( rot , np . zeros ( ( 1 , 3 ) ) ) ] , np . r_ [ ( move , 1.0 ) ] ) ] t = Transform ( 'mri_voxel' , 'mri' , trans ) return t
make a transformation from mri_voxel to mri surface ras .