Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD 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
FSL
fslpy
Commits
aafd587e
Commit
aafd587e
authored
6 years ago
by
Martin Craig
Browse files
Options
Downloads
Patches
Plain Diff
Add FSL_ANAT wrapper
parent
11951148
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/wrappers/__init__.py
+1
-0
1 addition, 0 deletions
fsl/wrappers/__init__.py
fsl/wrappers/fsl_anat.py
+48
-0
48 additions, 0 deletions
fsl/wrappers/fsl_anat.py
with
49 additions
and
0 deletions
fsl/wrappers/__init__.py
+
1
−
0
View file @
aafd587e
...
@@ -82,6 +82,7 @@ from .bet import (bet, # noqa
...
@@ -82,6 +82,7 @@ from .bet import (bet, # noqa
from
.eddy
import
(
eddy_cuda
,
# noqa
from
.eddy
import
(
eddy_cuda
,
# noqa
topup
)
topup
)
from
.fast
import
(
fast
,)
# noqa
from
.fast
import
(
fast
,)
# noqa
from
.fsl_anat
import
(
fsl_anat
,)
# noqa
from
.flirt
import
(
flirt
,
# noqa
from
.flirt
import
(
flirt
,
# noqa
invxfm
,
invxfm
,
applyxfm
,
applyxfm
,
...
...
This diff is collapsed.
Click to expand it.
fsl/wrappers/fsl_anat.py
0 → 100644
+
48
−
0
View file @
aafd587e
#!/usr/bin/env python
#
# fsl_anat.py - Wrapper for the FSL_ANAT command.
#
# Author: Martin Craig <martin.craig@eng.ox.ac.uk>
#
"""
This module provides the :func:`fsl_anat` function, a wrapper for the FSL
`FSL_ANAT <https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/fsl_anat>`_ command.
"""
import
six
import
fsl.utils.assertions
as
asrt
from
.
import
wrapperutils
as
wutils
@wutils.fileOrImage
(
'
img
'
,
outprefix
=
'
out
'
)
@wutils.fslwrapper
def
fsl_anat
(
img
,
out
=
'
fsl_anat
'
,
**
kwargs
):
"""
Wrapper for the ``fsl_anat`` command.
:arg img: Input structural image
:arg out: Output directory name
"""
asrt
.
assertIsNifti
(
img
)
valmap
=
{
'
weakbias
'
:
wutils
.
SHOW_IF_TRUE
,
'
noreorient
'
:
wutils
.
SHOW_IF_TRUE
,
'
nocrop
'
:
wutils
.
SHOW_IF_TRUE
,
'
nobias
'
:
wutils
.
SHOW_IF_TRUE
,
'
noreg
'
:
wutils
.
SHOW_IF_TRUE
,
'
nononlinreg
'
:
wutils
.
SHOW_IF_TRUE
,
'
noseg
'
:
wutils
.
SHOW_IF_TRUE
,
'
nosubcortseg
'
:
wutils
.
SHOW_IF_TRUE
,
'
nosearch
'
:
wutils
.
SHOW_IF_TRUE
,
'
betfparam
'
:
wutils
.
SHOW_IF_TRUE
,
'
nocleanup
'
:
wutils
.
SHOW_IF_TRUE
,
}
argmap
=
{
'
bias_smoothing
'
:
'
s
'
,
'
img_type
'
:
'
t
'
,
}
cmd
=
[
'
fsl_anat
'
,
'
-i
'
,
img
,
'
-o
'
,
out
]
cmd
+=
wutils
.
applyArgStyle
(
'
--=
'
,
valmap
=
valmap
,
argmap
=
argmap
,
singlechar_args
=
True
,
**
kwargs
)
return
cmd
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