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
50e4e04d
Commit
50e4e04d
authored
9 months ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
ENH,BF: add accessors to FEATImage class, fix zfstats accessor
parent
0aeeabd9
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/data/featimage.py
+30
-12
30 additions, 12 deletions
fsl/data/featimage.py
with
30 additions
and
12 deletions
fsl/data/featimage.py
+
30
−
12
View file @
50e4e04d
...
...
@@ -94,6 +94,7 @@ class FEATImage(fslimage.Image):
self
.
__zstats
=
[
None
]
*
self
.
numContrasts
()
self
.
__zfstats
=
[
None
]
*
self
.
numFTests
()
self
.
__clustMasks
=
[
None
]
*
self
.
numContrasts
()
self
.
__fclustMasks
=
[
None
]
*
self
.
numFTests
()
if
'
name
'
not
in
kwargs
:
self
.
name
=
f
'
{
self
.
__analysisName
}
:
{
self
.
name
}
'
...
...
@@ -101,13 +102,14 @@ class FEATImage(fslimage.Image):
def
__del__
(
self
):
"""
Clears references to any loaded images.
"""
self
.
__design
=
None
self
.
__residuals
=
None
self
.
__pes
=
None
self
.
__copes
=
None
self
.
__zstats
=
None
self
.
__zfstats
=
None
self
.
__clustMasks
=
None
self
.
__design
=
None
self
.
__residuals
=
None
self
.
__pes
=
None
self
.
__copes
=
None
self
.
__zstats
=
None
self
.
__zfstats
=
None
self
.
__clustMasks
=
None
self
.
__fclustMasks
=
None
def
getFEATDir
(
self
):
...
...
@@ -224,14 +226,16 @@ class FEATImage(fslimage.Image):
return
featanalysis
.
getThresholds
(
self
.
__settings
)
def
clusterResults
(
self
,
contrast
):
"""
Returns the clusters found in the analysis.
def
clusterResults
(
self
,
contrast
,
ftest
=
False
):
"""
Returns the clusters found in the analysis for the specified
contrast or f-test.
See :func:.featanalysis.loadClusterResults`
"""
return
featanalysis
.
loadClusterResults
(
self
.
__featDir
,
self
.
__settings
,
contrast
)
contrast
,
ftest
)
def
getPE
(
self
,
ev
):
...
...
@@ -289,9 +293,9 @@ class FEATImage(fslimage.Image):
if
self
.
__zfstats
[
ftest
]
is
None
:
zfile
=
featanalysis
.
getZFStatFile
(
self
.
__featDir
,
ftest
)
self
.
__zstats
[
con
]
=
fslimage
.
Image
(
self
.
__z
f
stats
[
ftest
]
=
fslimage
.
Image
(
zfile
,
name
=
f
'
{
self
.
__analysisName
}
: zfstat
{
con
+
1
}
'
)
name
=
f
'
{
self
.
__analysisName
}
: zfstat
{
ftest
+
1
}
'
)
return
self
.
__zfstats
[
ftest
]
...
...
@@ -310,6 +314,20 @@ class FEATImage(fslimage.Image):
return
self
.
__clustMasks
[
con
]
def
getFClusterMask
(
self
,
ftest
):
"""
Returns the cluster mask image for the given f-test (0-indexed).
"""
if
self
.
__fclustMasks
[
ftest
]
is
None
:
mfile
=
featanalysis
.
getFClusterMaskFile
(
self
.
__featDir
,
ftest
)
self
.
__fclustMasks
[
ftest
]
=
fslimage
.
Image
(
mfile
,
name
=
f
'
{
self
.
__analysisName
}
: cluster mask
'
f
'
for zfstat
{
ftest
+
1
}
'
)
return
self
.
__fclustMasks
[
ftest
]
def
fit
(
self
,
contrast
,
xyz
):
"""
Calculates the model fit for the given contrast vector
at the given voxel. See the :func:`modelFit` function.
...
...
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