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
87a5537f
Commit
87a5537f
authored
8 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
getDesign method implemented, and untested.
parent
15f69c0d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/featdesign.py
+25
-10
25 additions, 10 deletions
fsl/data/featdesign.py
with
25 additions
and
10 deletions
fsl/data/featdesign.py
+
25
−
10
View file @
87a5537f
...
...
@@ -151,24 +151,39 @@ class FEATFSFDesign(object):
if
len
(
self
.
__evs
)
!=
self
.
__numEVs
:
raise
FSFError
(
'
Number of EVs does not match design.mat
'
)
# Load the voxelwise images now,
# so they're ready to be used by
# the getDesign method.
for
ev
in
self
.
__evs
:
if
not
isinstance
(
ev
,
(
VoxelwiseEV
,
VoxelwiseConfoundEV
)):
continue
# The path to some voxelwise
# EVs may not be present -
# see the VoxelwisEV class.
if
ev
.
filename
is
not
None
:
ev
.
image
=
fslimage
.
Image
(
ev
.
filename
)
else
:
ev
.
image
=
None
def
getDesign
(
self
,
x
,
y
,
z
):
"""
Returns the design matrix for the specified voxel.
"""
"""
Returns the design matrix for the specified voxel.
"""
# if no vox EVs, just
# return the design
pass
design
=
np
.
array
(
self
.
__design
)
for
ev
in
self
.
__evs
:
def
getVoxelEVFile
(
self
,
idx
):
return
self
.
__evs
[
idx
].
filenam
e
if
not
isinstance
(
ev
,
(
VoxelwiseEV
,
VoxelwiseConfoundEV
)
):
continu
e
def
getVoxelConfoundFile
(
self
,
idx
):
return
self
.
__evs
[
idx
].
filename
if
ev
.
image
is
None
:
log
.
warning
(
'
Voxel EV image missing
'
'
for ev {}
'
.
format
(
ev
.
index
))
design
[:,
ev
.
index
]
=
ev
.
image
.
data
[
x
,
y
,
z
,
:]
return
design
class
EV
(
object
):
...
...
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