X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fsample-ctrec.sh.in;h=b85e71f615ab57d78e8bf001d3aa2f9f22bf876b;hb=c95a927599e20c3d7762073450e3126d9694107d;hp=bf7410d09ccf20e63e40c73d6ba1e69be2183cac;hpb=13838bda88b63a2535b5baaf7197006767de4b8e;p=ctsim.git diff --git a/src/sample-ctrec.sh.in b/src/sample-ctrec.sh.in index bf7410d..b85e71f 100755 --- a/src/sample-ctrec.sh.in +++ b/src/sample-ctrec.sh.in @@ -4,16 +4,24 @@ bin="@prefix@/bin/" # Generate phantom image -${bin}phm2sdf sample-phm.sdf 256 256 --nsample 2 -${bin}sdf2img sample-phm.sdf sample-phm.png --format png +${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 +fi # Simulate CT data collection and generate raysum sinugram for display -${bin}phm2rs sample-rs.rs 367 320 --nray 2 -${bin}rs2sdf sample-rs.rs sample-rs.sdf -${bin}sdf2img sample-rs.sdf sample-rs.png --format png +${bin}phm2rs sample-rs.rs 367 320 --nray 2 --phantom herman +if [ -f sample-rs.rs ]; then + ${bin}rs2sdf sample-rs.rs sample-rs.sdf +fi +if [ -f sample-rs.sdf ]; then + ${bin}sdf2img sample-rs.sdf sample-rs.png --format png +fi # Reconstruct raysums and generate image for display ${bin}ctrec sample-rs.rs sample-rec.sdf 256 256 -${bin}sdf2img sample-rec.sdf sample-rec.png --format png +if [ -f sample-rec.sdf ]; then + ${bin}sdf2img sample-rec.sdf sample-rec.png --format png +fi # Files sample-phm.png, sample-rs.png, and sample-rec.png are ready for display