-
Notifications
You must be signed in to change notification settings - Fork 21
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
Anisotropic Phantoms #342
Anisotropic Phantoms #342
Conversation
…sting. modified: src/datatypes/Phantom.jl
modified: src/datatypes/Phantom.jl
modified: src/datatypes/Phantom.jl
…l into anisotropic_phantoms
See #311 (reply in thread) for an example. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #342 +/- ##
==========================================
- Coverage 92.41% 92.04% -0.38%
==========================================
Files 33 33
Lines 2215 2250 +35
==========================================
+ Hits 2047 2071 +24
- Misses 168 179 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Removed additional spaces
Thanks @curtcorum! Sorry for all the commits, I couldn´t find a way to do them simultaneously on GitHub. There is a part where tabs are used instead of spaces, and I also included a suggestion to wrap some checks in a function. |
modified: KomaMRIBase/src/datatypes/Phantom.jl
Utility function to check the arguments of phantom generating functions. modified: KomaMRIBase/src/datatypes/Phantom.jl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
help?> KomaMRIBase.check_phantom_arguments
ssx, ssy, ssz, usx, usy, usz = check_phantom_arguments(nd, ss, us)
Utility function to check the arguments of phantom generating functions.
Arguments
≡≡≡≡≡≡≡≡≡≡≡
• nd : (::Integer) dimensionality of the phantom
• ss : (::Integer or ::Vector{Integer}) subsampling parameter for all axes if scaler, per axis if a 2 or 3 element vector
• us : (::Integer or ::Vector{Integer}) upsampling parameter for all axes if scaler, per axis if a 2 or 3 element vector
Returns
≡≡≡≡≡≡≡≡≡
• ssx, ssy, ssz: (::Vector{Integer}) valid subsampling parameter per axis
• usx, usy, usz: (::Vector{Integer}) valid upsampling parameter per axis
Examples
≡≡≡≡≡≡≡≡≡≡
julia> ssx, ssy, ssz, usx, usy, usz = check_phantom_arguments(2, 1, 1)
julia> ssx, ssy, ssz, usx, usy, usz = check_phantom_arguments(3, 4, [2, 2, 2])
julia> KomaMRIBase.check_phantom_arguments(2, 1, [1, 1])
[ Info: setting ss=1 since us=[1, 1] defined
(1, 1, -9999, 1, 1, -9999)
julia> KomaMRIBase.check_phantom_arguments(2, 1, [1, 1, 1])
[ Info: setting ss=1 since us=[1, 1, 1] defined
ERROR: AssertionError: us=[1, 1, 1] invalid, us can have up to two components [usx, usy] for a 2D phantom
Stacktrace:
[1] check_phantom_arguments(nd::Int64, ss::Int64, us::Vector{Int64})
@ KomaMRIBase ~/src/KomaMRI/KomaMRIBase/src/datatypes/Phantom.jl:549
[2] top-level scope
@ REPL[2]:1
julia> KomaMRIBase.check_phantom_arguments(3, 1, [1, 1, 1])
[ Info: setting ss=1 since us=[1, 1, 1] defined
(1, 1, 1, 1, 1, 1)
modified: KomaMRIBase/src/datatypes/Phantom.jl
…phantom modified: KomaMRIBase/src/datatypes/Phantom.jl
I completely forgot to merge this. I will run tests including some recent changes, and then merge. |
Thanks 🙏
And I will also try to label directly the profiles in the RawAcquisitioDdata in order to get a standard cartesian acquisition data rather than using the nufft reconstruction :) |
Ok, all the tests are running. I will be merging this. @beorostica can you release a new set of patch package versions? (after checking everything looks good with the docs, plots, etc...) @aTrotier Tell us if you need any help. |
@cncastillo Still need to merge? |
Oh god, thanks for noticing! merged! |
Phantom functions accept length 2 (or length 3 for brain_phantom3D) vectors for the subsampling and upsampling parameters. Scalers still accepted and should be backwards compatible. Some validity checking.
"""