r187: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 2 Sep 2000 05:17:29 +0000 (05:17 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 2 Sep 2000 05:17:29 +0000 (05:17 +0000)
32 files changed:
ChangeLog
TODO
configure
configure.in
include/Makefile.am
include/array2d.h
include/backprojectors.h
include/ct.h
include/procsignal.h
include/projections.h
include/reconstruct.h [new file with mode: 0644]
include/scanner.h
include/sgp.h
libctgraphics/ezplot.cpp
libctgraphics/sgp.cpp
libctsim/Makefile.am
libctsim/backprojectors.cpp
libctsim/procsignal.cpp
libctsim/projections.cpp
libctsim/reconstruct.cpp [new file with mode: 0644]
libctsim/scanner.cpp
rpm/ctsim-2.0.0b9-1.spec
src/Makefile.am
src/dialogs.cpp
src/dialogs.h
src/dlgprojections.cpp
src/dlgreconstruct.cpp [new file with mode: 0644]
src/dlgreconstruct.h [new file with mode: 0644]
src/views.cpp
src/views.h
tools/pjinfo.cpp [new file with mode: 0644]
tools/pjrec.cpp

index e77b5944d954b29da019af3d7d6b4bd9f0d8432a..a14122f4b91ab9bfc706e259ddabb630a544911b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,15 @@
-2.0.0-b11 - 8/31/00
-   Added reconstruction for Equilinear and Equiangular geometries
-   Changed theta to be -PI/2 to make compliant with Kak-Slaney formulas
+2.0.0-b11 - 9/1/00
    ctsim: Added projection graph to animation of projection collection 
    ctsim: Added single stepping to projection collection animation
    ctsim: improved File/Properties display for projection files
    ctsim: Added projection graph to animation of projection collection 
    ctsim: Added single stepping to projection collection animation
    ctsim: improved File/Properties display for projection files
+   ctsim: Added progress dialog for reconstructions
+   ctsim: Added file labels for projection and reconstruction images
+   ctsim: Made File/Properties bring up modal dialogs
+   Added reconstruction for Equilinear and Equiangular geometries
+   Changed theta to be -PI/2 to make compliant with Kak-Slaney formulas
+   Separated reconstruction into Reconstructor class
+   Fixed center of detector adjustment for even number of detectors
+   Added --enable-static to generate statically linked programs
        
 2.0.0-b10 - 8/25/00
    ctsim: Added animation of projection collection processs
        
 2.0.0-b10 - 8/25/00
    ctsim: Added animation of projection collection processs
diff --git a/TODO b/TODO
index 46eec6e6d08c4d4e24449a2d50f8b34ae4d7d9ed..71a56a6b2b032cde884c034bb183095297aaedbd 100644 (file)
--- a/TODO
+++ b/TODO
@@ -2,9 +2,7 @@ Fix BUGS -- see BUGS file
 
 Convert pol to C++ object.
 
 
 Convert pol to C++ object.
 
-Adding animation of X-ray projection collection
-
-Add animation of filtering & backprojections
+Add divergent filtering to frequency/direct filtering
 
 FFT filtering requires FFTW library. Add a public domain FFT routine.
 
 
 FFT filtering requires FFTW library. Add a public domain FFT routine.
 
index 299bf4348756e26f01cf987ea1397049503d315a..056984c9ecbbd442c76770d9e31b36afb6cb3ece 100755 (executable)
--- a/configure
+++ b/configure
@@ -16,6 +16,9 @@ ac_help="$ac_help
 ac_help="$ac_help
   --enable-verbose-warnings
                           Enable verbose compiler warnings."
 ac_help="$ac_help
   --enable-verbose-warnings
                           Enable verbose compiler warnings."
+ac_help="$ac_help
+  --enable-static
+                          Enable static executables."
 ac_help="$ac_help
   --with-lam[=PATH]       Set path of LAM MPI "
 ac_help="$ac_help
 ac_help="$ac_help
   --with-lam[=PATH]       Set path of LAM MPI "
 ac_help="$ac_help
@@ -573,7 +576,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:577: checking for a BSD compatible install" >&5
+echo "configure:580: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -626,7 +629,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:630: checking whether build environment is sane" >&5
+echo "configure:633: checking whether build environment is sane" >&5
 # Just in case
 sleep 1
 echo timestamp > conftestfile
 # Just in case
 sleep 1
 echo timestamp > conftestfile
@@ -683,7 +686,7 @@ test "$program_suffix" != NONE &&
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:687: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:690: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -729,7 +732,7 @@ EOF
 
 missing_dir=`cd $ac_aux_dir && pwd`
 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
 
 missing_dir=`cd $ac_aux_dir && pwd`
 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:733: checking for working aclocal" >&5
+echo "configure:736: checking for working aclocal" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -742,7 +745,7 @@ else
 fi
 
 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:746: checking for working autoconf" >&5
+echo "configure:749: checking for working autoconf" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -755,7 +758,7 @@ else
 fi
 
 echo $ac_n "checking for working automake""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:759: checking for working automake" >&5
+echo "configure:762: checking for working automake" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -768,7 +771,7 @@ else
 fi
 
 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:772: checking for working autoheader" >&5
+echo "configure:775: checking for working autoheader" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -781,7 +784,7 @@ else
 fi
 
 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:785: checking for working makeinfo" >&5
+echo "configure:788: checking for working makeinfo" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -803,7 +806,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:807: checking for $ac_word" >&5
+echo "configure:810: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -844,7 +847,7 @@ done
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:848: checking for a BSD compatible install" >&5
+echo "configure:851: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -897,7 +900,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:901: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:904: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -926,7 +929,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:930: checking for $ac_word" >&5
+echo "configure:933: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -956,7 +959,7 @@ fi
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:960: checking for $ac_word" >&5
+echo "configure:963: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -986,7 +989,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:990: checking for $ac_word" >&5
+echo "configure:993: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1037,7 +1040,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1041: checking for $ac_word" >&5
+echo "configure:1044: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1069,7 +1072,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1073: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1076: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1080,12 +1083,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
 
 cat > conftest.$ac_ext << EOF
 
-#line 1084 "configure"
+#line 1087 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1111,12 +1114,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1115: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1120: checking whether we are using GNU C" >&5
+echo "configure:1123: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1125,7 +1128,7 @@ else
   yes;
 #endif
 EOF
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1144,7 +1147,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1148: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1151: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1180,7 +1183,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1184: checking for $ac_word" >&5
+echo "configure:1187: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1212,7 +1215,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1216: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1219: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1223,12 +1226,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
 
 cat > conftest.$ac_ext << EOF
 
-#line 1227 "configure"
+#line 1230 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1254,12 +1257,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1258: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1261: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1263: checking whether we are using GNU C++" >&5
+echo "configure:1266: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1268,7 +1271,7 @@ else
   yes;
 #endif
 EOF
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -1287,7 +1290,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1291: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1294: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1321,7 +1324,7 @@ fi
 # Extract the first word of "wx-config", so it can be a program name with args.
 set dummy wx-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 # Extract the first word of "wx-config", so it can be a program name with args.
 set dummy wx-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
+echo "configure:1328: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_wxconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_path_wxconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1362,7 +1365,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1366: checking host system type" >&5
+echo "configure:1369: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
 
 host_alias=$host
 case "$host_alias" in
@@ -1383,21 +1386,21 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
  
 echo $ac_n "checking for inline""... $ac_c" 1>&6
 echo "$ac_t""$host" 1>&6
  
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1387: checking for inline" >&5
+echo "configure:1390: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1394 "configure"
+#line 1397 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1423,7 +1426,7 @@ EOF
 esac
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
 esac
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1427: checking size of short" >&5
+echo "configure:1430: checking size of short" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1431,7 +1434,7 @@ else
   ac_cv_sizeof_short=2
 else
   cat > conftest.$ac_ext <<EOF
   ac_cv_sizeof_short=2
 else
   cat > conftest.$ac_ext <<EOF
-#line 1435 "configure"
+#line 1438 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1442,7 +1445,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:1446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -1462,7 +1465,7 @@ EOF
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1466: checking size of int" >&5
+echo "configure:1469: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1470,7 +1473,7 @@ else
   ac_cv_sizeof_int=4
 else
   cat > conftest.$ac_ext <<EOF
   ac_cv_sizeof_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 1474 "configure"
+#line 1477 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1481,7 +1484,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:1485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -1501,7 +1504,7 @@ EOF
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1505: checking size of long" >&5
+echo "configure:1508: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1509,7 +1512,7 @@ else
   ac_cv_sizeof_long=4
 else
   cat > conftest.$ac_ext <<EOF
   ac_cv_sizeof_long=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 1513 "configure"
+#line 1516 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1520,7 +1523,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -1540,7 +1543,7 @@ EOF
 
 
 echo $ac_n "checking size of float""... $ac_c" 1>&6
 
 
 echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:1544: checking size of float" >&5
+echo "configure:1547: checking size of float" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1548,7 +1551,7 @@ else
   ac_cv_sizeof_float=4
 else
   cat > conftest.$ac_ext <<EOF
   ac_cv_sizeof_float=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 1552 "configure"
+#line 1555 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1559,7 +1562,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_float=`cat conftestval`
 else
 then
   ac_cv_sizeof_float=`cat conftestval`
 else
@@ -1579,7 +1582,7 @@ EOF
 
 
 echo $ac_n "checking size of double""... $ac_c" 1>&6
 
 
 echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:1583: checking size of double" >&5
+echo "configure:1586: checking size of double" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1587,7 +1590,7 @@ else
   ac_cv_sizeof_double=8
 else
   cat > conftest.$ac_ext <<EOF
   ac_cv_sizeof_double=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 1591 "configure"
+#line 1594 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1598,7 +1601,7 @@ main()
   exit(0);
 }
 EOF
   exit(0);
 }
 EOF
-if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_double=`cat conftestval`
 else
 then
   ac_cv_sizeof_double=`cat conftestval`
 else
@@ -1622,14 +1625,14 @@ EOF
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1626: checking whether byte ordering is bigendian" >&5
+echo "configure:1629: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 1633 "configure"
+#line 1636 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1640,11 +1643,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 1648 "configure"
+#line 1651 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1655,7 +1658,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -1675,7 +1678,7 @@ if test "$cross_compiling" = yes; then
   ac_cv_c_bigendian=unknown
 else
   cat > conftest.$ac_ext <<EOF
   ac_cv_c_bigendian=unknown
 else
   cat > conftest.$ac_ext <<EOF
-#line 1679 "configure"
+#line 1682 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -1688,7 +1691,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
 then
   ac_cv_c_bigendian=no
 else
@@ -1718,7 +1721,7 @@ fi
 
 
 echo $ac_n "checking for main in -lz""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for main in -lz""... $ac_c" 1>&6
-echo "configure:1722: checking for main in -lz" >&5
+echo "configure:1725: checking for main in -lz" >&5
 ac_lib_var=`echo z'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo z'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1726,14 +1729,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1730 "configure"
+#line 1733 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1755,7 +1758,7 @@ else
 fi
 
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:1759: checking for main in -lm" >&5
+echo "configure:1762: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1763,14 +1766,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1767 "configure"
+#line 1770 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1798,7 +1801,7 @@ else
 fi
 
 echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
-echo "configure:1802: checking for main in -lcurses" >&5
+echo "configure:1805: checking for main in -lcurses" >&5
 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1806,14 +1809,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1810 "configure"
+#line 1813 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1835,7 +1838,7 @@ curses=false
 fi
 
 echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6
-echo "configure:1839: checking for main in -lncurses" >&5
+echo "configure:1842: checking for main in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo ncurses'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1843,14 +1846,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1847 "configure"
+#line 1850 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1872,7 +1875,7 @@ ncurses=false
 fi
 
 echo $ac_n "checking for main in -lg2""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for main in -lg2""... $ac_c" 1>&6
-echo "configure:1876: checking for main in -lg2" >&5
+echo "configure:1879: checking for main in -lg2" >&5
 ac_lib_var=`echo g2'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo g2'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1880,14 +1883,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lg2  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lg2  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1884 "configure"
+#line 1887 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1910,7 +1913,7 @@ fi
 
 wxwin=false
 echo $ac_n "checking for main in -lwx_gtk""... $ac_c" 1>&6
 
 wxwin=false
 echo $ac_n "checking for main in -lwx_gtk""... $ac_c" 1>&6
-echo "configure:1914: checking for main in -lwx_gtk" >&5
+echo "configure:1917: checking for main in -lwx_gtk" >&5
 ac_lib_var=`echo wx_gtk'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo wx_gtk'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1918,14 +1921,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lwx_gtk  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lwx_gtk  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1922 "configure"
+#line 1925 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1949,7 +1952,7 @@ else
 fi
 
 echo $ac_n "checking for main in -lwx_msw""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for main in -lwx_msw""... $ac_c" 1>&6
-echo "configure:1953: checking for main in -lwx_msw" >&5
+echo "configure:1956: checking for main in -lwx_msw" >&5
 ac_lib_var=`echo wx_msw'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo wx_msw'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1957,14 +1960,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lwx_msw  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lwx_msw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1961 "configure"
+#line 1964 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1988,7 +1991,7 @@ else
 fi
 
 echo $ac_n "checking for main in -lhdf5""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for main in -lhdf5""... $ac_c" 1>&6
-echo "configure:1992: checking for main in -lhdf5" >&5
+echo "configure:1995: checking for main in -lhdf5" >&5
 ac_lib_var=`echo hdf5'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo hdf5'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1996,14 +1999,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lhdf5 -lz $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lhdf5 -lz $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2000 "configure"
+#line 2003 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2025,7 +2028,7 @@ hdf5=false
 fi
 
 echo $ac_n "checking for main in -lfftw""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for main in -lfftw""... $ac_c" 1>&6
-echo "configure:2029: checking for main in -lfftw" >&5
+echo "configure:2032: checking for main in -lfftw" >&5
 ac_lib_var=`echo fftw'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo fftw'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2033,14 +2036,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lfftw  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lfftw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2037 "configure"
+#line 2040 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2067,7 +2070,7 @@ fi
 
 if test "$zlib" = "true" ; then
   echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6
 
 if test "$zlib" = "true" ; then
   echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6
-echo "configure:2071: checking for main in -lpng" >&5
+echo "configure:2074: checking for main in -lpng" >&5
 ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2075,14 +2078,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpng  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lpng  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2079 "configure"
+#line 2082 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2109,7 +2112,7 @@ fi
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2113: checking how to run the C preprocessor" >&5
+echo "configure:2116: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2124,13 +2127,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2128 "configure"
+#line 2131 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2141,13 +2144,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2145 "configure"
+#line 2148 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2158,13 +2161,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2162 "configure"
+#line 2165 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2189,12 +2192,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2193: checking for ANSI C header files" >&5
+echo "configure:2196: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2198 "configure"
+#line 2201 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2202,7 +2205,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2219,7 +2222,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2223 "configure"
+#line 2226 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2237,7 +2240,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2241 "configure"
+#line 2244 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2258,7 +2261,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2262 "configure"
+#line 2265 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2269,7 +2272,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
 exit (0); }
 
 EOF
-if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
 then
   :
 else
@@ -2296,17 +2299,17 @@ for ac_hdr in fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h s
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2300: checking for $ac_hdr" >&5
+echo "configure:2303: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2305 "configure"
+#line 2308 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2334,12 +2337,12 @@ done
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2338: checking for working const" >&5
+echo "configure:2341: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2343 "configure"
+#line 2346 "configure"
 #include "confdefs.h"
 
 int main() {
 #include "confdefs.h"
 
 int main() {
@@ -2388,7 +2391,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2409,12 +2412,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2413: checking for off_t" >&5
+echo "configure:2416: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2418 "configure"
+#line 2421 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2442,12 +2445,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2446: checking for size_t" >&5
+echo "configure:2449: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2451 "configure"
+#line 2454 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2475,12 +2478,12 @@ EOF
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2479: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:2482: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2484 "configure"
+#line 2487 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -2488,7 +2491,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:2492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -2510,12 +2513,12 @@ fi
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2514: checking for vprintf" >&5
+echo "configure:2517: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2519 "configure"
+#line 2522 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -2538,7 +2541,7 @@ vprintf();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -2562,12 +2565,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2566: checking for _doprnt" >&5
+echo "configure:2569: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2571 "configure"
+#line 2574 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -2590,7 +2593,7 @@ _doprnt();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -2617,12 +2620,12 @@ fi
 for ac_func in strtod strtol snprintf htonl usleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 for ac_func in strtod strtol snprintf htonl usleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2621: checking for $ac_func" >&5
+echo "configure:2624: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2626 "configure"
+#line 2629 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2645,7 +2648,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2670,12 +2673,12 @@ fi
 done
 
 echo $ac_n "checking for basename""... $ac_c" 1>&6
 done
 
 echo $ac_n "checking for basename""... $ac_c" 1>&6
-echo "configure:2674: checking for basename" >&5
+echo "configure:2677: checking for basename" >&5
 if eval "test \"`echo '$''{'ac_cv_func_basename'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_basename'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2679 "configure"
+#line 2682 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char basename(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char basename(); below.  */
@@ -2698,7 +2701,7 @@ basename();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_basename=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_basename=yes"
 else
@@ -2718,12 +2721,12 @@ else
 fi
 
 echo $ac_n "checking for setjmp""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for setjmp""... $ac_c" 1>&6
-echo "configure:2722: checking for setjmp" >&5
+echo "configure:2725: checking for setjmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setjmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_setjmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2727 "configure"
+#line 2730 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char setjmp(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char setjmp(); below.  */
@@ -2746,7 +2749,7 @@ setjmp();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_setjmp=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_setjmp=yes"
 else
@@ -2769,12 +2772,12 @@ if test "${OSTYPE}" = "cygwin" ; then
   getopt_long=false
 else
   echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
   getopt_long=false
 else
   echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:2773: checking for getopt_long" >&5
+echo "configure:2776: checking for getopt_long" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2778 "configure"
+#line 2781 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
@@ -2797,7 +2800,7 @@ getopt_long();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_getopt_long=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_getopt_long=yes"
 else
@@ -2838,7 +2841,7 @@ fi
 fi
 
 echo $ac_n "checking debug""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking debug""... $ac_c" 1>&6
-echo "configure:2842: checking debug" >&5
+echo "configure:2845: checking debug" >&5
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
@@ -2887,7 +2890,7 @@ fi
  fi
  
 echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6
  fi
  
 echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6
-echo "configure:2891: checking whether to enable verbose warnings" >&5
+echo "configure:2894: checking whether to enable verbose warnings" >&5
 # Check whether --enable-verbose-warnings or --disable-verbose-warnings was given.
 if test "${enable_verbose_warnings+set}" = set; then
   enableval="$enable_verbose_warnings"
 # Check whether --enable-verbose-warnings or --disable-verbose-warnings was given.
 if test "${enable_verbose_warnings+set}" = set; then
   enableval="$enable_verbose_warnings"
@@ -2936,6 +2939,30 @@ else
 fi
 
 
 fi
 
 
+echo $ac_n "checking static executables""... $ac_c" 1>&6
+echo "configure:2944: checking static executables" >&5
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+   case "$enableval" in
+  yes)
+    echo "$ac_t""yes" 1>&6
+    
+ if test -n "$GCC"; then
+    CFLAGS="$CFLAGS --static"
+ fi
+    ;;
+  *)
+    echo "$ac_t""no" 1>&6
+    ;;
+  esac 
+else
+  echo "$ac_t""no" 1>&6
+
+fi
+
+
 # Check whether --with-lam or --without-lam was given.
 if test "${with_lam+set}" = set; then
   withval="$with_lam"
 # Check whether --with-lam or --without-lam was given.
 if test "${with_lam+set}" = set; then
   withval="$with_lam"
@@ -2952,7 +2979,7 @@ if test "$withval" != "no" ; then
   fi
 
   echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6
   fi
 
   echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6
-echo "configure:2956: checking for LAM MPI installation" >&5
+echo "configure:2983: checking for LAM MPI installation" >&5
   for testlamdir in "." $trylamdir /usr/local /usr/local/lam /usr /usr/lam /opt /opt/lam ; do
     if test -x "$testlamdir/bin/hcc" ; then
       LDFLAGS="$LDFLAGS -L$testlamdir/lib"
   for testlamdir in "." $trylamdir /usr/local /usr/local/lam /usr /usr/lam /opt /opt/lam ; do
     if test -x "$testlamdir/bin/hcc" ; then
       LDFLAGS="$LDFLAGS -L$testlamdir/lib"
@@ -2970,7 +2997,7 @@ else
 fi
 
 echo $ac_n "checking for web access""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for web access""... $ac_c" 1>&6
-echo "configure:2974: checking for web access" >&5
+echo "configure:3001: checking for web access" >&5
 # Check whether --with-cgibin-dir or --without-cgibin-dir was given.
 if test "${with_cgibin_dir+set}" = set; then
   withval="$with_cgibin_dir"
 # Check whether --with-cgibin-dir or --without-cgibin-dir was given.
 if test "${with_cgibin_dir+set}" = set; then
   withval="$with_cgibin_dir"
@@ -3060,7 +3087,7 @@ fi
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:3064: checking for X" >&5
+echo "configure:3091: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -3122,12 +3149,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 3126 "configure"
+#line 3153 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3196,14 +3223,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3200 "configure"
+#line 3227 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -3309,17 +3336,17 @@ else
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:3313: checking whether -R must be followed by a space" >&5
+echo "configure:3340: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 3316 "configure"
+#line 3343 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -3335,14 +3362,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 3339 "configure"
+#line 3366 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -3374,7 +3401,7 @@ rm -f conftest*
     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:3378: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:3405: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3382,7 +3409,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3386 "configure"
+#line 3413 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3393,7 +3420,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3415,7 +3442,7 @@ fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:3419: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:3446: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3423,7 +3450,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3427 "configure"
+#line 3454 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3434,7 +3461,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3463,12 +3490,12 @@ fi
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3467: checking for gethostbyname" >&5
+echo "configure:3494: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3472 "configure"
+#line 3499 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3491,7 +3518,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -3512,7 +3539,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3516: checking for gethostbyname in -lnsl" >&5
+echo "configure:3543: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3520,7 +3547,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3524 "configure"
+#line 3551 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3531,7 +3558,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3561,12 +3588,12 @@ fi
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3565: checking for connect" >&5
+echo "configure:3592: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3570 "configure"
+#line 3597 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3589,7 +3616,7 @@ connect();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -3610,7 +3637,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3614: checking for connect in -lsocket" >&5
+echo "configure:3641: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3618,7 +3645,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3622 "configure"
+#line 3649 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3629,7 +3656,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3653,12 +3680,12 @@ fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:3657: checking for remove" >&5
+echo "configure:3684: checking for remove" >&5
 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3662 "configure"
+#line 3689 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -3681,7 +3708,7 @@ remove();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -3702,7 +3729,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:3706: checking for remove in -lposix" >&5
+echo "configure:3733: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3710,7 +3737,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3714 "configure"
+#line 3741 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3721,7 +3748,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3745,12 +3772,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:3749: checking for shmat" >&5
+echo "configure:3776: checking for shmat" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3754 "configure"
+#line 3781 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -3773,7 +3800,7 @@ shmat();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -3794,7 +3821,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:3798: checking for shmat in -lipc" >&5
+echo "configure:3825: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3802,7 +3829,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3806 "configure"
+#line 3833 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3813,7 +3840,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3846,7 +3873,7 @@ fi
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:3850: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:3877: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3854,7 +3881,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3858 "configure"
+#line 3885 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3865,7 +3892,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3902,7 +3929,7 @@ X_BASIC_LIBS="-lXext -lX11"
 our_saved_LDFLAGS="$LDFLAGS"
 LDFLAGS="$X_LIBS $LDFLAGS"
 echo $ac_n "checking for XtToolkitThreadInitialize in -lXt""... $ac_c" 1>&6
 our_saved_LDFLAGS="$LDFLAGS"
 LDFLAGS="$X_LIBS $LDFLAGS"
 echo $ac_n "checking for XtToolkitThreadInitialize in -lXt""... $ac_c" 1>&6
-echo "configure:3906: checking for XtToolkitThreadInitialize in -lXt" >&5
+echo "configure:3933: checking for XtToolkitThreadInitialize in -lXt" >&5
 ac_lib_var=`echo Xt'_'XtToolkitThreadInitialize | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo Xt'_'XtToolkitThreadInitialize | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3910,7 +3937,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3914 "configure"
+#line 3941 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3921,7 +3948,7 @@ int main() {
 XtToolkitThreadInitialize()
 ; return 0; }
 EOF
 XtToolkitThreadInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3949,7 +3976,7 @@ LDFLAGS="$our_saved_LDFLAGS"
 our_saved_LDFLAGS="$LDFLAGS"
 LDFLAGS="$X_LIBS $LDFLAGS"
 echo $ac_n "checking for XdbeQueryExtension in -lXext""... $ac_c" 1>&6
 our_saved_LDFLAGS="$LDFLAGS"
 LDFLAGS="$X_LIBS $LDFLAGS"
 echo $ac_n "checking for XdbeQueryExtension in -lXext""... $ac_c" 1>&6
-echo "configure:3953: checking for XdbeQueryExtension in -lXext" >&5
+echo "configure:3980: checking for XdbeQueryExtension in -lXext" >&5
 ac_lib_var=`echo Xext'_'XdbeQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo Xext'_'XdbeQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3957,7 +3984,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3961 "configure"
+#line 3988 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3968,7 +3995,7 @@ int main() {
 XdbeQueryExtension()
 ; return 0; }
 EOF
 XdbeQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3992,7 +4019,7 @@ else
 fi
 
 echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6
-echo "configure:3996: checking for XmbufQueryExtension in -lXext" >&5
+echo "configure:4023: checking for XmbufQueryExtension in -lXext" >&5
 ac_lib_var=`echo Xext'_'XmbufQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo Xext'_'XmbufQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4000,7 +4027,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4004 "configure"
+#line 4031 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4011,7 +4038,7 @@ int main() {
 XmbufQueryExtension()
 ; return 0; }
 EOF
 XmbufQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4041,17 +4068,17 @@ for ac_hdr in X11/extensions/Xdbe.h X11/extensions/multibuf.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4045: checking for $ac_hdr" >&5
+echo "configure:4072: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4050 "configure"
+#line 4077 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4093,7 +4120,7 @@ my_includes="$my_includes -I../include -I.."
 
 
 echo $ac_n "checking interactive graphics""... $ac_c" 1>&6
 
 
 echo $ac_n "checking interactive graphics""... $ac_c" 1>&6
-echo "configure:4097: checking interactive graphics" >&5
+echo "configure:4124: checking interactive graphics" >&5
 if test "$no_x" != "yes" ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_X11 1
 if test "$no_x" != "yes" ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_X11 1
@@ -4113,8 +4140,12 @@ else
   HAVE_SGP_FALSE=
 fi
   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
   HAVE_SGP_FALSE=
 fi
   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
-  ctlibs_graphics="$ctlibs_base -lctgraphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
+  ctlibs_graphics="$ctlibs_base -lctgraphics"
   echo "$ac_t""yes" 1>&6
   echo "$ac_t""yes" 1>&6
+  if test "$g2" = "true" ; then
+  ctlibs_graphics="$ctlibs_graphics -lg2"
+  fi   
+  ctlibs_graphics="$ctlibs_graphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
 else
   echo "$ac_t""no" 1>&6
 fi
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -4125,16 +4156,12 @@ fi
 if test "$zlib" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lz"
 fi
 if test "$zlib" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lz"
 fi
-if test "$g2" = "true" ; then
-  ctlibs_tools="$ctlibs_tools -lg2"
-fi
-
 if test "$fftw" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lrfftw -lfftw"
 fi
 
 echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6
 if test "$fftw" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lrfftw -lfftw"
 fi
 
 echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6
-echo "configure:4138: checking for main in -ldmallocxx" >&5
+echo "configure:4165: checking for main in -ldmallocxx" >&5
 ac_lib_var=`echo dmallocxx'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo dmallocxx'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4142,14 +4169,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldmallocxx  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ldmallocxx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4146 "configure"
+#line 4173 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4171,7 +4198,7 @@ dmallocxx=false
 fi
 
 echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6
 fi
 
 echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6
-echo "configure:4175: checking for enable-dmalloc" >&5
+echo "configure:4202: checking for enable-dmalloc" >&5
 # Check whether --enable-dmalloc or --disable-dmalloc was given.
 if test "${enable_dmalloc+set}" = set; then
   enableval="$enable_dmalloc"
 # Check whether --enable-dmalloc or --disable-dmalloc was given.
 if test "${enable_dmalloc+set}" = set; then
   enableval="$enable_dmalloc"
index 0b5e2705f8e4cfa53a4a1e4eed87603375630ea1..262f928be32742d772236a4346f433a427907ed8 100644 (file)
@@ -165,6 +165,21 @@ AC_ARG_ENABLE(verbose-warnings,
   esac ], AC_MSG_RESULT(no)
 )
 
   esac ], AC_MSG_RESULT(no)
 )
 
+AC_MSG_CHECKING(static executables)
+AC_ARG_ENABLE(static,
+[  --enable-static
+                          Enable static executables.],
+[ case "$enableval" in
+  yes)
+    AC_MSG_RESULT(yes)
+    AC_ADD_GCC_CFLAGS([--static])
+    ;;
+  *)
+    AC_MSG_RESULT(no)
+    ;;
+  esac ], AC_MSG_RESULT(no)
+)
+
 dnl Set LAM path
 AC_ARG_WITH(lam,
 [  --with-lam[=PATH]       Set path of LAM MPI ],
 dnl Set LAM path
 AC_ARG_WITH(lam,
 [  --with-lam[=PATH]       Set path of LAM MPI ],
@@ -300,8 +315,12 @@ if test "$no_x" != "yes" ; then
   AC_DEFINE(HAVE_SGP)
   AM_CONDITIONAL(HAVE_SGP, test 1==1)
   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
   AC_DEFINE(HAVE_SGP)
   AM_CONDITIONAL(HAVE_SGP, test 1==1)
   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
-  ctlibs_graphics="$ctlibs_base -lctgraphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
+  ctlibs_graphics="$ctlibs_base -lctgraphics"
   AC_MSG_RESULT(yes)
   AC_MSG_RESULT(yes)
+  if test "$g2" = "true" ; then
+  ctlibs_graphics="$ctlibs_graphics -lg2"
+  fi   
+  ctlibs_graphics="$ctlibs_graphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
 else
   AC_MSG_RESULT(no)
 fi
 else
   AC_MSG_RESULT(no)
 fi
@@ -312,10 +331,6 @@ fi
 if test "$zlib" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lz"
 fi
 if test "$zlib" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lz"
 fi
-if test "$g2" = "true" ; then
-  ctlibs_tools="$ctlibs_tools -lg2"
-fi
-
 if test "$fftw" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lrfftw -lfftw"
 fi
 if test "$fftw" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lrfftw -lfftw"
 fi
index a7f4ddf9ff828dedc77f9b9f93847d4bf461ff38..bf978a6ee7b8c60489c6059869b7dd9e0ec623da 100644 (file)
@@ -1,4 +1,5 @@
-noinst_HEADERS=ct.h ezplot.h pol.h sgp.h array2d.h imagefile.h backprojectors.h mpiworld.h fnetorderstream.h phantom.h timer.h sstream scanner.h projections.h ctsupport.h filter.h array2dfile.h trace.h transformmatrix.h procsignal.h
+noinst_HEADERS=ct.h ezplot.h pol.h sgp.h array2d.h imagefile.h backprojectors.h mpiworld.h fnetorderstream.h phantom.h timer.h sstream scanner.h projections.h ctsupport.h filter.h array2dfile.h trace.h transformmatrix.h procsignal.h reconstruct.h
+
 
 
 
 
 
 
index 73f39093cb2da11832e3d69a8d1c87f1f59d2047..8c323f4034ca45f3b1449b3ba3f2b50c7db3c2ed 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: array2d.h,v 1.7 2000/07/13 07:03:21 kevin Exp $
+**  $Id: array2d.h,v 1.8 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -35,13 +35,13 @@ template<class T>
 class Array2d {
  public:
     Array2d (unsigned int x, unsigned int y)
 class Array2d {
  public:
     Array2d (unsigned int x, unsigned int y)
-       : nx(x), ny(y), array_data(0)
+       : m_nx(x), m_ny(y), array_data(0)
        {
            allocArray();
        }
 
        {
            allocArray();
        }
 
-    Array2d (void)
-       : nx(0), ny(0), array_data(0)
+    Array2d ()
+       : m_nx(0), m_ny(0), array_data(0)
        {}
 
     ~Array2d ()
        {}
 
     ~Array2d ()
@@ -51,13 +51,13 @@ class Array2d {
     
     void initSetSize (unsigned int x, unsigned int y)
        {
     
     void initSetSize (unsigned int x, unsigned int y)
        {
-           nx = x;
-           ny = y;
+           m_nx = x;
+           m_ny = y;
            deleteArray();
            allocArray();
        }
 
            deleteArray();
            allocArray();
        }
 
-    T** getArray (void) const
+    T** getArray () const
        { return array_data; }
 
     T* getColumn (unsigned int x) const
        { return array_data; }
 
     T* getColumn (unsigned int x) const
@@ -66,35 +66,39 @@ class Array2d {
     T getPoint (unsigned int x, unsigned int y) const
        { return (array_data ? array_data[x][y] : NULL); }
 
     T getPoint (unsigned int x, unsigned int y) const
        { return (array_data ? array_data[x][y] : NULL); }
 
-    unsigned int sizeofPixel (void) const 
+    unsigned int sizeofPixel () const 
        {  return sizeof(T); }
 
        {  return sizeof(T); }
 
-    unsigned int sizeofColumn (void) const
-       { return (sizeof(T) * ny); }
+    unsigned int sizeofColumn () const
+       { return (sizeof(T) * m_ny); }
 
 
-    unsigned int sizeofArray (void) const
-       { return (sizeof(T) * nx * ny); }
+    unsigned int sizeofArray () const
+       { return (sizeof(T) * m_nx * m_ny); }
 
 
  private:
 
 
  private:
-    unsigned int nx;
-    unsigned int ny;
+    unsigned int m_nx;
+    unsigned int m_ny;
     T** array_data;
 
     T** array_data;
 
-    void allocArray (void)
+    void allocArray ()
        {
        {
-           array_data = new T*[nx];
+           if (array_data)
+               deleteArray();
+
+           array_data = new T*[m_nx];
            
            
-           for (unsigned int i = 0; i < nx; i++)
-               array_data[i] = new T[ny];
+           for (unsigned int i = 0; i < m_nx; i++)
+               array_data[i] = new T[m_ny];
        }
 
        }
 
-    void deleteArray (void)
+    void deleteArray ()
        {
            if (array_data) {
        {
            if (array_data) {
-               for (unsigned int i = 0; i < nx; i++)
-                   delete array_data[i];
+               for (unsigned int i = 0; i < m_nx; i++)
+                   delete array_data [i];
                delete array_data;
                delete array_data;
+               array_data = NULL;
            }
        }
 
            }
        }
 
index b36dfb83cefbb7ef776ef5d4e2da3871e378a9ff..ef70d0581657f58ea6e10d6389027a178071282c 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: backprojectors.h,v 1.14 2000/08/31 08:38:58 kevin Exp $
+**  $Id: backprojectors.h,v 1.15 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -155,7 +155,7 @@ class BackprojectTable : public Backproject
 {
  public:
   BackprojectTable (const Projections& proj, ImageFile& im, int interpID, const int interpFactor);
 {
  public:
   BackprojectTable (const Projections& proj, ImageFile& im, int interpID, const int interpFactor);
-  ~BackprojectTable ();
+  virtual ~BackprojectTable ();
 
   void BackprojectView (const double* const t, double view_angle);
 
 
   void BackprojectView (const double* const t, double view_angle);
 
@@ -220,6 +220,9 @@ class BackprojectEquilinear : public BackprojectTable
       {}
 
   void BackprojectView (const double* const t, double view_angle);
       {}
 
   void BackprojectView (const double* const t, double view_angle);
+
+  virtual ~BackprojectEquilinear()
+      {}
 };
 
 class BackprojectEquiangular : public BackprojectTable
 };
 
 class BackprojectEquiangular : public BackprojectTable
@@ -230,6 +233,9 @@ class BackprojectEquiangular : public BackprojectTable
       {}
 
   void BackprojectView (const double* const t, double view_angle);
       {}
 
   void BackprojectView (const double* const t, double view_angle);
+
+  virtual ~BackprojectEquiangular()
+      {}
 };
 
 
 };
 
 
index a0383afae73797de76304cb78b402b2b2031080e..0653809af675d855e9fe4744de7b7074216d53b9 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ct.h,v 1.31 2000/08/19 22:59:06 kevin Exp $
+**  $Id: ct.h,v 1.32 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -157,6 +157,7 @@ using namespace std;
 #include "filter.h"
 #include "procsignal.h"
 #include "projections.h"
 #include "filter.h"
 #include "procsignal.h"
 #include "projections.h"
+#include "reconstruct.h"
 #include "trace.h"
 
 
 #include "trace.h"
 
 
index ad2858161a4e1158522c9a22c78eb24076974cd3..94548a8bd2e3fb7ba467da35365af47541e24c9f 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: procsignal.h,v 1.4 2000/08/31 08:38:58 kevin Exp $
+**  $Id: procsignal.h,v 1.5 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -41,6 +41,7 @@
 
 
 class SignalFilter;
 
 
 class SignalFilter;
+class SGP;
 
 class ProcessSignal {
  public:
 
 class ProcessSignal {
  public:
@@ -58,7 +59,7 @@ class ProcessSignal {
     static const int FILTER_GENERATION_DIRECT;
     static const int FILTER_GENERATION_INVERSE_FOURIER;
 
     static const int FILTER_GENERATION_DIRECT;
     static const int FILTER_GENERATION_INVERSE_FOURIER;
 
-    ProcessSignal (const char* szFilterName, const char* szFilterMethodName,double bw, double signalIncrement, int n, double param, const char* szDomainName, const char* szFilterGenerationName, const int zeropad = 0, const int preinterpolationFactor = 1, const int iTraceLevel = Trace::TRACE_NONE, int iGeometry = Scanner::GEOMETRY_PARALLEL, double dFocalLength = 1.);
+    ProcessSignal (const char* szFilterName, const char* szFilterMethodName,double bw, double signalIncrement, int n, double param, const char* szDomainName, const char* szFilterGenerationName, const int zeropad = 0, const int preinterpolationFactor = 1, const int iTraceLevel = Trace::TRACE_NONE, int iGeometry = Scanner::GEOMETRY_PARALLEL, double dFocalLength = 1., SGP* pSGP = NULL);
 
     ~ProcessSignal();
 
 
     ~ProcessSignal();
 
@@ -149,7 +150,7 @@ class ProcessSignal {
     fftw_plan m_complexPlanForward, m_complexPlanBackward;
 #endif
 
     fftw_plan m_complexPlanForward, m_complexPlanBackward;
 #endif
 
-    void init (const int idFilter, int idFilterMethod, double dBandwidth, double dSignalIncrement, int nSignalPoints, double dFilterParam, const int idDomain, int idFilterGeneration, const int iZeropad, const int iPreinterpolationFactor, const int iTraceLevel, const int iGeometry, double dFocalLength);
+    void init (const int idFilter, int idFilterMethod, double dBandwidth, double dSignalIncrement, int nSignalPoints, double dFilterParam, const int idDomain, int idFilterGeneration, const int iZeropad, const int iPreinterpolationFactor, const int iTraceLevel, const int iGeometry, double dFocalLength, SGP* pSGP);
 
     // transforms that use precalculated trig tables, therefore don't 
     // require number of data points (n) as an argument
 
     // transforms that use precalculated trig tables, therefore don't 
     // require number of data points (n) as an argument
index 8a916166170327ee92adcde5dffe93d6b7993c21..eb1e853db11a3b9a8d0536fa5c566ebff0be8d22 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: projections.h,v 1.13 2000/08/31 08:38:58 kevin Exp $
+**  $Id: projections.h,v 1.14 2000/09/02 05:10:39 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -62,8 +62,8 @@ class Projections
   void setDetInc (double detInc) { m_detInc = detInc;}
   void setPhmLen (double phmLen) { m_phmLen = phmLen;}
   void setCalcTime (double calcTime) {m_calcTime = calcTime;}
   void setDetInc (double detInc) { m_detInc = detInc;}
   void setPhmLen (double phmLen) { m_phmLen = phmLen;}
   void setCalcTime (double calcTime) {m_calcTime = calcTime;}
-  void setRemark (const char* remark) {m_remark = remark;}
-  void setRemark (const string& remark) {m_remark = remark;}
+  void setRemark (const char* remark) {m_remark = remark; m_label.setLabelString(remark);}
+  void setRemark (const string& remark) {setRemark(remark.c_str());}
 
   double detStart() const {return m_detStart;}
   double rotStart() const {return m_rotStart;}
 
   double detStart() const {return m_detStart;}
   double rotStart() const {return m_rotStart;}
diff --git a/include/reconstruct.h b/include/reconstruct.h
new file mode 100644 (file)
index 0000000..422b6c9
--- /dev/null
@@ -0,0 +1,68 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:        reconstruct.h          Header file for Reconstruction class
+**   Programmer:   Kevin Rosenberg
+**   Date Started: Aug 84
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: reconstruct.h,v 1.1 2000/09/02 05:13:57 kevin Exp $
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+
+#ifndef __RECONSTRUCT_H
+#define __RECONSTRUCT_H
+
+
+class Projections;
+class ImageFile;
+class Backprojector;
+class ProcessSignal;
+
+#include <string>
+
+class Reconstructor 
+{
+public:
+    Reconstructor (const Projections& rProj, ImageFile& rIF, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* filterGenerationName, const char* const interpName, int interpFactor, const char* const backprojectName, const int trace, SGP* pSGP = NULL);
+
+    ~Reconstructor ();
+
+    bool fail() const {return m_bFail;}
+    const string& failMessage() const {return m_strFailMessage;}
+    
+    void plotFilter (SGP* pSGP = NULL);
+
+    void reconstructAllViews ();
+
+    void reconstructView (int iStartView = 0, int iViewCount = -1, SGP* pSGP = NULL);
+    
+ private:
+    const Projections& m_rProj;
+    ImageFile& m_rImagefile;
+    ProcessSignal* m_pProcessSignal;
+    Backprojector* m_pBackprojector;
+    int m_nFilteredProjections;
+    int m_iTrace;
+
+    bool m_bFail;
+    string m_strFailMessage;
+
+    double* m_adPlotXAxis;
+};
+
+#endif
index 7f8f95e7e2aafcb29a4e8323167b0c66bf91bfb6..8911976f77366f32db7554c8c2e943838a878f1d 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: scanner.h,v 1.14 2000/08/31 08:38:58 kevin Exp $
+**  $Id: scanner.h,v 1.15 2000/09/02 05:10:39 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -159,17 +159,15 @@ class Scanner
 
 };
 
 
 };
 
-const static int PROJECTION_TRACE_ROW_TITLE=0;
-const static int PROJECTION_TRACE_ROW_TITLE2=1;
-const static int PROJECTION_TRACE_ROW_PHANT_ID=3;
-const static int PROJECTION_TRACE_ROW_GEOMETRY=4;
-const static int PROJECTION_TRACE_ROW_FOCAL_LENGTH=5;
-const static int PROJECTION_TRACE_ROW_FIELD_OF_VIEW=6;
-const static int PROJECTION_TRACE_ROW_NDET=7;
-const static int PROJECTION_TRACE_ROW_NVIEW=8;
-const static int PROJECTION_TRACE_ROW_SAMPLES=9;
-const static int PROJECTION_TRACE_ROW_CURR_VIEW=10;
-const static int PROJECTION_TRACE_ROW_ATTEN=11;
+const static int PROJECTION_TRACE_ROW_PHANT_ID=0;
+const static int PROJECTION_TRACE_ROW_GEOMETRY=1;
+const static int PROJECTION_TRACE_ROW_FOCAL_LENGTH=2;
+const static int PROJECTION_TRACE_ROW_FIELD_OF_VIEW=3;
+const static int PROJECTION_TRACE_ROW_NDET=4;
+const static int PROJECTION_TRACE_ROW_NVIEW=5;
+const static int PROJECTION_TRACE_ROW_SAMPLES=6;
+const static int PROJECTION_TRACE_ROW_CURR_VIEW=7;
+const static int PROJECTION_TRACE_ROW_ATTEN=8;
 
 
 
 
 
 
index b026cdc6f1634cdcb67f2b08fae8b4633d28406a..a873d18d16e5c5529c3c5a51369903e730ea36d6 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: sgp.h,v 1.16 2000/08/31 08:38:58 kevin Exp $
+**  $Id: sgp.h,v 1.17 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -202,7 +202,8 @@ public:
   void setMarker (int idMarker, int color);
   void setRasterOp (int ro);
 
   void setMarker (int idMarker, int color);
   void setRasterOp (int ro);
 
-  void getViewport (double &xmin, double &ymin, double& xmax, double& ymax);
+  void getWindow (double& xmin, double& ymin, double& xmax, double& ymax);
+  void getViewport (double& xmin, double& ymin, double& xmax, double& ymax);
   void getTextExtent (const char *szText, double* x, double* y);
   double getCharHeight ();
 
   void getTextExtent (const char *szText, double* x, double* y);
   double getCharHeight ();
 
index c29575737f47870ca14c934b2c7e218b8236405e..fb823b505f15feb1c7f0bbdee9ec052fab08190b 100644 (file)
@@ -6,7 +6,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ezplot.cpp,v 1.12 2000/08/31 08:38:58 kevin Exp $
+**  $Id: ezplot.cpp,v 1.13 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -333,7 +333,7 @@ EZPlot::plot ()
   /* adjust frame for title */
   if (c_title.length() > 0)
     ya_max -= 2.5 * charheight;
   /* adjust frame for title */
   if (c_title.length() > 0)
     ya_max -= 2.5 * charheight;
-  title_row = ya_max + 0.5 * charheight;
+  title_row = ya_max + charheight;
 
   /* calculate legend box boundaries */
   int max_leg = 0;                     /* longest legend in characters */
 
   /* calculate legend box boundaries */
   int max_leg = 0;                     /* longest legend in characters */
@@ -587,7 +587,9 @@ EZPlot::drawAxes(void)
   rSGP.setViewport (xp_min, yp_min, xp_max, yp_max);
   
   if (c_title.length() > 0) {
   rSGP.setViewport (xp_min, yp_min, xp_max, yp_max);
   
   if (c_title.length() > 0) {
-    rSGP.moveAbs (xa_min + (xa_max-xa_min)/2 - c_title.length()*charwidth, title_row);
+    double wText, hText;
+    rSGP.getTextExtent (c_title.c_str(), &wText, &hText);
+    rSGP.moveAbs (xa_min + (xa_max-xa_min)/2 - wText/2, title_row);
     rSGP.setTextSize (charheight * 2.0);
     rSGP.setTextColor (clr_title, -1);
     rSGP.drawText (c_title);
     rSGP.setTextSize (charheight * 2.0);
     rSGP.setTextColor (clr_title, -1);
     rSGP.drawText (c_title);
index c1004d699bc2a720b9c2e4e1ab80c16d8a53a0ca..e96f29d8414c5ffc2d9324fb8a0404582d86c127 100644 (file)
@@ -7,7 +7,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: sgp.cpp,v 1.12 2000/08/31 08:38:58 kevin Exp $
+**  $Id: sgp.cpp,v 1.13 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -206,6 +206,15 @@ SGP::getViewport (double& xmin, double& ymin, double& xmax, double& ymax)
     ymax = yv_max;
 }
 
     ymax = yv_max;
 }
 
+void
+SGP::getWindow (double& xmin, double& ymin, double& xmax, double& ymax)
+{
+    xmin = xw_min;
+    ymin = yw_min;
+    xmax = xw_max;
+    ymax = yw_max;
+}
+
 
 // NAME
 //     frameViewport           draw box around viewport
 
 // NAME
 //     frameViewport           draw box around viewport
index 3138c0144f367ee72273bccf874c7d1090834b1b..28b31736b70fdc7c6e10b02b1671f2f4f602daaf 100644 (file)
@@ -1,5 +1,5 @@
 noinst_LIBRARIES = libctsim.a 
 noinst_LIBRARIES = libctsim.a 
-libctsim_a_SOURCES = filter.cpp scanner.cpp projections.cpp phantom.cpp imagefile.cpp backprojectors.cpp array2dfile.cpp trace.cpp procsignal.cpp
+libctsim_a_SOURCES = filter.cpp scanner.cpp projections.cpp phantom.cpp imagefile.cpp backprojectors.cpp array2dfile.cpp trace.cpp procsignal.cpp reconstruct.cpp
 
 INCLUDES=@my_includes@
 EXTRA_DIST=Makefile.nt
 
 INCLUDES=@my_includes@
 EXTRA_DIST=Makefile.nt
index 0bcd4077cd527281d11769b4084c3d29e07cce1d..8c785ac45bdfbe38b7fccb5358241c8096468723 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: backprojectors.cpp,v 1.13 2000/08/31 08:38:58 kevin Exp $
+**  $Id: backprojectors.cpp,v 1.14 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -261,7 +261,7 @@ Backproject::Backproject (const Projections& proj, ImageFile& im, const int inte
 {
   detInc = proj.detInc();
   nDet = proj.nDet();
 {
   detInc = proj.detInc();
   nDet = proj.nDet();
-  iDetCenter = nDet / 2;       // index refering to L=0 projection 
+  iDetCenter = (nDet - 1) / 2; // index refering to L=0 projection 
   rotInc = proj.rotInc();
 
   v = im.getArray();
   rotInc = proj.rotInc();
 
   v = im.getArray();
@@ -360,8 +360,8 @@ BackprojectTrig::BackprojectView (const double* const filteredProj, const double
 BackprojectTable::BackprojectTable (const Projections& proj, ImageFile& im, int interpType, const int interpFactor)
   : Backproject::Backproject (proj, im, interpType, interpFactor)
 {
 BackprojectTable::BackprojectTable (const Projections& proj, ImageFile& im, int interpType, const int interpFactor)
   : Backproject::Backproject (proj, im, interpType, interpFactor)
 {
-  arrayR.initSetSize (nx, ny);
-  arrayPhi.initSetSize (nx, ny);
+  arrayR.initSetSize (im.nx(), im.ny());
+  arrayPhi.initSetSize (im.nx(), im.ny());
   r = arrayR.getArray();
   phi = arrayPhi.getArray();
 
   r = arrayR.getArray();
   phi = arrayPhi.getArray();
 
@@ -665,7 +665,7 @@ BackprojectEquiangular::BackprojectView (const double* const filteredProj, const
        if (iDetPos < 0 || iDetPos >= nDet - 1) {
          ; //      errorIndexOutsideDetector (ix, iy, beta, r[ix][iy], phi[ix][iy], gamma, iDetPos);
        } else
        if (iDetPos < 0 || iDetPos >= nDet - 1) {
          ; //      errorIndexOutsideDetector (ix, iy, beta, r[ix][iy], phi[ix][iy], gamma, iDetPos);
        } else
-         pImCol[iy] += (((1-frac) * filteredProj[iDetPos] + frac * filteredProj[iDetPos+1])) / dL2;
+         pImCol[iy] += (filteredProj[iDetPos] + frac * (filteredProj[iDetPos+1] - filteredProj[iDetPos])) / dL2;
       }
     }  // end for y 
   }    // end for x 
       }
     }  // end for y 
   }    // end for x 
@@ -705,7 +705,7 @@ BackprojectEquilinear::BackprojectView (const double* const filteredProj, const
        if (iDetPos < 0 || iDetPos >= nDet - 1)
          ; //      errorIndexOutsideDetector (ix, iy, beta, r[ix][iy], phi[ix][iy], dDetPos, iDetPos);
        else
        if (iDetPos < 0 || iDetPos >= nDet - 1)
          ; //      errorIndexOutsideDetector (ix, iy, beta, r[ix][iy], phi[ix][iy], dDetPos, iDetPos);
        else
-         pImCol[iy] += (((1-frac) * filteredProj[iDetPos] + frac * filteredProj[iDetPos+1])) / (dU * dU);
+         pImCol[iy] += (filteredProj[iDetPos] + frac * (filteredProj[iDetPos+1] - filteredProj[iDetPos])) / (dU * dU);
       }
     }  // end for y 
   }    // end for x 
       }
     }  // end for y 
   }    // end for x 
index 5c10c9e9ff2a44b6b9ba602c5352c52bf6c1094e..a9ab2c7956053165a89eff72eea2ad5ec813a5e5 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: procsignal.cpp,v 1.5 2000/08/31 08:38:58 kevin Exp $
+**  $Id: procsignal.cpp,v 1.6 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -77,7 +77,7 @@ const int ProcessSignal::s_iFilterGenerationCount = sizeof(s_aszFilterGeneration
 // CLASS IDENTIFICATION
 //   ProcessSignal
 //
 // CLASS IDENTIFICATION
 //   ProcessSignal
 //
-ProcessSignal::ProcessSignal (const char* szFilterName, const char* szFilterMethodName, double dBandwidth, double dSignalIncrement, int nSignalPoints, double dFilterParam, const char* szDomainName, const char* szFilterGenerationName, int iZeropad, int iPreinterpolationFactor, int iTraceLevel, int iGeometry, double dFocalLength)
+ProcessSignal::ProcessSignal (const char* szFilterName, const char* szFilterMethodName, double dBandwidth, double dSignalIncrement, int nSignalPoints, double dFilterParam, const char* szDomainName, const char* szFilterGenerationName, int iZeropad, int iPreinterpolationFactor, int iTraceLevel, int iGeometry, double dFocalLength, SGP* pSGP)
     : m_adFourierCosTable(NULL), m_adFourierSinTable(NULL), m_adFilter(NULL), m_fail(false)
 {
   m_idFilterMethod = convertFilterMethodNameToID (szFilterMethodName);
     : m_adFourierCosTable(NULL), m_adFourierSinTable(NULL), m_adFilter(NULL), m_fail(false)
 {
   m_idFilterMethod = convertFilterMethodNameToID (szFilterMethodName);
@@ -109,12 +109,12 @@ ProcessSignal::ProcessSignal (const char* szFilterName, const char* szFilterMeth
     return;
   }
 
     return;
   }
 
-  init (m_idFilter, m_idFilterMethod, dBandwidth, dSignalIncrement, nSignalPoints, dFilterParam, m_idDomain, m_idFilterGeneration, iZeropad, iPreinterpolationFactor, iTraceLevel, iGeometry, dFocalLength);
+  init (m_idFilter, m_idFilterMethod, dBandwidth, dSignalIncrement, nSignalPoints, dFilterParam, m_idDomain, m_idFilterGeneration, iZeropad, iPreinterpolationFactor, iTraceLevel, iGeometry, dFocalLength, pSGP);
 }
 
 
 void
 }
 
 
 void
-ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandwidth, double dSignalIncrement, int nSignalPoints, double dFilterParam, const int idDomain, const int idFilterGeneration, const int iZeropad, const int iPreinterpolationFactor, int iTraceLevel, int iGeometry, double dFocalLength)
+ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandwidth, double dSignalIncrement, int nSignalPoints, double dFilterParam, const int idDomain, const int idFilterGeneration, const int iZeropad, const int iPreinterpolationFactor, int iTraceLevel, int iGeometry, double dFocalLength, SGP* pSGP)
 {
   m_idFilter = idFilter;
   m_idDomain = idDomain;
 {
   m_idFilter = idFilter;
   m_idDomain = idDomain;
@@ -178,53 +178,39 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
        m_adFilter = new double[ m_nFilterPoints ];
        double adFrequencyFilter [m_nFilterPoints];
        filter.copyFilterData (adFrequencyFilter, 0, m_nFilterPoints);
        m_adFilter = new double[ m_nFilterPoints ];
        double adFrequencyFilter [m_nFilterPoints];
        filter.copyFilterData (adFrequencyFilter, 0, m_nFilterPoints);
-       if (m_traceLevel >= Trace::TRACE_PLOT) {
-         SGPDriver sgpDriver ("Frequency Filter: Natural Order");
-         SGP sgp (sgpDriver);
-         EZPlot ezplot (sgp);
-
-         ezplot.ezset ("title Filter Response: Natural Order");
-         ezplot.addCurve (adFrequencyFilter, m_nFilterPoints);
-         ezplot.plot();
-         cio_put_str ("Press any key to continue");
-         cio_kb_getc ();
+       EZPlot* pEZPlot = NULL;
+       if (pSGP && m_traceLevel >= Trace::TRACE_PLOT) {
+         pEZPlot = new EZPlot (*pSGP);
+         pEZPlot->ezset ("title Filter Response: Natural Order");
+         pEZPlot->ezset ("ylength 0.25");
+         pEZPlot->addCurve (adFrequencyFilter, m_nFilterPoints);
+         pEZPlot->plot();
        }
            
        shuffleNaturalToFourierOrder (adFrequencyFilter, m_nFilterPoints);
        }
            
        shuffleNaturalToFourierOrder (adFrequencyFilter, m_nFilterPoints);
-       if (m_traceLevel >= Trace::TRACE_PLOT) {
-         SGPDriver sgpDriver ("Frequency Filter: Fourier Order");
-         SGP sgp (sgpDriver);
-         EZPlot ezplot (sgp);
-
-         ezplot.ezset ("title Filter Response: Fourier Order");
-         ezplot.addCurve (adFrequencyFilter, m_nFilterPoints);
-         ezplot.plot();
-         cio_put_str ("Press any key to continue");
-         cio_kb_getc ();
+       if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) {
+         pEZPlot->ezset ("title Filter Response: Fourier Order");
+         pEZPlot->ezset ("ylength 0.25");
+         pEZPlot->ezset ("yporigin 0.25");
+         pEZPlot->addCurve (adFrequencyFilter, m_nFilterPoints);
+         pEZPlot->plot();
        }
        ProcessSignal::finiteFourierTransform (adFrequencyFilter, m_adFilter, m_nFilterPoints, -1);
        }
        ProcessSignal::finiteFourierTransform (adFrequencyFilter, m_adFilter, m_nFilterPoints, -1);
-       if (m_traceLevel >= Trace::TRACE_PLOT) {
-         SGPDriver sgpDriver ("Inverse Fourier Frequency: Fourier Order");
-         SGP sgp (sgpDriver);
-         EZPlot ezplot (sgp);
-
-         ezplot.ezset ("title Inverse Fourier Frequency: Fourier Order");
-         ezplot.addCurve (m_adFilter, m_nFilterPoints);
-         ezplot.plot();
-         cio_put_str ("Press any key to continue");
-         cio_kb_getc ();
+       if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) {
+         pEZPlot->ezset ("title Inverse Fourier Frequency: Fourier Order");
+         pEZPlot->ezset ("ylength 0.25");
+         pEZPlot->ezset ("yporigin 0.50");
+         pEZPlot->addCurve (m_adFilter, m_nFilterPoints);
+         pEZPlot->plot();
        }
        shuffleFourierToNaturalOrder (m_adFilter, m_nFilterPoints);
        }
        shuffleFourierToNaturalOrder (m_adFilter, m_nFilterPoints);
-       if (m_traceLevel >= Trace::TRACE_PLOT) {
-         SGPDriver sgpDriver ("Inverse Fourier Frequency: Natural Order");
-         SGP sgp (sgpDriver);
-         EZPlot ezplot (sgp);
-
-         ezplot.ezset ("title Inverse Fourier Frequency: Natural Order");
-         ezplot.addCurve (m_adFilter, m_nFilterPoints);
-         ezplot.plot();
-         cio_put_str ("Press any key to continue");
-         cio_kb_getc ();
+       if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) {
+         pEZPlot->ezset ("title Inverse Fourier Frequency: Natural Order");
+         pEZPlot->ezset ("ylength 0.25");
+         pEZPlot->ezset ("yporigin 0.75");
+         pEZPlot->addCurve (m_adFilter, m_nFilterPoints);
+         pEZPlot->plot();
+         delete pEZPlot;
        }
        for (int i = 0; i < m_nFilterPoints; i++) {
            m_adFilter[i] /= m_dSignalInc;
        }
        for (int i = 0; i < m_nFilterPoints; i++) {
            m_adFilter[i] /= m_dSignalInc;
@@ -259,8 +245,10 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
          nextPowerOf2++;
        nextPowerOf2 += (m_iZeropad - 1);
        m_nFilterPoints = 1 << nextPowerOf2;
          nextPowerOf2++;
        nextPowerOf2 += (m_iZeropad - 1);
        m_nFilterPoints = 1 << nextPowerOf2;
+#ifdef DEBUG
        if (m_traceLevel >= Trace::TRACE_CONSOLE)
        if (m_traceLevel >= Trace::TRACE_CONSOLE)
-       cout << "nFilterPoints = " << m_nFilterPoints << endl;
+         cout << "nFilterPoints = " << m_nFilterPoints << endl;
+#endif
       }
       m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
 
       }
       m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
 
@@ -294,29 +282,24 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
          //      m_adFilter[i] *= dScale;
        }
       }
          //      m_adFilter[i] *= dScale;
        }
       }
-      if (m_traceLevel >= Trace::TRACE_PLOT) {
-       SGPDriver sgpDriver ("Frequency Filter: Natural Order");
-       SGP sgp (sgpDriver);
-       EZPlot ezplot (sgp);
-       
-       ezplot.ezset ("title Filter Filter: Natural Order");
-       ezplot.addCurve (m_adFilter, m_nFilterPoints);
-         ezplot.plot();
-         cio_put_str ("Press any key to continue");
-         cio_kb_getc ();
+      EZPlot* pEZPlot = NULL;
+      if (pSGP && m_traceLevel >= Trace::TRACE_PLOT) {
+       pEZPlot = new EZPlot (*pSGP);
+       pEZPlot->ezset ("title Filter Filter: Natural Order");
+       pEZPlot->ezset ("ylength 0.50");
+       pEZPlot->ezset ("yporigin 0.00");
+       pEZPlot->addCurve (m_adFilter, m_nFilterPoints);
+       pEZPlot->plot();
       }
       shuffleNaturalToFourierOrder (m_adFilter, m_nFilterPoints);
       }
       shuffleNaturalToFourierOrder (m_adFilter, m_nFilterPoints);
-       if (m_traceLevel >= Trace::TRACE_PLOT) {
-         SGPDriver sgpDriver ("Frequency Filter: Fourier Order");
-         SGP sgp (sgpDriver);
-         EZPlot ezplot (sgp);
-
-         ezplot.ezset ("title Filter Filter: Fourier Order");
-         ezplot.addCurve (m_adFilter, m_nFilterPoints);
-         ezplot.plot();
-         cio_put_str ("Press any key to continue");
-         cio_kb_getc ();
-       }
+      if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) {
+       pEZPlot->ezset ("title Filter Filter: Fourier Order");
+       pEZPlot->ezset ("ylength 0.50");
+       pEZPlot->ezset ("yporigin 0.50");
+       pEZPlot->addCurve (m_adFilter, m_nFilterPoints);
+       pEZPlot->plot();
+       delete pEZPlot;
+      }
     } else if (m_idFilterGeneration == FILTER_GENERATION_INVERSE_FOURIER) {
       // calculate number of filter points with zeropadding
       int nSpatialPoints = 2 * (m_nSignalPoints - 1) + 1;
     } else if (m_idFilterGeneration == FILTER_GENERATION_INVERSE_FOURIER) {
       // calculate number of filter points with zeropadding
       int nSpatialPoints = 2 * (m_nSignalPoints - 1) + 1;
@@ -333,21 +316,22 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
        m_nFilterPoints = 1 << nextPowerOf2;
       }
       m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
        m_nFilterPoints = 1 << nextPowerOf2;
       }
       m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
+#ifdef DEBUG
       if (m_traceLevel >= Trace::TRACE_CONSOLE)
        cout << "nFilterPoints = " << m_nFilterPoints << endl;
       if (m_traceLevel >= Trace::TRACE_CONSOLE)
        cout << "nFilterPoints = " << m_nFilterPoints << endl;
+#endif
       double adSpatialFilter [m_nFilterPoints];
       SignalFilter filter (m_idFilter, m_dFilterMin, m_dFilterMax, nSpatialPoints, m_dBandwidth, m_dFilterParam, SignalFilter::DOMAIN_SPATIAL);
       filter.copyFilterData (adSpatialFilter, 0, nSpatialPoints);
       double adSpatialFilter [m_nFilterPoints];
       SignalFilter filter (m_idFilter, m_dFilterMin, m_dFilterMax, nSpatialPoints, m_dBandwidth, m_dFilterParam, SignalFilter::DOMAIN_SPATIAL);
       filter.copyFilterData (adSpatialFilter, 0, nSpatialPoints);
-      if (m_traceLevel >= Trace::TRACE_PLOT) {
-       SGPDriver sgpDriver ("Spatial Filter: Natural Order");
-       SGP sgp (sgpDriver);
-       EZPlot ezplot (sgp);
-       
-       ezplot.ezset ("title Spatial Filter: Natural Order");
-       ezplot.addCurve (adSpatialFilter, nSpatialPoints);
-       ezplot.plot();
-       cio_put_str ("Press any key to continue");
-       cio_kb_getc ();
+      EZPlot* pEZPlot = NULL;
+      if (pSGP && m_traceLevel >= Trace::TRACE_PLOT) {
+       pEZPlot = new EZPlot (*pSGP);
+       pEZPlot->ezset ("title Spatial Filter: Natural Order");
+       pEZPlot->ezset ("ylength 0.50");
+       pEZPlot->ezset ("yporigin 0.00");
+       pEZPlot->addCurve (adSpatialFilter, nSpatialPoints);
+       pEZPlot->plot();
+       delete pEZPlot;
       }
       if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
        for (int i = 0; i < m_nFilterPoints; i++)
       }
       if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
        for (int i = 0; i < m_nFilterPoints; i++)
@@ -372,16 +356,13 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
       finiteFourierTransform (adSpatialFilter, acInverseFilter, m_nFilterPoints, 1);
       for (int i = 0; i < m_nFilterPoints; i++)
        m_adFilter[i] = abs(acInverseFilter[i]) * m_dSignalInc;
       finiteFourierTransform (adSpatialFilter, acInverseFilter, m_nFilterPoints, 1);
       for (int i = 0; i < m_nFilterPoints; i++)
        m_adFilter[i] = abs(acInverseFilter[i]) * m_dSignalInc;
-      if (m_traceLevel >= Trace::TRACE_PLOT) {
-       SGPDriver sgpDriver ("Spatial Filter: Inverse");
-       SGP sgp (sgpDriver);
-       EZPlot ezplot (sgp);
-       
-       ezplot.ezset ("title Spatial Filter: Inverse");
-       ezplot.addCurve (m_adFilter, m_nFilterPoints);
-       ezplot.plot();
-       cio_put_str ("Press any key to continue");
-       cio_kb_getc ();
+      if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) {
+       pEZPlot->ezset ("title Spatial Filter: Inverse");
+       pEZPlot->ezset ("ylength 0.50");
+       pEZPlot->ezset ("yporigin 0.50");
+       pEZPlot->addCurve (m_adFilter, m_nFilterPoints);
+       pEZPlot->plot();
+       delete pEZPlot;
       }
     }
   }
       }
     }
   }
index be8e82941f9a47b30fe1946905fa9fba96bc7f0c..fb24e0d897bf065d9d348a5b09f827eacf1b8b8d 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: projections.cpp,v 1.24 2000/08/31 08:38:58 kevin Exp $
+**  $Id: projections.cpp,v 1.25 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -66,6 +66,7 @@ Projections::~Projections (void)
 void
 Projections::init (const int nView, const int nDet)
 {
 void
 Projections::init (const int nView, const int nDet)
 {
+  m_label.setLabelType (Array2dFileLabel::L_HISTORY);
   m_nView = nView;
   m_nDet = nDet;
   newProjData ();
   m_nView = nView;
   m_nDet = nDet;
   newProjData ();
@@ -74,6 +75,7 @@ Projections::init (const int nView, const int nDet)
 void
 Projections::initFromScanner (const Scanner& scanner)
 {
 void
 Projections::initFromScanner (const Scanner& scanner)
 {
+  m_label.setLabelType (Array2dFileLabel::L_HISTORY);
   deleteProjData();
   init (scanner.nView(), scanner.nDet());
 
   deleteProjData();
   init (scanner.nView(), scanner.nDet());
 
@@ -452,11 +454,10 @@ Projections::detarrayWrite (fnetorderstream& fs, const DetectorArray& darray, co
 }
 
 /* NAME
 }
 
 /* NAME
- *   prt_projections                   Print projections data
+ *   printProjectionData                       Print projections data
  *
  * SYNOPSIS
  *
  * SYNOPSIS
- *   prt_projections (proj)
- *   Projections& proj                 Projection data to be printed
+ *   printProjectionData ()
  */
 
 void
  */
 
 void
@@ -498,149 +499,3 @@ Projections::printScanInfo (ostringstream& os) const
 
 
 
 
 
 
-/* NAME
- *   Projections::reconstruct      Reconstruct Image from Projections
- *
- * SYNOPSIS
- *   im = proj.reconstruct (im, filt_type, filt_param, interp_type)
- *   IMAGE *im                 Output image
- *   int filt_type             Type of convolution filter to use
- *   double filt_param         Filter specific parameter
- *                             Currently, used only with Hamming filters
- *   int interp_type           Type of interpolation method to use
- *
- * ALGORITHM
- *
- *     Calculate one-dimensional filter in spatial domain
- *     Allocate & clear (zero) the 2d output image array
- *      For each projection view
- *         Convolve raysum array with filter
- *         Backproject raysums and add (summate) to image array
- *      end
- */
-
-bool
-Projections::reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* filterGenerationName, const char* const interpName, int interpFactor, const char* const backprojectName, const int trace) const
-{
-  double detInc = m_detInc;
-  int n_filteredProj = m_nDet * interpFactor;
-  double filteredProj [n_filteredProj];   // filtered projections
-
-#ifdef HAVE_BSPLINE_INTERP
-  int spline_order = 0, zoom_factor = 0;
-  if (interp_type == I_BSPLINE) {
-    zoom_factor = interpFactor;
-    spline_order = 3;
-    zoom_factor = 3;
-    n_filteredProj = (m_nDet - 1) * (zoom_factor + 1) + 1;
-  }
-#endif
-
-  double filterBW = 1. / detInc;
-  ProcessSignal processSignal (filterName, filterMethodName, filterBW, m_detInc, m_nDet, filt_param, "spatial", filterGenerationName, zeropad, interpFactor, trace, m_geometry, m_focalLength);
-
-  if (processSignal.fail()) {
-      sys_error (ERR_SEVERE, "%s [Projections::reconstruct]", processSignal.failMessage().c_str());
-      return false;
-  }
-
-  if (trace)
-    cout << "Reconstruct: filter="<<filterName<< ", interp="<<interpName<<", backproject="<<backprojectName<<endl;
-
-#if HAVE_SGP
-  int nVecFilter = processSignal.getNFilterPoints();
-  double plot_xaxis [nVecFilter];                      // array for plotting 
-
-  if (trace > Trace::TRACE_CONSOLE && nVecFilter > 0)  {
-    int i;
-    double f;
-    double filterInc = processSignal.getFilterIncrement();
-    for (i = 0, f = processSignal.getFilterMin(); i < nVecFilter; i++, f += filterInc)
-      plot_xaxis[i] = f;
-
-    if (processSignal.getFilter()) {
-      SGPDriver sgpDriver ("Filter Function");
-      SGP sgp (sgpDriver);
-      EZPlot ezplot (sgp);
-
-      ezplot.ezset ("title Filter Response");
-      ezplot.addCurve (plot_xaxis, processSignal.getFilter(), nVecFilter);
-      ezplot.plot();
-      cio_put_str ("Press any key to continue");
-      cio_kb_getc ();
-    }
-  }
-  if (trace >= Trace::TRACE_CONSOLE) {
-    printf ("nview=%d, ndet=%d, det_start=%.4f, detInc=%.4f\n", m_nView, m_nDet, m_detStart, m_detInc);
-  }
-#endif  //HAVE_SGP
-
-  Backprojector bj (*this, im, backprojectName, interpName, interpFactor);
-  if (bj.fail()) {
-    sys_error (ERR_SEVERE, "%s [Projections::reconstruct]", bj.failMessage().c_str());
-    return false;
-  }
-
-  for (int iview = 0; iview < m_nView; iview++)  {
-    if (trace >= Trace::TRACE_CONSOLE) 
-      cout <<"Reconstructing view " << iview << "(last = " << m_nView - 1 << ")\n";
-      
-    const DetectorArray& darray = getDetectorArray (iview);
-    const DetectorValue* detval = darray.detValues();
-
-    processSignal.filterSignal (detval, filteredProj);
-
-#ifdef HAVE_BSPLINE_INTERP
-    if (interp_type == I_BSPLINE) 
-       bspline (m_nDet, zoom_factor, spline_order, filteredProj, filteredProj);
-    
-#ifdef HAVE_SGP
-    if (trace >= Trace::TRACE_PLOT && interp_type == I_BSPLINE) {
-       bspline (m_nDet, zoom_factor, spline_order, filteredProj, filteredProj);
-      ezplot_1d (filteredProj, n_filteredProj);
-    }
-#endif
-#endif
-
-    bj.BackprojectView (filteredProj, darray.viewAngle());
-
-#ifdef HAVE_SGP
-    if (trace >= Trace::TRACE_PLOT) {
-      SGPDriver sgpDriverProj ("Projection");
-      SGP sgpProj (sgpDriverProj);
-      EZPlot ezplotProj (sgpProj);
-
-      ezplotProj.ezset  ("clear");
-      ezplotProj.ezset ("title Filtered Projection");
-      ezplotProj.ezset  ("xticks major 5.");
-      ezplotProj.ezset  ("xlabel ");
-      ezplotProj.ezset  ("ylabel ");
-      ezplotProj.ezset  ("yporigin .5.");
-      ezplotProj.ezset  ("ylength .5.");
-      ezplotProj.ezset  ("box.");
-      ezplotProj.ezset  ("grid.");
-      ezplotProj.addCurve (plot_xaxis, detval, m_nDet);
-      ezplotProj.plot();
-      ezplotProj.ezset  ("clear");
-      ezplotProj.ezset  ("xticks major 5.");
-      ezplotProj.ezset  ("xlabel ");
-      ezplotProj.ezset  ("ylabel ");
-      ezplotProj.ezset  ("ylength .5.");
-      ezplotProj.ezset ("box");
-      ezplotProj.ezset ("grid");
-      ezplotProj.addCurve (plot_xaxis, filteredProj,  n_filteredProj);
-      ezplotProj.plot();
-
-      cout << "Do you want to exit with current pic (y/n)? " << flush;
-      char str[256];
-      fgets(str, sizeof(str), stdin);
-      if (tolower(str[0]) == 'y') {
-       break;
-      }
-    } 
-#endif  //HAVE_SGP
-  }
-
-  return true;
-}
-
diff --git a/libctsim/reconstruct.cpp b/libctsim/reconstruct.cpp
new file mode 100644 (file)
index 0000000..8e09a16
--- /dev/null
@@ -0,0 +1,199 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:        reconstruct.cpp         Reconstruction class
+**   Programmer:   Kevin Rosenberg
+**   Date Started: Aug 84
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: reconstruct.cpp,v 1.1 2000/09/02 05:13:57 kevin Exp $
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+
+#include "ct.h"
+
+
+/* NAME
+ *   Reconstructor::Reconstructor      Reconstruct Image from Projections
+ *
+ * SYNOPSIS
+ *   im = proj.reconstruct (im, filt_type, filt_param, interp_type)
+ *   IMAGE *im                 Output image
+ *   int filt_type             Type of convolution filter to use
+ *   double filt_param         Filter specific parameter
+ *                             Currently, used only with Hamming filters
+ *   int interp_type           Type of interpolation method to use
+ *
+ * ALGORITHM
+ *
+ *     Calculate one-dimensional filter in spatial domain
+ *     Allocate & clear (zero) the 2d output image array
+ *      For each projection view
+ *         Convolve raysum array with filter
+ *         Backproject raysums and add (summate) to image array
+ *      end
+ */
+
+
+Reconstructor::Reconstructor (const Projections& rProj, ImageFile& rIF, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* filterGenerationName, const char* const interpName, int interpFactor, const char* const backprojectName, const int iTrace, SGP* pSGP)
+  : m_rProj(rProj), m_rImagefile(rIF), m_pProcessSignal(0), m_pBackprojector(0), m_iTrace(iTrace), m_bFail(false), m_adPlotXAxis(0)
+{
+  m_nFilteredProjections = m_rProj.nDet() * interpFactor;
+
+#ifdef HAVE_BSPLINE_INTERP
+  int spline_order = 0, zoom_factor = 0;
+  if (interp_type == I_BSPLINE) {
+    zoom_factor = interpFactor;
+    spline_order = 3;
+    zoom_factor = 3;
+    m_nFilteredProjections = (m_nDet - 1) * (zoom_factor + 1) + 1;
+  }
+#endif
+
+  double filterBW = 1. / m_rProj.detInc();
+  m_pProcessSignal = new ProcessSignal (filterName, filterMethodName, filterBW, m_rProj.detInc(), m_rProj.nDet(), filt_param, "spatial", filterGenerationName, zeropad, interpFactor, iTrace, m_rProj.geometry(), m_rProj.focalLength(), pSGP);
+
+  if (m_pProcessSignal->fail()) {
+    m_bFail = true;
+    m_strFailMessage = "Error creating ProcessSignal: ";
+    m_strFailMessage += m_pProcessSignal->failMessage();
+    delete m_pProcessSignal; m_pProcessSignal = NULL;
+    return;
+  }
+
+  m_pBackprojector = new Backprojector (m_rProj, m_rImagefile, backprojectName, interpName, interpFactor);
+  if (m_pBackprojector->fail()) {
+    m_bFail = true;
+    m_strFailMessage = "Error creating backprojector: ";
+    m_strFailMessage += m_pBackprojector->failMessage();
+    delete m_pBackprojector; m_pBackprojector = NULL;
+    delete m_pProcessSignal; m_pProcessSignal = NULL;
+    return;
+  }
+
+#if HAVE_SGP
+  m_adPlotXAxis = new double [m_rProj.nDet()];
+  double x = - ((m_rProj.nDet() - 1) / 2) * m_rProj.detInc();
+  double xInc = m_rProj.detInc();
+
+  for (int i = 0; i < m_rProj.nDet(); i++, x += xInc)
+    m_adPlotXAxis[i] = x;
+#endif
+}
+
+Reconstructor::~Reconstructor ()
+{
+  delete m_pBackprojector;
+  delete m_pProcessSignal;
+  delete m_adPlotXAxis;
+}
+
+
+void
+Reconstructor::plotFilter (SGP* pSGP)
+{
+#if HAVE_SGP
+  int nVecFilter = m_pProcessSignal->getNFilterPoints();
+  double adPlotXAxis [nVecFilter];
+
+  if (nVecFilter > 0 && pSGP)  {
+    double f = m_pProcessSignal->getFilterMin();
+    double filterInc = m_pProcessSignal->getFilterIncrement();
+    for (int i = 0; i < nVecFilter; i++, f += filterInc)
+      adPlotXAxis[i] = f;
+
+    if (m_pProcessSignal->getFilter()) {
+      EZPlot ezplot (*pSGP);
+
+      ezplot.ezset ("title Filter Response");
+      ezplot.addCurve (adPlotXAxis, m_pProcessSignal->getFilter(), nVecFilter);
+      ezplot.plot();
+    }
+  }
+#endif
+}
+
+
+void
+Reconstructor::reconstructAllViews ()
+{
+  reconstructView (0, m_rProj.nView());
+  delete m_pBackprojector; m_pBackprojector = NULL;
+}
+
+
+void
+Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP)
+{
+  double adFilteredProj [m_nFilteredProjections];   // filtered projections
+
+  if (iViewCount <= 0)
+    iViewCount = m_rProj.nView() - iStartView;
+      
+  for (int iView = iStartView; iView < (iStartView + iViewCount); iView++)  {
+    if (m_iTrace == Trace::TRACE_CONSOLE) 
+      cout <<"Reconstructing view " << iView << " (last = " << m_rProj.nView() - 1 << ")\n";
+      
+    const DetectorArray& rDetArray = m_rProj.getDetectorArray (iView);
+    const DetectorValue* detval = rDetArray.detValues();
+
+    m_pProcessSignal->filterSignal (detval, adFilteredProj);
+
+#ifdef HAVE_BSPLINE_INTERP
+    if (interp_type == I_BSPLINE) 
+       bspline (m_rProj.nDet(), zoom_factor, spline_order, adFilteredProj, adFilteredProj);
+    
+#ifdef HAVE_SGP
+    if (trace >= Trace::TRACE_PLOT && interp_type == I_BSPLINE && pSGP) {
+       bspline (m_rProj.nDet(), zoom_factor, spline_order, adFilteredProj, adFilteredProj);
+      ezplot_1d (adFilteredProj, m_nFilteredProjections);
+    }
+#endif
+#endif
+
+    m_pBackprojector->BackprojectView (adFilteredProj, rDetArray.viewAngle());
+
+#ifdef HAVE_SGP
+    if (m_iTrace >= Trace::TRACE_PLOT && pSGP) {
+      EZPlot ezplotProj (*pSGP);
+
+      ezplotProj.ezset ("clear");
+      ezplotProj.ezset ("title Raw Projection");
+      ezplotProj.ezset ("xticks major 5");
+      ezplotProj.ezset ("xlabel ");
+      ezplotProj.ezset ("ylabel ");
+      ezplotProj.ezset ("yporigin .5");
+      ezplotProj.ezset ("ylength .5");
+      ezplotProj.ezset ("box.");
+      ezplotProj.ezset ("grid.");
+      ezplotProj.addCurve (m_adPlotXAxis, detval, m_rProj.nDet());
+      ezplotProj.plot();
+      ezplotProj.ezset ("clear");
+      ezplotProj.ezset ("title Filtered Projection");
+      ezplotProj.ezset ("xticks major 5");
+      ezplotProj.ezset ("xlabel ");
+      ezplotProj.ezset ("ylabel ");
+      ezplotProj.ezset ("ylength .5");
+      ezplotProj.ezset ("box");
+      ezplotProj.ezset ("grid");
+      ezplotProj.addCurve (m_adPlotXAxis, adFilteredProj,  m_nFilteredProjections);
+      ezplotProj.plot();
+    } 
+#endif  //HAVE_SGP
+  }
+}
+
index ef72c5b4cc99a7672a9d3ba2a25eac03a8d26edf..7d95afd642506bb5eac5f031c69a56fabc6c1b36 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: scanner.cpp,v 1.13 2000/08/31 08:38:58 kevin Exp $
+**  $Id: scanner.cpp,v 1.14 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -95,12 +95,13 @@ Scanner::Scanner (const Phantom& phm, const char* const geometryName, int nDet,
     return;
   }
 
     return;
   }
 
-  if (nView < 1)
-    nView = 1;
+  if (nView < 1 || nDet < 1) {
+    m_fail = true;
+    m_failMessage = "nView & nDet must be greater than 0";
+    return;
+  }
   if (nSample < 1)
     m_nSample = 1;
   if (nSample < 1)
     m_nSample = 1;
-  if (nDet < 1)
-    nDet = 1;
 
   m_nDet     = nDet;
   m_nView    = nView;
 
   m_nDet     = nDet;
   m_nView    = nView;
@@ -117,16 +118,18 @@ Scanner::Scanner (const Phantom& phm, const char* const geometryName, int nDet,
   if (m_idGeometry == GEOMETRY_PARALLEL) {
     m_detLen   = m_dFieldOfView;
     m_detInc  = m_detLen / m_nDet;
   if (m_idGeometry == GEOMETRY_PARALLEL) {
     m_detLen   = m_dFieldOfView;
     m_detInc  = m_detLen / m_nDet;
+    if (m_nDet % 2 == 0) // Adjust for Even number of detectors
+      m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2)-1
     
     double dHalfDetLen = m_detLen / 2;
     
     double dHalfDetLen = m_detLen / 2;
-    m_initPos.xs1 = m_dXCenter - m_dFocalLength;
-    m_initPos.ys1 = m_dYCenter + dHalfDetLen;
-    m_initPos.xs2 = m_dXCenter + m_dFocalLength;
-    m_initPos.ys2 = m_dYCenter + dHalfDetLen;
-    m_initPos.xd1 = m_dXCenter - m_dFocalLength;
-    m_initPos.yd1 = m_dYCenter - dHalfDetLen;
-    m_initPos.xd2 = m_dXCenter + m_dFocalLength;
-    m_initPos.yd2 = m_dYCenter - dHalfDetLen;
+    m_initPos.xs1 = m_dXCenter - dHalfDetLen;
+    m_initPos.ys1 = m_dYCenter + m_dFocalLength;
+    m_initPos.xs2 = m_dXCenter + dHalfDetLen;
+    m_initPos.ys2 = m_dYCenter + m_dFocalLength;
+    m_initPos.xd1 = m_dXCenter - dHalfDetLen;
+    m_initPos.yd1 = m_dYCenter - m_dFocalLength;
+    m_initPos.xd2 = m_dXCenter + dHalfDetLen;
+    m_initPos.yd2 = m_dYCenter - m_dFocalLength;
     m_initPos.angle = 0.0;
   } else if (m_idGeometry == GEOMETRY_EQUILINEAR) {
 #if 0
     m_initPos.angle = 0.0;
   } else if (m_idGeometry == GEOMETRY_EQUILINEAR) {
 #if 0
@@ -145,6 +148,8 @@ Scanner::Scanner (const Phantom& phm, const char* const geometryName, int nDet,
 
     m_detLen = dHalfDetLen * 2;
     m_detInc  = m_detLen / m_nDet;
 
     m_detLen = dHalfDetLen * 2;
     m_detInc  = m_detLen / m_nDet;
+    if (m_nDet % 2 == 0) // Adjust for Even number of detectors
+      m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2)-1
     
     m_initPos.angle = 0.0;
     m_initPos.xs1 = m_dXCenter;
     
     m_initPos.angle = 0.0;
     m_initPos.xs1 = m_dXCenter;
@@ -171,7 +176,8 @@ Scanner::Scanner (const Phantom& phm, const char* const geometryName, int nDet,
 #endif
     m_detLen = 2 * dAngle;
     m_detInc = m_detLen / m_nDet;
 #endif
     m_detLen = 2 * dAngle;
     m_detInc = m_detLen / m_nDet;
-
+    if (m_nDet % 2 == 0) // Adjust for Even number of detectors
+      m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2)-1
     m_dAngularDetIncrement = m_detInc * 2; // Angular Position 2x gamma angle
     m_dAngularDetLen = m_detLen * 2;
     m_initPos.dAngularDet = -m_dAngularDetLen / 2;
     m_dAngularDetIncrement = m_detInc * 2; // Angular Position 2x gamma angle
     m_dAngularDetLen = m_detLen * 2;
     m_initPos.dAngularDet = -m_dAngularDetLen / 2;
@@ -317,8 +323,6 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iS
     phm.draw (*m_pSGP);
     m_dTextHeight = m_pSGP->getCharHeight ();
 
     phm.draw (*m_pSGP);
     m_dTextHeight = m_pSGP->getCharHeight ();
 
-    traceShowParam ("Projection Collector", "%s", PROJECTION_TRACE_ROW_TITLE, C_BLACK, " ");
-    traceShowParam ("________________", "%s", PROJECTION_TRACE_ROW_TITLE2, C_LTGRAY, " ");
     traceShowParam ("Phantom:",       "%s", PROJECTION_TRACE_ROW_PHANT_ID, C_BLACK, phm.name().c_str());
     traceShowParam ("Geometry:", "%s", PROJECTION_TRACE_ROW_GEOMETRY, C_BLUE, convertGeometryIDToName(m_idGeometry));
     traceShowParam ("Focal Length Ratio:", "%.2f", PROJECTION_TRACE_ROW_FOCAL_LENGTH, C_BLUE, m_dFocalLengthRatio);
     traceShowParam ("Phantom:",       "%s", PROJECTION_TRACE_ROW_PHANT_ID, C_BLACK, phm.name().c_str());
     traceShowParam ("Geometry:", "%s", PROJECTION_TRACE_ROW_GEOMETRY, C_BLUE, convertGeometryIDToName(m_idGeometry));
     traceShowParam ("Focal Length Ratio:", "%.2f", PROJECTION_TRACE_ROW_FOCAL_LENGTH, C_BLUE, m_dFocalLengthRatio);
@@ -468,10 +472,10 @@ Scanner::projectSingleView (const Phantom& phm, DetectorArray& detArray, const d
        sum += projectSingleLine (phm, xd, yd, xs, ys);
              
 #ifdef HAVE_SGP
        sum += projectSingleLine (phm, xd, yd, xs, ys);
              
 #ifdef HAVE_SGP
-       if (m_trace >= Trace::TRACE_CLIPPING) {
-         traceShowParam ("Attenuation:", "%s", PROJECTION_TRACE_ROW_ATTEN, C_LTMAGENTA, "        ");
-         traceShowParam ("Attenuation:", "%.3f", PROJECTION_TRACE_ROW_ATTEN, C_LTMAGENTA, sum);
-       }
+       //      if (m_trace >= Trace::TRACE_CLIPPING) {
+       //        traceShowParam ("Attenuation:", "%s", PROJECTION_TRACE_ROW_ATTEN, C_LTMAGENTA, "        ");
+       //        traceShowParam ("Attenuation:", "%.3f", PROJECTION_TRACE_ROW_ATTEN, C_LTMAGENTA, sum);
+       //      }
 #endif
        if (m_idGeometry == GEOMETRY_EQUIANGULAR)
            dAngle += dAngleSampleInc;
 #endif
        if (m_idGeometry == GEOMETRY_EQUIANGULAR)
            dAngle += dAngleSampleInc;
@@ -530,7 +534,7 @@ Scanner::traceShowParamRasterOp (int iRasterOp, const char *szLabel, const char
     m_pSGP->moveAbs (m_dXMinWin, dYPos);
     m_pSGP->setTextColor (color, -1);
     m_pSGP->drawText (szLabel);
     m_pSGP->moveAbs (m_dXMinWin, dYPos);
     m_pSGP->setTextColor (color, -1);
     m_pSGP->drawText (szLabel);
-    double dValueOffset = (m_dXMaxWin - m_dXMinWin) / 5;
+    double dValueOffset = (m_dXMaxWin - m_dXMinWin) / 4;
     m_pSGP->moveAbs (m_dXMinWin + dValueOffset, dYPos);
     m_pSGP->drawText (szValue);
   } else {
     m_pSGP->moveAbs (m_dXMinWin + dValueOffset, dYPos);
     m_pSGP->drawText (szValue);
   } else {
index 948cf19fef08183930c812ce57147e65e283eb52..c731b0af48ba9d8b603b00408985283d6bf378b3 100644 (file)
@@ -18,7 +18,7 @@ CTSim is a Computed Tomography Simulator.
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" \
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" \
-       ./configure --prefix=/usr/local
+       ./configure --prefix=/usr/local --enable-static
 make
 
 %install
 make
 
 %install
index 6d252c1cee3941828a6789fda4eb731609e5849c..86b56670ef5b6884ec45823610ad43bfc409af44 100644 (file)
@@ -1,6 +1,6 @@
 bin_PROGRAMS=ctsim
 
 bin_PROGRAMS=ctsim
 
-ctsim_SOURCES=ctsim.cpp docs.cpp views.cpp dialogs.cpp ctsim.h docs.h views.h dialogs.h dlgprojections.cpp dlgprojections.h
+ctsim_SOURCES=ctsim.cpp docs.cpp views.cpp dialogs.cpp ctsim.h docs.h views.h dialogs.h dlgprojections.cpp dlgprojections.h dlgreconstruct.cpp dlgreconstruct.h
 ctsim_DEPENDENCIES=../libctgraphics/libctgraphics.a ../libctsupport/libctsupport.a ../libctsim/libctsim.a ../include/ct.h
 ctsim_LDADD=-L../libctgraphics -L../libctsupport -L../libctsim @ctlibs@
 
 ctsim_DEPENDENCIES=../libctgraphics/libctgraphics.a ../libctsupport/libctsupport.a ../libctsim/libctsim.a ../include/ct.h
 ctsim_LDADD=-L../libctgraphics -L../libctsupport -L../libctsim @ctlibs@
 
index 57c95f8b1bbda0d5aee2cbe57b8c37ff5c4828f2..3035244e912e1e572109266e4620886f9a400f31 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dialogs.cpp,v 1.11 2000/08/31 08:38:58 kevin Exp $
+**  $Id: dialogs.cpp,v 1.12 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -280,7 +280,7 @@ DialogGetRasterParameters::getNSamples (void)
 /////////////////////////////////////////////////////////////////////
 
 
 /////////////////////////////////////////////////////////////////////
 
 
-DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., double dDefaultFocalLength = 1, double dDefaultFieldOfView = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL, int iDefaultTrace = Trace::TRACE_NONE)
+DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet, int iDefaultNView, int iDefaultNSamples, double dDefaultRotAngle, double dDefaultFocalLength, double dDefaultFieldOfView, int iDefaultGeometry, int iDefaultTrace)
   : wxDialog (pParent, -1, "Set Projection Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
   : wxDialog (pParent, -1, "Set Projection Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
@@ -292,13 +292,15 @@ DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent,
   m_iDefaultNView = iDefaultNView;
   m_iDefaultNDet = iDefaultNDet;
   m_iDefaultTrace = iDefaultTrace;
   m_iDefaultNView = iDefaultNView;
   m_iDefaultNDet = iDefaultNDet;
   m_iDefaultTrace = iDefaultTrace;
+  m_iDefaultGeometry = iDefaultGeometry;
+
 
   pTopSizer->Add (new wxStaticText (this, -1, "Set Projection Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
   m_pListBoxGeometry = new StringValueAndTitleListBox (this, Scanner::getGeometryCount(), Scanner::getGeometryTitleArray(), Scanner::getGeometryNameArray());
 
   pTopSizer->Add (new wxStaticText (this, -1, "Set Projection Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
   m_pListBoxGeometry = new StringValueAndTitleListBox (this, Scanner::getGeometryCount(), Scanner::getGeometryTitleArray(), Scanner::getGeometryNameArray());
-  m_pListBoxGeometry->SetSelection (iDefaultGeometry);
+  m_pListBoxGeometry->SetSelection (iDefaultGeometry, true);
 
   ostringstream os;
   os << iDefaultNDet;
 
   ostringstream os;
   os << iDefaultNDet;
@@ -456,7 +458,7 @@ DialogGetProjectionParameters::getTrace (void)
 /////////////////////////////////////////////////////////////////////
 
 
 /////////////////////////////////////////////////////////////////////
 
 
-DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultFilterID = SignalFilter::FILTER_ABS_BANDLIMIT, double dDefaultFilterParam = 1.,  int iDefaultFilterMethodID = ProcessSignal::FILTER_METHOD_CONVOLUTION, int iDefaultFilterGenerationID = ProcessSignal::FILTER_GENERATION_INVALID, int iDefaultZeropad = 3, int iDefaultInterpID = Backprojector::INTERP_LINEAR, int iDefaultInterpParam = 1, int iDefaultBackprojectID = Backprojector::BPROJ_IDIFF3)
+DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize, int iDefaultYSize, int iDefaultFilterID, double dDefaultFilterParam,  int iDefaultFilterMethodID, int iDefaultFilterGenerationID, int iDefaultZeropad, int iDefaultInterpID, int iDefaultInterpParam, int iDefaultBackprojectID, int iTrace)
     : wxDialog (pParent, -1, "Set Reconstruction Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
     : wxDialog (pParent, -1, "Set Reconstruction Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
@@ -521,6 +523,10 @@ DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* p
   pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
   pTopSizer->Add (pGridSizer, 1, wxALL, 3);
 
   pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
   pTopSizer->Add (pGridSizer, 1, wxALL, 3);
 
+  m_pListBoxTrace = new StringValueAndTitleListBox (this, Trace::getTraceCount(), Trace::getTraceTitleArray(), Trace::getTraceNameArray());
+  m_pListBoxTrace->SetSelection (iTrace);
+  pTopSizer->Add (m_pListBoxTrace);
+
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
@@ -617,6 +623,12 @@ DialogGetReconstructionParameters::getInterpName (void)
   return m_pListBoxInterp->getSelectionStringValue();
 }
 
   return m_pListBoxInterp->getSelectionStringValue();
 }
 
+int
+DialogGetReconstructionParameters::getTrace (void)
+{
+  return Trace::convertTraceNameToID(m_pListBoxTrace->getSelectionStringValue());
+}
+
 const char*
 DialogGetReconstructionParameters::getBackprojectName (void)
 {
 const char*
 DialogGetReconstructionParameters::getBackprojectName (void)
 {
index 7271339bd9a8c789e254157e8e22b38ffef5d948..1cd86e3efb879e37eba1d520ce5d804cfd404437 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dialogs.h,v 1.12 2000/08/31 08:38:58 kevin Exp $
+**  $Id: dialogs.h,v 1.13 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -47,7 +47,7 @@ class StringValueAndTitleListBox : public wxListBox
  public:
   StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]);
 
  public:
   StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]);
 
-    const char* getSelectionStringValue (void) const;
+    const char* getSelectionStringValue () const;
 
  private:
     const char** m_ppszValues;
 
  private:
     const char** m_ppszValues;
@@ -58,9 +58,9 @@ class DialogGetPhantom : public wxDialog
 {
  public:
     DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN);
 {
  public:
     DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN);
-    virtual ~DialogGetPhantom (void) {}
+    virtual ~DialogGetPhantom () {}
 
 
-    const char* getPhantom (void);
+    const char* getPhantom ();
 
  private:
     StringValueAndTitleListBox* m_pListBoxPhantom;
 
  private:
     StringValueAndTitleListBox* m_pListBoxPhantom;
@@ -72,10 +72,10 @@ class DialogGetImageMinMax : public wxDialog
 {
  public:
     DialogGetImageMinMax (wxFrame* pParent, const ImageFile& rImagefile, double dDefaultMin = 0., double dDefaultMax = 0.);
 {
  public:
     DialogGetImageMinMax (wxFrame* pParent, const ImageFile& rImagefile, double dDefaultMin = 0., double dDefaultMax = 0.);
-    virtual ~DialogGetImageMinMax (void);
+    virtual ~DialogGetImageMinMax ();
 
 
-    double getMinimum (void);
-    double getMaximum (void);
+    double getMinimum ();
+    double getMaximum ();
 
  private:
     wxTextCtrl* m_pTextCtrlMin;
 
  private:
     wxTextCtrl* m_pTextCtrlMin;
@@ -90,11 +90,11 @@ class DialogGetRasterParameters : public wxDialog
 {
  public:
     DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1);
 {
  public:
     DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1);
-    virtual ~DialogGetRasterParameters (void);
+    virtual ~DialogGetRasterParameters ();
 
 
-    unsigned int getXSize (void);
-    unsigned int getYSize (void);
-    unsigned int getNSamples (void);
+    unsigned int getXSize ();
+    unsigned int getYSize ();
+    unsigned int getNSamples ();
 
  private:
     wxTextCtrl* m_pTextCtrlXSize;
 
  private:
     wxTextCtrl* m_pTextCtrlXSize;
@@ -111,17 +111,17 @@ class DialogGetProjectionParameters : public wxDialog
 {
  public:
     DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., double dDefaultFocalLength = 1, double dDefaultFieldOfView = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL, int iDefaultTrace = Trace::TRACE_NONE);
 {
  public:
     DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., double dDefaultFocalLength = 1, double dDefaultFieldOfView = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL, int iDefaultTrace = Trace::TRACE_NONE);
-    ~DialogGetProjectionParameters (void);
+    ~DialogGetProjectionParameters ();
 
 
-    unsigned int getNDet (void);
-    unsigned int getNView (void);
-    unsigned int getNSamples (void);
-    int getTrace (void);
+    unsigned int getNDet ();
+    unsigned int getNView ();
+    unsigned int getNSamples ();
+    int getTrace ();
 
 
-    double getRotAngle (void);
-    double getFieldOfViewRatio (void);
-    double getFocalLengthRatio (void);
-    const char* getGeometry(void);
+    double getRotAngle ();
+    double getFieldOfViewRatio ();
+    double getFocalLengthRatio ();
+    const char* getGeometry();
 
  private:
     wxTextCtrl* m_pTextCtrlNDet;
 
  private:
     wxTextCtrl* m_pTextCtrlNDet;
@@ -138,6 +138,7 @@ class DialogGetProjectionParameters : public wxDialog
     int m_iDefaultNView;
     int m_iDefaultNSamples;
     int m_iDefaultTrace;
     int m_iDefaultNView;
     int m_iDefaultNSamples;
     int m_iDefaultTrace;
+    int m_iDefaultGeometry;
     double m_dDefaultRotAngle;
     double m_dDefaultFocalLength;
     double m_dDefaultFieldOfView;
     double m_dDefaultRotAngle;
     double m_dDefaultFocalLength;
     double m_dDefaultFieldOfView;
@@ -148,19 +149,20 @@ class DialogGetProjectionParameters : public wxDialog
 class DialogGetReconstructionParameters : public wxDialog
 {
  public:
 class DialogGetReconstructionParameters : public wxDialog
 {
  public:
-    DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultFilterID = SignalFilter::FILTER_ABS_BANDLIMIT, double dDefaultFilterParam = 1., int iDefaultFilterMethodID = ProcessSignal::FILTER_METHOD_CONVOLUTION, int iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_INVALID, int iDefaultZeropad = 3, int iDefaultInterpID = Backprojector::INTERP_LINEAR, int iDefaultInterpParam = 1, int iDefaultBackprojectID = Backprojector::BPROJ_IDIFF3);
-    virtual ~DialogGetReconstructionParameters (void);
-
-    unsigned int getXSize(void);
-    unsigned int getYSize(void);
-    const char* getFilterName(void);
-    double getFilterParam(void);
-    const char* getFilterMethodName(void);
-    unsigned int getZeropad(void);
-    const char* getFilterGenerationName(void);
-    const char* getInterpName(void);
-    unsigned int getInterpParam(void);
-    const char* getBackprojectName(void);
+    DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultFilterID = SignalFilter::FILTER_ABS_BANDLIMIT, double dDefaultFilterParam = 1., int iDefaultFilterMethodID = ProcessSignal::FILTER_METHOD_CONVOLUTION, int iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_INVALID, int iDefaultZeropad = 3, int iDefaultInterpID = Backprojector::INTERP_LINEAR, int iDefaultInterpParam = 1, int iDefaultBackprojectID = Backprojector::BPROJ_IDIFF3, int iDefaultTrace = Trace::TRACE_NONE);
+    virtual ~DialogGetReconstructionParameters ();
+
+    unsigned int getXSize();
+    unsigned int getYSize();
+    const char* getFilterName();
+    double getFilterParam();
+    const char* getFilterMethodName();
+    unsigned int getZeropad();
+    const char* getFilterGenerationName();
+    const char* getInterpName();
+    unsigned int getInterpParam();
+    const char* getBackprojectName();
+    int getTrace ();
 
  private:
     wxTextCtrl* m_pTextCtrlXSize;
 
  private:
     wxTextCtrl* m_pTextCtrlXSize;
@@ -174,12 +176,14 @@ class DialogGetReconstructionParameters : public wxDialog
     StringValueAndTitleListBox* m_pListBoxFilterGeneration;
     StringValueAndTitleListBox* m_pListBoxInterp;
     StringValueAndTitleListBox* m_pListBoxBackproject;
     StringValueAndTitleListBox* m_pListBoxFilterGeneration;
     StringValueAndTitleListBox* m_pListBoxInterp;
     StringValueAndTitleListBox* m_pListBoxBackproject;
+    StringValueAndTitleListBox* m_pListBoxTrace;
 
     int m_iDefaultXSize;
     int m_iDefaultYSize;
     double m_dDefaultFilterParam;
     int m_iDefaultZeropad;
     int m_iDefaultInterpParam;
 
     int m_iDefaultXSize;
     int m_iDefaultYSize;
     double m_dDefaultFilterParam;
     int m_iDefaultZeropad;
     int m_iDefaultInterpParam;
+    int m_iDefaultTrace;
 };
 
 class DialogAutoScaleParameters : public wxDialog
 };
 
 class DialogAutoScaleParameters : public wxDialog
index 4f793342a37e3e2ad031cb284247a79242077dda..53b15cf69c35153fbb4d3db9ac69c5fe1c8c4113 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dlgprojections.cpp,v 1.2 2000/08/31 08:38:58 kevin Exp $
+**  $Id: dlgprojections.cpp,v 1.3 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -106,13 +106,13 @@ ProjectionsDialog::ProjectionsDialog (Scanner& rScanner, Projections& rProj, con
     SetAutoLayout(TRUE);
     Layout();
 
     SetAutoLayout(TRUE);
     Layout();
 
-    wxSize sizeDlg (600,600);
+    wxSize sizeDlg (500,500);
     if (sizeDlg.x != sizeDlg.y) {
       sizeDlg.x = max(sizeDlg.x,sizeDlg.y);
       sizeDlg.y = max(sizeDlg.x,sizeDlg.y);
     }
     if (m_iTrace >= Trace::TRACE_PLOT)
     if (sizeDlg.x != sizeDlg.y) {
       sizeDlg.x = max(sizeDlg.x,sizeDlg.y);
       sizeDlg.y = max(sizeDlg.x,sizeDlg.y);
     }
     if (m_iTrace >= Trace::TRACE_PLOT)
-      sizeDlg.x += 200;
+      sizeDlg.x += 250;
 
     m_iClientX = sizeDlg.x;
     m_iClientY = sizeDlg.y;
 
     m_iClientX = sizeDlg.x;
     m_iClientY = sizeDlg.y;
@@ -148,7 +148,7 @@ ProjectionsDialog::showView (int iViewNumber)
        wxYield();        // update the display
        m_iLastView = iViewNumber;
        if (m_iTrace >= Trace::TRACE_PLOT)
        wxYield();        // update the display
        m_iLastView = iViewNumber;
        if (m_iTrace >= Trace::TRACE_PLOT)
-           m_pSGP->setViewport (0, 0, 0.75, 1);
+           m_pSGP->setViewport (0, 0, 0.66, 1);
        m_rScanner.collectProjections (m_rProjections, m_rPhantom, iViewNumber, 1, true, m_iTrace, m_pSGP);
        if (m_iTrace >= Trace::TRACE_PLOT) {
            const DetectorArray& detArray = m_rProjections.getDetectorArray (iViewNumber);
        m_rScanner.collectProjections (m_rProjections, m_rPhantom, iViewNumber, 1, true, m_iTrace, m_pSGP);
        if (m_iTrace >= Trace::TRACE_PLOT) {
            const DetectorArray& detArray = m_rProjections.getDetectorArray (iViewNumber);
@@ -157,9 +157,9 @@ ProjectionsDialog::showView (int iViewNumber)
            for (int i = 0; i < detArray.nDet(); i++)
                detPos[i] = i;
            EZPlot ezplot (*m_pSGP);
            for (int i = 0; i < detArray.nDet(); i++)
                detPos[i] = i;
            EZPlot ezplot (*m_pSGP);
-           ezplot.ezset("xporigin 0.75");
+           ezplot.ezset("xporigin 0.66");
            ezplot.ezset("yporigin 0.10");
            ezplot.ezset("yporigin 0.10");
-           ezplot.ezset("xlength  0.25");
+           ezplot.ezset("xlength  0.34");
            ezplot.ezset("ylength  0.90");
            ezplot.ezset("grid");
            ezplot.ezset("box");
            ezplot.ezset("ylength  0.90");
            ezplot.ezset("grid");
            ezplot.ezset("box");
diff --git a/src/dlgreconstruct.cpp b/src/dlgreconstruct.cpp
new file mode 100644 (file)
index 0000000..e8e01e2
--- /dev/null
@@ -0,0 +1,278 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          dlgreconstruct.cpp
+**   Purpose:       Projection Collection Animation Dialog
+**   Programmer:    Kevin Rosenberg
+**   Date Started:  August 2000
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: dlgreconstruct.cpp,v 1.1 2000/09/02 05:13:57 kevin Exp $
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+
+#ifdef __GNUG__
+  #pragma implementation "dlgreconstruct.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+    #include "wx/utils.h"
+    #include "wx/frame.h"
+    #include "wx/button.h"
+    #include "wx/stattext.h"
+    #include "wx/layout.h"
+    #include "wx/event.h"
+    #include "wx/intl.h"
+    #include "wx/settings.h"
+    #include "wx/dcclient.h"
+    #include "wx/timer.h"
+#endif
+
+#include "dlgreconstruct.h"
+#include "ct.h"
+
+
+static const int LAYOUT_X_MARGIN = 4;
+static const int LAYOUT_Y_MARGIN = 4;
+
+BEGIN_EVENT_TABLE(ReconstructDialog, wxDialog)
+   EVT_BUTTON(wxID_CANCEL, ReconstructDialog::OnCancel)
+   EVT_BUTTON(ID_BTN_PAUSE, ReconstructDialog::OnPause)
+   EVT_BUTTON(ID_BTN_STEP, ReconstructDialog::OnStep)
+   EVT_CLOSE(ReconstructDialog::OnClose)
+   EVT_PAINT(ReconstructDialog::OnPaint)
+END_EVENT_TABLE()
+
+IMPLEMENT_CLASS(ReconstructDialog, wxDialog)
+
+
+ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Projections& rProj, ImageFile& rIF, const int iTrace, wxWindow *parent)
+    : wxDialog(parent, -1, "Collect Projections"), m_rReconstructor(rReconstruct), m_rProjections(rProj), m_rImageFile(rIF), m_pSGPDriver(NULL), m_pSGP(NULL), m_iTrace(iTrace), m_pDC(NULL), m_btnAbort(0), m_btnPause(0), m_btnStep(0)
+{
+    m_state = Continue;
+    m_iLastView = -1;
+    m_parentTop = parent;
+    while ( m_parentTop && m_parentTop->GetParent() )
+        m_parentTop = m_parentTop->GetParent();
+    
+    m_btnAbort = new wxButton(this, wxID_CANCEL, _("Cancel"));
+    wxLayoutConstraints* c = new wxLayoutConstraints;
+    c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
+    c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
+
+    wxSize sizeBtn = wxButton::GetDefaultSize();
+    c->width.Absolute(sizeBtn.x);
+    c->height.Absolute(sizeBtn.y);
+
+    m_btnAbort->SetConstraints(c);
+
+    m_btnPause = new wxButton (this, ID_BTN_PAUSE, wxString("Pause"));
+    wxLayoutConstraints* cPause = new wxLayoutConstraints;
+    cPause->right.SameAs(this, wxRight, 3*LAYOUT_X_MARGIN + sizeBtn.x);
+    cPause->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
+    cPause->width.Absolute(sizeBtn.x);
+    cPause->height.Absolute(sizeBtn.y);
+    m_btnPause->SetConstraints(cPause);
+
+    m_btnStep = new wxButton (this, ID_BTN_STEP, wxString("Step"));
+    wxLayoutConstraints* cStep = new wxLayoutConstraints;
+    cStep->right.SameAs(this, wxRight, 5*LAYOUT_X_MARGIN + sizeBtn.x * 2);
+    cStep->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
+    cStep->width.Absolute(sizeBtn.x);
+    cStep->height.Absolute(sizeBtn.y);
+    m_btnStep->SetConstraints(cStep);
+
+    SetAutoLayout(TRUE);
+    Layout();
+
+    wxSize sizeDlg (700,500);
+    if (sizeDlg.x != sizeDlg.y) {
+      sizeDlg.x = max(sizeDlg.x,sizeDlg.y);
+      sizeDlg.y = max(sizeDlg.x,sizeDlg.y);
+    }
+
+    m_iClientX = sizeDlg.x;
+    m_iClientY = sizeDlg.y;
+    SetClientSize(sizeDlg);
+
+    m_bitmap.Create (m_iClientX, m_iClientY); // save a copy of screen
+    m_pDC = new wxMemoryDC;
+    m_pDC->SelectObject (m_bitmap);       // in memoryDC
+    m_pDC->SetFont (*wxSWISS_FONT);
+    int x, y;
+    this->GetClientSize(&x, &y);
+    m_pSGPDriver = new SGPDriver (dynamic_cast<wxDC*>(m_pDC), x, y);
+    m_pSGP = new SGP (*m_pSGPDriver);
+
+    Centre(wxCENTER_FRAME | wxBOTH);
+
+    if ( m_parentTop )
+      m_parentTop->Enable(FALSE);
+
+    Show(TRUE);
+    Enable(TRUE); // enable this window
+
+    wxYield();     // Update the display
+
+    m_pSGPDriver->idWX()->SetFont(*wxSWISS_FONT);
+#ifdef __WXMAC__
+    MacUpdateImmediately();
+#endif
+}
+
+void
+ReconstructDialog::showView (int iViewNumber)
+{
+  if ( iViewNumber < m_rProjections.nView() ) {
+    wxYield();        // update the display
+    m_iLastView = iViewNumber;
+    m_pSGP->eraseWindow();
+    if (m_iTrace >= Trace::TRACE_PLOT)
+      m_pSGP->setViewport (0, 0, 1, 1);
+    char szProgress [256];
+    snprintf (szProgress, sizeof(szProgress), "Reconstructing View %d (%.1f%%)", iViewNumber, 100 * iViewNumber / static_cast<double>(m_rProjections.nView()));
+    double wText, hText;
+    m_pSGP->setTextColor (C_LTRED, -1);
+    m_pSGP->getTextExtent (szProgress, &wText, &hText);
+    double xw_max, xw_min, yw_max, yw_min;
+    m_pSGP->getWindow (xw_min, yw_min, xw_max, yw_max);
+    m_pSGP->moveAbs ((xw_max - xw_min) / 2 + xw_min - wText / 2, yw_max - hText);
+    m_pSGP->drawText (szProgress);
+    if (m_iTrace >= Trace::TRACE_PLOT)
+      m_pSGP->setViewport (0, .1, 0.66, 1);
+    m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP);
+
+    ::wxYield();
+    m_pDC->SelectObject (wxNullBitmap);
+    Refresh();
+    m_pDC->SelectObject (m_bitmap);
+    ::wxYield();
+  }
+}
+
+bool
+ReconstructDialog::reconstructView (int iViewNumber)
+{
+  showView (iViewNumber);
+  wxYield();        // update the display
+  if (m_iTrace >= Trace::TRACE_PLOT)
+    sleep(1);
+  else {
+    m_state = Finished;    // so that we return TRUE below and 
+  }                        // that [Cancel] handler knew what to do
+  
+#ifdef __WXMAC__
+  MacUpdateImmediately();
+#endif
+
+  return m_state != Cancelled;
+}
+
+
+// EVENT HANDLERS
+
+void ReconstructDialog::OnCancel (wxCommandEvent& event)
+{
+  if ( m_state == Finished ) {
+    // this means that the count down is already finished and we're being
+    // shown as a modal dialog - so just let the default handler do the job
+    event.Skip();
+  } else {
+    // request to cancel was received, the next time Update() is called we
+    // will handle it
+    m_state = Cancelled;
+
+    // update the button state immediately so that the user knows that the
+    // request has been noticed
+    m_btnAbort->Disable();
+  }
+}
+
+
+void 
+ReconstructDialog::OnPause (wxCommandEvent& event)
+{
+  if ( m_state == Finished ) {
+    // this means that the count down is already finished and we're being
+    // shown as a modal dialog - so just let the default handler do the job
+    event.Skip();
+  } else {
+      if (m_state == Continue) {
+       m_state = Paused;
+       m_btnPause->SetLabel (wxString("Resume"));
+      } else if (m_state == Paused) {
+       m_state = Continue;
+       m_btnPause->SetLabel (wxString("Pause"));
+      }
+  }
+}
+
+void 
+ReconstructDialog::OnStep (wxCommandEvent& event)
+{
+  if ( m_state == Finished ) {
+    event.Skip();
+  } else {
+    if (m_state == Continue) {
+      m_state = Paused;
+      m_btnPause->SetLabel (wxString("Resume"));
+    } else if (m_state == Paused) {
+      reconstructView (m_iLastView + 1);
+    }
+  }
+}
+
+void ReconstructDialog::OnClose(wxCloseEvent& event)
+{
+    if ( m_state == Uncancellable )
+      event.Veto(TRUE);    // can't close this dialog
+    else if ( m_state == Finished )
+      event.Skip(); // let the default handler close the window as we already terminated
+    else
+      m_state = Cancelled;          // next Update() will notice it
+}
+
+void
+ReconstructDialog::OnPaint (wxPaintEvent& event)
+{
+  wxPaintDC paintDC (this);
+  if (m_state == Paused) {
+    paintDC.DrawBitmap(m_bitmap, 0, 0, false);
+  }
+}
+
+
+/////////////////////////////////////////////////////
+// destruction
+
+ReconstructDialog::~ReconstructDialog()
+{
+  if ( m_parentTop )
+    m_parentTop->Enable(TRUE);
+
+  delete m_pSGP;
+  delete m_pSGPDriver;
+  delete m_pDC;
+}
+
diff --git a/src/dlgreconstruct.h b/src/dlgreconstruct.h
new file mode 100644 (file)
index 0000000..b73cf09
--- /dev/null
@@ -0,0 +1,121 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          dlgreconstruct.h
+**   Purpose:       Headers for Projection Collection Animation Dialog
+**   Programmer:    Kevin Rosenberg
+**   Date Started:  August 2000
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: dlgreconstruct.h,v 1.1 2000/09/02 05:13:57 kevin Exp $
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+
+#ifndef __DLGRECONSTRUCT_H_
+#define __DLGRECONSTRUCT_H_
+
+#ifdef __GNUG__
+#pragma interface "dlgreconstruct.h"
+#endif
+
+#include "wx/setup.h"
+#include "wx/dialog.h"
+#include "wx/dcmemory.h"
+
+class wxButton;
+class wxStaticText;
+class Projections;
+class ImageFile;
+class SGP;
+class SGPDriver;
+class Reconstructor;
+
+class ReconstructDialog : public wxDialog
+{
+  DECLARE_DYNAMIC_CLASS(ReconstructDialog)
+
+public:
+  ReconstructDialog (Reconstructor& rReconstruct, const Projections& rProj, ImageFile& rIF, const int iTrace, wxWindow *parent);
+
+   ~ReconstructDialog();
+
+   /* Perform projection on view number
+       return true if ABORT button has not been pressed
+   */
+   bool reconstructView (int iViewNumber);
+
+   /* Can be called to continue after the cancel button has been pressed, but
+       the program decided to continue the operation (e.g., user didn't
+       confirm it)
+   */
+   void Resume() { m_state = Continue; }
+
+   // implementation from now on
+       // callback for optional abort button
+   void OnCancel(wxCommandEvent& event);
+       // callback to disable "hard" window closing
+   void OnClose(wxCloseEvent& event);
+   void OnPaint(wxPaintEvent& event);
+
+   void OnPause(wxCommandEvent& event);
+   void OnStep(wxCommandEvent& event);
+
+   bool isPaused() const {return m_state == Paused;}
+
+   bool isCancelled() const {return m_state == Cancelled;}
+
+private:
+   // parent top level window (may be NULL)
+   wxWindow *m_parentTop;
+   int m_iLastView;
+   int m_iClientX;   // size of client window
+   int m_iClientY;
+
+   Reconstructor& m_rReconstructor;
+   const Projections& m_rProjections;
+   ImageFile& m_rImageFile;
+   SGPDriver* m_pSGPDriver;
+   SGP* m_pSGP;
+   const int m_iTrace;
+   wxMemoryDC* m_pDC;
+
+   wxButton *m_btnAbort;    // the abort button (or NULL if none)
+   wxButton *m_btnPause; 
+   wxButton *m_btnStep;
+
+   wxMemoryDC m_memoryDC;  // for restoring image on OnPaint
+   wxBitmap m_bitmap;
+
+   // continue processing or not (return value for Update())
+   enum
+   {
+      Uncancellable = -1,   // dialog can't be canceled
+      Paused,
+      Cancelled,            // can be cancelled and, in fact, was
+      Continue,            // can be cancelled but wasn't
+      Finished             // finished, waiting to be removed from screen
+   } m_state;
+
+   const static int ID_BTN_PAUSE = 19998;
+   const static int ID_BTN_STEP = 19999;
+
+   void showView (int iViewNumber);
+
+   DECLARE_EVENT_TABLE()
+};
+#endif
+
index 3df51fa5e3c94227185b8acb602024602de88d15..d60515bbb8c4c7a359061d9e9d47e5316c43ac9b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.18 2000/08/31 08:38:58 kevin Exp $
+**  $Id: views.cpp,v 1.19 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -45,6 +45,7 @@
 #endif
 
 #include "wx/image.h"
 #endif
 
 #include "wx/image.h"
+#include "wx/progdlg.h"
 
 #include "ct.h"
 #include "ctsim.h"
 
 #include "ct.h"
 #include "ctsim.h"
 #include "views.h"
 #include "dialogs.h"
 #include "dlgprojections.h"
 #include "views.h"
 #include "dialogs.h"
 #include "dlgprojections.h"
+#include "dlgreconstruct.h"
 #include <sstream>
 #include "backprojectors.h"
 #include <sstream>
 #include "backprojectors.h"
+#include "reconstruct.h"
+#include "timer.h"
 
 // ImageFileCanvas
 
 
 // ImageFileCanvas
 
@@ -135,16 +139,8 @@ ImageFileView::OnProperties (wxCommandEvent& event)
     ostringstream os;
     os << "file: " << rFilename << "\nmin: "<<min<<"\nmax: "<<max<<"\nmean: "<<mean<<"\nmode: "<<mode<<"\nstddev: "<<stddev << "\n";
     *theApp->getLog() << os.str().c_str();
     ostringstream os;
     os << "file: " << rFilename << "\nmin: "<<min<<"\nmax: "<<max<<"\nmean: "<<mean<<"\nmode: "<<mode<<"\nstddev: "<<stddev << "\n";
     *theApp->getLog() << os.str().c_str();
-
-    int xSize, ySize;
-    ostringstream osSize;
-    m_frame->GetSize (&xSize, &ySize);
-    osSize << "Frame size: (" << xSize << "," << ySize << ")\n";
-    m_frame->GetClientSize (&xSize, &ySize);
-    osSize << "Frame Client size: (" << xSize << "," << ySize << ")\n";
-    m_canvas->GetSize (&xSize, &ySize);
-    osSize << "Canvas size: (" << xSize << "," << ySize << ")\n";
-    *theApp->getLog() << osSize.str().c_str();
+    wxMessageDialog dialogMsg (m_frame, os.str().c_str(), "Imagefile Properties", wxOK | wxICON_INFORMATION);
+    dialogMsg.ShowModal();
   }
 }
 
   }
 }
 
@@ -382,6 +378,14 @@ END_EVENT_TABLE()
 PhantomView::PhantomView(void) 
   : wxView(), m_canvas(NULL), m_frame(NULL)
 {
 PhantomView::PhantomView(void) 
   : wxView(), m_canvas(NULL), m_frame(NULL)
 {
+    m_iDefaultNDet = 367;
+    m_iDefaultNView = 320;
+    m_iDefaultNSample = 2;
+    m_dDefaultRotation = 2;
+    m_dDefaultFocalLength = 2;
+    m_dDefaultFieldOfView = 1;
+    m_iDefaultGeometry = Scanner::GEOMETRY_PARALLEL;
+    m_iDefaultTrace = Trace::TRACE_NONE;
 }
 
 PhantomView::~PhantomView(void)
 }
 
 PhantomView::~PhantomView(void)
@@ -406,31 +410,33 @@ PhantomView::OnProperties (wxCommandEvent& event)
 void
 PhantomView::OnProjections (wxCommandEvent& event)
 {
 void
 PhantomView::OnProjections (wxCommandEvent& event)
 {
-  DialogGetProjectionParameters dialogProjection (m_frame, 367, 320, 1, 1., 1., 1., Scanner::GEOMETRY_PARALLEL, Trace::TRACE_NONE);
+  DialogGetProjectionParameters dialogProjection (m_frame, m_iDefaultNDet, m_iDefaultNView, m_iDefaultNSample, m_dDefaultRotation, m_dDefaultFocalLength, m_dDefaultFieldOfView, m_iDefaultGeometry, m_iDefaultTrace);
   int retVal = dialogProjection.ShowModal();
   if (retVal == wxID_OK) {
   int retVal = dialogProjection.ShowModal();
   if (retVal == wxID_OK) {
-    int nDet = dialogProjection.getNDet();
-    int nView = dialogProjection.getNView();
-    int nSamples = dialogProjection.getNSamples();
-    int iTrace = dialogProjection.getTrace();
-    double dRotAngle = dialogProjection.getRotAngle();
-    double dFocalLengthRatio = dialogProjection.getFocalLengthRatio();
-    double dFieldOfViewRatio = dialogProjection.getFieldOfViewRatio();
-
+    m_iDefaultNDet = dialogProjection.getNDet();
+    m_iDefaultNView = dialogProjection.getNView();
+    m_iDefaultNSample = dialogProjection.getNSamples();
+    m_iDefaultTrace = dialogProjection.getTrace();
+    m_dDefaultRotation = dialogProjection.getRotAngle();
+    m_dDefaultFocalLength = dialogProjection.getFocalLengthRatio();
+    m_dDefaultFieldOfView = dialogProjection.getFieldOfViewRatio();
     wxString sGeometry = dialogProjection.getGeometry();
     wxString sGeometry = dialogProjection.getGeometry();
-    if (nDet > 0 && nView > 0 && sGeometry != "") {
+    m_iDefaultGeometry = Scanner::convertGeometryNameToID (sGeometry.c_str());
+
+    if (m_iDefaultNDet > 0 && m_iDefaultNView > 0 && sGeometry != "") {
       const Phantom& rPhantom = GetDocument()->getPhantom();
       ProjectionFileDocument* pProjectionDoc = dynamic_cast<ProjectionFileDocument*>(theApp->getDocManager()->CreateDocument("untitled.pj", wxDOC_SILENT));
       Projections& rProj = pProjectionDoc->getProjections();
       const Phantom& rPhantom = GetDocument()->getPhantom();
       ProjectionFileDocument* pProjectionDoc = dynamic_cast<ProjectionFileDocument*>(theApp->getDocManager()->CreateDocument("untitled.pj", wxDOC_SILENT));
       Projections& rProj = pProjectionDoc->getProjections();
-      Scanner theScanner (rPhantom, sGeometry.c_str(), nDet, nView, nSamples, dRotAngle, dFocalLengthRatio, dFieldOfViewRatio);
+      Scanner theScanner (rPhantom, sGeometry.c_str(), m_iDefaultNDet, m_iDefaultNView, m_iDefaultNSample, m_dDefaultRotation, m_dDefaultFocalLength, m_dDefaultFieldOfView);
       if (theScanner.fail()) {
        *theApp->getLog() << "Failed making scanner: " << theScanner.failMessage().c_str() << "\n";
        return;
       }
       rProj.initFromScanner (theScanner);
       if (theScanner.fail()) {
        *theApp->getLog() << "Failed making scanner: " << theScanner.failMessage().c_str() << "\n";
        return;
       }
       rProj.initFromScanner (theScanner);
+      m_dDefaultRotation /= PI;  // convert back to PI units
 
 
-      if (iTrace > Trace::TRACE_CONSOLE) {
-       ProjectionsDialog dialogProjections (theScanner, rProj, rPhantom, iTrace, dynamic_cast<wxWindow*>(m_frame));
+      if (m_iDefaultTrace > Trace::TRACE_CONSOLE) {
+       ProjectionsDialog dialogProjections (theScanner, rProj, rPhantom, m_iDefaultTrace, dynamic_cast<wxWindow*>(m_frame));
        for (int iView = 0; iView < rProj.nView(); iView++) {
          ::wxYield();
          ::wxYield();
        for (int iView = 0; iView < rProj.nView(); iView++) {
          ::wxYield();
          ::wxYield();
@@ -445,19 +451,32 @@ PhantomView::OnProjections (wxCommandEvent& event)
              ::wxUsleep(50);
          }
        }
              ::wxUsleep(50);
          }
        }
-      } else
-       theScanner.collectProjections (rProj, rPhantom, iTrace);
+      } else {
+       wxProgressDialog dlgProgress (wxString("Projection"), wxString("Projection Progress"), rProj.nView() + 1, m_frame, wxPD_CAN_ABORT);
+       for (int i = 0; i < rProj.nView(); i++) {
+         theScanner.collectProjections (rProj, rPhantom, i, 1, true, m_iDefaultTrace);
+         if (! dlgProgress.Update (i+1)) {
+           pProjectionDoc->DeleteAllViews();
+           return;
+         }
+       }
+      }
 
 
+      ostringstream os;
+      os << "Projections for " << rPhantom.name() << ": nDet=" << m_iDefaultNDet << ", nView=" << m_iDefaultNView << ", nSamples=" << m_iDefaultNSample << ", RotAngle=" << m_dDefaultRotation << ", FocalLengthRatio=" << m_dDefaultFocalLength << ", FieldOfViewRatio=" << m_dDefaultFieldOfView << ", Geometry=" << sGeometry.c_str() << "\n";
+      rProj.setRemark (os.str());
+      *theApp->getLog() << os.str().c_str();
+
+      ::wxYield();
       pProjectionDoc->Modify(true);
       pProjectionDoc->UpdateAllViews(this);
       pProjectionDoc->Modify(true);
       pProjectionDoc->UpdateAllViews(this);
+      ::wxYield();
       if (wxView* pView = pProjectionDoc->GetFirstView())
        if (wxFrame* pFrame = pView->GetFrame()) {
          pFrame->SetFocus();
       if (wxView* pView = pProjectionDoc->GetFirstView())
        if (wxFrame* pFrame = pView->GetFrame()) {
          pFrame->SetFocus();
+         pFrame->Raise();
        }
        }
-      ostringstream os;
-      os << "Projections for " << rPhantom.name() << ": nDet=" << nDet << ", nView=" << nView << ", nSamples=" << nSamples << ", RotAngle=" << dRotAngle << ", FocalLengthRatio=" << dFocalLengthRatio << ", FieldOfViewRatio=" << dFieldOfViewRatio << ", Geometry=" << sGeometry.c_str() << "\n";
-      rProj.setRemark (os.str());
-      *theApp->getLog() << os.str().c_str();
+      m_frame->Lower();
     }
   }
 }
     }
   }
 }
@@ -654,6 +673,8 @@ ProjectionFileView::OnProperties (wxCommandEvent& event)
   ostringstream os;
   rProj.printScanInfo(os);
   *theApp->getLog() << os.str().c_str();
   ostringstream os;
   rProj.printScanInfo(os);
   *theApp->getLog() << os.str().c_str();
+  wxMessageDialog dialogMsg (m_frame, os.str().c_str(), "Projection File Properties", wxOK | wxICON_INFORMATION);
+  dialogMsg.ShowModal();
 }
 
 
 }
 
 
@@ -677,17 +698,51 @@ ProjectionFileView::OnReconstruct (wxCommandEvent& event)
     wxString optInterpName = dialogReconstruction.getInterpName();
     int optInterpParam = dialogReconstruction.getInterpParam();
     wxString optBackprojectName = dialogReconstruction.getBackprojectName();
     wxString optInterpName = dialogReconstruction.getInterpName();
     int optInterpParam = dialogReconstruction.getInterpParam();
     wxString optBackprojectName = dialogReconstruction.getBackprojectName();
+    int iTrace = dialogReconstruction.getTrace();
     if (xSize > 0 && ySize > 0) {
       ImageFileDocument* pReconDoc = dynamic_cast<ImageFileDocument*>(theApp->getDocManager()->CreateDocument("untitled.if", wxDOC_SILENT));
       ImageFile& imageFile = pReconDoc->getImageFile();
       const Projections& rProj = GetDocument()->getProjections();
       imageFile.setArraySize (xSize, ySize);
     if (xSize > 0 && ySize > 0) {
       ImageFileDocument* pReconDoc = dynamic_cast<ImageFileDocument*>(theApp->getDocManager()->CreateDocument("untitled.if", wxDOC_SILENT));
       ImageFile& imageFile = pReconDoc->getImageFile();
       const Projections& rProj = GetDocument()->getProjections();
       imageFile.setArraySize (xSize, ySize);
-      rProj.reconstruct (imageFile, optFilterName.c_str(), optFilterParam, optFilterMethodName.c_str(), optZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), optInterpParam, optBackprojectName.c_str(), Trace::TRACE_NONE);
+      Timer timerRecon;
+
+      Reconstructor* pReconstruct = new Reconstructor (rProj, imageFile, optFilterName.c_str(), optFilterParam, optFilterMethodName.c_str(), optZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), optInterpParam, optBackprojectName.c_str(), iTrace);
+      if (iTrace > Trace::TRACE_CONSOLE) {
+       ReconstructDialog* pDlgReconstruct = new ReconstructDialog (*pReconstruct, rProj, imageFile, iTrace, m_frame);
+       for (int iView = 0; iView < rProj.nView(); iView++) {
+         ::wxYield();
+         ::wxYield();
+         if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView)) {
+           delete pDlgReconstruct;
+           delete pReconstruct;
+           pReconDoc->DeleteAllViews();
+           return;
+         }
+         ::wxYield();
+         ::wxYield();
+         while (pDlgReconstruct->isPaused()) {
+             ::wxYield();
+             ::wxUsleep(50);
+         }
+       }
+      } else {
+       wxProgressDialog dlgProgress (wxString("Reconstruction"), wxString("Reconstruction Progress"), rProj.nView() + 1, m_frame, wxPD_CAN_ABORT);
+       for (int i = 0; i < rProj.nView(); i++) {
+         pReconstruct->reconstructView (i, 1);
+         if (! dlgProgress.Update(i + 1)) {
+           delete pReconstruct;
+           pReconDoc->DeleteAllViews();
+           return;
+         }
+       }
+      }
       pReconDoc->Modify(true);
       pReconDoc->UpdateAllViews(this);
       ostringstream os;
       os << "Reconstruct " << rProj.getFilename() << ": xSize=" << xSize << ", ySize=" << ySize << ", Filter=" << optFilterName.c_str() << ", FilterParam=" << optFilterParam << ", FilterMethod=" << optFilterMethodName.c_str() << ", FilterGeneration=" << optFilterGenerationName.c_str() << ", Zeropad=" << optZeropad << ", Interpolation=" << optInterpName.c_str() << ", InterpolationParam=" << optInterpParam << ", Backprojection=" << optBackprojectName.c_str() << "\n";
       *theApp->getLog() << os.str().c_str();
       pReconDoc->Modify(true);
       pReconDoc->UpdateAllViews(this);
       ostringstream os;
       os << "Reconstruct " << rProj.getFilename() << ": xSize=" << xSize << ", ySize=" << ySize << ", Filter=" << optFilterName.c_str() << ", FilterParam=" << optFilterParam << ", FilterMethod=" << optFilterMethodName.c_str() << ", FilterGeneration=" << optFilterGenerationName.c_str() << ", Zeropad=" << optZeropad << ", Interpolation=" << optInterpName.c_str() << ", InterpolationParam=" << optInterpParam << ", Backprojection=" << optBackprojectName.c_str() << "\n";
       *theApp->getLog() << os.str().c_str();
+      imageFile.labelAdd (rProj.getLabel());
+      imageFile.labelAdd (Array2dFileLabel::L_HISTORY, os.str().c_str(), timerRecon.timerEnd());
     }
   }
 }
     }
   }
 }
index 71efce20081a48f79fc7bc5ce942fce6825697c4..f82d5066c16558f41eb31e4d44e13c356fc24065 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.h,v 1.8 2000/08/31 08:38:58 kevin Exp $
+**  $Id: views.h,v 1.9 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -140,6 +140,15 @@ private:
     PhantomCanvas *m_canvas;
     wxFrame *m_frame;
 
     PhantomCanvas *m_canvas;
     wxFrame *m_frame;
 
+    int m_iDefaultNDet;
+    int m_iDefaultNView;
+    int m_iDefaultNSample;
+    int m_iDefaultGeometry;
+    int m_iDefaultTrace;
+    double m_dDefaultRotation;
+    double m_dDefaultFocalLength;
+    double m_dDefaultFieldOfView;
+
 public:
     PhantomView(void);
     virtual ~PhantomView(void);
 public:
     PhantomView(void);
     virtual ~PhantomView(void);
diff --git a/tools/pjinfo.cpp b/tools/pjinfo.cpp
new file mode 100644 (file)
index 0000000..0ca578c
--- /dev/null
@@ -0,0 +1,141 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**   Name:          pjfinfo.cpp
+**   Purpose:       Convert an projection data file to an image file
+**   Programmer:    Kevin Rosenberg
+**   Date Started:  April 2000
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: pjinfo.cpp,v 1.1 2000/09/02 05:17:29 kevin Exp $
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+
+/* FILE
+ *   pjfinfo.c                 Convert Raysum to image
+ *
+ * DATE
+ *   August 2000
+ */
+
+#include "ct.h"
+#include "timer.h"
+
+
+enum { O_DUMP, O_HELP, O_VERSION };
+
+static struct option my_options[] =
+{
+  {"dump", 0, 0, O_DUMP},
+  {"help", 0, 0, O_HELP},
+  {"version", 0, 0, O_VERSION},
+  {0, 0, 0, 0}
+};
+
+static const char* g_szIdStr = "$Id: pjinfo.cpp,v 1.1 2000/09/02 05:17:29 kevin Exp $";
+
+void 
+pjfinfo_usage (const char *program)
+{
+  cout << "usage: " << fileBasename(program) << " proj-file [OPTIONS]" << endl;
+  cout << "Display projection file information" << endl;
+  cout << endl;
+  cout << "   --dump      Dump all scan data" << endl;
+  cout << "   --version   Print version" << endl;
+  cout << "   --help      Print this help message" << endl;
+}
+
+         
+
+int 
+pjfinfo_main (const int argc, char *const argv[])
+{
+  string pj_name;
+  bool optDump = false;
+  extern int optind;
+  Timer timerProgram;
+
+  while (1)
+    {
+      int c = getopt_long (argc, argv, "", my_options, NULL);
+      if (c == -1)
+       break;
+      
+      switch (c)
+       {
+       case O_DUMP:
+         optDump = true;
+         break;
+        case O_VERSION:
+#ifdef VERSION
+         cout << "Version " << VERSION << endl << g_szIdStr << endl;
+#else
+          cout << "Unknown version number" << endl;
+#endif
+         return (0);
+       case O_HELP:
+       case '?':
+         pjfinfo_usage(argv[0]);
+         return (0);
+       default:
+         pjfinfo_usage(argv[0]);
+         return (1);
+       }
+    }
+  
+  if (argc - optind != 1) {
+    pjfinfo_usage(argv[0]);
+    return (1);
+  }
+
+  pj_name = argv[optind];
+
+  Projections pj;
+  if (! pj.read (pj_name)) {
+    sys_error (ERR_SEVERE, "Can not open projection file %s", pj_name.c_str());
+    return (1);
+  }
+
+  if (optDump)
+    pj.printProjectionData();
+  else {
+    ostringstream os;
+    pj.printScanInfo (os);
+    cout << os.str();
+  }
+  
+  return(0);
+}
+
+
+#ifndef NO_MAIN
+int 
+main (const int argc, char *const argv[])
+{
+  int retval = 1;
+
+  try {
+    retval = pjfinfo_main(argc, argv);
+  } catch (exception e) {
+    cerr << "Exception: " << e.what() << endl;
+  } catch (...) {
+    cerr << "Unknown exception" << endl;
+  }
+
+  return (retval);
+}
+#endif
index 9fcb8903a6de987e3a130f7ae720eeb28883dc45..33fe7d3f6e45a7af71f1b6e38fdc1b9abf657db9 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: pjrec.cpp,v 1.16 2000/08/31 08:38:58 kevin Exp $
+**  $Id: pjrec.cpp,v 1.17 2000/09/02 05:10:39 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -49,7 +49,7 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: pjrec.cpp,v 1.16 2000/08/31 08:38:58 kevin Exp $";
+static const char* g_szIdStr = "$Id: pjrec.cpp,v 1.17 2000/09/02 05:10:39 kevin Exp $";
 
 void 
 pjrec_usage (const char *program)
 
 void 
 pjrec_usage (const char *program)
@@ -324,7 +324,14 @@ pjrec_main (int argc, char * argv[])
 
 #ifdef HAVE_MPI
   TimerCollectiveMPI timerReconstruct (mpiWorld.getComm());
 
 #ifdef HAVE_MPI
   TimerCollectiveMPI timerReconstruct (mpiWorld.getComm());
-  projLocal.reconstruct (*imLocal, sOptFilterName.c_str(), dOptFilterParam, sOptFilterMethodName.c_str(), iOptZeropad, sOptFilterGenerationName.c_str(), sOptInterpName.c_str(), iOptPreinterpolationFactor, sOptBackprojectName.c_str(), optTrace);
+
+  Reconstructor reconstruct (projLocal, *imLocal, sOptFilterName.c_str(), dOptFilterParam, sOptFilterMethodName.c_str(), iOptZeropad, sOptFilterGenerationName.c_str(), sOptInterpName.c_str(), iOptPreinterpolationFactor, sOptBackprojectName.c_str(), optTrace);
+  if (reconstruct.fail()) {
+    cout << reconstruct.failMessage();
+    return (1);
+  }
+  reconstruct.reconstructAllViews();
+
   if (bOptVerbose)
       timerReconstruct.timerEndAndReport ("Time to reconstruct");
 
   if (bOptVerbose)
       timerReconstruct.timerEndAndReport ("Time to reconstruct");
 
@@ -333,7 +340,12 @@ pjrec_main (int argc, char * argv[])
   if (bOptVerbose)
       timerReduce.timerEndAndReport ("Time to reduce image");
 #else
   if (bOptVerbose)
       timerReduce.timerEndAndReport ("Time to reduce image");
 #else
-  projGlobal.reconstruct (*imGlobal, sOptFilterName.c_str(), dOptFilterParam, sOptFilterMethodName.c_str(), iOptZeropad, sOptFilterGenerationName.c_str(), sOptInterpName.c_str(), iOptPreinterpolationFactor, sOptBackprojectName.c_str(), optTrace);
+  Reconstructor reconstruct (projGlobal, *imGlobal, sOptFilterName.c_str(), dOptFilterParam, sOptFilterMethodName.c_str(), iOptZeropad, sOptFilterGenerationName.c_str(), sOptInterpName.c_str(), iOptPreinterpolationFactor, sOptBackprojectName.c_str(), optTrace);
+  if (reconstruct.fail()) {
+    cout << reconstruct.failMessage();
+    return (1);
+  }
+  reconstruct.reconstructAllViews();
 #endif
 
 #ifdef HAVE_MPI
 #endif
 
 #ifdef HAVE_MPI