@testing.requires_testing_data
@requires_freesurfer
@requires_nibabel()
def test_vertex_to_mni_fs_nibabel():
 n_check = 1000
 subject = 'sample'
 vertices = rng.randint(0, 100000, n_check)
 hemis = rng.randint(0, 1, n_check)
 coords = vertex_to_mni(vertices, hemis, subject, subjects_dir, 'nibabel')
 coords_2 = vertex_to_mni(vertices, hemis, subject, subjects_dir, 'freesurfer')
 assert_allclose(coords, coords_2, atol=0.1)

@ testing . requires_testing_data @ requires_freesurfer @ requires_nibabel ( ) def test_vertex_to_mni_fs_nibabel ( ) : n_check = 1000 subject = 'sample' vertices = rng . randint ( 0 , 100000 , n_check ) hemis = rng . randint ( 0 , 1 , n_check ) coords = vertex_to_mni ( vertices , hemis , subject , subjects_dir , 'nibabel' ) coords_2 = vertex_to_mni ( vertices , hemis , subject , subjects_dir , 'freesurfer' ) assert_allclose ( coords , coords_2 , atol = 0.1 )
test equivalence of vert_to_mni for nibabel and freesurfer .