# HG changeset patch # User Neil Dizon # Date 1713721363 -10800 # Node ID 1c4b7d1f261ff4f060958eea47141981897ccce9 # Parent a30a8745a83bde5941caa8229a15ac09d1437c94 added plotting functions diff -r a30a8745a83b -r 1c4b7d1f261f src/PET/PET.jl --- a/src/PET/PET.jl Sun Apr 21 19:26:50 2024 +0300 +++ b/src/PET/PET.jl Sun Apr 21 20:42:43 2024 +0300 @@ -42,16 +42,17 @@ include("AlgorithmZeroDual.jl") include("PlotResults.jl") -using .Radon +import .AlgorithmDualScaling +import .AlgorithmGreedy +import .AlgorithmNoPrediction +import .AlgorithmPrimalOnly +import .AlgorithmProximal +import .AlgorithmRotation +import .AlgorithmZeroDual + +using .Radon: backproject! using .ImGenerate -using .OpticalFlow -using .AlgorithmDualScaling -using .AlgorithmGreedy -using .AlgorithmNoPrediction -using .AlgorithmPrimalOnly -using .AlgorithmProximal -using .AlgorithmRotation -using .AlgorithmZeroDual +using .OpticalFlow: DisplacementFull, DisplacementConstant using .PlotResults diff -r a30a8745a83b -r 1c4b7d1f261f src/PET/PlotResults.jl --- a/src/PET/PlotResults.jl Sun Apr 21 19:26:50 2024 +0300 +++ b/src/PET/PlotResults.jl Sun Apr 21 20:42:43 2024 +0300 @@ -13,7 +13,7 @@ export fv_plot, ssim_plot, psnr_plot global mystart = 38 -global myend = 75 +global myend = 135 function fv_plot(name :: String, save_plot::Bool=true) save_path = "./img/$(name)256x256_pdps_known_fv_plot.html" diff -r a30a8745a83b -r 1c4b7d1f261f src/PredictPDPS.jl --- a/src/PredictPDPS.jl Sun Apr 21 19:26:50 2024 +0300 +++ b/src/PredictPDPS.jl Sun Apr 21 20:42:43 2024 +0300 @@ -40,6 +40,7 @@ include("AlgorithmBothNL.jl") include("AlgorithmFB.jl") include("AlgorithmFBDual.jl") +include("PlotResults.jl") # Additional @@ -52,6 +53,7 @@ include("AlgorithmZeroDual.jl") include("PET/PET.jl") + import .Algorithm, .AlgorithmBoth, .AlgorithmBothGreedyV, @@ -66,17 +68,12 @@ .AlgorithmNoPrediction, .AlgorithmPrimalOnly, .AlgorithmDualScaling, - .AlgorithmZeroDual, - .PET + .AlgorithmZeroDual using .ImGenerate using .OpticalFlow: DisplacementFull, DisplacementConstant -using .PET: demo_petS1, demo_petS2, demo_petS3, - demo_petS4, demo_petS5, demo_petS6, demo_petS7, - demo_petB1, demo_petB2, demo_petB3, - demo_petB4, demo_petB5, demo_petB6, demo_petB7, - batchrun_shepplogan, batchrun_brainphantom, batchrun_pet, - plot_pet +using .PlotResults +using .PET ############## # Our exports @@ -95,7 +92,7 @@ demo_petB1, demo_petB2, demo_petB3, demo_petB4, demo_petB5, demo_petB6, demo_petB7, batchrun_shepplogan, batchrun_brainphantom, batchrun_pet, - plot_pet + plot_denoising, plot_pet ################################### # Parameterisation and experiments @@ -590,6 +587,16 @@ end end +######################### +# Plotting SSIM and PSNR +######################### + +function plot_denoising(kwargs...) + ssim_plot("lighthouse") + psnr_plot("lighthouse") +end + + ############### # Precompiling ###############