r56: Improved option processing
[ctsim.git] / src / sample-ctrec.sh.in
1 #!/bin/sh
2
3 bin="@prefix@/bin/"
4
5 # Generate phantom image
6
7 ${bin}phm2sdf sample-phm.sdf 256 256 --nsample 2 --phantom herman
8 if [ -f sample-phm.sdf ] ; then
9   ${bin}sdf2img sample-phm.sdf sample-phm.png --format png
10 fi
11
12 # Simulate CT data collection and generate raysum sinugram for display
13 ${bin}phm2rs  sample-rs.rs 367 320 --nray 2  --phantom herman
14 if [ -f sample-rs.rs ]; then
15   ${bin}rs2sdf  sample-rs.rs sample-rs.sdf
16 fi
17 if [ -f sample-rs.sdf ]; then
18   ${bin}sdf2img sample-rs.sdf sample-rs.png --format png
19 fi
20
21 # Reconstruct raysums and generate image for display
22 ${bin}ctrec   sample-rs.rs sample-rec.sdf 256 256 
23 if [ -f sample-rec.sdf ]; then 
24   ${bin}sdf2img sample-rec.sdf sample-rec.png --format png
25 fi
26
27 # Files sample-phm.png, sample-rs.png, and sample-rec.png are ready for display