Skip to content

Commit 9c30bd1

Browse files
author
oliver-contier
committed
merged local master with upstream rel/1.1.9
1 parent 8cb6fb6 commit 9c30bd1

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

nipype/workflows/fmri/fsl/preprocess.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,6 @@ def getthreshop(thresh):
2020
def pickrun(files, whichrun):
2121
"""pick file from list of files"""
2222

23-
<<<<<<< HEAD
24-
filemap = {'first': 0, 'last': -1, 'middle' :len(files) // 2}
25-
26-
if isinstance(whichrun, str):
27-
if whichrun not in filemap.keys():
28-
raise(KeyError, 'Sorry, whichrun must be either integer index'
29-
'or string in form of "first", "last" or "middle')
30-
else:
31-
return files[filemap[whichrun]]
32-
33-
if isinstance(files, list):
34-
return files[whichrun]
35-
else:
36-
=======
3723
filemap = {'first': 0, 'last': -1, 'middle': len(files) // 2}
3824

3925
if isinstance(files, list):
@@ -50,7 +36,6 @@ def pickrun(files, whichrun):
5036
return files[filemap[whichrun]]
5137
else:
5238
# in case single file name is given
53-
>>>>>>> f079ed286d456b531f4f325ddc689f2572654edd
5439
return files
5540

5641

@@ -426,14 +411,10 @@ def create_parallelfeat_preproc(name='featpreproc', highpass=True):
426411
return featpreproc
427412

428413

429-
<<<<<<< HEAD
430-
def create_featreg_preproc(name='featpreproc', highpass=True, whichvol='middle', whichrun=0):
431-
=======
432414
def create_featreg_preproc(name='featpreproc',
433415
highpass=True,
434416
whichvol='middle',
435417
whichrun=0):
436-
>>>>>>> f079ed286d456b531f4f325ddc689f2572654edd
437418
"""Create a FEAT preprocessing workflow with registration to one volume of the first run
438419
439420
Parameters
@@ -444,11 +425,7 @@ def create_featreg_preproc(name='featpreproc',
444425
name : name of workflow (default: featpreproc)
445426
highpass : boolean (default: True)
446427
whichvol : which volume of the first run to register to ('first', 'middle', 'last', 'mean')
447-
<<<<<<< HEAD
448-
whichrun : which of the runs to draw reference volume from (indexed by int)
449-
=======
450428
whichrun : which run to draw reference volume from (integer index or 'first', 'middle', 'last')
451-
>>>>>>> f079ed286d456b531f4f325ddc689f2572654edd
452429
453430
Inputs::
454431
@@ -537,13 +514,6 @@ def create_featreg_preproc(name='featpreproc',
537514
"""
538515

539516
if whichvol != 'mean':
540-
<<<<<<< HEAD
541-
extract_ref = pe.Node(interface=fsl.ExtractROI(t_size=1),
542-
iterfield=['in_file'],
543-
name='extractref')
544-
featpreproc.connect(img2float, ('out_file', pickrun, whichrun), extract_ref, 'in_file')
545-
featpreproc.connect(img2float, ('out_file', pickvol, 0, whichvol), extract_ref, 't_min')
546-
=======
547517
extract_ref = pe.Node(
548518
interface=fsl.ExtractROI(t_size=1),
549519
iterfield=['in_file'],
@@ -552,7 +522,6 @@ def create_featreg_preproc(name='featpreproc',
552522
extract_ref, 'in_file')
553523
featpreproc.connect(img2float, ('out_file', pickvol, 0, whichvol),
554524
extract_ref, 't_min')
555-
>>>>>>> f079ed286d456b531f4f325ddc689f2572654edd
556525
featpreproc.connect(extract_ref, 'roi_file', outputnode, 'reference')
557526
"""
558527
Realign the functional runs to the reference (`whichvol` volume of first run)
@@ -569,15 +538,8 @@ def create_featreg_preproc(name='featpreproc',
569538
'ref_file')
570539
else:
571540
motion_correct.inputs.mean_vol = True
572-
<<<<<<< HEAD
573-
featpreproc.connect(motion_correct, ('mean_img', pickrun, whichrun), outputnode, 'reference')
574-
575-
featpreproc.connect(motion_correct, 'par_file', outputnode, 'motion_parameters')
576-
featpreproc.connect(motion_correct, 'out_file', outputnode, 'realigned_files')
577-
=======
578541
featpreproc.connect(motion_correct, ('mean_img', pickrun, whichrun),
579542
outputnode, 'reference')
580-
>>>>>>> f079ed286d456b531f4f325ddc689f2572654edd
581543

582544
featpreproc.connect(motion_correct, 'par_file', outputnode,
583545
'motion_parameters')
@@ -598,19 +560,11 @@ def create_featreg_preproc(name='featpreproc',
598560
Extract the mean volume of the first functional run
599561
"""
600562

601-
<<<<<<< HEAD
602-
meanfunc = pe.Node(interface=fsl.ImageMaths(op_string='-Tmean',
603-
suffix='_mean'),
604-
name='meanfunc')
605-
featpreproc.connect(motion_correct, ('out_file', pickrun, whichrun), meanfunc, 'in_file')
606-
607-
=======
608563
meanfunc = pe.Node(
609564
interface=fsl.ImageMaths(op_string='-Tmean', suffix='_mean'),
610565
name='meanfunc')
611566
featpreproc.connect(motion_correct, ('out_file', pickrun, whichrun),
612567
meanfunc, 'in_file')
613-
>>>>>>> f079ed286d456b531f4f325ddc689f2572654edd
614568
"""
615569
Strip the skull from the mean functional to generate a mask
616570
"""
@@ -746,12 +700,8 @@ def create_featreg_preproc(name='featpreproc',
746700
iterfield=['in_file'],
747701
name='meanfunc3')
748702

749-
<<<<<<< HEAD
750-
featpreproc.connect(meanscale, ('out_file', pickrun, whichrun), meanfunc3, 'in_file')
751-
=======
752703
featpreproc.connect(meanscale, ('out_file', pickrun, whichrun), meanfunc3,
753704
'in_file')
754-
>>>>>>> f079ed286d456b531f4f325ddc689f2572654edd
755705
featpreproc.connect(meanfunc3, 'out_file', outputnode, 'mean')
756706
"""
757707
Perform temporal highpass filtering on the data

0 commit comments

Comments
 (0)