@testing.requires_testing_data
@requires_nibabel(vox2ras_tkr=True)
def test_mgz_header():
 header = _get_mgz_header(fname_mri)
 mri_hdr = _get_mri_header(fname_mri)
 assert_allclose(mri_hdr.get_data_shape(), header['dims'])
 assert_allclose(mri_hdr.get_vox2ras_tkr(), header['vox2ras_tkr'])
 assert_allclose(mri_hdr.get_ras2vox(), header['ras2vox'])

@ testing . requires_testing_data @ requires_nibabel ( vox2ras_tkr = True ) def test_mgz_header ( ) : header = _get_mgz_header ( fname_mri ) mri_hdr = _get_mri_header ( fname_mri ) assert_allclose ( mri_hdr . get_data_shape ( ) , header [ 'dims' ] ) assert_allclose ( mri_hdr . get_vox2ras_tkr ( ) , header [ 'vox2ras_tkr' ] ) assert_allclose ( mri_hdr . get_ras2vox ( ) , header [ 'ras2vox' ] )
test mgz header reading .