-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 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
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.
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
# 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
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
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
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.
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.
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.
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.
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.
# 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
# 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
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
# 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
# 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
# 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
# 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
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.
cat > conftest.$ac_ext << EOF
-#line 1084 "configure"
+#line 1087 "configure"
#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
{ 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 "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
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_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
# 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
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.
cat > conftest.$ac_ext << EOF
-#line 1227 "configure"
+#line 1230 "configure"
#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
{ 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 "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
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_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
# 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
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
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
-#line 1394 "configure"
+#line 1397 "configure"
#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
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
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
-#line 1435 "configure"
+#line 1438 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
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
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
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 1474 "configure"
+#line 1477 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
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
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
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 1513 "configure"
+#line 1516 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
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
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
ac_cv_sizeof_float=4
else
cat > conftest.$ac_ext <<EOF
-#line 1552 "configure"
+#line 1555 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
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
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
ac_cv_sizeof_double=8
else
cat > conftest.$ac_ext <<EOF
-#line 1591 "configure"
+#line 1594 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
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
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
-#line 1633 "configure"
+#line 1636 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#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
-#line 1648 "configure"
+#line 1651 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#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
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. */
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
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_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
-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
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_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
-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
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_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
-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
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_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
-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
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_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
-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
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_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
-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
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_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
-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
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_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
-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
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_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
-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
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_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
-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
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 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"
-{ (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
:
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"
-{ (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
:
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"
-{ (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
:
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
-#line 2198 "configure"
+#line 2201 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#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*
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
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
:
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')
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
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
-#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"
-{ (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*
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
-#line 2343 "configure"
+#line 2346 "configure"
#include "confdefs.h"
int main() {
; 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
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
-#line 2418 "configure"
+#line 2421 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
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
-#line 2451 "configure"
+#line 2454 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
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
-#line 2484 "configure"
+#line 2487 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
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
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
-#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. */
; 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
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
-#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. */
; 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
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
-#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. */
; 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
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
-#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. */
; 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
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
-#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. */
; 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
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
-#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. */
; 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
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"
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"
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"
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"
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"
# 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
# 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"
-{ (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_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
-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.
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
-#line 3316 "configure"
+#line 3343 "configure"
#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
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
-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
# 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_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
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
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_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
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
# 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
-#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. */
; 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
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_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
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
# -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
-#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. */
; 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
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_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
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
# 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
-#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. */
; 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
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_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
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
# 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
-#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. */
; 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
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_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
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
# 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_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
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
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_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
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
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_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
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
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_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
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
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
-#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"
-{ (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*
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
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
+ 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
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
-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_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
-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
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"
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 ],
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)
+ 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
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
-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
+
** 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
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();
}
- Array2d (void)
- : nx(0), ny(0), array_data(0)
+ Array2d ()
+ : m_nx(0), m_ny(0), array_data(0)
{}
~Array2d ()
void initSetSize (unsigned int x, unsigned int y)
{
- nx = x;
- ny = y;
+ m_nx = x;
+ m_ny = y;
deleteArray();
allocArray();
}
- T** getArray (void) const
+ T** getArray () const
{ return array_data; }
T* getColumn (unsigned int x) const
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); }
- 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:
- unsigned int nx;
- unsigned int ny;
+ unsigned int m_nx;
+ unsigned int m_ny;
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) {
- 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;
+ array_data = NULL;
}
}
** 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
{
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);
+
+ virtual ~BackprojectEquilinear()
+ {}
};
class BackprojectEquiangular : public BackprojectTable
{}
void BackprojectView (const double* const t, double view_angle);
+
+ virtual ~BackprojectEquiangular()
+ {}
};
** 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
#include "filter.h"
#include "procsignal.h"
#include "projections.h"
+#include "reconstruct.h"
#include "trace.h"
** 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
class SignalFilter;
+class SGP;
class ProcessSignal {
public:
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();
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
** 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
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;}
--- /dev/null
+/*****************************************************************************
+** 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
** 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
};
-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;
** 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
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 ();
** 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
/* 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 */
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);
** 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
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
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
** 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
{
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();
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();
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
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
** 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
// 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);
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
-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_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);
- 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);
- 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);
- 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;
nextPowerOf2++;
nextPowerOf2 += (m_iZeropad - 1);
m_nFilterPoints = 1 << nextPowerOf2;
+#ifdef DEBUG
if (m_traceLevel >= Trace::TRACE_CONSOLE)
- cout << "nFilterPoints = " << m_nFilterPoints << endl;
+ cout << "nFilterPoints = " << m_nFilterPoints << endl;
+#endif
}
m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
// 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);
- 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;
m_nFilterPoints = 1 << nextPowerOf2;
}
m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
+#ifdef DEBUG
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);
- 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++)
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;
}
}
}
** 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
void
Projections::init (const int nView, const int nDet)
{
+ m_label.setLabelType (Array2dFileLabel::L_HISTORY);
m_nView = nView;
m_nDet = nDet;
newProjData ();
void
Projections::initFromScanner (const Scanner& scanner)
{
+ m_label.setLabelType (Array2dFileLabel::L_HISTORY);
deleteProjData();
init (scanner.nView(), scanner.nDet());
}
/* NAME
- * prt_projections Print projections data
+ * printProjectionData Print projections data
*
* SYNOPSIS
- * prt_projections (proj)
- * Projections& proj Projection data to be printed
+ * printProjectionData ()
*/
void
-/* 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;
-}
-
--- /dev/null
+/*****************************************************************************
+** 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
+ }
+}
+
** 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
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 (nDet < 1)
- nDet = 1;
m_nDet = nDet;
m_nView = nView;
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;
- 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_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;
#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;
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);
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;
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 {
%build
CFLAGS="$RPM_OPT_FLAGS" \
- ./configure --prefix=/usr/local
+ ./configure --prefix=/usr/local --enable-static
make
%install
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@
** 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
/////////////////////////////////////////////////////////////////////
-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);
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());
- m_pListBoxGeometry->SetSelection (iDefaultGeometry);
+ m_pListBoxGeometry->SetSelection (iDefaultGeometry, true);
ostringstream os;
os << iDefaultNDet;
/////////////////////////////////////////////////////////////////////
-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);
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);
return m_pListBoxInterp->getSelectionStringValue();
}
+int
+DialogGetReconstructionParameters::getTrace (void)
+{
+ return Trace::convertTraceNameToID(m_pListBoxTrace->getSelectionStringValue());
+}
+
const char*
DialogGetReconstructionParameters::getBackprojectName (void)
{
** 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
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;
{
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;
{
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;
{
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;
{
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;
int m_iDefaultNView;
int m_iDefaultNSamples;
int m_iDefaultTrace;
+ int m_iDefaultGeometry;
double m_dDefaultRotAngle;
double m_dDefaultFocalLength;
double m_dDefaultFieldOfView;
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;
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_iDefaultTrace;
};
class DialogAutoScaleParameters : public wxDialog
** 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
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)
- sizeDlg.x += 200;
+ sizeDlg.x += 250;
m_iClientX = sizeDlg.x;
m_iClientY = sizeDlg.y;
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);
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("xlength 0.25");
+ ezplot.ezset("xlength 0.34");
ezplot.ezset("ylength 0.90");
ezplot.ezset("grid");
ezplot.ezset("box");
--- /dev/null
+/*****************************************************************************
+** 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;
+}
+
--- /dev/null
+/*****************************************************************************
+** 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
+
** 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
#endif
#include "wx/image.h"
+#include "wx/progdlg.h"
#include "ct.h"
#include "ctsim.h"
#include "views.h"
#include "dialogs.h"
#include "dlgprojections.h"
+#include "dlgreconstruct.h"
#include <sstream>
#include "backprojectors.h"
+#include "reconstruct.h"
+#include "timer.h"
// ImageFileCanvas
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();
}
}
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)
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 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();
- 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();
- 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);
+ 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();
::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);
+ ::wxYield();
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();
}
}
}
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();
}
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);
- 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();
+ imageFile.labelAdd (rProj.getLabel());
+ imageFile.labelAdd (Array2dFileLabel::L_HISTORY, os.str().c_str(), timerRecon.timerEnd());
}
}
}
** 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
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);
--- /dev/null
+/*****************************************************************************
+** 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
** 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
{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)
#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)
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