Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
eaa402dc
Commit
eaa402dc
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Some docs in __init__
parent
6e69cc44
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/wrappers/__init__.py
+34
-8
34 additions, 8 deletions
fsl/wrappers/__init__.py
with
34 additions
and
8 deletions
fsl/wrappers/__init__.py
+
34
−
8
View file @
eaa402dc
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment