Skip to content

Commit

Permalink
Merge pull request #2990 from lucindasisk/patch-1
Browse files Browse the repository at this point in the history
[ENH] Update mrtrix reconst.py EstimateFOD max_sh to be able to accept list
  • Loading branch information
effigies authored Aug 17, 2019
2 parents c14f24e + 3b1b62a commit ea2243c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
13 changes: 8 additions & 5 deletions nipype/interfaces/mrtrix3/reconst.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import os.path as op

from ..base import traits, TraitedSpec, File, Undefined
from ..base import traits, TraitedSpec, File, Undefined, InputMultiObject
from .base import MRTrix3BaseInputSpec, MRTrix3Base


Expand Down Expand Up @@ -115,10 +115,13 @@ class EstimateFODInputSpec(MRTrix3BaseInputSpec):
sep=',',
argstr='-shell %s',
desc='specify one or more dw gradient shells')
max_sh = traits.Int(
8, usedefault=True,
argstr='-lmax %d',
desc='maximum harmonic degree of response function')
max_sh = InputMultiObject(
traits.Int,
value=[8],
usedefault=True,
argstr='-lmax %s',
sep=',',
desc=('maximum harmonic degree of response function - single value for single-shell response, list for multi-shell response'))
in_dirs = File(
exists=True,
argstr='-directions %s',
Expand Down
9 changes: 7 additions & 2 deletions nipype/interfaces/mrtrix3/tests/test_auto_EstimateFOD.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ def test_EstimateFOD_inputs():
grad_file=dict(
argstr='-grad %s',
extensions=None,
xor=['grad_fsl'],
),
grad_fsl=dict(
argstr='-fslgrad %s %s',
xor=['grad_file'],
),
grad_fsl=dict(argstr='-fslgrad %s %s', ),
in_bval=dict(extensions=None, ),
in_bvec=dict(
argstr='-fslgrad %s %s',
Expand All @@ -63,7 +67,8 @@ def test_EstimateFOD_inputs():
extensions=None,
),
max_sh=dict(
argstr='-lmax %d',
argstr='-lmax %s',
sep=',',
usedefault=True,
),
nthreads=dict(
Expand Down

0 comments on commit ea2243c

Please sign in to comment.