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
00a64d03
Commit
00a64d03
authored
8 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Updates to featimage docs. Clarification/fix to featanalysis.isFEATImage
parent
e6b2518e
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/data/featanalysis.py
+6
-0
6 additions, 0 deletions
fsl/data/featanalysis.py
fsl/data/featimage.py
+8
-13
8 additions, 13 deletions
fsl/data/featimage.py
with
14 additions
and
13 deletions
fsl/data/featanalysis.py
+
6
−
0
View file @
00a64d03
...
@@ -61,6 +61,12 @@ def isFEATImage(path):
...
@@ -61,6 +61,12 @@ def isFEATImage(path):
"""
Returns ``True`` if the given path looks like it is the input data to
"""
Returns ``True`` if the given path looks like it is the input data to
a FEAT analysis, ``False`` otherwise.
a FEAT analysis, ``False`` otherwise.
"""
"""
try
:
path
=
fslimage
.
addExt
(
path
,
mustExist
=
True
)
except
:
return
False
dirname
=
op
.
dirname
(
path
)
dirname
=
op
.
dirname
(
path
)
filename
=
op
.
basename
(
path
)
filename
=
op
.
basename
(
path
)
...
...
This diff is collapsed.
Click to expand it.
fsl/data/featimage.py
+
8
−
13
View file @
00a64d03
...
@@ -18,7 +18,7 @@ from . import featanalysis
...
@@ -18,7 +18,7 @@ from . import featanalysis
class
FEATImage
(
fslimage
.
Image
):
class
FEATImage
(
fslimage
.
Image
):
"""
An ``Image`` from a FEAT analysis.
"""
An ``Image``
which contains the input data
from a FEAT analysis.
The :class:`FEATImage` class makes use of the functions defined in the
The :class:`FEATImage` class makes use of the functions defined in the
:mod:`.featanalysis` module.
:mod:`.featanalysis` module.
...
@@ -29,14 +29,14 @@ class FEATImage(fslimage.Image):
...
@@ -29,14 +29,14 @@ class FEATImage(fslimage.Image):
import fsl.data.featimage as featimage
import fsl.data.featimage as featimage
# You can pass in the name of the
# You can pass in the name of the
# .feat directory, or
any
fil
e
# .feat directory, or
the
fil
tered_func_data
# contained within that directory.
#
file
contained within that directory.
img = featimage.FEATImage(
'
myanalysis.feat/filtered_func_data.nii.gz
'
)
img = featimage.FEATImage(
'
myanalysis.feat/filtered_func_data.nii.gz
'
)
# Query information about the FEAT analysis
# Query information about the FEAT analysis
print
img.numEVs()
print
(
img.numEVs()
)
print
img.contrastNames()
print
(
img.contrastNames()
)
print
img.numPoints()
print
(
img.numPoints()
)
# Get the model fit residuals
# Get the model fit residuals
res4d = img.getResiduals()
res4d = img.getResiduals()
...
@@ -52,15 +52,10 @@ class FEATImage(fslimage.Image):
...
@@ -52,15 +52,10 @@ class FEATImage(fslimage.Image):
def
__init__
(
self
,
path
,
**
kwargs
):
def
__init__
(
self
,
path
,
**
kwargs
):
"""
Create a ``FEATImage`` instance.
"""
Create a ``FEATImage`` instance.
:arg path: A FEAT analysis directory, or a
n
image file
contained
:arg path: A FEAT analysis directory, or
the input dat
a image file
within such a directory.
contained
within such a directory.
:arg kwargs: Passed to the :class:`.Image` constructor.
:arg kwargs: Passed to the :class:`.Image` constructor.
.. note:: If a FEAT directory is passed in for the ``path``
argument, this ``FEATImage`` instance will encapsulate
the model input data, typically called
``<directory>.feat/filtered_func_data.nii.gz``.
"""
"""
if
op
.
isdir
(
path
):
if
op
.
isdir
(
path
):
...
...
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