Open curtcorum opened 5 months ago
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>
Thanks, yes we need to fix these examples. We will, however, switch to Makie, when I find time to fix them.
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
using ImageUtils: shepp_logan
or equivalent is needed.using MRISimulation: simulation
or equivalent is needed.