@@ -319,7 +319,7 @@ def create_epi_correct_pipeline(name="epi_correct", register_to_ref=False ):
319
319
,(mask_mag_dil , prelude , [('out_file' , 'mask_file' ) ])
320
320
,(prelude , fill_phase , [('unwrapped_phase_file' ,'in_file' )] )
321
321
,(inputnode , vsm , [('fieldmap_mag' , 'in_file' )])
322
- ,(fill_phase , vsm , [('out_file' ,'phasemap_file' )]) #, (('out_file',_genvsmpath),'shift_out_file') ] )
322
+ ,(fill_phase , vsm , [('out_file' ,'phasemap_file' )])
323
323
,(inputnode , vsm , [(('te_diff' ,_ms2sec ),'asym_se_time' ),('vsm_sigma' ,'smooth2d' )])
324
324
,(dwell_time , vsm , [(('dwell_time' ,_ms2sec ),'dwell_time' ) ])
325
325
,(mask_mag_dil , vsm , [('out_file' ,'mask_file' )] )
@@ -444,27 +444,9 @@ def _vsm_remove_mean( in_file, mask_file, in_unwarped ):
444
444
nib .save ( img , out_file )
445
445
return out_file
446
446
447
- #def _generate_fwdmap( in_file, mask_file, shift_in_file, in_unwarped):
448
- # import os
449
- # out_file = os.path.abspath( './fwdmap.nii.gz' )
450
- # cmd = 'fugue -i %s -w %s --loadshift=%s --mask=%s' % ( in_file, out_file, shift_in_file, mask_file )
451
- # print " Running:",cmd
452
- # os.system(cmd)
453
- # return out_file
454
-
455
- def _genvsmpath ( in_file ):
456
- import os
457
- name ,fext = os .path .splitext ( os .path .basename (in_file ) )
458
- if fext == '.gz' : name ,_ = os .path .splitext (name )
459
- out_file = os .path .abspath ( os .path .join ( os .path .dirname (in_file ), '%s_vsm.nii.gz' % name ))
460
- return out_file
461
-
462
447
def _ms2sec ( val ):
463
448
return val * 1e-3 ;
464
449
465
- def _yield ( in_file , in_block ):
466
- return in_file
467
-
468
450
def _split_dwi ( in_file ):
469
451
import nibabel as nib
470
452
import os
0 commit comments