r204: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 9 Nov 2000 00:12:25 +0000 (00:12 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 9 Nov 2000 00:12:25 +0000 (00:12 +0000)
ChangeLog
Makefile.in
configure
configure.in
getopt/Makefile.in
libctsim/Makefile.in
libctsim/phantom.cpp
libctsupport/Makefile.in
tools/Makefile.in
tools/phm2if.cpp
tools/phm2pj.cpp

index 951d903059a49b7e1475be325c2882df1808b8ab..09c83d6fc92db21f6b0e6f2973dadf73a4f44468 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2.0.2 - 11/8/00
+   Additions to man pages (Ian Kay)
+   Fix problem with reading of ASCII phantom files (Ian Kay)
+
 2.0.1 - 10/1/00
    Fixed syntax error in fftw configuration
    Slight modifications to support gcc v2.9.6
index 213c93ab0aa9c3f53cc3cbbaed2a1c1293e8ed61..fe94087fba0aed76be4ffa917891f19e63f082a2 100644 (file)
@@ -78,6 +78,7 @@ cgiprograms = @cgiprograms@
 ctlibs = @ctlibs@
 htmldata = @htmldata@
 htmldir = @htmldir@
+lamdefs = @lamdefs@
 lamdir = @lamdir@
 lamprograms = @lamprograms@
 mpienable = @mpienable@
@@ -110,7 +111,7 @@ mkinstalldirs
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 DIST_SUBDIRS =  getopt libctgraphics libctsupport libctsim man doc html \
 cgi-bin include tools src
@@ -294,7 +295,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 23f265fe93a16ccbb1155f8ebcfc5147884a3ef7..f396d7ee1aa61ed2a32c08918087f64b2d17f996 100755 (executable)
--- a/configure
+++ b/configure
@@ -715,7 +715,7 @@ fi
 
 PACKAGE=ctsim
 
-VERSION=2.0.1
+VERSION=2.0.2
 
 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; }
index 22566cdd28c1bf15a1334080042cdea29beddf7a..c078d99080e907dc5e3020b3a51ed0bbaeeebf37 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.1)
+AM_INIT_AUTOMAKE(ctsim,2.0.2)
 AM_CONFIG_HEADER(config.h)
 
 dnl Checks for programs.
index b331bf1c9609ffdf60949af704d984d7a4330aae..ede9e88744476919f5fc4f2b55eb90a30b1e6c02 100644 (file)
@@ -78,6 +78,7 @@ cgiprograms = @cgiprograms@
 ctlibs = @ctlibs@
 htmldata = @htmldata@
 htmldir = @htmldir@
+lamdefs = @lamdefs@
 lamdir = @lamdir@
 lamprograms = @lamprograms@
 mpienable = @mpienable@
@@ -118,7 +119,7 @@ DIST_COMMON =  Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 DEP_FILES =  .deps/getopt.P .deps/getopt1.P
 SOURCES = $(libgetopt_a_SOURCES)
@@ -207,7 +208,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 05d70301b26d133e8237f14fda1114a7ad8a1117..2d727fa23950814d414f569139170344d0846da3 100644 (file)
@@ -78,6 +78,7 @@ cgiprograms = @cgiprograms@
 ctlibs = @ctlibs@
 htmldata = @htmldata@
 htmldir = @htmldir@
+lamdefs = @lamdefs@
 lamdir = @lamdir@
 lamprograms = @lamprograms@
 mpienable = @mpienable@
@@ -90,7 +91,7 @@ wxconfig = @wxconfig@
 wxlibs = @wxlibs@
 
 noinst_LIBRARIES = libctsim.a 
-libctsim_a_SOURCES = filter.cpp scanner.cpp projections.cpp phantom.cpp imagefile.cpp backprojectors.cpp array2dfile.cpp trace.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
@@ -106,7 +107,8 @@ LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 libctsim_a_LIBADD = 
 libctsim_a_OBJECTS =  filter.o scanner.o projections.o phantom.o \
-imagefile.o backprojectors.o array2dfile.o trace.o
+imagefile.o backprojectors.o array2dfile.o trace.o procsignal.o \
+reconstruct.o
 AR = ar
 CXXFLAGS = @CXXFLAGS@
 CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -117,11 +119,11 @@ DIST_COMMON =  Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 DEP_FILES =  .deps/array2dfile.P .deps/backprojectors.P .deps/filter.P \
-.deps/imagefile.P .deps/phantom.P .deps/projections.P .deps/scanner.P \
-.deps/trace.P
+.deps/imagefile.P .deps/phantom.P .deps/procsignal.P \
+.deps/projections.P .deps/reconstruct.P .deps/scanner.P .deps/trace.P
 SOURCES = $(libctsim_a_SOURCES)
 OBJECTS = $(libctsim_a_OBJECTS)
 
@@ -210,7 +212,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index aff37a0ac9242fae8dcd4b8e5bc72d7b970f443d..59b46ce4ccf3dc5aca9950999dd820c5c8170341 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phantom.cpp,v 1.18 2000/09/04 09:06:46 kevin Exp $
+**  $Id: phantom.cpp,v 1.19 2000/11/09 00:12:25 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
@@ -196,41 +196,32 @@ Phantom::createFromPhantom (const int phmid)
 bool
 Phantom::createFromFile (const char* const fname)
 {
-  bool stoploop = false;
-  bool retval = false;
+  bool bGoodFile = true;
   FILE *fp;
 
   if ((fp = fopen (fname, "r")) == NULL)
     return (false);
 
   m_name = fname;
-  do {
-    if (! feof(fp)) {
-      double cx, cy, u, v, rot, dens;
-      char pelemtype[80];
-      char str[1024];
-      fgets (str, sizeof(str), fp);
-      int n = sscanf (str, "%79s %lf %lf %lf %lf %lf %lf", pelemtype, &cx, &cy, &u, &v, &rot, &dens);
+
+  while (1) {
+    double cx, cy, u, v, rot, dens;
+    char pelemtype[80];
+
+    int status = fscanf (fp, "%79s %lf %lf %lf %lf %lf %lf", pelemtype, &cx, &cy, &u, &v, &rot, &dens);
     
-      if (n == EOF || n == 0) {        /* end of file */
-       stoploop = true;
-       retval = false;
-      } else if (n != 7) {
-       stoploop = true;
-       retval = false;
-      } else {
-       addPElem (pelemtype, cx, cy, u, v, rot, dens);
-       retval = true;
-      }
-    } else {
-      stoploop = true;
-      retval = true;
+    if (status == static_cast<int>(EOF)) 
+      break;
+    else if (status != 7) {
+      sys_error (ERR_WARNING, "Insufficient fields reading phantom file %s [Phantom::createFromFile]", fname);
+      bGoodFile = false;
     }
-  } while (stoploop == false);
+    addPElem (pelemtype, cx, cy, u, v, rot, dens);
+  }
   
   fclose (fp);
 
-  return (retval);
+  return (bGoodFile);
 }
 
 
index 558d556be07fb104fea48a8e06cf4c44270a7aab..87a95e3daabdcc53835533bdd901b3c8d1cef1ab 100644 (file)
@@ -78,6 +78,7 @@ cgiprograms = @cgiprograms@
 ctlibs = @ctlibs@
 htmldata = @htmldata@
 htmldir = @htmldir@
+lamdefs = @lamdefs@
 lamdir = @lamdir@
 lamprograms = @lamprograms@
 mpienable = @mpienable@
@@ -116,7 +117,7 @@ DIST_COMMON =  Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 DEP_FILES =  .deps/clip.P .deps/consoleio.P .deps/fnetorderstream.P \
 .deps/mathfuncs.P .deps/strfuncs.P .deps/syserror.P .deps/xform.P
@@ -208,7 +209,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index b3f82fa9def43d559b185d8ec4dc5e28cb03bbed..ce4917d615efe342d42a5cf1360c2ae210a29219 100644 (file)
@@ -78,6 +78,7 @@ cgiprograms = @cgiprograms@
 ctlibs = @ctlibs@
 htmldata = @htmldata@
 htmldir = @htmldir@
+lamdefs = @lamdefs@
 lamdir = @lamdir@
 lamprograms = @lamprograms@
 mpienable = @mpienable@
@@ -89,7 +90,7 @@ wxcflags = @wxcflags@
 wxconfig = @wxconfig@
 wxlibs = @wxlibs@
 
-bin_PROGRAMS = pjrec phm2pj pj2if @lamprograms@  ifinfo phm2if if-1 if-2 if2img 
+bin_PROGRAMS = pjrec phm2pj pj2if @lamprograms@  ifinfo phm2if if-1 if-2 if2img pjinfo
 bin_SCRIPTS = sample-ctsim.sh
 EXTRA_PROGRAMS = pjrec-lam phm2pj-lam phm2if-lam
 INCLUDES = @my_includes@
@@ -112,6 +113,9 @@ if2img_DEPENDENCIES = $(SOURCE_DEPEND)
 pj2if_SOURCES = pj2if.cpp
 pj2if_LDADD = @ctlibs@
 pj2if_DEPENDENCIES = $(SOURCE_DEPEND)
+pjinfo_SOURCES = pjinfo.cpp
+pjinfo_LDADD = @ctlibs@
+pjinfo_DEPENDENCIES = $(SOURCE_DEPEND)
 if_1_SOURCES = if-1.cpp 
 if_1_LDADD = @ctlibs@
 if_1_DEPENDENCIES = $(SOURCE_DEPEND)
@@ -166,6 +170,8 @@ if_2_OBJECTS =  if-2.o
 if_2_LDFLAGS = 
 if2img_OBJECTS =  if2img.o
 if2img_LDFLAGS = 
+pjinfo_OBJECTS =  pjinfo.o
+pjinfo_LDFLAGS = 
 SCRIPTS =  $(bin_SCRIPTS)
 
 CXXFLAGS = @CXXFLAGS@
@@ -177,12 +183,13 @@ DIST_COMMON =  Makefile.am Makefile.in sample-ctsim.sh.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 DEP_FILES =  .deps/if-1.P .deps/if-2.P .deps/if2img.P .deps/ifinfo.P \
-.deps/phm2if.P .deps/phm2pj.P .deps/pj2if.P .deps/pjrec.P
-SOURCES = $(pjrec_lam_SOURCES) $(phm2pj_lam_SOURCES) $(phm2if_lam_SOURCES) $(pjrec_SOURCES) $(phm2pj_SOURCES) $(pj2if_SOURCES) $(ifinfo_SOURCES) $(phm2if_SOURCES) $(if_1_SOURCES) $(if_2_SOURCES) $(if2img_SOURCES)
-OBJECTS = $(pjrec_lam_OBJECTS) $(phm2pj_lam_OBJECTS) $(phm2if_lam_OBJECTS) $(pjrec_OBJECTS) $(phm2pj_OBJECTS) $(pj2if_OBJECTS) $(ifinfo_OBJECTS) $(phm2if_OBJECTS) $(if_1_OBJECTS) $(if_2_OBJECTS) $(if2img_OBJECTS)
+.deps/phm2if.P .deps/phm2pj.P .deps/pj2if.P .deps/pjinfo.P \
+.deps/pjrec.P
+SOURCES = $(pjrec_lam_SOURCES) $(phm2pj_lam_SOURCES) $(phm2if_lam_SOURCES) $(pjrec_SOURCES) $(phm2pj_SOURCES) $(pj2if_SOURCES) $(ifinfo_SOURCES) $(phm2if_SOURCES) $(if_1_SOURCES) $(if_2_SOURCES) $(if2img_SOURCES) $(pjinfo_SOURCES)
+OBJECTS = $(pjrec_lam_OBJECTS) $(phm2pj_lam_OBJECTS) $(phm2if_lam_OBJECTS) $(pjrec_OBJECTS) $(phm2pj_OBJECTS) $(pj2if_OBJECTS) $(ifinfo_OBJECTS) $(phm2if_OBJECTS) $(if_1_OBJECTS) $(if_2_OBJECTS) $(if2img_OBJECTS) $(pjinfo_OBJECTS)
 
 all: all-redirect
 .SUFFIXES:
@@ -270,6 +277,10 @@ if2img: $(if2img_OBJECTS) $(if2img_DEPENDENCIES)
        @rm -f if2img
        $(CXXLINK) $(if2img_LDFLAGS) $(if2img_OBJECTS) $(if2img_LDADD) $(LIBS)
 
+pjinfo: $(pjinfo_OBJECTS) $(pjinfo_DEPENDENCIES)
+       @rm -f pjinfo
+       $(CXXLINK) $(pjinfo_LDFLAGS) $(pjinfo_OBJECTS) $(pjinfo_LDADD) $(LIBS)
+
 install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(bindir)
@@ -333,7 +344,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -469,16 +480,13 @@ realclean:
        rm -f *.pgm *.if *~ *.pj
 
 @USE_LAM_TRUE@pjrec-lam: pjrec.cpp mpiworld.cpp ../include/ct.h  ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI pjrec.cpp -o pjrec-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
+@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI pjrec.cpp -o pjrec-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
 
 @USE_LAM_TRUE@phm2pj-lam: phm2pj.cpp mpiworld.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI phm2pj.cpp -o phm2pj-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
+@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI phm2pj.cpp -o phm2pj-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
 
 @USE_LAM_TRUE@phm2if-lam: phm2if.cpp mpiworld.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI phm2if.cpp -o phm2if-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
-
-shared: pjrec.cpp phm2pj.cpp 
-       $(CC) @DEFS@ $(CFLAGS) $(INCLUDES) -DNO_MAIN -shared phm2pj.cpp pjrec.cpp @ctlibs@ $(LDFLAGS) -o ir.so
+@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI phm2if.cpp -o phm2if-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 3d1915c0f3bf48139c3a5167ad9122c6dc3a0e40..f56a8f1a13c102d9d409b2930f047bc41fae8906 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phm2if.cpp,v 1.12 2000/09/04 09:06:46 kevin Exp $
+**  $Id: phm2if.cpp,v 1.13 2000/11/09 00:12:25 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
@@ -50,7 +50,7 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: phm2if.cpp,v 1.12 2000/09/04 09:06:46 kevin Exp $";
+static const char* g_szIdStr = "$Id: phm2if.cpp,v 1.13 2000/11/09 00:12:25 kevin Exp $";
 
 void 
 phm2if_usage (const char *program)
@@ -108,7 +108,7 @@ phm2if_main (int argc, char* argv[])
 {
   ImageFile* pImGlobal = NULL;
   Phantom phm;
-  string optPhmName (Phantom::convertPhantomIDToName(Phantom::PHM_HERMAN));
+  string optPhmName;
   string optFilterName;
   string optDomainName (SignalFilter::convertDomainIDToName (SignalFilter::DOMAIN_SPATIAL));
   string optOutFilename;
index c42f0af80618451f26cc973dd08355c42a5be2c2..af8e1f9448b6fcbc488d1ff5723fccd5bb2614a2 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phm2pj.cpp,v 1.12 2000/08/31 08:38:58 kevin Exp $
+**  $Id: phm2pj.cpp,v 1.13 2000/11/09 00:12:25 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
@@ -50,7 +50,7 @@ static struct option phm2pj_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: phm2pj.cpp,v 1.12 2000/08/31 08:38:58 kevin Exp $";
+static const char* g_szIdStr = "$Id: phm2pj.cpp,v 1.13 2000/11/09 00:12:25 kevin Exp $";
 
 
 void 
@@ -100,6 +100,7 @@ phm2pj_main (int argc, char* argv[])
   string optGeometryName = Scanner::convertGeometryIDToName(Scanner::GEOMETRY_PARALLEL);
   char *opt_outfile = NULL;
   string opt_desc;
+  string optPhmName;
   string optPhmFileName;
   int opt_ndet;
   int opt_nview;
@@ -107,7 +108,6 @@ phm2pj_main (int argc, char* argv[])
   double dOptFocalLength = 1.;
   double dOptFieldOfView = 1.;
   int opt_trace = Trace::TRACE_NONE;
-  string optPhmName (Phantom::convertPhantomIDToName(Phantom::PHM_HERMAN));
   int opt_verbose = 0;
   int opt_debug = 0;
   double opt_rotangle = 1;