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
09e4d355
Verified
Commit
09e4d355
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Count EPI as single readout
parent
6ae11cdf
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
src/parts/epi_readouts.jl
+22
-1
22 additions, 1 deletion
src/parts/epi_readouts.jl
with
22 additions
and
1 deletion
src/parts/epi_readouts.jl
+
22
−
1
View file @
09e4d355
...
@@ -2,7 +2,8 @@ module EPIReadouts
...
@@ -2,7 +2,8 @@ module EPIReadouts
import
...
Containers
:
BaseSequence
,
get_index_single_TR
import
...
Containers
:
BaseSequence
,
get_index_single_TR
import
..
Trapezoids
:
Trapezoid
,
opposite_kspace_lines
,
LineReadout
import
..
Trapezoids
:
Trapezoid
,
opposite_kspace_lines
,
LineReadout
import
...
Components
:
ADC
import
...
Components
:
ADC
import
...
Variables
:
get_free_variable
,
VariableType
,
qval
,
qvec
,
set_simple_constraints!
,
resolution
,
inverse_voxel_size
,
inverse_fov
,
resolution
,
get_readout
,
apply_simple_constraint!
import
...
Variables
:
get_free_variable
,
VariableType
,
qval
,
qvec
,
set_simple_constraints!
,
resolution
,
inverse_voxel_size
,
inverse_fov
,
resolution
,
get_readout
,
apply_simple_constraint!
,
effective_time
import
...
Pathways
:
PathwayWalker
,
update_walker_till_time!
"""
"""
EPIReadout(resolution; ky_lines=-resolution[2]:resolution[2], recenter=false, group=:FOV, variables...)
EPIReadout(resolution; ky_lines=-resolution[2]:resolution[2], recenter=false, group=:FOV, variables...)
...
@@ -64,6 +65,13 @@ inverse_fov(epi::EPIReadout) = [inverse_fov(epi.positive_line), 1e3 * epi.ky_ste
...
@@ -64,6 +65,13 @@ inverse_fov(epi::EPIReadout) = [inverse_fov(epi.positive_line), 1e3 * epi.ky_ste
inverse_voxel_size
(
epi
::
EPIReadout
)
=
[
inverse_voxel_size
(
epi
.
positive_line
),
1e3
*
epi
.
ky_step
*
maximum
(
abs
.
(
epi
.
ky_lines
))]
inverse_voxel_size
(
epi
::
EPIReadout
)
=
[
inverse_voxel_size
(
epi
.
positive_line
),
1e3
*
epi
.
ky_step
*
maximum
(
abs
.
(
epi
.
ky_lines
))]
resolution
(
epi
::
EPIReadout
)
=
[
resolution
(
epi
.
positive_line
),
maximum
(
abs
.
(
epi
.
ky_lines
))]
resolution
(
epi
::
EPIReadout
)
=
[
resolution
(
epi
.
positive_line
),
maximum
(
abs
.
(
epi
.
ky_lines
))]
get_readout
(
epi
::
EPIReadout
)
=
epi
.
positive_line
get_readout
(
epi
::
EPIReadout
)
=
epi
.
positive_line
function
effective_time
(
epi
::
EPIReadout
)
index
=
findfirst
(
iszero
,
epi
.
ky_lines
)
if
isnothing
(
index
)
error
(
"EPI readout does not pass through the centre of k-space"
)
end
return
effective_time
(
epi
,
index
*
2
)
end
function
get_index_single_TR
(
epi
::
EPIReadout
,
index
::
Integer
)
function
get_index_single_TR
(
epi
::
EPIReadout
,
index
::
Integer
)
if
index
==
1
if
index
==
1
...
@@ -84,4 +92,17 @@ function get_index_single_TR(epi::EPIReadout, index::Integer)
...
@@ -84,4 +92,17 @@ function get_index_single_TR(epi::EPIReadout, index::Integer)
end
end
end
end
# overrides default pathway behaviour, so that EPI is counted as a single readout
function
walk_pathway!
(
epi
::
EPIReadout
,
walker
::
PathwayWalker
,
pulse_effects
::
Vector
{
Symbol
},
nreadout
::
Ref
{
Int
},
block_start_time
::
VariableType
)
if
length
(
pulse_effects
)
>
0
return
false
end
nreadout
[]
-=
1
if
nreadout
[]
>
0
return
false
end
update_walker_till_time!
(
walker
,
block_start_time
+
effective_time
(
epi
))
return
true
end
end
end
\ No newline at end of file
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