@@ -67,25 +67,25 @@ clim = (0.95, 1.05) .* μ
6767# Here is the ideal phantom image:
6868oversample = 3
6969true_image = phantom (axes (ig)... , ob, oversample)
70- jim (axes (ig), true_image, " True 3D Shepp-Logan phantom image" ; clim)
70+ pt = jim (axes (ig), true_image, " True 3D Shepp-Logan phantom image" ; clim)
7171
7272# Define the system geometry
7373# (for some explanation use `?CtGeom`):
7474p = (ns = 130 , ds = 0.3 cm, nt = 80 , dt = 0.4 cm, na = 50 , dsd = 200 cm, dod = 40 cm)
75- cg = CtFanArc ( ; p... )
75+ rg = CtFanArc ( ; p... )
7676
7777# Examine the geometry to verify the FOV
7878# (this is more interesting when interacting via other Plot backends):
79- ct_geom_plot3 (cg , ig)
79+ ct_geom_plot3 (rg , ig)
8080
8181#
8282prompt ()
8383
8484
8585# CBCT projections
8686# using `Sinogram.rays` and `ImagePhantoms.radon`:
87- proj_arc = radon (rays (cg ), ob)
88- jim (cg . s, cg . t , proj_arc ;
87+ proj_arc = radon (rays (rg ), ob)
88+ pa = jim (axes (rg)[ 1 : 2 ] , proj_arc ;
8989 title= " Shepp-Logan projections (arc)" , xlabel= " s" , ylabel= " t" )
9090
9191
@@ -103,31 +103,32 @@ which would save work if we were reconstructing many images.
103103For illustration we include `Hamming` window.
104104=#
105105
106- plan = plan_fbp (cg , ig; window = Window (Hamming (), 1.0 ))
106+ plan = plan_fbp (rg , ig; window = Window (Hamming (), 1.0 ))
107107fdk_arc = fdk (plan, proj_arc)
108- jim (axes (ig), fdk_arc, " FDK image (arc)" ; clim)
108+ par = jim (axes (ig), fdk_arc, " FDK image (arc)" ; clim)
109109
110110#
111111err_arc = fdk_arc - true_image
112- jim (axes (ig), err_arc, " Error image (arc)" ; clim = (- 1 ,1 ) .* (0.05 μ))
112+ elim = (- 1 ,1 ) .* (0.02 μ)
113+ pae = jim (axes (ig), err_arc, " Error image (arc)" ; clim = elim)
113114
114115
115116#=
116117## Repeat with flat detector geometry
117118=#
118119
119- cg = CtFanFlat ( ; p... )
120- proj_flat = radon (rays (cg ), ob)
121- jim (cg . s, cg . t , proj_flat ;
120+ rg = CtFanFlat ( ; p... )
121+ proj_flat = radon (rays (rg ), ob)
122+ pfp = jim (axes (rg)[ 1 : 2 ] , proj_flat ;
122123 title= " Shepp-Logan projections (flat)" , xlabel= " s" , ylabel= " t" )
123124
124- plan = plan_fbp (cg , ig; window = Window (Hamming (), 1.0 ))
125+ plan = plan_fbp (rg , ig; window = Window (Hamming (), 1.0 ))
125126fdk_flat = fdk (plan, proj_flat)
126- jim (axes (ig), fdk_flat, " FDK image (flat)" ; clim)
127+ pfr = jim (axes (ig), fdk_flat, " FDK image (flat)" ; clim)
127128
128129#
129130err_flat = fdk_flat - true_image
130- jim (axes (ig), err_flat, " Error image (flat)" ; clim = ( - 1 , 1 ) .* ( 0.05 μ) )
131+ pfe = jim (axes (ig), err_flat, " Error image (flat)" ; clim = elim )
131132
132133#=
133134As expected for CBCT,
@@ -138,15 +139,21 @@ the largest errors are in the end slices.
138139#=
139140## Short scan
140141=#
141- cg = CtFanFlat (:short ; p... )
142- proj_short = radon (rays (cg ), ob)
143- jim (cg . s, cg . t , proj_short ;
142+ rg = CtFanFlat (:short ; p... , na = 200 )
143+ proj_short = radon (rays (rg ), ob)
144+ psp = jim (axes (rg)[ 1 : 2 ] , proj_short ;
144145 title= " Shepp-Logan projections (flat,short)" , xlabel= " s" , ylabel= " t" )
145146
146- plan_short = plan_fbp (cg, ig; window = Window (Hamming (), 1.0 ))
147+ #
148+ plan_short = plan_fbp (rg, ig; window = Window (Hamming (), 1.0 ))
149+ psw = jim (axes (rg)[[1 ,3 ]], plan_short. view_weight[:,1 ,:];
150+ title = " View weights (including Parker)" ,
151+ xlabel= " s" , ylabel= " angle" )
152+
153+ #
147154fdk_short = fdk (plan_short, proj_short)
148- jim (axes (ig), fdk_short, " FDK image (flat,short)" ; clim)
155+ psr = jim (axes (ig), fdk_short, " FDK image (flat,short)" ; clim)
149156
150157#
151158err_short = fdk_short - true_image
152- jim (axes (ig), err_flat, " Error image (flat,short)" ; clim = ( - 1 , 1 ) .* ( 0.05 μ) )
159+ pse = jim (axes (ig), err_flat, " Error image (flat,short)" ; clim = elim )
0 commit comments