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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Evan Edmond
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
No related tags found
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):
...
@@ -151,24 +151,39 @@ class FEATFSFDesign(object):
if
len
(
self
.
__evs
)
!=
self
.
__numEVs
:
if
len
(
self
.
__evs
)
!=
self
.
__numEVs
:
raise
FSFError
(
'
Number of EVs does not match design.mat
'
)
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
):
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
design
=
np
.
array
(
self
.
__design
)
# return the design
pass
for
ev
in
self
.
__evs
:
def
getVoxelEVFile
(
self
,
idx
):
if
not
isinstance
(
ev
,
(
VoxelwiseEV
,
VoxelwiseConfoundEV
)
):
return
self
.
__evs
[
idx
].
filenam
e
continu
e
if
ev
.
image
is
None
:
def
getVoxelConfoundFile
(
self
,
idx
):
log
.
warning
(
'
Voxel EV image missing
'
return
self
.
__evs
[
idx
].
filename
'
for ev {}
'
.
format
(
ev
.
index
))
design
[:,
ev
.
index
]
=
ev
.
image
.
data
[
x
,
y
,
z
,
:]
return
design
class
EV
(
object
):
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