Skip to content

Commit

Permalink
Merge remote branch 'hanke/master'
Browse files Browse the repository at this point in the history
* hanke/master:
  BF: Identifying all 'mode options' of BET and make them mutually exclusive
  ENH: Complete BET interface. I'm not 100% sure if there was a reason to exclude the missing options, but they seems to work fine for me.
  • Loading branch information
chrisgorgo committed Jan 12, 2011
2 parents 28dc342 + c12dfbc commit 3f140d7
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions nipype/interfaces/fsl/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


class BETInputSpec(FSLCommandInputSpec):
"""Note: Currently we don't support -R, -S, -Z,-A or -A2"""
""""""
# We use position args here as list indices - so a negative number
# will put something on the end
in_file = File(exists=True,
Expand Down Expand Up @@ -59,8 +59,29 @@ class BETInputSpec(FSLCommandInputSpec):
desc="apply thresholding to segmented brain image and mask")
mesh = traits.Bool(argstr='-e',
desc="generate a vtk mesh brain surface")
# XXX how do we know these two are mutually exclusive?
_xor_inputs = ('functional', 'reduce_bias')
# the remaining 'options' are more like modes (mutually exclusive) that
# FSL actually implements in a shell script wrapper around the bet binary.
# for some combinations of them in specific order a call would not fail,
# but in general using more than one of the following is clearly not
# supported
_xor_inputs = ('functional', 'reduce_bias', 'robust', 'padding',
'remove_eyes', 'surfaces', 't2_guided')
robust = traits.Bool(desc='robust brain centre estimation ' \
'(iterates BET several times)',
argstr='-R', xor=_xor_inputs)
padding = traits.Bool(desc='improve BET if FOV is very small in Z ' \
'(by temporarily padding end slices)',
argstr='-Z', xor=_xor_inputs)
remove_eyes = traits.Bool(desc='eye & optic nerve cleanup (can be ' \
'useful in SIENA)',
argstr='-S', xor=_xor_inputs)
surfaces = traits.Bool(desc='run bet2 and then betsurf to get additional ' \
'skull and scalp surfaces (includes ' \
'registrations)',
argstr='-A', xor=_xor_inputs)
t2_guided = File(desc='as with creating surfaces, when also feeding in ' \
'non-brain-extracted T2 (includes registrations)',
argstr='-A2 %s', xor=_xor_inputs)
functional = traits.Bool(argstr='-F', xor=_xor_inputs,
desc="apply to 4D fMRI data")
reduce_bias = traits.Bool(argstr='-B', xor=_xor_inputs,
Expand Down

0 comments on commit 3f140d7

Please sign in to comment.