Revert "Update package dependency from libwxgtk3.0-dev to libwxgtk3.0-gtk3-dev for...
[ctsim.git] / tools / sample-ctsim.sh.in
1 #!/bin/sh
2
3 if test "$1" != "" ; then
4   bin=$1
5 else
6   bin="@prefix@/bin/"
7 fi
8
9 if test "$1" = "clean" ; then
10   rm -f sample-phm.png sample-phm16.png sample-phm.if sample-pj.pj sample-pj.if sample-pj.png sample-pj16.png sample-rec.if sample-rec.png sample-rec16.png
11   exit
12 fi
13
14 # Generate phantom image
15
16 ${bin}ctsimtext phm2if sample-phm.if 256 256 --nsample 2 --phantom herman
17 if [ -f sample-phm.if ] ; then
18   ${bin}ctsimtext ifexport sample-phm.if sample-phm.png --format png
19   ${bin}ctsimtext ifexport sample-phm.if sample-phm16.png --format png16
20 fi
21
22 # Simulate CT data collection and generate raysum sinugram for display
23 ${bin}ctsimtext phm2pj  sample-pj.pj 367 320 --nray 2  --phantom herman
24 if [ -f sample-pj.pj ]; then
25   ${bin}ctsimtext pj2if  sample-pj.pj sample-pj.if
26 fi
27 if [ -f sample-pj.if ]; then
28   ${bin}ctsimtext ifexport sample-pj.if sample-pj.png --format png
29   ${bin}ctsimtext ifexport sample-pj.if sample-pj16.png --format png16
30 fi
31
32 # Reconstruct raysums and generate image for display
33 ${bin}ctsimtext pjrec   sample-pj.pj sample-rec.if 256 256 
34 if [ -f sample-rec.if ]; then 
35   ${bin}ctsimtext ifexport sample-rec.if sample-rec.png --format png
36   ${bin}ctsimtext ifexport sample-rec.if sample-rec16.png --format png16
37
38   # Display comparison statistics
39   ${bin}ctsimtext if2 sample-phm.if sample-rec.if --comp
40 fi
41
42 # Files sample-phm.png, sample-pj.png, and sample-rec.png are ready for display