Skip to content

Commit 262bfb4

Browse files
committed
Additional xor/requires constraints
1 parent c52cf92 commit 262bfb4

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ class ReconAllInputSpec(CommandLineInputSpec):
820820
"recon_all",
821821
argstr="-subjid %s",
822822
desc="subject name",
823+
xor=["base_template_id","longitudinal_timepoint_id"],
823824
)
824825
directive = traits.Enum(
825826
"all",
@@ -845,21 +846,28 @@ class ReconAllInputSpec(CommandLineInputSpec):
845846
usedefault=True,
846847
position=0,
847848
)
848-
hemi = traits.Enum("lh", "rh", desc="hemisphere to process", argstr="-hemi %s")
849+
hemi = traits.Enum("lh", "rh",
850+
desc="hemisphere to process",
851+
argstr="-hemi %s",
852+
requires=["subject_id"],
853+
)
849854
T1_files = InputMultiPath(
850-
File(exists=True), argstr="-i %s...", desc="name of T1 file to process"
855+
File(exists=True), argstr="-i %s...", desc="name of T1 file to process",
856+
requires=["subject_id"],
851857
)
852858
T2_file = File(
853859
exists=True,
854860
argstr="-T2 %s",
855861
min_ver="5.3.0",
856862
desc="Convert T2 image to orig directory",
863+
requires=["subject_id"],
857864
)
858865
FLAIR_file = File(
859866
exists=True,
860867
argstr="-FLAIR %s",
861868
min_ver="5.3.0",
862869
desc="Convert FLAIR image to orig directory",
870+
requires=["subject_id"]
863871
)
864872
use_T2 = traits.Bool(
865873
argstr="-T2pial",
@@ -888,18 +896,21 @@ class ReconAllInputSpec(CommandLineInputSpec):
888896
"Assume scan parameters are MGH MP-RAGE "
889897
"protocol, which produces darker gray matter"
890898
),
899+
requires=["subject_id"],
891900
)
892901
big_ventricles = traits.Bool(
893902
argstr="-bigventricles",
894903
desc=("For use in subjects with enlarged " "ventricles"),
895904
)
896905
brainstem = traits.Bool(
897-
argstr="-brainstem-structures", desc="Segment brainstem structures"
906+
argstr="-brainstem-structures", desc="Segment brainstem structures",
907+
requires=["subject_id"],
898908
)
899909
hippocampal_subfields_T1 = traits.Bool(
900910
argstr="-hippocampal-subfields-T1",
901911
min_ver="6.0.0",
902912
desc="segment hippocampal subfields using input T1 scan",
913+
requires=["subject_id"],
903914
)
904915
hippocampal_subfields_T2 = traits.Tuple(
905916
File(exists=True),
@@ -910,6 +921,7 @@ class ReconAllInputSpec(CommandLineInputSpec):
910921
"segment hippocampal subfields using T2 scan, identified by "
911922
"ID (may be combined with hippocampal_subfields_T1)"
912923
),
924+
requires=["subject_id"],
913925
)
914926
expert = File(
915927
exists=True, argstr="-expert %s", desc="Set parameters using expert file"

0 commit comments

Comments
 (0)