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
607cafee
Commit
607cafee
authored
13 years ago
by
Matthew Webster
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
5d7f2f33
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_glm.cc
+20
-15
20 additions, 15 deletions
fsl_glm.cc
with
20 additions
and
15 deletions
fsl_glm.cc
+
20
−
15
View file @
607cafee
...
...
@@ -24,9 +24,7 @@ using namespace std;
string
title
=
string
(
"fsl_glm (Version 1.1)"
)
+
string
(
"
\n
Copyright(c) 2004-2009, 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"
);
string
(
"
\n
Simple GLM allowing temporal or spatial regression on either text data or images
\n
"
);
string
examples
=
"fsl_glm -i <input> -d <design> -o <output> [options]"
;
//Command line Options {
...
...
@@ -37,7 +35,7 @@ using namespace std;
string
(
"output file name for GLM parameter estimates (GLM betas)"
),
false
,
requires_argument
);
Option
<
string
>
fndesign
(
string
(
"-d,--design"
),
string
(
""
),
string
(
"file name of the GLM design matrix (time courses or
spatial maps
)"
),
string
(
"file name of the GLM design matrix (
text
time courses
f
or
temporal regression or an image file for spatial regression
)"
),
false
,
requires_argument
);
Option
<
string
>
fnmask
(
string
(
"-m,--mask"
),
string
(
""
),
string
(
"mask image file name if input is image"
),
...
...
@@ -167,7 +165,7 @@ int setup(int &dof){
if
(
!
samesize
(
tmpdata
[
0
],
mask
)){
cerr
<<
"ERROR: Mask image does not match input image"
<<
endl
;
return
1
;
};
};
}
else
{
if
(
debug
.
value
())
cout
<<
"Creating mask image"
<<
endl
;
...
...
@@ -186,7 +184,7 @@ int setup(int &dof){
}
}
else
data
=
read_ascii_matrix
(
fnin
.
value
());
data
=
read_ascii_matrix
(
fnin
.
value
());
if
(
fsl_imageexists
(
fndesign
.
value
())){
//read design
if
(
debug
.
value
())
...
...
@@ -205,8 +203,17 @@ int setup(int &dof){
design
=
read_ascii_matrix
(
fndesign
.
value
());
}
dof
=
(
int
)
ols_dof
(
design
);
cerr
<<
data
<<
endl
<<
design
<<
endl
;
if
(
perf_demean
.
value
()
)
{
if
(
debug
.
value
())
cout
<<
"De-meaning the data matrix"
<<
endl
;
data
=
remmean
(
data
,
1
);
}
dof
=
ols_dof
(
design
);
Matrix
baseConfounds
;
if
(
textConfounds
.
set
()
)
{
baseConfounds
=
read_ascii_matrix
(
textConfounds
.
value
().
at
(
0
)
);
for
(
unsigned
int
i
=
1
;
i
<
textConfounds
.
value
().
size
();
i
++
)
...
...
@@ -238,14 +245,6 @@ int setup(int &dof){
dof
-=
confounds
.
size
();
}
if
(
perf_demean
.
value
()){
if
(
debug
.
value
())
cout
<<
"De-meaning the data matrix"
<<
endl
;
data
=
remmean
(
data
,
1
);
dof
-=
1
;
}
if
(
normdat
.
value
()){
if
(
debug
.
value
())
cout
<<
"Normalising data matrix to unit std-deviation"
<<
endl
;
...
...
@@ -253,11 +252,17 @@ int setup(int &dof){
}
meanR
=
mean
(
data
,
1
);
if
(
perf_demean
.
value
()){
if
(
debug
.
value
())
cout
<<
"De-meaning design matrix"
<<
endl
;
design
=
remmean
(
design
,
1
);
dof
-=
1
;
}
cerr
<<
data
<<
endl
<<
design
<<
endl
;
if
(
normdes
.
value
()){
if
(
debug
.
value
())
cout
<<
"Normalising design matrix to unit std-deviation"
<<
endl
;
...
...
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