Skip to content

ENH: Enable new BBRegister init options for FSv6+ #1811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion nipype/interfaces/freesurfer/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,12 @@ class BBRegisterInputSpec(FSTraitedSpec):
desc='output warped sourcefile either True or filename')


class BBRegisterInputSpec6(BBRegisterInputSpec):
init = traits.Enum('coreg', 'rr', 'spm', 'fsl', 'header', 'best', argstr='--init-%s',
usedefault=True, xor=['init_reg_file'],
desc='initialize registration with mri_coreg, spm, fsl, or header')


class BBRegisterOutputSpec(TraitedSpec):
out_reg_file = File(exists=True, desc='Output registration file')
out_fsl_file = File(desc='Output FLIRT-style registration file')
Expand All @@ -968,7 +974,10 @@ class BBRegister(FSCommand):
"""

_cmd = 'bbregister'
input_spec = BBRegisterInputSpec
if LooseVersion(FSVersion) < LooseVersion("6.0.0"):
input_spec = BBRegisterInputSpec
else:
input_spec = BBRegisterInputSpec6
output_spec = BBRegisterOutputSpec

def _list_outputs(self):
Expand Down