r4205: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 15 Mar 2003 14:53:11 +0000 (14:53 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 15 Mar 2003 14:53:11 +0000 (14:53 +0000)
configure.ac
debian/changelog
include/phantom.h
libctsim/phantom.cpp
libctsupport/syserror.cpp

index 87ba96ab1b7e0a6ddd3cf0d7258e5e62d46a06b2..b46a7f50984fe0508032a62a16d6c452b048e720 100644 (file)
@@ -5,7 +5,7 @@ dnl CDPATH=
 
 AC_INIT
 AC_CONFIG_SRCDIR([src/ctsim.cpp])
 
 AC_INIT
 AC_CONFIG_SRCDIR([src/ctsim.cpp])
-AM_INIT_AUTOMAKE(ctsim,4.2.0)
+AM_INIT_AUTOMAKE(ctsim,4.2.1)
 AM_CONFIG_HEADER(config.h)
 
 dnl Checks for programs.
 AM_CONFIG_HEADER(config.h)
 
 dnl Checks for programs.
index dcb5eba97cc05ab860e3f1dcbca1374e190e9bf1..f061657a9e3c337ecfc04d8da8dc1bba541f7e57 100644 (file)
@@ -1,3 +1,9 @@
+ctsim (4.2.1-1) unstable; urgency=low
+
+  * New upstream, minor fixes
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Sat, 15 Mar 2003 07:21:56 -0700
+
 ctsim (4.2.0-1) unstable; urgency=low
 
   * New feature: Direct inverse Fourier reconstructions
 ctsim (4.2.0-1) unstable; urgency=low
 
   * New feature: Direct inverse Fourier reconstructions
index 66f400e770fca2d08936cbdd76a18bfb5af24117..ca13f36f99f39a6bdca83d06d83d3fcb6e70bfa5 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: phantom.h,v 1.25 2001/02/27 03:59:30 kevin Exp $
+**  $Id: phantom.h,v 1.26 2003/03/15 14:52:36 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -100,8 +100,8 @@ class PhantomElement
     static const int POINTS_PER_CIRCLE;
     static const double SCALE_PELEM_EXTENT;  // increase pelem limits by 0.5% 
 
     static const int POINTS_PER_CIRCLE;
     static const double SCALE_PELEM_EXTENT;  // increase pelem limits by 0.5% 
 
-    static PhmElemType convertNameToType (const char* const typeName);
     static const char* const convertTypeToName (PhmElemType iType);
     static const char* const convertTypeToName (PhmElemType iType);
+    static PhmElemType convertNameToType (const char* const typeName);
 
     void makeTransformMatrices ();
 
 
     void makeTransformMatrices ();
 
index 8d02d1115865e206c90e49e28f58f4ab8d518b33..9d9a537acadf1c43f22622a6c42179e0705f02e4 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: phantom.cpp,v 1.32 2002/05/28 18:43:16 kevin Exp $
+**  $Id: phantom.cpp,v 1.33 2003/03/15 14:52:36 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -239,8 +239,13 @@ Phantom::fileWrite (const char* const fname)
 void 
 Phantom::addPElem (const char *type, const double cx, const double cy, const double u, const double v, const double rot, const double atten)
 {
 void 
 Phantom::addPElem (const char *type, const double cx, const double cy, const double u, const double v, const double rot, const double atten)
 {
-  PhantomElement *pelem = new PhantomElement (type, cx, cy, u, v, rot, atten);
+  PhmElemType pe_type = PhantomElement::convertNameToType (type);
+  if (pe_type == PELEM_INVALID) {
+    sys_error (ERR_WARNING, "Unknown PhantomElement type %s [PhantomElement::PhantomElement]", type);
+    return;
+  }
   
   
+  PhantomElement *pelem = new PhantomElement (type, cx, cy, u, v, rot, atten);
   m_listPElem.push_front (pelem);
   
   // update phantom limits
   m_listPElem.push_front (pelem);
   
   // update phantom limits
@@ -599,8 +604,6 @@ PhantomElement::convertNameToType (const char* const typeName)
     type = PELEM_SECTOR;
   else if (strcasecmp (typeName, "segment") == 0)
     type = PELEM_SEGMENT;
     type = PELEM_SECTOR;
   else if (strcasecmp (typeName, "segment") == 0)
     type = PELEM_SEGMENT;
-  else
-    sys_error (ERR_WARNING, "Unknown PhantomElement type %s [PhantomElement::PhantomElement]", type);
   
   return (type);
 }
   
   return (type);
 }
@@ -732,7 +735,7 @@ PhantomElement::makeVectorOutline ()
     m_yOutline[cpts] = 0.0;
     break;
   default:
     m_yOutline[cpts] = 0.0;
     break;
   default:
-    sys_error(ERR_WARNING, "illegal pelem type %d [makeVectorOutline]", m_type);
+    sys_error(ERR_WARNING, "Illegal phantom element type %d [makeVectorOutline]", m_type);
     return;
   }
   
     return;
   }
   
index 0823ea2bbbeb609be1993fdd1051dfe7b9858231..4aca18565d242a2256c89c1600488e8c66e15a30 100644 (file)
@@ -2,7 +2,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: syserror.cpp,v 1.23 2002/05/05 10:54:34 kevin Exp $
+**  $Id: syserror.cpp,v 1.24 2003/03/15 14:52:36 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -59,7 +59,7 @@ void sys_error (int severity, const char *msg, ...)
       wxString msg (strOutput.c_str());
       msg += "\n";
       eventLog.SetString( msg );
       wxString msg (strOutput.c_str());
       msg += "\n";
       eventLog.SetString( msg );
-      //      wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event, thread safe
+      wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event, thread safe
     } else {
       wxMutexGuiEnter();
       wxLog::OnLog (wxLOG_Message, strOutput.c_str(), time(NULL));
     } else {
       wxMutexGuiEnter();
       wxLog::OnLog (wxLOG_Message, strOutput.c_str(), time(NULL));