Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
melodic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
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
melodic
Commits
04635c65
Commit
04635c65
authored
15 years ago
by
Christian Beckmann
Browse files
Options
Downloads
Patches
Plain Diff
added full data normalisation
parent
1792d54d
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_glm.cc
+14
-11
14 additions, 11 deletions
fsl_glm.cc
with
14 additions
and
11 deletions
fsl_glm.cc
+
14
−
11
View file @
04635c65
...
...
@@ -22,8 +22,8 @@ using namespace std;
// The two strings below specify the title and example usage that is
// printed out as the help or usage message
string
title
=
string
(
"fsl_glm (Version 1.
05
)"
)
+
string
(
"
\n
Copyright(c) 2004-200
8
, University of Oxford (Christian F. Beckmann)
\n
"
)
+
string
title
=
string
(
"fsl_glm (Version 1.
1
)"
)
+
string
(
"
\n
Copyright(c) 2004-200
9
, University of Oxford (Christian F. Beckmann)
\n
"
)
+
string
(
"
\n
Simple GLM usign ordinary least-squares (OLS) regression on
\n
"
)
+
string
(
" time courses and/or 3D/4D imges against time courses
\n
"
)
+
string
(
" or 3D/4D images
\n\n
"
);
...
...
@@ -54,6 +54,9 @@ using namespace std;
Option
<
bool
>
normdes
(
string
(
"--des_norm"
),
FALSE
,
string
(
"switch on normalisation of the design matrix columns to unit std. deviation"
),
false
,
no_argument
);
Option
<
bool
>
normdat
(
string
(
"--dat_norm"
),
FALSE
,
string
(
"switch on normalisation of the data time series to unit std. deviation"
),
false
,
no_argument
);
Option
<
bool
>
perfvn
(
string
(
"--vn"
),
FALSE
,
string
(
" perform MELODIC variance-normalisation on data"
),
false
,
no_argument
);
...
...
@@ -161,14 +164,17 @@ int setup(){
data
=
tmpdata
.
matrix
(
mask
);
voxels
=
data
.
Ncols
();
if
(
perf_demean
.
value
())
data
=
remmean
(
data
,
1
);
if
(
perfvn
.
value
())
vnscales
=
Melodic
::
varnorm
(
data
);
}
else
data
=
read_ascii_matrix
(
fnin
.
value
());
if
(
perf_demean
.
value
())
data
=
remmean
(
data
,
1
);
if
(
perfvn
.
value
())
vnscales
=
Melodic
::
varnorm
(
data
);
if
(
normdat
.
value
())
data
=
SP
(
data
,
ones
(
data
.
Nrows
(),
1
)
*
pow
(
stdev
(
data
,
1
),
-
1
));
if
(
fsl_imageexists
(
fndesign
.
value
())){
//read design
volume4D
<
float
>
tmpdata
;
read_volume4D
(
tmpdata
,
fndesign
.
value
());
...
...
@@ -183,11 +189,7 @@ int setup(){
}
meanR
=
mean
(
data
,
1
);
if
(
perf_demean
.
value
()){
data
=
remmean
(
data
,
1
);
design
=
remmean
(
design
,
1
);
}
if
(
perf_demean
.
value
()){
if
(
normdes
.
value
())
design
=
SP
(
design
,
ones
(
design
.
Nrows
(),
1
)
*
pow
(
stdev
(
design
,
1
),
-
1
));
...
...
@@ -256,6 +258,7 @@ int main(int argc,char *argv[]){
options
.
add
(
fnftest
);
options
.
add
(
dofset
);
options
.
add
(
normdes
);
options
.
add
(
normdat
);
options
.
add
(
perfvn
);
options
.
add
(
perf_demean
);
options
.
add
(
help
);
...
...
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