Skip to content

Commit 68e8ef0

Browse files
authored
Merge pull request #2279 from effigies/enh/reconall_flair
ENH: Enable recon-all -FLAIR / -FLAIRpial options
2 parents ca91455 + 77f5bd4 commit 68e8ef0

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,17 @@ class ReconAllInputSpec(CommandLineInputSpec):
628628
argstr="-hemi %s")
629629
T1_files = InputMultiPath(File(exists=True), argstr='-i %s...',
630630
desc='name of T1 file to process')
631-
T2_file = File(exists=True, argstr="-T2 %s", min_ver='5.3.0',
631+
T2_file = File(exists=True, argstr="-T2 %s",
632+
min_ver='5.3.0',
632633
desc='Convert T2 image to orig directory')
633-
use_T2 = traits.Bool(argstr="-T2pial", min_ver='5.3.0',
634-
desc='Use converted T2 to refine the cortical surface')
634+
FLAIR_file = File(exists=True, argstr="-FLAIR %s",
635+
min_ver='5.3.0',
636+
desc='Convert FLAIR image to orig directory')
637+
use_T2 = traits.Bool(argstr="-T2pial", min_ver='5.3.0', xor=['use_FLAIR'],
638+
desc='Use T2 image to refine the pial surface')
639+
use_FLAIR = traits.Bool(argstr="-FLAIRpial",
640+
min_ver='5.3.0', xor=['use_T2'],
641+
desc='Use FLAIR image to refine the pial surface')
635642
openmp = traits.Int(argstr="-openmp %d",
636643
desc="Number of processors to use in parallel")
637644
parallel = traits.Bool(argstr="-parallel",

nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55

66
def test_ReconAll_inputs():
7-
input_map = dict(T1_files=dict(argstr='-i %s...',
7+
input_map = dict(FLAIR_file=dict(argstr='-FLAIR %s',
8+
min_ver='5.3.0',
9+
),
10+
T1_files=dict(argstr='-i %s...',
811
),
912
T2_file=dict(argstr='-T2 %s',
1013
min_ver='5.3.0',
@@ -108,8 +111,13 @@ def test_ReconAll_inputs():
108111
terminal_output=dict(deprecated='1.0.0',
109112
nohash=True,
110113
),
114+
use_FLAIR=dict(argstr='-FLAIRpial',
115+
min_ver='5.3.0',
116+
xor=['use_T2'],
117+
),
111118
use_T2=dict(argstr='-T2pial',
112119
min_ver='5.3.0',
120+
xor=['use_FLAIR'],
113121
),
114122
xopts=dict(argstr='-xopts-%s',
115123
),

0 commit comments

Comments
 (0)