AWK = @AWK@
CC = @CC@
CXX = @CXX@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@HAVE_SGP_TRUE@SOURCE_DEPEND = ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a ../libctgraphics/libctgraphics.a
@HAVE_SGP_FALSE@SOURCE_DEPEND = ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-ctsimtext_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp nographics.cpp phm2helix.cpp pjHinterp.cpp
+ctsimtext_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp nographics.cpp phm2helix.cpp pjHinterp.cpp linogram.cpp
ctsimtext_LDADD = @ctlibs@
ctsimtext_DEPENDENCIES = $(SOURCE_DEPEND)
-ctsimtext_lam_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp nographics.cpp mpiworld.cpp phm2helix.cpp pjHinterp.cpp
+ctsimtext_lam_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp nographics.cpp mpiworld.cpp phm2helix.cpp pjHinterp.cpp linogram.cpp
ctsimtext_lam_LDADD = @ctlamlibs@
@USE_LAM_TRUE@CC_LAM = $(lamdir)/bin/hcp
LIBS = @LIBS@
ctsimtext_lam_OBJECTS = ctsimtext.o if1.o if2.o ifinfo.o ifexport.o \
phm2if.o phm2pj.o pj2if.o pjinfo.o pjrec.o nographics.o mpiworld.o \
-phm2helix.o pjHinterp.o
+phm2helix.o pjHinterp.o linogram.o
ctsimtext_lam_LDFLAGS =
ctsimtext_OBJECTS = ctsimtext.o if1.o if2.o ifinfo.o ifexport.o \
phm2if.o phm2pj.o pj2if.o pjinfo.o pjrec.o nographics.o phm2helix.o \
-pjHinterp.o
+pjHinterp.o linogram.o
ctsimtext_LDFLAGS =
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/ctsimtext.P .deps/if1.P .deps/if2.P .deps/ifexport.P \
-.deps/ifinfo.P .deps/mpiworld.P .deps/nographics.P .deps/phm2helix.P \
-.deps/phm2if.P .deps/phm2pj.P .deps/pj2if.P .deps/pjHinterp.P \
-.deps/pjinfo.P .deps/pjrec.P
+.deps/ifinfo.P .deps/linogram.P .deps/mpiworld.P .deps/nographics.P \
+.deps/phm2helix.P .deps/phm2if.P .deps/phm2pj.P .deps/pj2if.P \
+.deps/pjHinterp.P .deps/pjinfo.P .deps/pjrec.P
SOURCES = $(ctsimtext_lam_SOURCES) $(ctsimtext_SOURCES)
OBJECTS = $(ctsimtext_lam_OBJECTS) $(ctsimtext_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .cpp .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
ln -sf ctsimtext $(bindir)/pjinfo
ln -sf ctsimtext $(bindir)/pjrec
ln -sf ctsimtext $(bindir)/pjHinterp
+ ln -sf linogram $(bindir)/linogram
realclean:
rm -f *.pgm *.if *~ *.pj
-@USE_LAM_TRUE@ctsimtext-lam$(EXEEXT): ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp mpiworld.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
+@USE_LAM_TRUE@ctsimtext-lam$(EXEEXT): ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp mpiworld.cpp linogram.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI -DNO_MAIN ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp -o ctsimtext-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ctsimtext.cpp,v 1.25 2003/01/30 04:16:27 kevin Exp $
+** $Id: ctsimtext.cpp,v 1.26 2003/04/01 18:56:59 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 linked to ctsimtext, but executed as another name, eg pjrec, then program will use that
// linked name as name of function.
-static const char* const g_szIdStr = "$Id: ctsimtext.cpp,v 1.25 2003/01/30 04:16:27 kevin Exp $";
+static const char* const g_szIdStr = "$Id: ctsimtext.cpp,v 1.26 2003/04/01 18:56:59 kevin Exp $";
static const char* const s_szProgramName = "ctsimtext";
static const char* const s_szProgramName2 = "ctsimtext.exe";
static const char* const s_szProgramName3 = "ctsimtext-lam";
extern int pj2if_main (int argc, char* const argv[]);
extern int pjinfo_main (int argc, char* const argv[]);
extern int pjrec_main (int argc, char* const argv[]);
+extern int linogram_main (int argc, char* const argv[]);
static int processCommand (int argc, char* const argv[]);
static void convertStringToArgcv (char* szLine, int* piArgc, char*** pppArgv);
std::cout << " phm2pj Take projections of a phantom object\n";
std::cout << " phm2helix Take projections of a phantom object\n";
std::cout << " pjHinterp Interpolate helical projections of a phantom object\n";
-
+ std::cout << " linogram Print linogram sampling\n";
}
void
std::cout << " pjHinterp Interpolate helical projections of a phantom object\n";
std::cout << " pjrec Projection reconstruction\n";
std::cout << " quit Quits shell\n";
+ std::cout << " linogram Display linogram sampling\n";
std::cout << "All functions accept --help as parameter for online help\n\n";
}
return pjinfo_main (argc, argv);
else if (strcasecmp (pszFunction, "pjrec") == 0)
return pjrec_main (argc, argv);
+ else if (strcasecmp (pszFunction, "linogram") == 0)
+ return linogram_main (argc, argv);
else {
std::cout << "Unknown function name: " << pszFunction << "\n";
if (s_bInteractive)
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: linogram.cpp,v 1.1 2003/04/01 18:34:42 kevin Exp $
+** $Id: linogram.cpp,v 1.2 2003/04/01 18:56:59 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
#include "ct.h"
-enum { O_LABELS,, O_VERBOSE, O_HELP, O_VERSION, O_DEBUG };
+enum { O_LABELS, O_VERBOSE, O_HELP, O_VERSION, O_DEBUG };
static struct option my_options[] =
{
{0, 0, 0, 0}
};
-static const char* g_szIdStr = "$Id: linogram.cpp,v 1.1 2003/04/01 18:34:42 kevin Exp $";
+static const char* g_szIdStr = "$Id: linogram.cpp,v 1.2 2003/04/01 18:56:59 kevin Exp $";
void
int
linogram_main (int argc, char *const argv[])
{
- std::string in_n;
int opt_verbose = 0;
int opt_debug = 0;
return (1);
}
- in_n = argv[optind];
- in_d = argv[optind+1];
+ const char* in_n = argv[optind];
+ const char* in_d = argv[optind+1];
int n = atol (in_n);
- double n = atof (in_d);
+ double d = atof (in_d);
int size = 2 * (2 * n - 1) + 1;
double divisor = 4 * n + 3;
for (int itheta = 0; itheta < size; itheta++) {
- double theta = atan (2 * itheta / division);
+ double theta = atan (2 * itheta / divisor);
printf ("%lf: ", theta);
double step = d * cos(theta);
for (int id = 0; id < size; id++) {