r164: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 29 Jul 2000 19:50:08 +0000 (19:50 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 29 Jul 2000 19:50:08 +0000 (19:50 +0000)
16 files changed:
ChangeLog
TODO
configure
configure.in
include/ctsupport.h
include/ezplot.h
include/sgp.h
libctgraphics/ezplot.cpp
libctgraphics/ezset.cpp
libctgraphics/sgp.cpp
libctsim/array2dfile.cpp
libctsim/phantom.cpp
libctsim/projections.cpp
libctsim/scanner.cpp
src/Makefile.am
src/views.cpp

index 8f16a4df42bbf23cda685d8fb52e315ec5d5e4b8..73c2e1a2bf65087be469d8cd57e8cbbe89de4465 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2.0.0-b8 - 8/1/00
+   Added line color support to SGP
+       
 2.0.0-b7 - 7/25/00
    Finished support for dmallocxx library
    Fixed bug in SignalFilter::convertFilterMethodNameToID()
diff --git a/TODO b/TODO
index ceeae855938d337f01a13c1114961648c72f5261..438846d247de6e4b381bcb9fcb62ba22b4d68bde 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,3 @@
-MISCELLANEOUS
-=============
-
-Convert SGP graphics to wxWindows.
-
+Fix BUGS -- see BUGS file
 
 
index c011a924d09cd35a7b401bf424ed9e6f9bb14042..7954212db097f6b6b88eb82255bd25813344c3d5 100755 (executable)
--- a/configure
+++ b/configure
 ac_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
+ac_help="$ac_help
+  --enable-debug          Turn on debugging"
 ac_help="$ac_help
   --enable-verbose-warnings
                           Enable verbose compiler warnings."
-ac_help="$ac_help
-  --enable-debug          Turn on debugging"
 ac_help="$ac_help
   --with-lam[=PATH]       Set path of LAM MPI "
 ac_help="$ac_help
@@ -712,7 +712,7 @@ fi
 
 PACKAGE=ctsim
 
-VERSION=2.0.0-b7
+VERSION=2.0.0-b8
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -2837,13 +2837,57 @@ else
 fi
 fi
 
+echo $ac_n "checking debug""... $ac_c" 1>&6
+echo "configure:2842: checking debug" >&5
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval="$enable_debug"
+  case "${enableval}" in
+  yes) debug=true 
+       echo "$ac_t""yes" 1>&6
+       ;;
+  no)  debug=false 
+       echo "$ac_t""no" 1>&6
+       ;;
+  *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 
+       ;;
+esac
+else
+  debug=false; echo "$ac_t""no" 1>&6
+fi
+
+
+
+if test "$debug" = "true"; then
+  DEBUG_TRUE=
+  DEBUG_FALSE='#'
+else
+  DEBUG_TRUE='#'
+  DEBUG_FALSE=
+fi
+
+if test "$debug" = "true" ; then
+  CFLAGS="-g -DDEBUG"
+  cat >> confdefs.h <<\EOF
+#define DEBUG 1
+EOF
+
+else
+  CFLAGS="-g -O3 -DNDEBUG"
+  cat >> confdefs.h <<\EOF
+#define NDEBUG 1
+EOF
+
+fi
+
+
 
  if test -n "$GCC"; then
     CFLAGS="$CFLAGS -Wall"
  fi
  
 echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6
-echo "configure:2847: checking whether to enable verbose warnings" >&5
+echo "configure:2891: 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"
@@ -2892,57 +2936,6 @@ else
 fi
 
 
-echo $ac_n "checking debug""... $ac_c" 1>&6
-echo "configure:2897: checking debug" >&5
-# Check whether --enable-debug or --disable-debug was given.
-if test "${enable_debug+set}" = set; then
-  enableval="$enable_debug"
-  case "${enableval}" in
-  yes) debug=true 
-       echo "$ac_t""yes" 1>&6
-       ;;
-  no)  debug=false 
-       echo "$ac_t""no" 1>&6
-       ;;
-  *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 
-       ;;
-esac
-else
-  debug=false; echo "$ac_t""no" 1>&6
-fi
-
-
-
-if test "$debug" = "true"; then
-  DEBUG_TRUE=
-  DEBUG_FALSE='#'
-else
-  DEBUG_TRUE='#'
-  DEBUG_FALSE=
-fi
-
-if test "$debug" = "true" ; then
-  
- if test -n "$GCC"; then
-    CFLAGS="$CFLAGS -g -DDEBUG"
- fi
-  cat >> confdefs.h <<\EOF
-#define DEBUG 1
-EOF
-
-else
-  
- if test -n "$GCC"; then
-    CFLAGS="$CFLAGS -g -O3 -DNDEBUG --fast-math"
- fi
-  cat >> confdefs.h <<\EOF
-#define NDEBUG 1
-EOF
-
-fi
-
 # Check whether --with-lam or --without-lam was given.
 if test "${with_lam+set}" = set; then
   withval="$with_lam"
@@ -2959,7 +2952,7 @@ if test "$withval" != "no" ; then
   fi
 
   echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6
-echo "configure:2963: checking for LAM MPI installation" >&5
+echo "configure:2956: 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"
@@ -2977,7 +2970,7 @@ else
 fi
 
 echo $ac_n "checking for web access""... $ac_c" 1>&6
-echo "configure:2981: checking for web access" >&5
+echo "configure:2974: 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"
@@ -3067,7 +3060,7 @@ fi
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:3071: checking for X" >&5
+echo "configure:3064: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -3129,12 +3122,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 3133 "configure"
+#line 3126 "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:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3131: \"$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*
@@ -3203,14 +3196,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3207 "configure"
+#line 3200 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3207: \"$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.
@@ -3316,17 +3309,17 @@ else
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:3320: checking whether -R must be followed by a space" >&5
+echo "configure:3313: 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 3323 "configure"
+#line 3316 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -3342,14 +3335,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 3346 "configure"
+#line 3339 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -3381,7 +3374,7 @@ rm -f conftest*
     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:3385: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:3378: 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
@@ -3389,7 +3382,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3393 "configure"
+#line 3386 "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
@@ -3400,7 +3393,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3397: \"$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
@@ -3422,7 +3415,7 @@ fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:3426: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:3419: 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
@@ -3430,7 +3423,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3434 "configure"
+#line 3427 "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
@@ -3441,7 +3434,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3438: \"$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
@@ -3470,12 +3463,12 @@ fi
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3474: checking for gethostbyname" >&5
+echo "configure:3467: 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 3479 "configure"
+#line 3472 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3498,7 +3491,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3495: \"$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
@@ -3519,7 +3512,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3523: checking for gethostbyname in -lnsl" >&5
+echo "configure:3516: 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
@@ -3527,7 +3520,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3531 "configure"
+#line 3524 "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
@@ -3538,7 +3531,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3535: \"$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
@@ -3568,12 +3561,12 @@ fi
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3572: checking for connect" >&5
+echo "configure:3565: 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 3577 "configure"
+#line 3570 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3596,7 +3589,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3593: \"$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
@@ -3617,7 +3610,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3621: checking for connect in -lsocket" >&5
+echo "configure:3614: 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
@@ -3625,7 +3618,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3629 "configure"
+#line 3622 "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
@@ -3636,7 +3629,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3633: \"$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
@@ -3660,12 +3653,12 @@ fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:3664: checking for remove" >&5
+echo "configure:3657: 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 3669 "configure"
+#line 3662 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -3688,7 +3681,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3685: \"$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
@@ -3709,7 +3702,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:3713: checking for remove in -lposix" >&5
+echo "configure:3706: 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
@@ -3717,7 +3710,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3721 "configure"
+#line 3714 "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
@@ -3728,7 +3721,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3725: \"$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
@@ -3752,12 +3745,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:3756: checking for shmat" >&5
+echo "configure:3749: 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 3761 "configure"
+#line 3754 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -3780,7 +3773,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3777: \"$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
@@ -3801,7 +3794,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:3805: checking for shmat in -lipc" >&5
+echo "configure:3798: 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
@@ -3809,7 +3802,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3813 "configure"
+#line 3806 "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
@@ -3820,7 +3813,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:3824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3817: \"$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
@@ -3853,7 +3846,7 @@ fi
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:3857: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:3850: 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
@@ -3861,7 +3854,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3865 "configure"
+#line 3858 "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
@@ -3872,7 +3865,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3869: \"$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
@@ -3909,7 +3902,7 @@ X_BASIC_LIBS="-lXext -lX11"
 our_saved_LDFLAGS="$LDFLAGS"
 LDFLAGS="$X_LIBS $LDFLAGS"
 echo $ac_n "checking for XtToolkitThreadInitialize in -lXt""... $ac_c" 1>&6
-echo "configure:3913: checking for XtToolkitThreadInitialize in -lXt" >&5
+echo "configure:3906: 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
@@ -3917,7 +3910,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3921 "configure"
+#line 3914 "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
@@ -3928,7 +3921,7 @@ int main() {
 XtToolkitThreadInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3925: \"$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
@@ -3956,7 +3949,7 @@ LDFLAGS="$our_saved_LDFLAGS"
 our_saved_LDFLAGS="$LDFLAGS"
 LDFLAGS="$X_LIBS $LDFLAGS"
 echo $ac_n "checking for XdbeQueryExtension in -lXext""... $ac_c" 1>&6
-echo "configure:3960: checking for XdbeQueryExtension in -lXext" >&5
+echo "configure:3953: 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
@@ -3964,7 +3957,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3968 "configure"
+#line 3961 "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
@@ -3975,7 +3968,7 @@ int main() {
 XdbeQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3972: \"$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
@@ -3999,7 +3992,7 @@ else
 fi
 
 echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6
-echo "configure:4003: checking for XmbufQueryExtension in -lXext" >&5
+echo "configure:3996: 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
@@ -4007,7 +4000,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4011 "configure"
+#line 4004 "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
@@ -4018,7 +4011,7 @@ int main() {
 XmbufQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4015: \"$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
@@ -4048,17 +4041,17 @@ for ac_hdr in X11/extensions/Xdbe.h X11/extensions/multibuf.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4052: checking for $ac_hdr" >&5
+echo "configure:4045: 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 4057 "configure"
+#line 4050 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4055: \"$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*
@@ -4100,7 +4093,7 @@ my_includes="$my_includes -I../include -I.."
 
 
 echo $ac_n "checking interactive graphics""... $ac_c" 1>&6
-echo "configure:4104: checking interactive graphics" >&5
+echo "configure:4097: checking interactive graphics" >&5
 if test "$no_x" != "yes" ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_X11 1
@@ -4141,7 +4134,7 @@ if test "$fftw" = "true" ; then
 fi
 
 echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6
-echo "configure:4145: checking for main in -ldmallocxx" >&5
+echo "configure:4138: 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
@@ -4149,14 +4142,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldmallocxx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4153 "configure"
+#line 4146 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4153: \"$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
@@ -4178,7 +4171,7 @@ dmallocxx=false
 fi
 
 echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6
-echo "configure:4182: checking for enable-dmalloc" >&5
+echo "configure:4175: checking for enable-dmalloc" >&5
 # Check whether --enable-dmalloc or --disable-dmalloc was given.
 if test "${enable_dmalloc+set}" = set; then
   enableval="$enable_dmalloc"
@@ -4206,15 +4199,11 @@ EOF
   echo "$ac_t""Using dmalloc" 1>&6
 fi
 
-LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
-ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
-
-
 if test "$wxwin" = "true" ; then
   wxcflags=`$wxconfig --cflags`
   CFLAGS="$CFLAGS -I../include $wxcflags"
   wxlibs=`$wxconfig --libs`
-  wxlibs="$wxlibs $ctlibs"
+  ctlibs_graphics="$ctlibs_graphics $wxlibs"
   
 
 if test 1==1 ; then
@@ -4228,6 +4217,10 @@ fi
 
 
 
+LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
+ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
+
+
 if test -n "$lamdir" ; then
   lamprograms="pjrec-lam phm2if-lam phm2pj-lam"
   
@@ -4419,11 +4412,11 @@ s%@NO_X_FALSE@%$NO_X_FALSE%g
 s%@my_includes@%$my_includes%g
 s%@HAVE_SGP_TRUE@%$HAVE_SGP_TRUE%g
 s%@HAVE_SGP_FALSE@%$HAVE_SGP_FALSE%g
-s%@ctlibs@%$ctlibs%g
 s%@HAVE_WXWINDOWS_TRUE@%$HAVE_WXWINDOWS_TRUE%g
 s%@HAVE_WXWINDOWS_FALSE@%$HAVE_WXWINDOWS_FALSE%g
 s%@wxcflags@%$wxcflags%g
 s%@wxlibs@%$wxlibs%g
+s%@ctlibs@%$ctlibs%g
 s%@lamprograms@%$lamprograms%g
 
 CEOF
index e2c9244c1aea20bbdade8c092f6b11934b663ac1..153bd9471a20bf25a9881abaf3acf6d22f8172f9 100644 (file)
@@ -4,7 +4,7 @@ dnl Must reset CDPATH so that bash's cd does not print to stdout
 dnl CDPATH=
 
 AC_INIT(src/ctsim.cpp)
-AM_INIT_AUTOMAKE(ctsim,2.0.0-b7)
+AM_INIT_AUTOMAKE(ctsim,2.0.0-b8)
 AM_CONFIG_HEADER(config.h)
 
 dnl Checks for programs.
@@ -115,28 +115,6 @@ if test "${getopt_long}" = "false" ; then
   AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test 1==1)
 fi
 
-AC_ADD_GCC_CFLAGS([-Wall])
-AC_MSG_CHECKING(whether to enable verbose warnings)
-AC_ARG_ENABLE(verbose-warnings,
-[  --enable-verbose-warnings
-                          Enable verbose compiler warnings.],
-[ case "$enableval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    AC_ADD_GCC_CFLAGS([-W])
-    AC_ADD_GCC_CFLAGS([-Wshadow -Wpointer-arith -Wbad-function-cast])
-    AC_ADD_GCC_CFLAGS([-Wcast-align -Wwrite-strings -Waggregate-return])
-    AC_ADD_GCC_CFLAGS([-Wmissing-prototypes -Wstrict-prototypes])
-    AC_ADD_GCC_CFLAGS([-pedantic])
-    AC_ADD_GCC_CFLAGS([-Wredundant-decls])
-
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ], AC_MSG_RESULT(no)
-)
-
 dnl Check for debug mode
 AC_MSG_CHECKING([debug])
 AC_ARG_ENABLE(debug,
@@ -155,13 +133,38 @@ esac],
 AM_CONDITIONAL(DEBUG, test "$debug" = "true")
 
 if test "$debug" = "true" ; then
-  AC_ADD_GCC_CFLAGS([-g -DDEBUG])
+dnl  AC_ADD_GCC_CFLAGS([-g -DDEBUG])
+  CFLAGS="-g -DDEBUG"
   AC_DEFINE(DEBUG)
 else
-  AC_ADD_GCC_CFLAGS([-g -O3 -DNDEBUG --fast-math])
+dnl  AC_ADD_GCC_CFLAGS([-g -O2 -DNDEBUG])
+  CFLAGS="-g -O3 -DNDEBUG"
   AC_DEFINE(NDEBUG)
 fi
 
+
+AC_ADD_GCC_CFLAGS([-Wall])
+AC_MSG_CHECKING(whether to enable verbose warnings)
+AC_ARG_ENABLE(verbose-warnings,
+[  --enable-verbose-warnings
+                          Enable verbose compiler warnings.],
+[ case "$enableval" in
+  yes)
+    AC_MSG_RESULT(yes)
+    AC_ADD_GCC_CFLAGS([-W])
+    AC_ADD_GCC_CFLAGS([-Wshadow -Wpointer-arith -Wbad-function-cast])
+    AC_ADD_GCC_CFLAGS([-Wcast-align -Wwrite-strings -Waggregate-return])
+    AC_ADD_GCC_CFLAGS([-Wmissing-prototypes -Wstrict-prototypes])
+    AC_ADD_GCC_CFLAGS([-pedantic])
+    AC_ADD_GCC_CFLAGS([-Wredundant-decls])
+
+    ;;
+  *)
+    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 ],
@@ -340,21 +343,21 @@ if test "$dmallocxx" = "true" -a "$usedmalloc" = "true" ; then
   AC_MSG_RESULT(Using dmalloc)
 fi
 
-dnl Setting projet libraries and includes
-LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
-ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
-AC_SUBST(ctlibs)
-
 if test "$wxwin" = "true" ; then
   wxcflags=`$wxconfig --cflags`
   CFLAGS="$CFLAGS -I../include $wxcflags"
   wxlibs=`$wxconfig --libs`
-  wxlibs="$wxlibs $ctlibs"
+  ctlibs_graphics="$ctlibs_graphics $wxlibs"
   AM_CONDITIONAL(HAVE_WXWINDOWS, test 1==1 )
 fi
 AC_SUBST(wxcflags)
 AC_SUBST(wxlibs)
 
+dnl Setting projet libraries and includes
+LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
+ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
+AC_SUBST(ctlibs)
+
 if test -n "$lamdir" ; then
   lamprograms="pjrec-lam phm2if-lam phm2pj-lam"
   AC_SUBST(lamprograms)
index 58274ee3039a9e37c7157a73f3dbcb7a70eef987..5558150baaa25674f6d85079964cb1b770f7e008 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsupport.h,v 1.5 2000/06/28 15:25:34 kevin Exp $
+**  $Id: ctsupport.h,v 1.6 2000/07/29 19:50:08 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -271,25 +271,6 @@ double normalizeAngle (double theta);
 double integrateSimpson (const double xmin, const double xmax, const double *y, const int np);
 
 
-// Console I/O Section
-
-#define C_BLACK             0                  /* color codes */
-#define C_BLUE       1
-#define C_GREEN             2
-#define C_CYAN       3
-#define C_RED       4
-#define C_MAGENTA    5
-#define C_BROWN      6
-#define C_WHITE      7
-#define C_GREY       8
-#define C_LTBLUE     9
-#define C_LTGREEN   10
-#define C_LTCYAN    11
-#define C_LTRED     12
-#define C_LTMAGENTA 13
-#define C_YELLOW    14
-#define C_LTWHITE   15
-
 /*----------------------------------------------------------------------*/
 
 /* screen character codes */
index 13e35e9b9f1f679c85c0e2bf255e1e6f94e32972..22c2360873ad0ead0dc1d38032fa5b072fe9c269 100644 (file)
@@ -7,7 +7,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ezplot.h,v 1.11 2000/07/28 10:51:31 kevin Exp $
+**  $Id: ezplot.h,v 1.12 2000/07/29 19:50:08 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
@@ -209,7 +209,6 @@ class EZPlot {
 
     static void initkw(void);
     
-    int curveinteract;
     static bool ezset_initialized;
 
  public:
@@ -245,9 +244,6 @@ class EZPlot {
 #define S_SYMBOL       -18     
 #define S_EVERY                -19
 #define S_NONE         -20
-#define S_CURVES       -21
-#define S_UNKNOWN      -22
-#define S_END          -23
 #define S_LEGEND       -24
 #define S_XLEGEND      -25
 #define S_YLEGEND      -26
index b2d31eec0fbf7818e2d1728a3ac1deba444337fc..32abbc405e2baae7c0ae11aec3903ac943a2c191 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: sgp.h,v 1.11 2000/07/28 08:28:08 kevin Exp $
+**  $Id: sgp.h,v 1.12 2000/07/29 19:50:08 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
@@ -100,6 +100,7 @@ public:
 };
 
 
+class RGBColor;
 class SGP {
 private:
   int m_iPhysicalXSize;   // Physical Window size 
@@ -133,6 +134,9 @@ private:
   
   void calc_transform ();
 
+  static RGBColor s_aRGBColor[];
+  static int s_iRGBColorCount;
+
 public:
   enum {                  // linestyles 
       LS_NOLINE = 0,
@@ -209,4 +213,45 @@ public:
 };
 
 
+enum {
+    C_BLACK     = 0,     // color codes 
+    C_BLUE      = 1,
+    C_GREEN     = 2,
+    C_CYAN      = 3,
+    C_RED       = 4,
+    C_MAGENTA   = 5,
+    C_BROWN     = 6,
+    C_GRAY      = 7,
+    C_LTGRAY    = 8,
+    C_LTBLUE    = 9,
+    C_LTGREEN   = 10,
+    C_LTCYAN    = 11,
+    C_LTRED     = 12,
+    C_LTMAGENTA = 13,
+    C_YELLOW    = 14,
+    C_WHITE     = 15,
+};
+
+class RGBColor {
+ private:
+  short int r;
+  short int g;
+  short int b;
+
+ public:
+  RGBColor (int r, int g, int b)
+    : r(r), g(g), b(b)
+    {}
+
+  int getRed () const
+    { return r; }
+
+  int getGreen () const
+    { return g; }
+
+  int getBlue () const
+    { return b; }
+
+};
+
 #endif
index 519b7f97396bd398cd710b4e03f841d8d1077090..45796684b2741dc822a69029e67a3718f062ef57 100644 (file)
@@ -6,7 +6,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ezplot.cpp,v 1.8 2000/07/28 10:51:31 kevin Exp $
+**  $Id: ezplot.cpp,v 1.9 2000/07/29 19:50:08 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
@@ -31,7 +31,7 @@ static const double TICKRATIO = 0.4;  // ratio of minor to major tick lengths
 static const int MAXNUMFMT = 15;       // maximum length of a numeric format 
 static const double DEF_CHARHEIGHT = (1./43.); //size of characters in NDC 
 static const double DEF_CHARWIDTH = (1./80.); // size of characters in NDC 
-static const int DEF_CURVE_CLR = C_YELLOW;
+static const int DEF_CURVE_CLR = C_RED;
 
 
 
@@ -130,13 +130,11 @@ EZPlot::EZPlot (SGP& sgp)
 void
 EZPlot::initPlotSettings ()
 {
-  curveinteract = -1;
-
   charwidth = DEF_CHARWIDTH;   
   charheight = DEF_CHARHEIGHT;
   
-  c_xlabel = "X axis";
-  c_ylabel =  "Y axis";
+  c_xlabel = "";
+  c_ylabel =  "";
   c_title = "";
   c_legend = "";
   
@@ -179,12 +177,12 @@ EZPlot::initPlotSettings ()
   s_ylegend  = FALSE;
   s_textsize = FALSE;
   
-  clr_axis   = C_WHITE;                /* set fixed colors */
-  clr_title  = (C_CYAN+8);
-  clr_label  = (C_CYAN+8);
-  clr_legend = (C_RED+8);
-  clr_number = (C_GREEN+8);
-  clr_grid   = (C_BLACK+8);
+  clr_axis   = C_BLACK;                /* set fixed colors */
+  clr_title  = C_CYAN;
+  clr_label  = C_CYAN;
+  clr_legend = C_RED;
+  clr_number = C_GREEN;
+  clr_grid   = C_LTGRAY;
 }
 
 
index c28c76180ac131390c8da4c2b9e875671e772d28..074b287025608cab5d454a67696cfc694ea18ec9 100644 (file)
@@ -6,7 +6,7 @@
  **  This is part of the CTSim program
  **  Copyright (C) 1983-2000 Kevin Rosenberg
  **
- **  $Id: ezset.cpp,v 1.6 2000/07/28 10:51:31 kevin Exp $
+ **  $Id: ezset.cpp,v 1.7 2000/07/29 19:50:08 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
@@ -284,38 +284,12 @@ EZPlot::do_cmd (int lx)
          s_ylegend = FALSE;
       }
     break;
-  case S_CURVES:
-    if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) {
-      if (n < 1)
-       n = 1;
-      //      if (modeinteract == TRUE) {
-      //       curveinteract = n - 1;
-      //       if (o_unknowncurves == FALSE && o_reqcurves < n)
-      //         o_reqcurves = n;
-      //      } else {
-      // clearCurve ();
-      // o_reqcurves = n;
-      // }
-    } else {
-      //      if (pol_word ("unknown", 7) == TRUE)
-       //      o_unknowncurves = TRUE;
-      //      else if (pol_word ("end", 3) == TRUE) {
-       //      o_unknowncurves = FALSE;
-       //      o_reqcurves = i_numcurves;
-       //      i_plotimmediate = TRUE;
-       //      ezplot (static_cast<double*>(NULL), static_cast<double*>(NULL), 0);
-       //      i_plotimmediate = FALSE;
-      // }
-    }
-    break;
   case S_SYMBOL:
     if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) {
       if (n > 0 && n <= MAXSYMBOL)
        o_symbol = n;
       else
        o_symbol = 1;
-      //      if (modeinteract == TRUE && curveinteract >= 0)
-      //       curve[curveinteract].symbol = o_symbol;
     } else {
       if (pol_word("every",5) == TRUE) {
        if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) {
@@ -323,13 +297,9 @@ EZPlot::do_cmd (int lx)
            o_symfreq = n;
          else
            o_symfreq = 1;
-         //      if (modeinteract == TRUE && curveinteract >= 0)
-         //        curve[curveinteract].symfreq = o_symfreq;
        }
       } else if (pol_word ("none",4) == TRUE) {
        o_symbol = -1;
-       //      if (modeinteract == TRUE && curveinteract >= 0)
-       //        curve[curveinteract].symbol = o_symbol;
       }
     }
     break;
@@ -417,23 +387,17 @@ static struct key {
   char *keyword;
   int code;
 } keytab[] = {
-  {"solid",    S_SOLID},
-    {"dash",           S_DASH},
-      {"noline",       S_NOLINE},
-       {"black",       S_BLACK},
-         {"red",               S_RED},
-           {"blue",            S_BLUE},
-             {"green", S_GREEN},
-               {"pen",         S_PEN},
-                 {"symbol",    S_SYMBOL},
-                   /*  "every",        S_EVERY,        */
-                   /*  "none",         S_NONE,         */
-
-                   {"curves",  S_CURVES},
-                     {"curve", S_CURVES},
-                       /*      "unknown",      S_UNKNOWN,      */
-                       /*      "end",          S_END,          */
-
+    {"solid",  S_SOLID},
+       {"dash", S_DASH},
+           {"noline",  S_NOLINE},
+               {"black",       S_BLACK},
+                   {"red",             S_RED},
+                       {"blue",                S_BLUE},
+                           {"green",   S_GREEN},
+                               {"pen",         S_PEN},
+                                   {"symbol",  S_SYMBOL},
+                                       {"every",       S_EVERY},    
+                                           {"none",            S_NONE},  
                        {"legend",      S_LEGEND},
                          {"xlegend",   S_XLEGEND},
                            {"ylegend", S_YLEGEND},
@@ -479,7 +443,6 @@ static struct key {
                                                                                                    {"store",   S_STORE},
                                                                                                      {"restore",       S_RESTORE},
                                                                                                            {"amark",   S_AMARK},
-                                                                                                             {"interactive",   S_INTERACTIVE},
                                                                                                                {"units",       S_UNITS},
                                                                                                                  {"inches",    S_INCHES},
                                                                                                                    {"user",            S_USER},
@@ -508,6 +471,6 @@ void
 EZPlot::initkw(void)
 {
   for (unsigned int i = 0; i < NKEYS; i++)
-    if (pol_install(keytab[i].keyword, keytab[i].code) == FALSE)
+    if (! pol_install(keytab[i].keyword, keytab[i].code))
       sys_error(ERR_SEVERE, "error installing ezset keywords [initkw]");
 }
index 4d70f8cfe965f265f99f06d723542bd7d8603883..bc789cf0fea2f685eed345e84b778d4b58741177 100644 (file)
@@ -7,7 +7,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: sgp.cpp,v 1.6 2000/07/28 10:51:31 kevin Exp $
+**  $Id: sgp.cpp,v 1.7 2000/07/29 19:50:08 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 "sgp.h"
 
 
+RGBColor SGP::s_aRGBColor[] =
+{
+  RGBColor (0, 0, 0),
+  RGBColor (0, 0, 128),
+  RGBColor (0, 128, 0),
+  RGBColor (0, 128, 128),
+  RGBColor (128, 0, 0),
+  RGBColor (128, 0, 128),
+  RGBColor (128, 128, 0),
+  RGBColor (80, 80, 80),
+  RGBColor (160, 160, 160),
+  RGBColor (0, 0, 255),
+  RGBColor (0, 255, 0),
+  RGBColor (0, 255, 255),
+  RGBColor (255, 0, 0),
+  RGBColor (255, 0, 255),
+  RGBColor (255, 255, 0),
+  RGBColor (255, 255, 255),
+};
+
+int SGP::s_iRGBColorCount = sizeof(s_aRGBColor) / sizeof(class RGBColor);
 
 #ifdef HAVE_WXWINDOWS
 SGPDriver::SGPDriver (wxDC* pDC, const char* szWinTitle = "", int xsize = 640, int ysize = 480)
@@ -72,11 +93,11 @@ SGP::SGP (const SGPDriver& driver)
   setWindow (0., 0., 1., 1.);
   setViewport (0., 0., 1., 1.);
   moveAbs (0., 0.);
-  m_iCurrentPhysicalX = 0;
-  m_iCurrentPhysicalY = 0;
+  stylusNDC (0., 0., false);
  
   setTextAngle (0.);
   setTextSize (1. / 25.);
+  setColor (C_BLACK);
 }
 
 
@@ -89,10 +110,14 @@ SGP::stylusNDC (double x, double y, bool beam)
     yp = m_iPhysicalYSize - yp;
 
   if (beam) {
+#if HAVE_WXWINDOWS
       if (m_driver.isWX())
          m_driver.idWX()->DrawLine (m_iCurrentPhysicalX, m_iCurrentPhysicalY, xp, yp);
+#endif
+#if HAVE_G2_H
       if (m_driver.isG2())
          g2_line (m_driver.idG2(), m_iCurrentPhysicalX, m_iCurrentPhysicalY, xp, yp);
+#endif
   }
   m_iCurrentPhysicalX = xp;
   m_iCurrentPhysicalY = yp;
@@ -115,10 +140,14 @@ SGP::pointNDC (double x, double y)
 void 
 SGP::eraseWindow ()
 {
+#if HAVE_G2_H
   if (m_driver.isG2())
     g2_clear (m_driver.idG2());
+#endif
+#if HAVE_WXWINDOWS
   if (m_driver.isWX())
     m_driver.idWX()->Clear();
+#endif
 }
 
 // NAME
@@ -186,6 +215,21 @@ SGP::setTextColor (int iFGcolor, int iBGcolor)
 void 
 SGP::setColor (int icol)
 {
+  if (icol >= 0 && icol < s_iRGBColorCount) {
+#if HAVE_G2_H
+    if (m_driver.isG2()) {
+      int iInk = g2_ink (m_driver.idG2(), s_aRGBColor[icol].getRed() / 255., s_aRGBColor[icol].getGreen() / 255., s_aRGBColor[icol].getBlue() / 255.);
+      g2_pen (m_driver.idG2(), iInk);
+    }
+#endif
+#if HAVE_WXWINDOWS
+    if (m_driver.isWX()) {
+      wxColor colour (s_aRGBColor[icol].getRed(), s_aRGBColor[icol].getGreen(), s_aRGBColor[icol].getBlue());
+      wxPen pen (colour, 1, wxSOLID);
+      m_driver.idWX()->SetPen (pen);
+    }
+#endif
+  }
 }
 
 void
@@ -355,12 +399,17 @@ SGP::drawText (const char *pszMessage)
 
   stylusNDC (xndc, yndc, false);            // move to location 
 
+#if HAVE_G2_H
   if (m_driver.isG2()) {
-    if (m_dTextAngle == 0.)
-      g2_string (m_driver.idG2(), m_iCurrentPhysicalX, m_iCurrentPhysicalY, const_cast<char*>(pszMessage));
+    g2_string (m_driver.idG2(), m_iCurrentPhysicalX, m_iCurrentPhysicalY, const_cast<char*>(pszMessage));
   }
+#endif
+#if HAVE_WXWINDOWS
   if (m_driver.isWX()) {
+    wxString str (pszMessage);
+    m_driver.idWX()->DrawRotatedText (str, m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle);
   }
+#endif
 }
 
 
index f0f19ab5d13c12d08a59b908580c243d5b7298f3..424ec230fe8d1717550ee6a9b1e402abe0bf1e3d 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: array2dfile.cpp,v 1.7 2000/07/23 01:49:03 kevin Exp $
+**  $Id: array2dfile.cpp,v 1.8 2000/07/29 19:50:08 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
@@ -199,12 +199,9 @@ Array2dFile::init (void)
 void
 Array2dFile::setArraySize (int x, int y, int pixelSize, int pixelFormat)
 {
-    m_nx = x;
-    m_ny = y;
     m_pixelSize = pixelSize;
-    m_arraySize = m_nx * m_ny * m_pixelSize;
     m_pixelFormat = pixelFormat;
-    allocArray ();
+    setArraySize (x, y);
 }
 
 void
index d16bf5bb42e8d2e7d35a93cec3fc925f081c1aaa..ac0fa4a83f76abc278d8f712b6941e13f2d6aa8b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phantom.cpp,v 1.12 2000/07/28 10:51:31 kevin Exp $
+**  $Id: phantom.cpp,v 1.13 2000/07/29 19:50:08 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
@@ -328,17 +328,16 @@ void
 Phantom::draw (SGP& sgp) const
 {
   double wsize = m_xmax - m_xmin;
-  double xmin = m_xmin;
-  double ymin = m_ymin;
-
   if ((m_ymax - m_ymin) > wsize) 
       wsize = m_ymax - m_ymin;
   wsize *= 1.01;
+  double halfWindow = wsize / 2;
+
+  double xcent = m_xmin + (m_xmax - m_xmin) / 2;
+  double ycent = m_ymin + (m_ymax - m_ymin) / 2;
 
-  double xmax = xmin + wsize;
-  double ymax = ymin + wsize; 
+  sgp.setWindow (xcent - halfWindow, ycent - halfWindow, xcent + halfWindow, ycent + halfWindow);
 
-  sgp.setWindow (xmin, ymin, xmax, ymax);
   for (PElemIterator i = m_listPElem.begin(); i != m_listPElem.end(); i++)
     sgp.polylineAbs ((*i)->xOutline(), (*i)->yOutline(), (*i)->nOutlinePoints());
 }
index e5d19a37cceafc09cfafb3bd37df7bbd225052bc..7d3e814967394d885dd3b494ea0c626f351157df 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: projections.cpp,v 1.17 2000/07/28 10:51:31 kevin Exp $
+**  $Id: projections.cpp,v 1.18 2000/07/29 19:50:08 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
@@ -530,6 +530,7 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
       SGP sgp (sgpDriver);
       EZPlot ezplot (sgp);
 
+      ezplot.ezset ("title Filter Response");
       ezplot.addCurve (plot_xaxis, filter.getFilter(), nVecFilter);
       ezplot.plot();
       cio_put_str ("Press any key to continue");
@@ -556,54 +557,51 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
 
     filter.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_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_PLOT)  {
+    if (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  ("xlength .5.");
+      ezplotProj.ezset  ("yporigin .5.");
+      ezplotProj.ezset  ("ylength .5.");
       ezplotProj.ezset  ("box.");
       ezplotProj.ezset  ("grid.");
-      ezplotProj.addCurve (detval, plot_xaxis, m_nDet);
+      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  ("xporigin .5.");
-      ezplotProj.ezset  ("xlength .5.");
+      ezplotProj.ezset  ("ylength .5.");
       ezplotProj.ezset ("box");
       ezplotProj.ezset ("grid");
-      ezplotProj.addCurve (filteredProj, plot_xaxis, n_filteredProj);
+      ezplotProj.addCurve (plot_xaxis, filteredProj,  n_filteredProj);
       ezplotProj.plot();
-      cout << "Press enter to continue\n";
-      cio_kb_getc();
-    }
-#endif  //HAVE_SGP
 
-#ifdef HAVE_BSPLINE_INTERP
-    if (interp_type == I_BSPLINE) 
-       bspline (m_nDet, zoom_factor, spline_order, filteredProj, filteredProj);
-    
-#ifdef HAVE_SGP
-    if (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_PLOT) {
+      cout << "Do you want to exit with current pic (y/n)? " << flush;
       char str[256];
-      printf ("Do you want to exit with current pic (y/n) -- ");
       fgets(str, sizeof(str), stdin);
       if (tolower(str[0]) == 'y') {
        break;
index d4a398ef995006d1e1eca15f9ecec17a40482aaf..e39fca5d7ff0a8625c3d335893b0c641c1051bd6 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: scanner.cpp,v 1.6 2000/07/28 08:28:08 kevin Exp $
+**  $Id: scanner.cpp,v 1.7 2000/07/29 19:50:08 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
@@ -217,8 +217,8 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int st
     pSGP->moveAbs (0., 0.);
     pSGP->drawCircle (wsize);
     //      raysum_trace_menu_column = (crt->xsize * crt->asp) / 8 + 3;
-    traceShowParam ("X-Ray Simulator", "%s", RAYSUM_TRACE_ROW_TITLE, 8+C_LTWHITE, " ");
-    traceShowParam ("---------------", "%s", RAYSUM_TRACE_ROW_TITLE2, 8+C_LTWHITE, " ");
+    traceShowParam ("X-Ray Simulator", "%s", RAYSUM_TRACE_ROW_TITLE, C_BLACK, " ");
+    traceShowParam ("---------------", "%s", RAYSUM_TRACE_ROW_TITLE2, C_BLACK, " ");
     traceShowParam ("Phantom:",       "%s", RAYSUM_TRACE_ROW_PHANT_ID, C_YELLOW, " Herman");
     traceShowParam ("Chomaticity  :", "%s", RAYSUM_TRACE_ROW_CHROMATIC, C_LTGREEN, "Mono");
     traceShowParam ("Scatter      :", "%5.1f", RAYSUM_TRACE_ROW_SCATTER, C_LTGREEN, 0.);
index 71303775f15a1a18e6cb11839814320b383b2639..f3fab1e74f3bff5f06c9a6f3d28b5ee2ab4c6d79 100644 (file)
@@ -2,7 +2,7 @@ bin_PROGRAMS=ctsim
 
 ctsim_SOURCES=ctsim.cpp docs.cpp views.cpp dialogs.cpp ctsim.h docs.h views.h dialogs.h
 ctsim_DEPENDENCIES=../libctgraphics/libctgraphics.a ../libctsupport/libctsupport.a ../libctsim/libctsim.a ../include/ct.h
-ctsim_LDADD=-L../libctgraphics -L../libctsupport -L../libctsim @wxlibs@
+ctsim_LDADD=-L../libctgraphics -L../libctsupport -L../libctsim @ctlibs@
 
 
 
index 8ec1df2bff80bf1e17529210fd503e4bdf1e312b..87e9e932135af1083e1f0cd4792ea9d63caf1011 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.9 2000/07/28 08:28:08 kevin Exp $
+**  $Id: views.cpp,v 1.10 2000/07/29 19:50:08 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
@@ -297,7 +297,7 @@ ImageFileView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
                imageData[baseAddr] = imageData[baseAddr+1] = imageData[baseAddr+2] = intensity;
            }
        }
-       wxImage image (ny, nx, imageData, true);
+       wxImage image (nx, ny, imageData, true);
        m_bitmap = image.ConvertToBitmap();
        delete imageData;
        int xSize = nx;
@@ -562,6 +562,7 @@ PhantomView::OnDraw (wxDC* dc)
   SGPDriver driver (dc, "", xsize, ysize);
   SGP sgp (driver);
   const Phantom& rPhantom = GetDocument()->getPhantom();
+  sgp.setColor (C_RED);
   rPhantom.draw (sgp);
 }