Skip to content

Commit

Permalink
Post release testing fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
nbwuzhe committed Mar 27, 2024
1 parent 83e52d4 commit 681e813
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 159 deletions.
145 changes: 0 additions & 145 deletions example/cartesian_recon.jl

This file was deleted.

2 changes: 2 additions & 0 deletions example/download_data.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Pkg

Pkg.activate(".")
Pkg.add("HTTP")
Pkg.instantiate()
using HTTP

example_zenodo_data_url = "https://zenodo.org/records/7779045/files/data_girfreco_03_28_2023.zip?download=1"
Expand Down
20 changes: 10 additions & 10 deletions example/joss_demo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ saved into files, which are loaded for future usage to save calculation time.
This is controlled by `do_load_maps` in general parameters.
===================================================#

if params_general[:do_load_maps] && isfile(params_general[:b0_map_save_fullpath])
@info "Loading SENSE and B₀ maps from $(params_general[:sensitivity_save_fullpath]) and $(params_general[:b0_map_save_fullpath])"
cartesian_sensitivity = load_map(params_general[:sensitivity_save_fullpath]; do_split_phase = true)
b0_maps = load_map(params_general[:b0_map_save_fullpath])
num_slices = size(b0_maps, 3)
else
if ~(params_general[:do_load_maps] && isfile(params_general[:b0_map_save_fullpath]))
@info "Running cartesian_recon to retrieve maps (cartesian_sensitivity and b0_maps)"
cartesian_sensitivity, b0_maps = run_cartesian_recon(params_general)
num_slices = size(b0_maps, 3)
run_cartesian_recon(params_general) # Only run when coil/B0 maps have not been calculated
end

# Load the maps of coil and B0 from the previously calculated NIfTI files.
@info "Loading SENSE and B₀ maps from $(params_general[:sensitivity_save_fullpath]) and $(params_general[:b0_map_save_fullpath])"
cartesian_sensitivity = load_map(params_general[:sensitivity_save_fullpath]; do_split_phase = true)
b0_maps = load_map(params_general[:b0_map_save_fullpath])
num_slices = size(b0_maps, 3)

#=
### 3.2 Preparation of Spiral Reconstruction
Expand Down Expand Up @@ -246,7 +246,7 @@ sensitivity = mapslices(x -> imresize(x, params_spiral[:recon_size][1], params_s

# Optional: Plot the sensitivity maps of each coil on a given slice.
if params_general[:do_plot_recon]
plotlyjs()
plotlyjs(size=(1000, 800))
plot_sense_maps(sensitivity, 20)
end

Expand Down Expand Up @@ -341,7 +341,7 @@ end

if params_general[:do_plot_recon]
@info "Plotting Reconstruction"
plotlyjs()
plotlyjs(size=(1000, 800))
plot_reconstruction(
reco,
1:length(selected_slice),
Expand Down
2 changes: 1 addition & 1 deletion example/recon_config_joss_demo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ params_general = Dict{Symbol,Any}();
params_general[:gamma] = 42577478;

# General options for reconstruction script:
params_general[:do_load_maps] = false # if true, reloads B₀/SENSE maps instead of recalculating
params_general[:do_load_maps] = true # if true, reloads B₀/SENSE maps instead of recalculating
params_general[:do_save_recon] = true # if true, saves reconstruction and all auxiliary image data (maps) as NIfTI files
params_general[:do_plot_recon] = true # if true, plots intermediate debugging and output recon figures (needs graphics, not recommended in multi-thread mode due to PyPlot)
params_general[:do_process_map_scan] = true # if true, compute sensitivity and B₀ maps from reconstructed Cartesian scan
Expand Down
4 changes: 1 addition & 3 deletions src/utils/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,5 @@ function run_cartesian_recon(params_general)
end

@info "Successfully Completed cartesian_reconstruction"

return cartesian_sensitivity, b0_maps


end

0 comments on commit 681e813

Please sign in to comment.