2.0.0-b8 - 8/1/00
Added line color support to SGP
+ Fixed lineAbs bug
2.0.0-b7 - 7/25/00
Finished support for dmallocxx library
PACKAGE=ctsim
-VERSION=2.0.0-b8
+VERSION=2.0.0b8
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; }
dnl CDPATH=
AC_INIT(src/ctsim.cpp)
-AM_INIT_AUTOMAKE(ctsim,2.0.0-b8)
+AM_INIT_AUTOMAKE(ctsim,2.0.0b8)
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: phantom.h,v 1.11 2000/07/28 08:28:08 kevin Exp $
+** $Id: phantom.h,v 1.12 2000/07/31 14:48:35 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
#if HAVE_SGP
void show () const;
+ void show (SGP& sgp) const;
void draw (SGP& sgp) const;
#endif
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: scanner.h,v 1.9 2000/07/28 08:28:08 kevin Exp $
+** $Id: scanner.h,v 1.10 2000/07/31 14:48:35 kevin Exp $
**
**
** This program is free software; you can redistribute it and/or modify
static const char* s_aszGeometryName[];
static const char* s_aszGeometryTitle[];
static const int s_iGeometryCount;
- static const int N_EXTRA_DETECTORS=4; /* Number of extra detectors widths when calculating detlen */
+ static const int N_EXTRA_DETECTORS=0; // Number of extra detectors widths when calculating detlen
void projectSingleView (const Phantom& phm, DetectorArray& darray, const double xd1, const double yd1, const double xd2, const double yd2, const double xs1, const double ys1, const double xs2, const double ys2, SGP* pSGP);
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: pol.cpp,v 1.1 2000/07/30 15:58:18 kevin Exp $
+** $Id: pol.cpp,v 1.2 2000/07/31 14:48:35 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
static int hash(char *s);
static SYMBOL *lookup(SYMBOL *table[], char *s);
static SYMBOL *install(SYMBOL *table[], char *s, int def);
-static void outch(int c);
-static void inc_line(void);
-static int getlinect(void);
-static void setlinect(int n);
static void synerr(char *msg);
static int pol_getch(FILE *fp);
-static void ungets(char *s);
void pol_init (void)
pol_skpword (char *w)
{
if (install (skiptable, w, 0) == NULL)
- synerr ("Too many skip words defined");
+ sys_error (ERR_SEVERE, "Too many skip words defined");
}
/* pol_skpchar (s)
static int currentf = -1; /* pointer to current fp */
static FILE *filep[MAXFILE]; /* == NULL for string input */
static char *fname[MAXFILE]; /* pointer to filename */
-static int linect[MAXFILE]; /* line count in file */
static char inputline[MAXLINE]; /* current input line */
static int lineptr; /* current position in inputline */
-static void
-outch (int c)
-{
- putchar (c);
-}
-
-
-static void inc_line(void)
-{
- if (currentf >= 0)
- ++linect[currentf];
-}
-
-static int getlinect(void)
-{
- return (linect[currentf]);
-}
-
-static void
-setlinect (int n)
-{
- if (currentf >= 0)
- linect[currentf] = n;
-}
-
static void
synerr (char *msg)
{
fputs (fname[currentf], stderr);
- fprintf(stderr, "%d", linect[currentf]);
- fputc (COLON, stderr);
fputs (msg, stderr);
fputc (NEWLINE, stderr);
}
if (source == P_USE_STR) {
filep[currentf] = NULL;
- linect[currentf] = 1;
} else if (source == P_USE_FILE) {
if (fn == NULL || strlen(fn) == 0) {
fp = stdin;
return;
}
filep[currentf] = fp;
- linect[currentf] = 1;
fname[currentf] = strdup (fn);
}
}
}
-/* push back string onto input */
-static void
-ungets (char *s)
-{
- int i;
-
- for (i = strlen(s) - 1; i >= 0; i--)
- pol_ungetch (s[i]);
-}
-
int
get_inputline (FILE *fp)
{
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: sgp.cpp,v 1.7 2000/07/29 19:50:08 kevin Exp $
+** $Id: sgp.cpp,v 1.8 2000/07/31 14:48:35 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
double x2 = x;
double y2 = y;
- mc_to_ndc.transformPoint (&x1, &y2);
+ mc_to_ndc.transformPoint (&x2, &y2);
if (clip_rect (x1, y1, x2, y2, viewNDC) == true) { // clip to viewport
stylusNDC (x1, y1, 0); // move to first point
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: filter.cpp,v 1.22 2000/07/23 01:49:03 kevin Exp $
+** $Id: filter.cpp,v 1.23 2000/07/31 14:48:35 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
} else if (m_idDomain == DOMAIN_SPATIAL) {
double x;
int i;
- for (x = m_filterMin, i = 0; i < m_nFilterPoints; x += m_filterInc, i++)
+ for (x = m_filterMin, i = 0; i < m_nFilterPoints; x += m_filterInc, i++) {
if (haveAnalyticSpatial(m_idFilter))
m_vecFilter[i] = spatialResponseAnalytic (x, m_filterParam);
else
m_vecFilter[i] = spatialResponseCalc (x, m_filterParam);
+#if LIMIT_BANDWIDTH_TRIAL
+ if (i < m_nFilterPoints / 4 || i > (m_nFilterPoints * 3) / 4)
+ m_vecFilter[i] = 0;
+#endif
+ }
} else {
m_failMessage = "Illegal domain name ";
m_failMessage += m_idDomain;
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: phantom.cpp,v 1.13 2000/07/29 19:50:08 kevin Exp $
+** $Id: phantom.cpp,v 1.14 2000/07/31 14:48:35 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
{
SGPDriver driverSGP ("Phantom Show");
SGP sgp (driverSGP);
- draw (sgp);
+
+ show (sgp);
cout << "Press return to continue";
cio_kb_getc();
}
-#endif
-
-/* NAME
- * draw Draw vector outline of Phantom
- *
- * SYNOPSIS
- * draw ()
- */
-
-#ifdef HAVE_SGP
void
-Phantom::draw (SGP& sgp) const
+Phantom::show (SGP& sgp) const
{
double wsize = m_xmax - m_xmin;
if ((m_ymax - m_ymin) > wsize)
sgp.setWindow (xcent - halfWindow, ycent - halfWindow, xcent + halfWindow, ycent + halfWindow);
+ draw (sgp);
+}
+#endif
+
+
+/* NAME
+ * draw Draw vector outline of Phantom
+ *
+ * SYNOPSIS
+ * draw ()
+ */
+
+#ifdef HAVE_SGP
+void
+Phantom::draw (SGP& sgp) const
+{
for (PElemIterator i = m_listPElem.begin(); i != m_listPElem.end(); i++)
sgp.polylineAbs ((*i)->xOutline(), (*i)->yOutline(), (*i)->nOutlinePoints());
}
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: scanner.cpp,v 1.7 2000/07/29 19:50:08 kevin Exp $
+** $Id: scanner.cpp,v 1.8 2000/07/31 14:48:35 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
#ifdef HAVE_SGP
if (pSGP && m_trace >= TRACE_PHM) {
+ pSGP->setColor (C_RED);
pSGP->moveAbs (xd1, yd1);
pSGP->lineAbs (xd2, yd2);
pSGP->moveAbs (xs1, ys1);
#ifdef HAVE_SGP
if (pSGP && m_trace >= TRACE_PHM) {
// rs_plot (detArray, xd1, yd1, xcent, ycent, theta);
+ pSGP->setColor (C_RED);
pSGP->moveAbs (xd1, yd1);
pSGP->lineAbs (xd2, yd2);
pSGP->moveAbs (xs1, ys1);
for (unsigned int i = 0; i < m_nSample; i++) {
#ifdef HAVE_SGP
if (pSGP && m_trace >= TRACE_RAYS) {
+ pSGP->setColor (C_LTBLUE);
pSGP->moveAbs (xs, ys);
pSGP->lineAbs (xd, yd);
}
#ifdef HAVE_SGP
if (pSGP && m_trace >= TRACE_RAYS) {
+ pSGP->setColor (C_LTBLUE);
pSGP->moveAbs (xs, ys);
pSGP->lineAbs (xd, yd);
}
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.10 2000/07/29 19:50:08 kevin Exp $
+** $Id: views.cpp,v 1.11 2000/07/31 14:48:35 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
SGP sgp (driver);
const Phantom& rPhantom = GetDocument()->getPhantom();
sgp.setColor (C_RED);
- rPhantom.draw (sgp);
+ rPhantom.show (sgp);
}
// ProjectionCanvas
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: phm2pj.cpp,v 1.5 2000/07/28 08:28:08 kevin Exp $
+** $Id: phm2pj.cpp,v 1.6 2000/07/31 14:48:35 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
SGP* pSGP = NULL;
if (opt_trace >= TRACE_PHM) {
- pSGPDriver = new SGPDriver ("phm2pj");
+ pSGPDriver = new SGPDriver ("phm2pj", 600, 600);
pSGP = new SGP (*pSGPDriver);
}