Skip to content

Commit 9c3f5ee

Browse files
committed
Merge remote-tracking branch 'nipy/master'
# Conflicts: # nipype/algorithms/tests/test_auto_NonSteadyStateDetector.py
2 parents dd1ed4f + 9e4a94d commit 9c3f5ee

File tree

1 file changed

+40
-19
lines changed

1 file changed

+40
-19
lines changed

nipype/interfaces/fsl/preprocess.py

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,17 @@ class BET(FSLCommand):
118118
"""Use FSL BET command for skull stripping.
119119
120120
For complete details, see the `BET Documentation.
121-
<http://www.fmrib.ox.ac.uk/fsl/bet2/index.html>`_
121+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/BET/UserGuide>`_
122122
123123
Examples
124124
--------
125125
>>> from nipype.interfaces import fsl
126-
>>> from nipype.testing import example_data
127126
>>> btr = fsl.BET()
128-
>>> btr.inputs.in_file = example_data('structural.nii')
127+
>>> btr.inputs.in_file = 'structural.nii'
129128
>>> btr.inputs.frac = 0.7
129+
>>> btr.inputs.out_file = 'brain_anat.nii'
130+
>>> btr.cmdline # doctest: +ALLOW_UNICODE
131+
'bet structural.nii brain_anat.nii -f 0.70'
130132
>>> res = btr.run() # doctest: +SKIP
131133
132134
"""
@@ -275,7 +277,7 @@ class FASTOutputSpec(TraitedSpec):
275277

276278
mixeltype = File(desc="path/name of mixeltype volume file _mixeltype")
277279

278-
partial_volume_map = File(desc="path/name of partial volume file _pveseg")
280+
partial_volume_map = File(desc='path/name of partial volume file _pveseg')
279281
partial_volume_files = OutputMultiPath(File(
280282
desc='path/name of partial volumes files one for each class, _pve_x'))
281283

@@ -288,18 +290,17 @@ class FAST(FSLCommand):
288290
""" Use FSL FAST for segmenting and bias correction.
289291
290292
For complete details, see the `FAST Documentation.
291-
<http://www.fmrib.ox.ac.uk/fsl/fast4/index.html>`_
293+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FAST>`_
292294
293295
Examples
294296
--------
295297
>>> from nipype.interfaces import fsl
296-
>>> from nipype.testing import example_data
297-
298-
Assign options through the ``inputs`` attribute:
299-
300298
>>> fastr = fsl.FAST()
301-
>>> fastr.inputs.in_files = example_data('structural.nii')
302-
>>> out = fastr.run() #doctest: +SKIP
299+
>>> fastr.inputs.in_files = 'structural.nii'
300+
>>> fastr.inputs.out_basename = 'fast_'
301+
>>> fastr.cmdline # doctest: +ALLOW_UNICODE
302+
'fast -o fast_ -S 1 structural.nii'
303+
>>> out = fastr.run() # doctest: +SKIP
303304
304305
"""
305306
_cmd = 'fast'
@@ -308,12 +309,12 @@ class FAST(FSLCommand):
308309

309310
def _format_arg(self, name, spec, value):
310311
# first do what should be done in general
311-
formated = super(FAST, self)._format_arg(name, spec, value)
312+
formatted = super(FAST, self)._format_arg(name, spec, value)
312313
if name == 'in_files':
313314
# FAST needs the -S parameter value to correspond to the number
314315
# of input images, otherwise it will ignore all but the first
315-
formated = "-S %d %s" % (len(value), formated)
316-
return formated
316+
formatted = "-S %d %s" % (len(value), formatted)
317+
return formatted
317318

318319
def _list_outputs(self):
319320
outputs = self.output_spec().get()
@@ -526,7 +527,7 @@ class FLIRT(FSLCommand):
526527
"""Use FSL FLIRT for coregistration.
527528
528529
For complete details, see the `FLIRT Documentation.
529-
<http://www.fmrib.ox.ac.uk/fsl/flirt/index.html>`_
530+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT>`_
530531
531532
To print out the command line help, use:
532533
fsl.FLIRT().inputs_help()
@@ -594,6 +595,16 @@ class ApplyXFM(FLIRT):
594595
"""
595596
input_spec = ApplyXFMInputSpec
596597

598+
class ApplyXfm(ApplyXFM):
599+
"""
600+
.. deprecated:: 0.12.1
601+
Use :py:class:`nipype.interfaces.fsl.ApplyXFM` instead
602+
"""
603+
def __init__(self, **inputs):
604+
super(ApplyXfm, self).__init__(**inputs)
605+
warn(('This interface has been renamed since 0.12.1, please use '
606+
'nipype.interfaces.fsl.ApplyXFM'),
607+
UserWarning)
597608

598609
class MCFLIRTInputSpec(FSLCommandInputSpec):
599610
in_file = File(exists=True, position=0, argstr="-in %s", mandatory=True,
@@ -655,14 +666,18 @@ class MCFLIRT(FSLCommand):
655666
"""Use FSL MCFLIRT to do within-modality motion correction.
656667
657668
For complete details, see the `MCFLIRT Documentation.
658-
<http://www.fmrib.ox.ac.uk/fsl/mcflirt/index.html>`_
669+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MCFLIRT>`_
659670
660671
Examples
661672
--------
662673
>>> from nipype.interfaces import fsl
663-
>>> from nipype.testing import example_data
664-
>>> mcflt = fsl.MCFLIRT(in_file=example_data('functional.nii'), cost='mutualinfo')
665-
>>> res = mcflt.run() # doctest: +SKIP
674+
>>> mcflt = fsl.MCFLIRT()
675+
>>> mcflt.inputs.in_file = 'functional.nii'
676+
>>> mcflt.inputs.cost = 'mutualinfo'
677+
>>> mcflt.inputs.out_file = 'moco.nii'
678+
>>> mcflt.cmdline # doctest: +ALLOW_UNICODE
679+
'mcflirt -in functional.nii -cost mutualinfo -out moco.nii'
680+
>>> res = mcflt.run() # doctest: +SKIP
666681
667682
"""
668683
_cmd = 'mcflirt'
@@ -908,6 +923,9 @@ class FNIRTOutputSpec(TraitedSpec):
908923
class FNIRT(FSLCommand):
909924
"""Use FSL FNIRT for non-linear registration.
910925
926+
For complete details, see the `MCFLIRT Documentation.
927+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FNIRT>`_
928+
911929
Examples
912930
--------
913931
>>> from nipype.interfaces import fsl
@@ -1208,6 +1226,9 @@ class SUSANOutputSpec(TraitedSpec):
12081226
class SUSAN(FSLCommand):
12091227
""" use FSL SUSAN to perform smoothing
12101228
1229+
For complete details, see the `MCFLIRT Documentation.
1230+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/SUSAN>`_
1231+
12111232
Examples
12121233
--------
12131234

0 commit comments

Comments
 (0)