X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fsample-ctrec.sh.in;h=f1485da8a6c6d9be53b843a6fa387e8426e8916c;hb=931d1a7f12bb4ec7895c4b1300bd7df2ce758497;hp=b85e71f615ab57d78e8bf001d3aa2f9f22bf876b;hpb=c15d94034f5f815fc058c49c4b16f48ded042fd9;p=ctsim.git diff --git a/src/sample-ctrec.sh.in b/src/sample-ctrec.sh.in index b85e71f..f1485da 100755 --- a/src/sample-ctrec.sh.in +++ b/src/sample-ctrec.sh.in @@ -1,12 +1,17 @@ #!/bin/sh -bin="@prefix@/bin/" +if test "$1" != "" ; then + bin=$1 +else + bin="@prefix@/bin/" +fi # Generate phantom image ${bin}phm2sdf sample-phm.sdf 256 256 --nsample 2 --phantom herman if [ -f sample-phm.sdf ] ; then ${bin}sdf2img sample-phm.sdf sample-phm.png --format png + ${bin}sdf2img sample-phm.sdf sample-phm16.png --format png16 fi # Simulate CT data collection and generate raysum sinugram for display @@ -16,12 +21,14 @@ if [ -f sample-rs.rs ]; then fi if [ -f sample-rs.sdf ]; then ${bin}sdf2img sample-rs.sdf sample-rs.png --format png + ${bin}sdf2img sample-rs.sdf sample-rs16.png --format png16 fi # Reconstruct raysums and generate image for display ${bin}ctrec sample-rs.rs sample-rec.sdf 256 256 if [ -f sample-rec.sdf ]; then ${bin}sdf2img sample-rec.sdf sample-rec.png --format png + ${bin}sdf2img sample-rec.sdf sample-rec16.png --format png16 fi # Files sample-phm.png, sample-rs.png, and sample-rec.png are ready for display