Skip to content
Snippets Groups Projects
Commit eaa402dc authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Some docs in __init__

parent 6e69cc44
No related branches found
No related tags found
No related merge requests found
......@@ -6,16 +6,42 @@
#
"""This package contains wrappers for various FSL command line tools, allowing
them to be called from Python.
Most of these wrapper functions strive to provide as-close an interface to the
command-line tool as possible. Most functions use positional arguments for
required options, and keyword arguments for all other options, with argument
names equivalent to command line option names.
For options where this is not possible (e.g. ``flirt -2D``),an alias is used
instead. Aliases may also be used to provide a more readable interface (e.g.
the :func:`.bet` function uses ``mask`` instead of ``m``).
Wrapper functions for commands which accept NIfTI image or numeric text files
will for the most part accept either in-memory ``nibabel`` images/Numpy arrays
or file names as inputs. For commands which produce image or numeric text file
outputs, the special :data:`.LOAD` value can be used to indicate that the file
should be loaded and returned in-memory from the wrapper function. For example,
if we want to FLIRT two images and get the result, we can do this::
import nibabel as nib
from fsl.wrappers import flirt, LOAD
src = nib.load('src.nii')
ref = nib.load('ref.nii')
aligned = flirt(src, ref, out=LOAD)['out']
If you are writing wrapper functions, read through the :mod:`.wrapperutils`
module - it contains several useful functions and decorators.
"""
from .wrapperutils import (applyArgStyle, # noqa
required,
fileOrImage,
fileOrArray,
LOAD,
SHOW_IF_TRUE,
HIDE_IF_TRUE)
from .bet import (bet,) # noqa
from .wrapperutils import (LOAD,) # noqa
from .bet import (bet, # noqa
robustfov)
from .eddy import (eddy_cuda, # noqa
topup)
from .flirt import (flirt, # noqa
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment