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
c06ef973
Commit
c06ef973
authored
2 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: move standard_space_roi wrapper into the flirt module
parent
805228a4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fsl/wrappers/__init__.py
+7
-2
7 additions, 2 deletions
fsl/wrappers/__init__.py
fsl/wrappers/flirt.py
+43
-0
43 additions, 0 deletions
fsl/wrappers/flirt.py
fsl/wrappers/standard_space_roi.py
+0
-62
0 additions, 62 deletions
fsl/wrappers/standard_space_roi.py
with
50 additions
and
64 deletions
fsl/wrappers/__init__.py
+
7
−
2
View file @
c06ef973
...
@@ -121,7 +121,8 @@ from fsl.wrappers.flirt import (flirt,
...
@@ -121,7 +121,8 @@ from fsl.wrappers.flirt import (flirt,
applyxfm4D
,
applyxfm4D
,
concatxfm
,
concatxfm
,
fixscaleskew
,
fixscaleskew
,
mcflirt
)
mcflirt
,
standard_space_roi
)
from
fsl.wrappers.fnirt
import
(
fnirt
,
from
fsl.wrappers.fnirt
import
(
fnirt
,
applywarp
,
applywarp
,
invwarp
,
invwarp
,
...
@@ -143,4 +144,8 @@ from fsl.wrappers.misc import (fslreorient2std,
...
@@ -143,4 +144,8 @@ from fsl.wrappers.misc import (fslreorient2std,
slicer
,
slicer
,
cluster
,
cluster
,
gps
)
gps
)
from
fsl.wrappers.standard_space_roi
import
standard_space_roi
from
fsl.wrappers.bianca
import
(
bianca
,
bianca_cluster_stats
,
bianca_overlap_measures
,
bianca_perivent_deep
,
make_bianca_mask
)
This diff is collapsed.
Click to expand it.
fsl/wrappers/flirt.py
+
43
−
0
View file @
c06ef973
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#
#
# Author: Sean Fitzgibbon <sean.fitzgibbon@ndcn.ox.ac.uk>
# Author: Sean Fitzgibbon <sean.fitzgibbon@ndcn.ox.ac.uk>
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
# Author: Fidel Alfaro Almagro <fidel.alfaroalmagro@ndcn.ox.ac.uk>
#
#
"""
This module provides wrapper functions for the FSL `FLIRT
"""
This module provides wrapper functions for the FSL `FLIRT
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT>`_ tool, and other related
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT>`_ tool, and other related
...
@@ -17,7 +18,9 @@ tools.
...
@@ -17,7 +18,9 @@ tools.
applyxfm4D
applyxfm4D
invxfm
invxfm
concatxfm
concatxfm
fixscaleskew
mcflirt
mcflirt
standard_space_roi
"""
"""
...
@@ -175,3 +178,43 @@ def mcflirt(infile, **kwargs):
...
@@ -175,3 +178,43 @@ def mcflirt(infile, **kwargs):
cmd
+=
wutils
.
applyArgStyle
(
'
-
'
,
argmap
=
argmap
,
valmap
=
valmap
,
**
kwargs
)
cmd
+=
wutils
.
applyArgStyle
(
'
-
'
,
argmap
=
argmap
,
valmap
=
valmap
,
**
kwargs
)
return
cmd
return
cmd
@wutils.fileOrImage
(
'
input
'
,
'
output
'
,
'
maskMASK
'
,
'
roiMASK
'
,
'
ssref
'
,
'
altinput
'
)
@wutils.fslwrapper
def
standard_space_roi
(
input
,
output
,
**
kwargs
):
"""
Wrapper for the ``standard_space_roi`` command.
Refer to the ``standard_space_roi`` command-line help for details on all
arguments.
"""
asrt
.
assertIsNifti
(
input
)
argmap
=
{
'
twod
'
:
'
2D
'
}
valmap
=
{
'
maskFOV
'
:
wutils
.
SHOW_IF_TRUE
,
'
maskNONE
'
:
wutils
.
SHOW_IF_TRUE
,
'
roiFOV
'
:
wutils
.
SHOW_IF_TRUE
,
'
roiNONE
'
:
wutils
.
SHOW_IF_TRUE
,
'
d
'
:
wutils
.
SHOW_IF_TRUE
,
'
b
'
:
wutils
.
SHOW_IF_TRUE
,
'
usesqform
'
:
wutils
.
SHOW_IF_TRUE
,
'
displayinit
'
:
wutils
.
SHOW_IF_TRUE
,
'
noresample
'
:
wutils
.
SHOW_IF_TRUE
,
'
forcescaling
'
:
wutils
.
SHOW_IF_TRUE
,
'
applyxfm
'
:
wutils
.
SHOW_IF_TRUE
,
'
nosearch
'
:
wutils
.
SHOW_IF_TRUE
,
'
noclamp
'
:
wutils
.
SHOW_IF_TRUE
,
'
noresampblur
'
:
wutils
.
SHOW_IF_TRUE
,
'
2D
'
:
wutils
.
SHOW_IF_TRUE
,
'
v
'
:
wutils
.
SHOW_IF_TRUE
}
cmd
=
[
'
standard_space_roi
'
,
input
,
output
]
cmd
+=
wutils
.
applyArgStyle
(
'
-
'
,
argmap
=
argmap
,
valmap
=
valmap
,
**
kwargs
)
return
cmd
This diff is collapsed.
Click to expand it.
fsl/wrappers/standard_space_roi.py
deleted
100644 → 0
+
0
−
62
View file @
805228a4
#!/usr/bin/env python
#
# standard_space_roi.py - Wrapper for the standard_space_roi command.
#
# Author: Fidel Alfaro Almagro
#
"""
This module provides the :func:`standard_space_roi` function, a wrapper for
the FSL `standard_space_roi`_ command.
"""
import
fsl.utils.assertions
as
asrt
from
.
import
wrapperutils
as
wutils
@wutils.fileOrImage
(
'
input
'
,
'
output
'
,
'
maskMASK
'
,
'
roiMASK
'
,
'
ssref
'
,
'
altinput
'
)
@wutils.fslwrapper
def
standard_space_roi
(
input
,
output
,
**
kwargs
):
"""
Wrapper for the ``standard_space_roi`` command.
:arg maskFOV: Mask output using transformed standard space FOV (default)
:arg maskMASK: Mask output using transformed standard space mask
:arg maskNONE: Do not mask output
:arg roiFOV: Cut down input FOV using bounding box of the transformed standard space FOV (default)
:arg roiMASK: Cut down input FOV using nonbackground bounding box of the transformed standard space mask
:arg roiNONE: Co not cut down input FOV
:arg ssref Standard space reference image to use (default $FSLDIR/data/standard/MNI152_T1)
:arg altinput Alternative input image to apply the ROI to (instead of the one used to register to the reference)
:arg d Debug (don
'
t delete intermediate files)
:arg b Betpremask, equivalent to: -maskMASK $FSLDIR/data/standard/MNI152_T1_2mm_brain_mask_dil -roiNONE
Refer to the ``standard_space_roi`` command-line help for details on all arguments.
"""
asrt
.
assertIsNifti
(
input
)
argmap
=
{
'
twod
'
:
'
2D
'
}
valmap
=
{
'
maskFOV
'
:
wutils
.
SHOW_IF_TRUE
,
'
maskNONE
'
:
wutils
.
SHOW_IF_TRUE
,
'
roiFOV
'
:
wutils
.
SHOW_IF_TRUE
,
'
roiNONE
'
:
wutils
.
SHOW_IF_TRUE
,
'
d
'
:
wutils
.
SHOW_IF_TRUE
,
'
b
'
:
wutils
.
SHOW_IF_TRUE
,
'
usesqform
'
:
wutils
.
SHOW_IF_TRUE
,
'
displayinit
'
:
wutils
.
SHOW_IF_TRUE
,
'
noresample
'
:
wutils
.
SHOW_IF_TRUE
,
'
forcescaling
'
:
wutils
.
SHOW_IF_TRUE
,
'
applyxfm
'
:
wutils
.
SHOW_IF_TRUE
,
'
nosearch
'
:
wutils
.
SHOW_IF_TRUE
,
'
noclamp
'
:
wutils
.
SHOW_IF_TRUE
,
'
noresampblur
'
:
wutils
.
SHOW_IF_TRUE
,
'
2D
'
:
wutils
.
SHOW_IF_TRUE
,
'
v
'
:
wutils
.
SHOW_IF_TRUE
}
cmd
=
[
'
standard_space_roi
'
,
input
,
output
]
cmd
+=
wutils
.
applyArgStyle
(
'
-
'
,
argmap
=
argmap
,
valmap
=
valmap
,
**
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