Skip to content

Add hidden DOF (and --fsl-dof) options to BBRegister #1917

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 2 commits into from
Apr 1, 2017
Merged
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions nipype/interfaces/freesurfer/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,10 @@ class BBRegisterInputSpec(FSTraitedSpec):
desc="force use of nifti rather than analyze with SPM")
epi_mask = traits.Bool(argstr="--epi-mask",
desc="mask out B0 regions in stages 1 and 2")
dof = traits.Enum(6, 9, 12, argstr='--%d',
desc='number of transform degrees of freedom')
fsldof = traits.Int(argstr='--fsl-dof %d',
desc='degrees of freedom for initial registration (FSL)')
out_fsl_file = traits.Either(traits.Bool, File, argstr="--fslmat %s",
desc="write the transformation matrix in FSL FLIRT format")
registered_file = traits.Either(traits.Bool, File, argstr='--o %s',
Expand All @@ -1054,9 +1058,8 @@ class BBRegister(FSCommand):
"""Use FreeSurfer bbregister to register a volume to the Freesurfer anatomical.

This program performs within-subject, cross-modal registration using a
boundary-based cost function. The registration is constrained to be 6
DOF (rigid). It is required that you have an anatomical scan of the
subject that has already been recon-all-ed using freesurfer.
boundary-based cost function. It is required that you have an anatomical
scan of the subject that has already been recon-all-ed using freesurfer.

Examples
--------
Expand Down
4 changes: 4 additions & 0 deletions nipype/interfaces/freesurfer/tests/test_BBRegister.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ def test_BBRegister_inputs():
input_map_5_3 = dict(
args=dict(argstr='%s',),
contrast_type=dict(argstr='--%s', mandatory=True,),
dof=dict(argstr='--%d',),
environ=dict(nohash=True, usedefault=True,),
epi_mask=dict(argstr='--epi-mask',),
fsldof=dict(argstr='--fsl-dof %d',),
ignore_exception=dict(nohash=True, usedefault=True,),
init=dict(argstr='--init-%s', mandatory=True, xor=['init_reg_file'],),
init_reg_file=dict(argstr='--init-reg %s', mandatory=True, xor=['init'],),
Expand All @@ -26,8 +28,10 @@ def test_BBRegister_inputs():
input_map_6_0 = dict(
args=dict(argstr='%s',),
contrast_type=dict(argstr='--%s', mandatory=True,),
dof=dict(argstr='--%d',),
environ=dict(nohash=True, usedefault=True,),
epi_mask=dict(argstr='--epi-mask',),
fsldof=dict(argstr='--fsl-dof %d',),
ignore_exception=dict(nohash=True, usedefault=True,),
init=dict(argstr='--init-%s', xor=['init_reg_file'],),
init_reg_file=dict(argstr='--init-reg %s', xor=['init'],),
Expand Down