Skip to content

Commit b304510

Browse files
authored
Merge pull request #1811 from effigies/freesurfer6
ENH: Enable new BBRegister init options for FSv6+
2 parents f5ed4d6 + 514f5b5 commit b304510

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,12 @@ class BBRegisterInputSpec(FSTraitedSpec):
942942
desc='output warped sourcefile either True or filename')
943943

944944

945+
class BBRegisterInputSpec6(BBRegisterInputSpec):
946+
init = traits.Enum('coreg', 'rr', 'spm', 'fsl', 'header', 'best', argstr='--init-%s',
947+
usedefault=True, xor=['init_reg_file'],
948+
desc='initialize registration with mri_coreg, spm, fsl, or header')
949+
950+
945951
class BBRegisterOutputSpec(TraitedSpec):
946952
out_reg_file = File(exists=True, desc='Output registration file')
947953
out_fsl_file = File(desc='Output FLIRT-style registration file')
@@ -968,7 +974,10 @@ class BBRegister(FSCommand):
968974
"""
969975

970976
_cmd = 'bbregister'
971-
input_spec = BBRegisterInputSpec
977+
if LooseVersion(FSVersion) < LooseVersion("6.0.0"):
978+
input_spec = BBRegisterInputSpec
979+
else:
980+
input_spec = BBRegisterInputSpec6
972981
output_spec = BBRegisterOutputSpec
973982

974983
def _list_outputs(self):

0 commit comments

Comments
 (0)