12
12
... '../../testing/data'))
13
13
>>> os.chdir(datadir)
14
14
"""
15
- from __future__ import print_function , division , unicode_literals , absolute_import
15
+ from __future__ import print_function , division , unicode_literals , \
16
+ absolute_import
16
17
from builtins import str
17
18
18
19
import os
@@ -106,7 +107,7 @@ def _run_interface(self, runtime):
106
107
out_file = self .inputs .out_fieldmap
107
108
im = nb .load (out_file , mmap = NUMPY_MMAP )
108
109
dumb_img = nb .Nifti1Image (np .zeros (im .shape ), im .affine ,
109
- im .header )
110
+ im .header )
110
111
out_nii = nb .funcs .concat_images ((im , dumb_img ))
111
112
nb .save (out_nii , out_file )
112
113
@@ -450,26 +451,25 @@ class EddyInputSpec(FSLCommandInputSpec):
450
451
451
452
452
453
class EddyOutputSpec (TraitedSpec ):
453
- out_corrected = File (exists = True ,
454
- desc = ('4D image file containing all the corrected '
455
- 'volumes' ))
456
- out_parameter = File (exists = True ,
457
- desc = ('text file with parameters definining the '
458
- 'field and movement for each scan' ))
459
- out_rotated_bvecs = File (exists = True ,
460
- desc = ('File containing rotated b-values for all volumes' ))
461
- out_movement_rms = File (exists = True ,
462
- desc = ('Summary of the "total movement" in each volume' ))
463
- out_restricted_movement_rms = File (exists = True ,
464
- desc = ('Summary of the "total movement" in each volume '
465
- 'disregarding translation in the PE direction' ))
466
- out_shell_alignment_parameters = File (exists = True ,
467
- desc = ('File containing rigid body movement parameters '
468
- 'between the different shells as estimated by a '
469
- 'post-hoc mutual information based registration' ))
470
- out_outlier_report = File (exists = True ,
471
- desc = ('Text-file with a plain language report '
472
- 'on what outlier slices eddy has found' ))
454
+ out_corrected = File (
455
+ exists = True , desc = '4D image file containing all the corrected volumes' )
456
+ out_parameter = File (
457
+ exists = True , desc = ('text file with parameters definining the field and'
458
+ 'movement for each scan' ))
459
+ out_rotated_bvecs = File (
460
+ exists = True , desc = 'File containing rotated b-values for all volumes' )
461
+ out_movement_rms = File (
462
+ exists = True , desc = 'Summary of the "total movement" in each volume' )
463
+ out_restricted_movement_rms = File (
464
+ exists = True , desc = ('Summary of the "total movement" in each volume '
465
+ 'disregarding translation in the PE direction' ))
466
+ out_shell_alignment_parameters = File (
467
+ exists = True , desc = ('File containing rigid body movement parameters '
468
+ 'between the different shells as estimated by a '
469
+ 'post-hoc mutual information based registration' ))
470
+ out_outlier_report = File (
471
+ exists = True , desc = ('Text-file with a plain language report on what '
472
+ 'outlier slices eddy has found' ))
473
473
474
474
475
475
class Eddy (FSLCommand ):
@@ -492,9 +492,9 @@ class Eddy(FSLCommand):
492
492
>>> eddy.inputs.in_bvec = 'bvecs.scheme'
493
493
>>> eddy.inputs.in_bval = 'bvals.scheme'
494
494
>>> eddy.cmdline # doctest: +ELLIPSIS +ALLOW_UNICODE
495
- 'eddy_openmp --acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme \
496
- --imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii \
497
- --out=.../eddy_corrected'
495
+ 'eddy_openmp --acqp=epi_acqp.txt --bvals=bvals.scheme \
496
+ --bvecs=bvecs.scheme -- imain=epi.nii --index=epi_index.txt \
497
+ --mask=epi_mask.nii -- out=.../eddy_corrected'
498
498
>>> res = eddy.run() # doctest: +SKIP
499
499
500
500
"""
@@ -562,7 +562,8 @@ def _list_outputs(self):
562
562
out_restricted_movement_rms = os .path .abspath (
563
563
'%s.eddy_restricted_movement_rms' % self .inputs .out_base )
564
564
out_shell_alignment_parameters = os .path .abspath (
565
- '%s.eddy_post_eddy_shell_alignment_parameters' % self .inputs .out_base )
565
+ '%s.eddy_post_eddy_shell_alignment_parameters'
566
+ % self .inputs .out_base )
566
567
out_outlier_report = os .path .abspath (
567
568
'%s.eddy_outlier_report' % self .inputs .out_base )
568
569
@@ -571,9 +572,11 @@ def _list_outputs(self):
571
572
if os .path .exists (out_movement_rms ):
572
573
outputs ['out_movement_rms' ] = out_movement_rms
573
574
if os .path .exists (out_restricted_movement_rms ):
574
- outputs ['out_restricted_movement_rms' ] = out_restricted_movement_rms
575
+ outputs ['out_restricted_movement_rms' ] = \
576
+ out_restricted_movement_rms
575
577
if os .path .exists (out_shell_alignment_parameters ):
576
- outputs ['out_shell_alignment_parameters' ] = out_shell_alignment_parameters
578
+ outputs ['out_shell_alignment_parameters' ] = \
579
+ out_shell_alignment_parameters
577
580
if os .path .exists (out_outlier_report ):
578
581
outputs ['out_outlier_report' ] = out_outlier_report
579
582
0 commit comments