@@ -295,36 +295,27 @@ def test_freesurfer_large_vector_hack(self):
295295 def test_freesurfer_ico7_hack (self ):
296296 HC = self .header_class
297297 hdr = HC ()
298-
299298 # Test that using ico7 shape automatically uses factored dimensions
300299 hdr .set_data_shape ((163842 , 1 , 1 ))
301300 assert_array_equal (hdr ._structarr ['dim' ][1 :4 ], np .array ([27307 , 1 , 6 ]))
302-
303301 # Test consistency of data in .mgh and mri_convert produced .nii
304- nib_data = get_nibabel_data ()
305- nitest_path = os .path .join (nib_data , 'nitest-freesurfer' )
306-
302+ nitest_path = os .path .join (get_nibabel_data (), 'nitest-freesurfer' )
307303 mgh = mghload (os .path .join (nitest_path , 'fsaverage' , 'surf' ,
308304 'lh.orig.avg.area.mgh' ))
309305 nii = load (os .path .join (nitest_path , 'derivative' , 'fsaverage' , 'surf' ,
310306 'lh.orig.avg.area.nii' ))
311-
312307 assert_equal (mgh .shape , nii .shape )
313308 assert_array_equal (mgh .get_data (), nii .get_data ())
314309 assert_array_equal (nii .header ._structarr ['dim' ][1 :4 ],
315310 np .array ([27307 , 1 , 6 ]))
316-
317311 # Test writing produces consistent nii files
318312 with InTemporaryDirectory ():
319313 nii .to_filename ('test.nii' )
320-
321314 nii2 = load ('test.nii' )
322-
323315 assert_equal (nii .shape , nii2 .shape )
324316 assert_array_equal (nii .get_data (), nii2 .get_data ())
325317 assert_array_equal (nii .get_affine (), nii2 .get_affine ())
326318
327-
328319 def test_qform_sform (self ):
329320 HC = self .header_class
330321 hdr = HC ()
0 commit comments