Skip to content

Commit a99e02d

Browse files
authored
Merge pull request #1881 from neuroumbrage/master
[DOC] update FSL preprocess
2 parents 54f7cf1 + f5f1b22 commit a99e02d

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

nipype/interfaces/fsl/preprocess.py

Lines changed: 30 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()
@@ -655,14 +656,18 @@ class MCFLIRT(FSLCommand):
655656
"""Use FSL MCFLIRT to do within-modality motion correction.
656657
657658
For complete details, see the `MCFLIRT Documentation.
658-
<http://www.fmrib.ox.ac.uk/fsl/mcflirt/index.html>`_
659+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MCFLIRT>`_
659660
660661
Examples
661662
--------
662663
>>> 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
664+
>>> mcflt = fsl.MCFLIRT()
665+
>>> mcflt.inputs.in_file = 'functional.nii'
666+
>>> mcflt.inputs.cost = 'mutualinfo'
667+
>>> mcflt.inputs.out_file = 'moco.nii'
668+
>>> mcflt.cmdline # doctest: +ALLOW_UNICODE
669+
'mcflirt -in functional.nii -cost mutualinfo -out moco.nii'
670+
>>> res = mcflt.run() # doctest: +SKIP
666671
667672
"""
668673
_cmd = 'mcflirt'
@@ -908,6 +913,9 @@ class FNIRTOutputSpec(TraitedSpec):
908913
class FNIRT(FSLCommand):
909914
"""Use FSL FNIRT for non-linear registration.
910915
916+
For complete details, see the `FNIRT Documentation.
917+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FNIRT>`_
918+
911919
Examples
912920
--------
913921
>>> from nipype.interfaces import fsl
@@ -1208,6 +1216,9 @@ class SUSANOutputSpec(TraitedSpec):
12081216
class SUSAN(FSLCommand):
12091217
""" use FSL SUSAN to perform smoothing
12101218
1219+
For complete details, see the `SUSAN Documentation.
1220+
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/SUSAN>`_
1221+
12111222
Examples
12121223
--------
12131224

0 commit comments

Comments
 (0)