using Plots: plot, gui # these 2 must precede Sinograms for Requires to work! using Unitful: cm using Sinograms: SinoFanFlat, rays, plan_fbp, Window, Hamming, fbp, sino_geom_plot! using ImageGeoms: ImageGeom, fovs, MaskCircle using ImagePhantoms: SheppLogan, shepp_logan, radon, phantom using MIRTjim: jim, prompt isinteractive() ? jim(:prompt, true) : prompt(:draw); ig = ImageGeom(MaskCircle(); dims=(128,126), deltas = (0.2cm,0.2cm) ) rg = SinoFanFlat( ; nb = 130, d = 0.3cm, na = 100, dsd = 50cm, dod = 14cm) jim(axes(ig), ig.mask; prompt=false) sino_geom_plot!(rg, ig) prompt() μ = 0.1 / cm # typical linear attenuation coefficient ob = shepp_logan(SheppLogan(); fovs = fovs(ig), u = (1, 1, μ)) sino = radon(rays(rg), ob) jim(axes(rg), sino; title="Shepp-Logan sinogram", xlabel="r", ylabel="ϕ") plan = plan_fbp(rg, ig; window = Window(Hamming(), 1.0)) fbp_image = fbp(plan, sino) clim = (0.9, 1.1) .* μ jim(axes(ig), fbp_image, "FBP image for flat case"; clim) true_image = phantom(axes(ig)..., ob, 2) jim(axes(ig)..., true_image, "True phantom image"; clim)