Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MRIBuilder.jl
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Michiel Cottaar
MRIBuilder.jl
Commits
9cbd064b
Verified
Commit
9cbd064b
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Fix trapezoid type name
parent
3b3c4de5
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
src/helper_functions.jl
+6
-6
6 additions, 6 deletions
src/helper_functions.jl
with
6 additions
and
6 deletions
src/helper_functions.jl
+
6
−
6
View file @
9cbd064b
...
@@ -67,7 +67,7 @@ function excitation_pulse(; flip_angle=90, phase=0., frequency=0., shape=:sinc,
...
@@ -67,7 +67,7 @@ function excitation_pulse(; flip_angle=90, phase=0., frequency=0., shape=:sinc,
end
end
seq
=
Sequence
(
seq
=
Sequence
(
grad
,
grad
,
Trapezoid
Gradient
(
orientation
=
[
0
,
0
,
-
1.
],
ro
tate
=
rotate_grad
,
duration
=:
min
);
Trapezoid
(
orientation
=
[
0
,
0
,
-
1.
],
g
ro
up
=:
FOV
,
duration
=:
min
);
TR
=
Inf
TR
=
Inf
)
)
@constraint
global_model
()
qvec
(
grad
,
1
,
nothing
)[
3
]
==
-
qvec
(
seq
[
2
])[
3
]
@constraint
global_model
()
qvec
(
grad
,
1
,
nothing
)[
3
]
==
-
qvec
(
seq
[
2
])[
3
]
...
@@ -116,12 +116,12 @@ function refocus_pulse(; flip_angle=180, phase=0., frequency=0., shape=:sinc, sl
...
@@ -116,12 +116,12 @@ function refocus_pulse(; flip_angle=180, phase=0., frequency=0., shape=:sinc, sl
if
isinf
(
slice_thickness
)
if
isinf
(
slice_thickness
)
return
pulse
return
pulse
else
else
return
Trapezoid
Gradient
(
pulse
=
pulse
,
duration
=:
min
,
slice_thickness
=
[
Inf
,
Inf
,
slice_thickness
],
orientation
=
[
0
,
0
,
1.
],
rotate
=
rotate_grad
)
return
Trapezoid
(
pulse
=
pulse
,
duration
=:
min
,
slice_thickness
=
[
Inf
,
Inf
,
slice_thickness
],
orientation
=
[
0
,
0
,
1.
],
rotate
=
rotate_grad
)
end
end
else
else
orientation
=
isnothing
(
rotate_grad
)
?
[
1
,
1
,
1
]
:
[
0
,
0
,
1
]
orientation
=
isnothing
(
rotate_grad
)
?
[
1
,
1
,
1
]
:
[
0
,
0
,
1
]
if
isinf
(
slice_thickness
)
if
isinf
(
slice_thickness
)
grad
=
Trapezoid
Gradient
(
orientation
=
orientation
,
duration
=:
min
,
rotate
=
rotate_grad
)
grad
=
Trapezoid
(
orientation
=
orientation
,
duration
=:
min
,
rotate
=
rotate_grad
)
@constraint
global_model
()
qvec
(
grad
)[
3
]
==
2
π
*
1e-3
/
spoiler
@constraint
global_model
()
qvec
(
grad
)[
3
]
==
2
π
*
1e-3
/
spoiler
return
Sequence
(
grad
,
pulse
,
grad
;
TR
=
Inf
)
return
Sequence
(
grad
,
pulse
,
grad
;
TR
=
Inf
)
else
else
...
@@ -201,11 +201,11 @@ function cartesian_readout(start_lines, readout_lines, fov, resolution_x; scanne
...
@@ -201,11 +201,11 @@ function cartesian_readout(start_lines, readout_lines, fov, resolution_x; scanne
(
pos_line
,
neg_line
)
=
opposite_kspace_lines
(;
rotate
=:
FOV
,
fov
=
fov
[
1
],
resolution
=
resolution_x
,
kwargs
...
)
(
pos_line
,
neg_line
)
=
opposite_kspace_lines
(;
rotate
=:
FOV
,
fov
=
fov
[
1
],
resolution
=
resolution_x
,
kwargs
...
)
ky
=
@.
start_lines
*
1e-3
/
fov
[
2
]
ky
=
@.
start_lines
*
1e-3
/
fov
[
2
]
if
length
(
start_lines
)
==
1
if
length
(
start_lines
)
==
1
prepare_kspace
=
Trapezoid
Gradient
(
rotate
=:
FOV
,
duration
=:
min
,
qvec
=
[
-
qvec
(
pos_line
,
nothing
,
1
)[
1
],
ky
[
1
],
0.
])
prepare_kspace
=
Trapezoid
(
rotate
=:
FOV
,
duration
=:
min
,
qvec
=
[
-
qvec
(
pos_line
,
nothing
,
1
)[
1
],
ky
[
1
],
0.
])
else
else
prepare_kspace
=
AlternativeBlocks
(
prepare_kspace
=
AlternativeBlocks
(
:
readout_segment
,
:
readout_segment
,
[
Trapezoid
Gradient
(
rotate
=:
FOV
,
duration
=:
min
,
qvec
=
[
-
qvec
(
pos_line
,
nothing
,
1
)[
1
],
ky_prep
,
0.
])
for
ky_prep
in
ky
]
[
Trapezoid
(
rotate
=:
FOV
,
duration
=:
min
,
qvec
=
[
-
qvec
(
pos_line
,
nothing
,
1
)[
1
],
ky_prep
,
0.
])
for
ky_prep
in
ky
]
)
)
match_blocks!
(
prepare_kspace
,
flat_time
)
match_blocks!
(
prepare_kspace
,
flat_time
)
match_blocks!
(
prepare_kspace
,
rise_time
)
match_blocks!
(
prepare_kspace
,
rise_time
)
...
@@ -213,7 +213,7 @@ function cartesian_readout(start_lines, readout_lines, fov, resolution_x; scanne
...
@@ -213,7 +213,7 @@ function cartesian_readout(start_lines, readout_lines, fov, resolution_x; scanne
steps
=
(
readout_lines
[
2
:
end
]
-
readout_lines
[
1
:
end
-
1
])
steps
=
(
readout_lines
[
2
:
end
]
-
readout_lines
[
1
:
end
-
1
])
blips
=
Dict
(
blips
=
Dict
(
s
=>
Trapezoid
Gradient
(
orientation
=
[
0
,
1
,
0
],
rotate
=:
FOV
,
duration
=:
min
)
s
=>
Trapezoid
(
orientation
=
[
0
,
1
,
0
],
rotate
=:
FOV
,
duration
=:
min
)
for
s
in
steps
for
s
in
steps
)
)
for
(
s
,
trap
)
in
blips
for
(
s
,
trap
)
in
blips
...
...
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