3 if test "$1" != "" ; then
9 if test "$1" = "clean" ; then
10 rm -f sample-phm.png sample-phm.if sample-pj.pj sample-pj.if sample-pj.png sample-rec.if sample-rec.png 540-pj.pj 540-pj.if 540-pj.png 540-rec.if 540-rec.png dynphm
14 # Generate phantom image
16 cc -o dynphm dynphm.c -lm
18 ${bin}ctsimtext phm2if sample-phm.if 256 256 --nsample 2 --phmfile tmpphm
20 if [ -f sample-phm.if ] ; then
21 ${bin}ctsimtext ifexport sample-phm.if sample-phm.png --format png
24 # Simulate helical CT data collection and generate raysum sinugram for display
25 ${bin}ctsimtext phm2helix sample-pj.pj 367 1080 dynphm --nray 2 --geometry equiangular --rotangle 3
26 if [ -f sample-pj.pj ]; then
27 ${bin}ctsimtext pj2if sample-pj.pj sample-pj.if
29 if [ -f sample-pj.if ]; then
30 ${bin}ctsimtext ifexport sample-pj.if sample-pj.png --format png
32 if [ -f sample-pj.pj ]; then
33 ${bin}ctsimtext pjHinterp sample-pj.pj 540-pj.pj --interpview 540
35 if [ -f 540-pj.pj ]; then
36 ${bin}ctsimtext pj2if 540-pj.pj 540-pj.if
38 if [ -f sample-pj.if ]; then
39 ${bin}ctsimtext ifexport 540-pj.if 540-pj.png --format png
42 # Reconstruct raysums and generate image for display
43 ${bin}ctsimtext pjrec 540-pj.pj 540-rec.if 256 256
44 if [ -f sample-rec.if ]; then
45 ${bin}ctsimtext ifexport 540-rec.if 540-rec.png --format png
47 # Display comparison statistics
48 ${bin}ctsimtext if2 sample-phm.if 540-rec.if --comp