Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
film
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
film
Commits
19a32668
Commit
19a32668
authored
18 years ago
by
Christian Beckmann
Browse files
Options
Downloads
Patches
Plain Diff
changes to ftoz and ttoz to allow for voxel-specific dofs
parent
a17b92cb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ftoz.cc
+25
-5
25 additions, 5 deletions
ftoz.cc
ttoz.cc
+14
-5
14 additions, 5 deletions
ttoz.cc
with
39 additions
and
10 deletions
ftoz.cc
+
25
−
5
View file @
19a32668
...
...
@@ -10,6 +10,7 @@
#include
<fstream>
#define WANT_STREAM
#define WANT_MATH
#include
"fslio/fslio.h"
#include
"newmatap.h"
#include
"newmatio.h"
...
...
@@ -26,8 +27,8 @@ using namespace MISCMATHS;
class
globaloptions
{
public:
string
fsfname
;
in
t
dof1
;
in
t
dof2
;
str
in
g
dof
file
1
;
str
in
g
dof
file
2
;
string
zscoresfname
;
public:
...
...
@@ -73,9 +74,9 @@ void parse_command_line(int argc, char* argv[])
if
(
inp
==
1
)
globalopts
.
fsfname
=
arg
;
else
if
(
inp
==
2
)
globalopts
.
dof1
=
atoi
(
argv
[
n
]
)
;
globalopts
.
dof
file
1
=
argv
[
n
];
else
if
(
inp
==
3
)
globalopts
.
dof2
=
atoi
(
argv
[
n
]
)
;
globalopts
.
dof
file
2
=
argv
[
n
];
else
{
cerr
<<
"Mismatched argument "
<<
arg
<<
endl
;
...
...
@@ -126,8 +127,27 @@ int main(int argc,char *argv[])
int
numTS
=
fs
.
Nrows
();
cerr
<<
numTS
<<
endl
;
Volume
dof1
,
dof2
;
if
(
FslFileExists
(
globalopts
.
doffile1
.
c_str
())){
//dof1 is avw file
dof1
.
read
(
globalopts
.
doffile1
);
}
else
{
dof1
=
fs
;
dof1
=
atof
(
globalopts
.
doffile1
.
c_str
());
}
if
(
FslFileExists
(
globalopts
.
doffile2
.
c_str
())){
//dof2 is avw file
dof2
.
read
(
globalopts
.
doffile2
);
}
else
{
dof2
=
fs
;
dof2
=
atof
(
globalopts
.
doffile2
.
c_str
());
}
Volume
zs
(
numTS
);
F2z
::
ComputeFStats
(
fs
,
globalopts
.
dof1
,
globalopts
.
dof2
,
zs
);
F2z
::
ComputeFStats
(
fs
,
dof1
,
dof2
,
zs
);
VolumeInfo
volinfo
=
fs
.
getInfo
();
volinfo
.
intent_code
=
NIFTI_INTENT_ZSCORE
;
...
...
This diff is collapsed.
Click to expand it.
ttoz.cc
+
14
−
5
View file @
19a32668
...
...
@@ -10,6 +10,7 @@
#include
<fstream>
#define WANT_STREAM
#define WANT_MATH
#include
"fslio/fslio.h"
#include
"newmatap.h"
#include
"newmatio.h"
...
...
@@ -28,7 +29,7 @@ class globaloptions {
public:
string
varsfname
;
string
cbsfname
;
in
t
dof
;
str
in
g
dof
file
;
string
zscoresfname
;
public:
...
...
@@ -76,7 +77,7 @@ void parse_command_line(int argc, char* argv[])
else
if
(
inp
==
2
)
globalopts
.
cbsfname
=
arg
;
else
if
(
inp
==
3
)
globalopts
.
dof
=
atoi
(
argv
[
n
])
;
globalopts
.
dof
file
=
arg
;
else
{
cerr
<<
"Mismatched argument "
<<
arg
<<
endl
;
...
...
@@ -121,15 +122,23 @@ int main(int argc,char *argv[])
try
{
parse_command_line
(
argc
,
argv
);
Volume
vars
,
cbs
;
Volume
vars
,
cbs
,
dofs
;
vars
.
read
(
globalopts
.
varsfname
.
c_str
());
cbs
.
read
(
globalopts
.
cbsfname
.
c_str
());
int
numTS
=
vars
.
Nrows
();
cerr
<<
numTS
<<
endl
;
// cerr << numTS << endl;
if
(
FslFileExists
(
globalopts
.
doffile
.
c_str
())){
//dof1 is avw file
dofs
.
read
(
globalopts
.
doffile
);
}
else
{
dofs
=
vars
;
dofs
=
atof
(
globalopts
.
doffile
.
c_str
());
}
Volume
zs
(
numTS
);
T2z
::
ComputeZStats
(
vars
,
cbs
,
globalopts
.
dof
,
zs
);
T2z
::
ComputeZStats
(
vars
,
cbs
,
dof
s
,
zs
);
VolumeInfo
volinfo
=
vars
.
getInfo
();
volinfo
.
intent_code
=
NIFTI_INTENT_ZSCORE
;
...
...
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