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

Some observations about #Getting-Started #189

Open
curtcorum opened this issue May 28, 2024 · 2 comments
Open

Some observations about #Getting-Started #189

curtcorum opened this issue May 28, 2024 · 2 comments

Comments

@curtcorum
Copy link

curtcorum commented May 28, 2024

First, thanks for developing MRIReco.jl!

Here are some observations about the getting started example:

https://magneticresonanceimaging.github.io/MRIReco.jl/stable/gettingStarted/#Getting-Started

https://github.com/MagneticResonanceImaging/MRIReco.jl/blame/f70b2e0c9bf7b1f54f9f91b3d978fba5d2fb5041/docs/src/gettingStarted.md#L6

  • PyPlot.jl seems not to work with Julia 1.10 on my Ubuntu 20.04 system, this seems due to PyCall.jl dependency being generally broken. PythonPlot.jl (with PythonCall.jl) does work.
  • ImageUtils.jl is not exported by MRIReco.jl currently so using ImageUtils: shepp_logan or equivalent is needed.
  • MRISimulation.jl is not exported by MRIReco.jl so using MRISimulation: simulation or equivalent is needed.
@curtcorum
Copy link
Author

With the above modifications the example runs in a julia 1.10 repl with latest MRIReco master branch!

julia> using MRIReco

julia> using PythonPlot

julia> N = 256
256

julia> I = shepp_logan(N)
ERROR: UndefVarError: `shepp_logan` not defined
Stacktrace:
 [1] top-level scope
   @ REPL[7]:1

julia> using ImageUtils

julia> I = shepp_logan(N);

julia> params = Dict{Symbol, Any}()
Dict{Symbol, Any}()

julia> params[:simulation] = "fast"
"fast"

julia> params[:trajName] = "Radial"
"Radial"

julia> params[:numProfiles] = floor(Int64, pi/2*N)
402

julia> params[:numSamplingPerProfile] = 2*N
512

julia> using MRISimulation

julia> acqData = simulation(I, params)
AcquisitionData{Float64, 2}(Dict{Symbol, Any}(), Trajectory{Float64}[Trajectory{Float64}("Radial", [0.5 0.498046875 … -0.4960786011666189 -0.4980316665255426; 0.0 0.0 … 0.003876887106065375 0.0038921504411286246], [0.0, 1.953125e-6, 3.90625e-6, 5.859375e-6, 7.8125e-6, 9.765625e-6, 1.171875e-5, 1.3671875e-5, 1.5625e-5, 1.7578125000000002e-5  …  0.00098046875, 0.000982421875, 0.000984375, 0.000986328125, 0.00098828125, 0.000990234375, 0.0009921875, 0.000994140625, 0.00099609375, 0.000998046875], 0.0, 0.001, 402, 512, 1, false, true)], Matrix{ComplexF64}[[14.993934186787254 - 0.014462395824845934im; 8.48946061333052 - 2.7004662118253853im; … ; -7.193691810797341 - 3.3333815485922402im; 0.18801461059376928 - 12.683277955043577im;;];;;], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10  …  205815, 205816, 205817, 205818, 205819, 205820, 205821, 205822, 205823, 205824]], (256, 256), (0.0, 0.0, 0.0))

julia> params[:reco] = "direct"
"direct"

julia> params[:reconSize] = (N,N)
(256, 256)

julia> Ireco = reconstruction(acqData, params)
6-dimensional AxisArray{ComplexF64,6,...} with axes:
    :x, (StepRangeLen(0.0, 0.0, 256)) mm
    :y, (StepRangeLen(0.0, 0.0, 256)) mm
    :z, (StepRangeLen(0.0, 0.0, 1)) mm
    :echos, 1:1
    :coils, 1:1
    :repetitions, 1:1
And data, a 256×256×1×1×1×1 Array{ComplexF64, 6}:
[:, :, 1, 1, 1, 1] = SNIP

julia> imshow(abs.(Ireco[:,:,1,1,1]))
Python: <matplotlib.image.AxesImage object at 0x7f8c7f246000>

gettingStarted_Figure_1

@tknopp
Copy link
Member

tknopp commented May 29, 2024

Thanks, yes we need to fix these examples. We will, however, switch to Makie, when I find time to fix them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants