Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
slicetimer
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
slicetimer
Commits
c6aa5f78
Commit
c6aa5f78
authored
15 years ago
by
Matthew Webster
Browse files
Options
Downloads
Patches
Plain Diff
should now be working correctly
parent
b87f159a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
slicetimer.cc
+11
-11
11 additions, 11 deletions
slicetimer.cc
with
11 additions
and
11 deletions
slicetimer.cc
+
11
−
11
View file @
c6aa5f78
/* slicetimer.cc - FMRIB's Slice Timing Utility
Peter Bannister
and
Stephen Smith, FMRIB Image Analysis Group
Peter Bannister
,
Stephen Smith
and Matthew Webster
, FMRIB Image Analysis Group
Copyright (C) 2001-200
3
University of Oxford */
Copyright (C) 2001-200
9
University of Oxford */
/* CCOPYRIGHT */
...
...
@@ -28,7 +28,7 @@ using namespace NEWMAT;
using
namespace
NEWIMAGE
;
using
namespace
Utilities
;
string
title
=
"slicetimer (Version 1.
8
)
\n
FMRIB's Interpolation for Slice Timing
\n
Copyright(c) 2001-200
2
, University of Oxford"
;
string
title
=
"slicetimer (Version 1.
9
)
\n
FMRIB's Interpolation for Slice Timing
\n
Copyright(c) 2001-200
9
, University of Oxford"
;
string
examples
=
"slicetimer -i <timeseries> [-o <corrected_timeseries>] [options]
\n
"
;
Option
<
bool
>
help
(
string
(
"-h,--help"
),
false
,
...
...
@@ -50,10 +50,10 @@ Option<string> outputname(string("-o,--out"), string(""),
string
(
"filename of output timeseries"
),
false
,
requires_argument
);
Option
<
string
>
tcustom
(
string
(
"--tcustom"
),
string
(
""
),
string
(
"filename of single-column slice timings, in fractions of TR,
range 0:1 (default is 0.5 = no shift)
"
),
string
(
"filename of single-column slice timings, in fractions of TR,
+ve values shift slices forwards in time.
"
),
false
,
requires_argument
);
Option
<
float
>
tglobal
(
string
(
"--tglobal"
),
0
.5
,
string
(
"global shift in fraction of TR,
range 0:1
(default is 0
.5 = no shift
)"
),
Option
<
float
>
tglobal
(
string
(
"--tglobal"
),
0
,
string
(
"global shift in fraction of TR, (default is 0)"
),
false
,
requires_argument
);
Option
<
string
>
ocustom
(
string
(
"--ocustom"
),
string
(
""
),
string
(
"filename of single-column custom interleave order file (first slice is referred to as 1 not 0)"
),
...
...
@@ -113,9 +113,9 @@ int do_slice_correction()
for
(
int
slice
=
1
;
slice
<=
no_slices
;
slice
++
)
{
if
(
tglobal
.
set
())
{
offset
=
0.5
-
tglobal
.
value
();
offset
=
tglobal
.
value
();
}
else
if
(
tcustom
.
set
())
{
offset
=
0.5
-
timings
(
slice
,
1
);
offset
=
timings
(
slice
,
1
);
}
else
if
(
ocustom
.
set
())
{
int
local_count
=
1
;
while
(
local_count
<=
no_slices
)
{
...
...
@@ -142,7 +142,7 @@ int do_slice_correction()
ColumnVector
interpseries
=
voxeltimeseries
;
for
(
int
time_step
=
1
;
time_step
<=
no_volumes
;
time_step
++
){
// interpseries(time_step) = interpolate_1d(voxeltimeseries, time_step - offset);
interpseries
(
time_step
)
=
kernelinterpolation_1d
(
voxeltimeseries
,
time_step
-
offset
,
userkernel
,
7
);
interpseries
(
time_step
)
=
kernelinterpolation_1d
(
voxeltimeseries
,
time_step
+
offset
,
userkernel
,
7
);
}
timeseries
.
setvoxelts
(
interpseries
,
x_pos
,
y_pos
,
slice
-
1
);
}
...
...
@@ -151,8 +151,8 @@ int do_slice_correction()
cerr
<<
"Slice "
<<
slice
<<
" offset "
<<
offset
<<
endl
;
}
if
(
direction
.
value
()
==
1
)
timeseries
.
swapdimensions
(
3
,
2
,
1
);
// reverse Flip z and x
if
(
direction
.
value
()
==
2
)
timeseries
.
swapdimensions
(
1
,
3
,
2
);
// reverse Flip z and y
if
(
direction
.
value
()
==
1
)
timeseries
.
swapdimensions
(
3
,
2
,
1
);
// reverse Flip z and x
if
(
direction
.
value
()
==
2
)
timeseries
.
swapdimensions
(
1
,
3
,
2
);
// reverse Flip z and y
save_volume4D
(
timeseries
,
outputname
.
value
());
return
0
;
...
...
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