+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
ctlibs = @ctlibs@
htmldata = @htmldata@
htmldir = @htmldir@
+lamdefs = @lamdefs@
lamdir = @lamdir@
lamprograms = @lamprograms@
mpienable = @mpienable@
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
@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 \
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; }
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.
ctlibs = @ctlibs@
htmldata = @htmldata@
htmldir = @htmldir@
+lamdefs = @lamdefs@
lamdir = @lamdir@
lamprograms = @lamprograms@
mpienable = @mpienable@
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)
@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 \
ctlibs = @ctlibs@
htmldata = @htmldata@
htmldir = @htmldir@
+lamdefs = @lamdefs@
lamdir = @lamdir@
lamprograms = @lamprograms@
mpienable = @mpienable@
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
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)
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)
@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 \
** 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
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);
}
ctlibs = @ctlibs@
htmldata = @htmldata@
htmldir = @htmldir@
+lamdefs = @lamdefs@
lamdir = @lamdir@
lamprograms = @lamprograms@
mpienable = @mpienable@
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
@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 \
ctlibs = @ctlibs@
htmldata = @htmldata@
htmldir = @htmldir@
+lamdefs = @lamdefs@
lamdir = @lamdir@
lamprograms = @lamprograms@
mpienable = @mpienable@
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@
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)
if_2_LDFLAGS =
if2img_OBJECTS = if2img.o
if2img_LDFLAGS =
+pjinfo_OBJECTS = pjinfo.o
+pjinfo_LDFLAGS =
SCRIPTS = $(bin_SCRIPTS)
CXXFLAGS = @CXXFLAGS@
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:
@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)
@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 \
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.
** 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
{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)
{
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;
** 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
{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
string optGeometryName = Scanner::convertGeometryIDToName(Scanner::GEOMETRY_PARALLEL);
char *opt_outfile = NULL;
string opt_desc;
+ string optPhmName;
string optPhmFileName;
int opt_ndet;
int opt_nview;
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;