Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motion Phantom #184

Merged
merged 346 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
346 commits
Select commit Hold shift + click to select a range
21dd32c
Remove `ExplicitArbitraryMotion`
pvillacorta Jan 10, 2024
18e9331
Adapted simulation funcions, add NVTX macros
pvillacorta Jan 10, 2024
07923a2
IO functions: solved datatype and package bugs
pvillacorta Jan 10, 2024
0c2dd47
Add ´PlotlyJS´ before `heatmap` call
pvillacorta Jan 10, 2024
017f86e
Add nvtx_test.jl file for profiling
pvillacorta Jan 10, 2024
d690330
Merge branch 'master' into new-phantom-parallel
pvillacorta Jan 12, 2024
5cdc347
Test change
pvillacorta Jan 12, 2024
c1d4138
Solve PulseDesigner bug
pvillacorta Jan 12, 2024
84c34e0
Solve double `default_sim_params` definition
pvillacorta Jan 12, 2024
420578a
Solved some differences with master
pvillacorta Jan 12, 2024
9c10e68
Deleted unused arguments
pvillacorta Jan 12, 2024
93b1e63
Update .gitignore
pvillacorta Jan 12, 2024
a62a345
Deleted nifti maps (big files)
pvillacorta Jan 12, 2024
b265469
Merge branch 'new-phantom-parallel' of https://github.com/pvillacorta…
pvillacorta Jan 12, 2024
173652a
Move `lit-05-MotionSimulation.jl`
pvillacorta Jan 12, 2024
4e78032
Delete KomaMRIBase dependency for dev
pvillacorta Jan 12, 2024
102cfc0
Improve nvtx_test.jl
pvillacorta Feb 5, 2024
76260d4
SimpleMotion types
pvillacorta Feb 5, 2024
927d731
`axis_angle` function
pvillacorta Feb 6, 2024
a1b0f79
Rotation motion
pvillacorta Feb 6, 2024
9627eb0
`get_displacements` -> `get_positions`
pvillacorta Feb 7, 2024
c1a1ad3
Declare types
pvillacorta Feb 7, 2024
e5e463d
Change to EPI sequence
pvillacorta Feb 7, 2024
89f52b5
Rotation Simple Motion Type
pvillacorta Feb 7, 2024
af2fd8a
Delete transformation to vector
pvillacorta Feb 7, 2024
fd55f26
Test
pvillacorta Feb 7, 2024
07be38c
Test
pvillacorta Feb 7, 2024
3a82e76
Test
pvillacorta Feb 7, 2024
fa9721d
Test
pvillacorta Feb 7, 2024
aca80fb
Translation Simple Motion Type
pvillacorta Feb 7, 2024
f53a8c8
Improve nvtx_test.jl
pvillacorta Feb 7, 2024
af206d4
Correct matrix dimensions bug
pvillacorta Feb 7, 2024
d308666
Transpose seq.t vector
pvillacorta Feb 7, 2024
daa398b
Improve Rotation Simple Motion Type
pvillacorta Feb 7, 2024
2c9a6ca
Trying to resolve Rotation bug on GPU
pvillacorta Feb 7, 2024
1337fa5
Improve nvtx_test.jl
pvillacorta Feb 8, 2024
7d42a27
Add file
pvillacorta Feb 8, 2024
6d79877
Add file
pvillacorta Feb 8, 2024
1161f5d
Rename type argument
pvillacorta Feb 8, 2024
8455f9b
NVTX range in `get_positions`
pvillacorta Feb 8, 2024
e6cf78d
Minor changes
pvillacorta Feb 8, 2024
080efd2
Remove with_kw macro
pvillacorta Feb 8, 2024
f40c83f
Correct bug winth NVTX range
pvillacorta Feb 9, 2024
dce0450
.gitignore change
pvillacorta Feb 12, 2024
b1a771d
Delete nvtx_test.jl
pvillacorta Feb 12, 2024
0df2451
@with_kw added again
pvillacorta Feb 12, 2024
979f747
Unchecking and Unassigning `Nothing` to non-moving etp functions
pvillacorta Feb 12, 2024
d1df067
Suppressed flow dynamics to simplify optimization
pvillacorta Feb 12, 2024
0560543
Solved type conflicts
pvillacorta Feb 15, 2024
fa0a6ff
Minor change when adding phantoms
pvillacorta Feb 15, 2024
0e9e816
Gitignore
pvillacorta Feb 16, 2024
383c1d9
Gitignore
pvillacorta Feb 16, 2024
b948d2c
Merge branch 'JuliaHealth:master' into master
pvillacorta Feb 16, 2024
a840250
Delete nvtx_test
pvillacorta Feb 16, 2024
cf41639
Recover changes
pvillacorta Feb 16, 2024
d128b59
Gitignore
pvillacorta Feb 16, 2024
55e11d5
Unuse NVTX
pvillacorta Feb 16, 2024
d74927c
Simplify NoMotion
pvillacorta Feb 16, 2024
cf61bfa
Include packages in development
pvillacorta Feb 16, 2024
a150f4f
Recover changes
pvillacorta Feb 16, 2024
5f5b0c1
Merge branch 'master' into optimize-arbitrary
pvillacorta Feb 16, 2024
893828b
Functor SimpleMotion and ArbitraryMotion
pvillacorta Feb 19, 2024
fe406fc
Element type definition in SimpleMotion
pvillacorta Feb 19, 2024
7a80f38
Define motion type in Phantom struct
pvillacorta Feb 19, 2024
9c04393
Delete @view macro
pvillacorta Feb 19, 2024
b8b426e
Delete KomaMRIBase from root Project.toml
pvillacorta Feb 19, 2024
417e3af
Correct bug
pvillacorta Feb 19, 2024
c1769f1
Delete NVTX
pvillacorta Feb 23, 2024
fd28b45
Avoid storing ux, uy and uz functions in SimpleMotion
pvillacorta Feb 23, 2024
37a7bce
Adapt test to new phantom
pvillacorta Feb 23, 2024
9dc76e0
Add "allocations" as output in raw data
pvillacorta Feb 26, 2024
cb0a53b
`ux` -> `displacement_x`
pvillacorta Mar 4, 2024
03f3830
Move functions in DiffusionModel.jl to Grad.jl
pvillacorta Mar 4, 2024
f8aace5
Add method to adapt function when input is a scalar
pvillacorta Mar 4, 2024
79e3f5f
Adapt Rotation motion to new functions (not working yet)
pvillacorta Mar 4, 2024
4d871b7
Correct bug in input types for `Un`
pvillacorta Mar 4, 2024
4b38da2
Change data types
pvillacorta Mar 4, 2024
a0df993
Merge branch 'JuliaHealth:master' into master
pvillacorta Mar 4, 2024
c78a00e
Merge branch 'master' into optimize-arbitrary
pvillacorta Mar 4, 2024
a3935b6
Improve `adapt_storage` for allowing SimpleMotionType to be immutable
pvillacorta Mar 6, 2024
659c5bb
Fix Rotation motion, change `displacement_x` to `get_spin_coords`
pvillacorta Mar 6, 2024
4f6c2c1
`Un` and `cross` functions back to KomaMRICore/DiffusionModel.jl
pvillacorta Mar 6, 2024
f7a9d4c
Addition of SimpleMotions in test
pvillacorta Mar 6, 2024
ea126b8
Merge branch 'optimize-motion' into new-phantom-parallel
pvillacorta Mar 6, 2024
10e940c
New `Cardiac` Motion
pvillacorta Mar 7, 2024
fe32d4f
Movement -> Motion
pvillacorta Mar 7, 2024
487600d
Check if rotation center displacement works correctly
pvillacorta Mar 7, 2024
0b1ce50
New SimpleMotionType: Cardiac
pvillacorta Mar 7, 2024
8bfe32f
minor change
pvillacorta Mar 7, 2024
639b4ca
Simplity adaptor functions
pvillacorta Mar 13, 2024
9290dfe
New SimpleMotionType approach: ´ti´, `tf`...
pvillacorta Mar 13, 2024
267f281
Gitignore
pvillacorta Mar 14, 2024
3fd23f6
Delete scripts folder
pvillacorta Mar 14, 2024
0dc3925
Gitignore. Delete phantom examples (not usable by the moment)
pvillacorta Mar 14, 2024
7f1cc52
Revert Project.toml files
pvillacorta Mar 14, 2024
665f6f6
Revert removal of comment and revert line order change
pvillacorta Mar 14, 2024
3772a59
Delete NIfTI an MAT files read related files and functions (for anoth…
pvillacorta Mar 14, 2024
8ada071
Remove comment
pvillacorta Mar 14, 2024
55e5bd3
Remove `rotation_matrix` function and the use of LinearAlgebra and St…
pvillacorta Mar 14, 2024
1fa15d2
Change cu(x) to adapt(CuArray, x)
pvillacorta Mar 14, 2024
1106764
Remove additional packages from KomaMRIPlots
pvillacorta Mar 14, 2024
dcaf600
Delete `plot_cine` function
pvillacorta Mar 14, 2024
3043b98
Change `adapt` to `cu` again
pvillacorta Mar 14, 2024
085f61f
Remove Plots and Printf packages from KomaMRIPlots
pvillacorta Mar 14, 2024
e64bfbd
Solve readability issue
pvillacorta Mar 15, 2024
5f716f4
Correct tests and indentation problems
pvillacorta Mar 15, 2024
3a27927
New `get_range` and improved readability
pvillacorta Mar 15, 2024
f6a42f2
Correct bugs
pvillacorta Mar 15, 2024
38a60d3
more `get_range` methods
pvillacorta Mar 15, 2024
2f03c17
Solve bugs
pvillacorta Mar 15, 2024
721931d
`plot_phantom_map2`
pvillacorta Mar 15, 2024
0257ae4
Correct bug
pvillacorta Mar 18, 2024
c183ace
Correct bugs
pvillacorta Mar 18, 2024
1e5b22a
Omit (by the moment) flow information
pvillacorta Mar 18, 2024
f19a750
Update DisplayFunctions.js and modify `plot_phantom_map`
pvillacorta Mar 18, 2024
1ea94ce
Export `get_dims`
pvillacorta Mar 18, 2024
d92e9d0
Work on `read_phantom` and `write_phantom` functions
pvillacorta Mar 18, 2024
531ee0d
Follow the docstring conventions
pvillacorta Mar 21, 2024
b076470
Adapt `read_phantom` and `write_phantom` to ArbitraryMotion
pvillacorta Mar 21, 2024
bea1273
`get_range` -> `get_times`
pvillacorta Mar 22, 2024
f106e91
Documentation conventions
pvillacorta Mar 22, 2024
89a028e
Solve bug for ArbitraryMotion
pvillacorta Mar 22, 2024
f93937f
Improve `plot_phantom_map` to display in initial and final times of e…
pvillacorta Mar 22, 2024
9352c54
Solve bug when reading ArbitraryMotion from .phantom files
pvillacorta Mar 22, 2024
3d9a948
Make the new `plot_phantom_map` usable for the GUI
pvillacorta Mar 22, 2024
d879272
Fix radian conversion mistake
pvillacorta Mar 28, 2024
c65e348
Delete examples
pvillacorta Mar 28, 2024
f293d22
Gitignore
pvillacorta Mar 28, 2024
36c8cba
Improve `get_dims`
pvillacorta Mar 28, 2024
8b830f2
Minor change
pvillacorta Mar 28, 2024
f1ab4fb
Remove new sequences temporarily
pvillacorta Mar 28, 2024
0c7ed9d
New PeriodicTranslation and PeriodicRotation, `get_range` -> `get_tim…
pvillacorta Apr 1, 2024
6d1afa1
Merge branch 'master' into new-phantom-parallel
pvillacorta Apr 1, 2024
c72cfa7
Gitignore
pvillacorta Apr 1, 2024
5e2a909
Add ArbitraryMotion to tests
pvillacorta Apr 1, 2024
3038d74
Delete `get_grad_area` and `set_grad_area!` from branch
pvillacorta Apr 1, 2024
7568c2d
Enlarge tests for code coverage
pvillacorta Apr 1, 2024
8fe9f0c
Improve `read_phantom` and `write_phantom`
pvillacorta Apr 1, 2024
571b06b
Gitignore fix
pvillacorta Apr 1, 2024
7c28e92
Improve `plot_phantom_map`
pvillacorta Apr 4, 2024
42602ce
Solve type conflicts
pvillacorta Apr 4, 2024
17fe75c
HeartBeat and PeriodicHeartBeat motions (in progress)
pvillacorta Apr 4, 2024
692d8be
Add InteractiveUtils
pvillacorta Apr 4, 2024
f5f4960
Add necessary functions
pvillacorta Apr 4, 2024
93066ab
Imrpove read and write phantom functions
pvillacorta Apr 4, 2024
d525023
Delete test comments
pvillacorta Apr 4, 2024
5dd8ff1
Solve bug with the use of `atan` in HeartBeat
pvillacorta Apr 5, 2024
4d5bf43
Replicate `heart_phantom` with the new simple motions
pvillacorta Apr 5, 2024
82573fa
Update comments
pvillacorta Apr 5, 2024
b18d51d
Fix tests
pvillacorta Apr 5, 2024
f3b577e
Fix MotionModel sum
pvillacorta Apr 5, 2024
f6a6844
Merge branch 'master' into new-phantom-parallel
pvillacorta Apr 5, 2024
447ad97
Recover example .h5 phantoms
pvillacorta Apr 5, 2024
be3016c
Fix bug with composable movements (Rotation and PeriodicRotation)
pvillacorta Apr 8, 2024
17418ee
Gitignore
pvillacorta Apr 8, 2024
b0de6c1
Remove comments and fix indentation
pvillacorta Apr 8, 2024
fdaaecc
Remove unnecessary exports
pvillacorta Apr 8, 2024
c4a55ce
Add contracting ring phantom example
pvillacorta Apr 8, 2024
24eb5e0
Change `is_composable` dispatch
pvillacorta Apr 9, 2024
5c92e65
Improve `get_spin_coords` and make Heartbeat composable
pvillacorta Apr 9, 2024
ef8c00c
Add play/pause button in `plot_phantom_map`
pvillacorta Apr 9, 2024
2887cfb
Solve bug and forgotten change for PeriodicRotation
pvillacorta Apr 9, 2024
f9177b8
Merge branch 'master' into new-phantom-parallel
pvillacorta Apr 9, 2024
5151cce
Change play/pause buttons in `plot_phantom_map`
pvillacorta Apr 10, 2024
1b16ad2
Merge branch 'new-phantom-parallel' of https://github.com/pvillacorta…
pvillacorta Apr 10, 2024
fd2d9a6
Merge branch 'master' into new-phantom-parallel
pvillacorta Apr 10, 2024
b39f75d
Improve `plot_phantom_map`
pvillacorta Apr 10, 2024
4fecf46
Indentation
pvillacorta Apr 10, 2024
934ea01
Improve test for KomaMRIFiles
pvillacorta Apr 10, 2024
23ba39f
Merge branch 'master' into new-phantom-parallel
cncastillo Apr 10, 2024
ee1bdc5
Merge branch 'master' into new-phantom-parallel
cncastillo Apr 10, 2024
15beb5a
Merge branch 'master' into new-phantom-parallel
cncastillo Apr 10, 2024
986e48f
Merge branch 'master' into new-phantom-parallel
cncastillo Apr 10, 2024
961c057
Formatting
pvillacorta Apr 10, 2024
17f6c95
More formatting
pvillacorta Apr 10, 2024
dc06b3f
Tests and code coverage
pvillacorta Apr 10, 2024
9def196
New brain motion phantom example
pvillacorta Apr 10, 2024
ea10e50
KomaMRIFiles Version in read/write phantom functions
pvillacorta Apr 11, 2024
839e445
@assert
pvillacorta Apr 11, 2024
105e43f
Improve `export_motion` for SimpleMotion
pvillacorta Apr 11, 2024
f4b06e5
Improve `export_motion` for SimpleMotion
pvillacorta Apr 11, 2024
65b0cd7
Add `==` method definition for motions and phantoms
pvillacorta Apr 11, 2024
25ebd96
Fix tests
pvillacorta Apr 11, 2024
803924f
Apply @cncastillo suggestions to read/write functions
pvillacorta Apr 11, 2024
b3cce15
Not hardcode and dispatch `≈``function
pvillacorta Apr 11, 2024
48ae6c2
`sin`, `cos` -> `sind`, `cosd`
pvillacorta Apr 11, 2024
07e01d0
Follow conventions and minor changes in read/write
pvillacorta Apr 11, 2024
c2d5710
Fix tests
pvillacorta Apr 11, 2024
56c6a8d
Merge branch 'master' into new-phantom-parallel
pvillacorta Apr 11, 2024
ad657b3
Fix `plot_phantom_map` for big ArbitraryMotions
pvillacorta Apr 12, 2024
430f31b
Merge branch 'master' of https://github.com/pvillacorta/KomaMRI.jl
pvillacorta Apr 12, 2024
b94dfc6
Update .gitignore
pvillacorta Apr 13, 2024
9726cb4
Remove useless parenthesis in PeriodicRotation.jl
pvillacorta Apr 13, 2024
c0fb2aa
Remove useless parenthesis in Rotation.jl
pvillacorta Apr 13, 2024
6bd8712
`get_times`, `get_time_nodes`, `get_piece_limits` -> `time_nodes`
pvillacorta Apr 14, 2024
0d00625
Merge branch 'new-phantom-parallel' of https://github.com/pvillacorta…
pvillacorta Apr 14, 2024
f7b92c4
Use integer division `÷`
pvillacorta Apr 14, 2024
692e5f6
Fix previous commit
pvillacorta Apr 15, 2024
3b693a1
Remove export LinearInterpolator
pvillacorta Apr 15, 2024
33c6a88
export LinearInterpolator (again)
pvillacorta Apr 15, 2024
d79e978
Compare phantom names in `==` function and improve `*`
pvillacorta Apr 15, 2024
464bbcf
`iterpolate_times` -> `process_times`
pvillacorta Apr 15, 2024
366daf5
Fix variable name bug
pvillacorta Apr 15, 2024
6b828e0
Improve `process_times`
pvillacorta Apr 15, 2024
bfd79f5
Make `dt_frame` a `kwarg`
pvillacorta Apr 15, 2024
5c1a10e
`ti`, `tf` -> `t_start`, `t_end`, consider when they are equal
pvillacorta Apr 15, 2024
1152696
Fix bug with interpolation
pvillacorta Apr 15, 2024
c390ce9
Add phantom test files (previously ignored)
pvillacorta Apr 15, 2024
edf1f0c
Solved bug with constructors
pvillacorta Apr 16, 2024
dfbd46f
Improve `==` and `≈` for SimpleMotionTypes
pvillacorta Apr 16, 2024
8beeccc
`unit_time` function
pvillacorta Apr 16, 2024
8af4846
Recover deleted line by mistake
pvillacorta Apr 16, 2024
72e3d85
Recover files
pvillacorta Apr 17, 2024
2ff951f
Formatting, `duration` -> `period_durations`
pvillacorta Apr 17, 2024
789965f
Implement `vcat` for Motion Models
pvillacorta Apr 17, 2024
94e3c1c
Change tests (pending)
pvillacorta Apr 17, 2024
e939365
Add comment for later
pvillacorta Apr 17, 2024
d2384be
Merge branch 'JuliaHealth:master' into master
pvillacorta Apr 17, 2024
9f3b657
Merge branch 'master' into new-phantom-parallel
pvillacorta Apr 17, 2024
bef56fc
Formatting
pvillacorta Apr 17, 2024
e1ef71b
Fix attributte order for Periodic motion types
pvillacorta Apr 17, 2024
fae727c
Improve tests (pending)
pvillacorta Apr 17, 2024
7ab33c4
Define forgotten `vcat` for NoMotion
pvillacorta Apr 17, 2024
f796ed7
Solve test bug
pvillacorta Apr 18, 2024
e16a7cb
`K` -> `num_pieces`
pvillacorta Apr 18, 2024
e380cca
Solve adding Phantom names
pvillacorta Apr 18, 2024
bfcc0ea
Formatting
pvillacorta Apr 19, 2024
637911d
Test ArbitraryMotion
pvillacorta Apr 19, 2024
4dbb43a
Remove unnecesary lines
pvillacorta Apr 19, 2024
8824ed2
Improve readability
pvillacorta Apr 19, 2024
b3dcb5e
Fix ortographic error
pvillacorta Apr 19, 2024
46ef617
New `sort_motions!` and optimize `get_spin_coords`
pvillacorta Apr 24, 2024
bef553d
Warning when using ArbitraryMotion
pvillacorta Apr 24, 2024
afb918e
motion_jemris.dat back to where it was
pvillacorta Apr 24, 2024
14c253c
Sum 0 to make a copy
pvillacorta Apr 24, 2024
1313d6f
Call `sort_motions!`
pvillacorta Apr 24, 2024
cd919a6
Merge branch 'master' into new-phantom-parallel
pvillacorta Apr 24, 2024
d05402c
Solve bugs for ArbitraryMotion
pvillacorta Apr 24, 2024
7eac340
Formatting
pvillacorta Apr 24, 2024
914b43f
Test for Simple and Arbitrary motion in core
pvillacorta Apr 24, 2024
71983b7
Phantom test files
pvillacorta Apr 24, 2024
b78be4d
Documentation
pvillacorta Apr 25, 2024
33b777c
`time_nodes` -> `times`
pvillacorta Apr 25, 2024
2e4dff1
Update examples
pvillacorta Apr 25, 2024
2d00fda
No export `get_dims`
pvillacorta Apr 25, 2024
e250e8b
Tests
pvillacorta Apr 25, 2024
d8b2d69
Solve test fail
pvillacorta Apr 25, 2024
3aba027
Correct tags
pvillacorta Apr 25, 2024
7d61136
Docstrings
pvillacorta Apr 26, 2024
e5fc537
Merge branch 'master' into new-phantom-parallel
cncastillo May 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions KomaMRIBase/src/KomaMRIBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ using Parameters
using Interpolations
#Reconstruction
using MRIBase
@reexport using MRIBase: Profile, RawAcquisitionData, AcquisitionData, AcquisitionHeader, EncodingCounters, Limit
@reexport using MRIBase:
Profile, RawAcquisitionData, AcquisitionData, AcquisitionHeader, EncodingCounters, Limit
using MAT # For loading example phantoms

global γ = 42.5774688e6; # Hz/T gyromagnetic constant for H1, JEMRIS uses 42.5756 MHz/T
global γ = 42.5774688e6 # Hz/T gyromagnetic constant for H1, JEMRIS uses 42.5756 MHz/T

# Hardware
include("datatypes/Scanner.jl")
Expand Down Expand Up @@ -43,7 +44,15 @@ export times, ampls, freqs
# This are also used for simulation
export kfoldperm, trapz, cumtrapz
# Phantom
export brain_phantom2D, brain_phantom3D, pelvis_phantom2D
export brain_phantom2D, brain_phantom3D, pelvis_phantom2D, heart_phantom
# Motion
export MotionModel
export NoMotion, SimpleMotion, ArbitraryMotion
export SimpleMotionType
export Translation, Rotation, HeartBeat
export PeriodicTranslation, PeriodicRotation, PeriodicHeartBeat
export get_spin_coords, sort_motions!
export LinearInterpolator
pvillacorta marked this conversation as resolved.
Show resolved Hide resolved
# Secondary
export get_kspace, rotx, roty, rotz
# Additionals
Expand All @@ -57,6 +66,8 @@ export PulseDesigner

#Package version, KomaMRIBase.__VERSION__
using Pkg
__VERSION__ = VersionNumber(Pkg.TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml"))["version"])
__VERSION__ = VersionNumber(
Pkg.TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml"))["version"]
)

end # module KomaMRIBase
Loading
Loading