@@ -378,7 +378,8 @@ def _parse_inputs(self, skip=None):
378
378
# If not defined, assume index are the first N entries in the
379
379
# parameters file, for N input images.
380
380
if not isdefined (self .inputs .in_index ):
381
- self .inputs .in_index = list (range (1 , len (self .inputs .in_files ) + 1 ))
381
+ self .inputs .in_index = list (
382
+ range (1 , len (self .inputs .in_files ) + 1 ))
382
383
383
384
return super (ApplyTOPUP , self )._parse_inputs (skip = skip )
384
385
@@ -491,7 +492,8 @@ def _num_threads_update(self):
491
492
if 'OMP_NUM_THREADS' in self .inputs .environ :
492
493
del self .inputs .environ ['OMP_NUM_THREADS' ]
493
494
else :
494
- self .inputs .environ ['OMP_NUM_THREADS' ] = str (self .inputs .num_threads )
495
+ self .inputs .environ ['OMP_NUM_THREADS' ] = str (
496
+ self .inputs .num_threads )
495
497
496
498
def _format_arg (self , name , spec , value ):
497
499
if name == 'in_topup_fieldcoef' :
@@ -502,8 +504,10 @@ def _format_arg(self, name, spec, value):
502
504
503
505
def _list_outputs (self ):
504
506
outputs = self .output_spec ().get ()
505
- outputs ['out_corrected' ] = os .path .abspath ('%s.nii.gz' % self .inputs .out_base )
506
- outputs ['out_parameter' ] = os .path .abspath ('%s.eddy_parameters' % self .inputs .out_base )
507
+ outputs ['out_corrected' ] = os .path .abspath (
508
+ '%s.nii.gz' % self .inputs .out_base )
509
+ outputs ['out_parameter' ] = os .path .abspath (
510
+ '%s.eddy_parameters' % self .inputs .out_base )
507
511
return outputs
508
512
509
513
@@ -575,7 +579,8 @@ class EpiRegInputSpec(FSLCommandInputSpec):
575
579
position = - 3 , desc = 'wholehead T1 image' )
576
580
t1_brain = File (exists = True , argstr = '--t1brain=%s' , mandatory = True ,
577
581
position = - 2 , desc = 'brain extracted T1 image' )
578
- out_base = traits .String ("epi2struct" , desc = 'output base name' , argstr = '--out=%s' ,
582
+ out_base = traits .String ("epi2struct" , desc = 'output base name' ,
583
+ argstr = '--out=%s' ,
579
584
position = - 1 , usedefault = True )
580
585
fmap = File (exists = True , argstr = '--fmap=%s' ,
581
586
desc = 'fieldmap image (in rad/s)' )
@@ -622,7 +627,8 @@ class EpiRegOutputSpec(TraitedSpec):
622
627
fullwarp = File (exists = True ,
623
628
desc = 'warpfield to unwarp epi and transform into \
624
629
structural space' )
625
- wmseg = File (exists = True , desc = 'white matter segmentation used in flirt bbr' )
630
+ wmseg = File (exists = True ,
631
+ desc = 'white matter segmentation used in flirt bbr' )
626
632
wmedge = File (exists = True , desc = 'white matter edges for visualization' )
627
633
628
634
@@ -661,32 +667,34 @@ def _list_outputs(self):
661
667
outputs = self .output_spec ().get ()
662
668
outputs ['out_file' ] = os .path .join (os .getcwd (),
663
669
self .inputs .out_base + '.nii.gz' )
664
- if not (isdefined (self .inputs .no_fmapreg ) and self .inputs .no_fmapreg ) and isdefined (self .inputs .fmap ):
665
- outputs ['out_1vol' ] = os .path .join (os .getcwd (),
666
- self .inputs .out_base + '_1vol.nii.gz' )
667
- outputs ['fmap2str_mat' ] = os .path .join (os .getcwd (),
668
- self .inputs .out_base + '_fieldmap2str.mat' )
669
- outputs ['fmap2epi_mat' ] = os .path .join (os .getcwd (),
670
- self .inputs .out_base + '_fieldmaprads2epi.mat' )
671
- outputs ['fmap_epi' ] = os .path .join (os .getcwd (),
672
- self .inputs .out_base + '_fieldmaprads2epi.nii.gz' )
673
- outputs ['fmap_str' ] = os .path .join (os .getcwd (),
674
- self .inputs .out_base + '_fieldmaprads2str.nii.gz' )
675
- outputs ['fmapmag_str' ] = os .path .join (os .getcwd (),
676
- self .inputs .out_base + '_fieldmap2str.nii.gz' )
677
- outputs ['shiftmap' ] = os .path .join (os .getcwd (),
678
- self .inputs .out_base + '_fieldmaprads2epi_shift.nii.gz' )
679
- outputs ['fullwarp' ] = os .path .join (os .getcwd (),
680
- self .inputs .out_base + '_warp.nii.gz' )
681
- outputs ['epi2str_inv' ] = os .path .join (os .getcwd (),
682
- self .inputs .out_base + '_inv.mat' )
683
-
684
- outputs ['epi2str_mat' ] = os .path .join (os .getcwd (),
685
- self .inputs .out_base + '.mat' )
686
- outputs ['wmedge' ] = os .path .join (os .getcwd (),
687
- self .inputs .out_base + '_fast_wmedge.nii.gz' )
688
- outputs ['wmseg' ] = os .path .join (os .getcwd (),
689
- self .inputs .out_base + '_fast_wmseg.nii.gz' )
670
+ if (not (isdefined (self .inputs .no_fmapreg ) and
671
+ self .inputs .no_fmapreg ) and isdefined (self .inputs .fmap )):
672
+ outputs ['out_1vol' ] = os .path .join (
673
+ os .getcwd (), self .inputs .out_base + '_1vol.nii.gz' )
674
+ outputs ['fmap2str_mat' ] = os .path .join (
675
+ os .getcwd (), self .inputs .out_base + '_fieldmap2str.mat' )
676
+ outputs ['fmap2epi_mat' ] = os .path .join (
677
+ os .getcwd (), self .inputs .out_base + '_fieldmaprads2epi.mat' )
678
+ outputs ['fmap_epi' ] = os .path .join (
679
+ os .getcwd (), self .inputs .out_base + '_fieldmaprads2epi.nii.gz' )
680
+ outputs ['fmap_str' ] = os .path .join (
681
+ os .getcwd (), self .inputs .out_base + '_fieldmaprads2str.nii.gz' )
682
+ outputs ['fmapmag_str' ] = os .path .join (
683
+ os .getcwd (), self .inputs .out_base + '_fieldmap2str.nii.gz' )
684
+ outputs ['shiftmap' ] = os .path .join (
685
+ os .getcwd (),
686
+ self .inputs .out_base + '_fieldmaprads2epi_shift.nii.gz' )
687
+ outputs ['fullwarp' ] = os .path .join (
688
+ os .getcwd (), self .inputs .out_base + '_warp.nii.gz' )
689
+ outputs ['epi2str_inv' ] = os .path .join (
690
+ os .getcwd (), self .inputs .out_base + '_inv.mat' )
691
+
692
+ outputs ['epi2str_mat' ] = os .path .join (
693
+ os .getcwd (), self .inputs .out_base + '.mat' )
694
+ outputs ['wmedge' ] = os .path .join (
695
+ os .getcwd (), self .inputs .out_base + '_fast_wmedge.nii.gz' )
696
+ outputs ['wmseg' ] = os .path .join (
697
+ os .getcwd (), self .inputs .out_base + '_fast_wmseg.nii.gz' )
690
698
691
699
return outputs
692
700
0 commit comments