@@ -4,17 +4,19 @@ Show 2D sinogram geometries.
442022-01-23, Jeff Fessler
55=#
66
7- export sino_plot_rays, sino_geom_plot!
7+ import Sinograms : sino_plot_rays, sino_geom_plot! # extended here
88
9- # using Sinograms: SinoGeom, RealU
10- using . Plots: scatter, plot, plot!, default, xlims!
9+ using Sinograms: SinoGeom, RealU, rays, SinoPar, SinoFan, SinoMoj
10+ using Sinograms: _ar, _rfov, _dso, _xds, _yds, _d_moj
11+ using Plots: scatter, plot, plot!, default, xlims!
12+ using ImageGeoms: ImageGeom
1113
1214
1315"""
1416 sino_plot_rays(rg::SinoGeom ; kwargs...)
1517
1618Make a scatter plot of the `(r, ϕ)` sample locations for all rays.
17- Requires `Plots`.
19+ Needs `Plots`.
1820"""
1921function sino_plot_rays (rg:: SinoGeom ; kwargs... )
2022# r, phi = rays(rg)
@@ -101,12 +103,12 @@ function sino_geom_plot_fan!(
101103 ylims = (- 1 ,1 ) .* dso
102104 tmp = ar .+ π/ 2 # trick: angle beta defined ccw from y axis
103105 scat! ([p0[1 ]], [p0[2 ]], color= :blue , marker= :square , # source
104- ; xlims, ylims)
105- plot! (dso * cos .(t), dso * sin .(t), color= :cyan ) # source circle
106+ ; xlims, ylims, label = " " )
107+ plot! (dso * cos .(t), dso * sin .(t), color= :cyan , label = " " ) # source circle
106108 scat! (dso * cos .(tmp), dso * sin .(tmp),
107- color= :blue , marker= :circle , markersize= 2 ) # source points
109+ color= :blue , marker= :circle , markersize= 2 , label = " " ) # source points
108110 scat! (vec (pd[1 ,:]), vec (pd[2 ,:]), marker= :circle ,
109- color= :orange , markersize= 1 ) # detectors
111+ color= :orange , markersize= 1 , label = " " ) # detectors
110112
111113 plot! ([pd[1 ,1 ], p0[1 ], pd[1 ,end ]], [pd[2 ,1 ], p0[2 ], pd[2 ,end ]],
112114 color= :red , label= " " )
0 commit comments