From: Kevin M. Rosenberg Date: Thu, 9 Nov 2000 00:12:25 +0000 (+0000) Subject: r204: *** empty log message *** X-Git-Tag: debian-4.5.3-3~813 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=74377b5c32f908a9d5a7665f4ad81d35619272f9 r204: *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 951d903..09c83d6 100644 --- 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 diff --git a/Makefile.in b/Makefile.in index 213c93a..fe94087 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 \ diff --git a/configure b/configure index 23f265f..f396d7e 100755 --- 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; } diff --git a/configure.in b/configure.in index 22566cd..c078d99 100644 --- a/configure.in +++ b/configure.in @@ -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. diff --git a/getopt/Makefile.in b/getopt/Makefile.in index b331bf1..ede9e88 100644 --- a/getopt/Makefile.in +++ b/getopt/Makefile.in @@ -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 \ diff --git a/libctsim/Makefile.in b/libctsim/Makefile.in index 05d7030..2d727fa 100644 --- a/libctsim/Makefile.in +++ b/libctsim/Makefile.in @@ -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 \ diff --git a/libctsim/phantom.cpp b/libctsim/phantom.cpp index aff37a0..59b46ce 100644 --- a/libctsim/phantom.cpp +++ b/libctsim/phantom.cpp @@ -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(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); } diff --git a/libctsupport/Makefile.in b/libctsupport/Makefile.in index 558d556..87a95e3 100644 --- a/libctsupport/Makefile.in +++ b/libctsupport/Makefile.in @@ -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 \ diff --git a/tools/Makefile.in b/tools/Makefile.in index b3f82fa..ce4917d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -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. diff --git a/tools/phm2if.cpp b/tools/phm2if.cpp index 3d1915c..f56a8f1 100644 --- a/tools/phm2if.cpp +++ b/tools/phm2if.cpp @@ -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; diff --git a/tools/phm2pj.cpp b/tools/phm2pj.cpp index c42f0af..af8e1f9 100644 --- a/tools/phm2pj.cpp +++ b/tools/phm2pj.cpp @@ -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;