r4312: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 1 Apr 2003 18:56:59 +0000 (18:56 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 1 Apr 2003 18:56:59 +0000 (18:56 +0000)
tools/Makefile.in
tools/ctsimtext.cpp
tools/linogram.cpp

index 01db349593e421703f49d00c9378ed6538198fd8..3fa7612f1f0d5e1dd567be6872ce8cbd11c48106 100644 (file)
@@ -62,6 +62,7 @@ host_triplet = @host@
 AWK = @AWK@
 CC = @CC@
 CXX = @CXX@
+MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -96,11 +97,11 @@ INCLUDES = @my_includes@
 @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
@@ -119,11 +120,11 @@ LDFLAGS = @LDFLAGS@
 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)
@@ -137,16 +138,16 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 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)
@@ -394,11 +395,12 @@ install-exec-hook:
        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.
index c9e6297f0fb7c4398976ba7e70b71995d0adb372..3186150c9ac59093db7f2401239c8cb8eb35bef0 100644 (file)
@@ -9,7 +9,7 @@
 **  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
@@ -45,7 +45,7 @@ extern "C" {
 // 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";
@@ -61,6 +61,7 @@ extern int pjHinterp_main (int argc, char* const argv[]);
 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);
@@ -86,7 +87,7 @@ ctsimtext_usage (const char *program)
   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 
@@ -106,6 +107,7 @@ interactive_usage ()
   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";
 }
 
@@ -267,6 +269,8 @@ processCommand (int argc, char* const argv[])
       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)
index a244c0d9477015b5978d89b16f84b0d0fa72b91d..16e78ad343747faade392e99942bca60d3f58460 100644 (file)
@@ -9,7 +9,7 @@
 **  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
@@ -27,7 +27,7 @@
 
 #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[] =
 {
@@ -38,7 +38,7 @@ 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 
@@ -57,7 +57,6 @@ linogram_usage (const char *program)
 int 
 linogram_main (int argc, char *const argv[])
 {
-  std::string in_n;
   int opt_verbose = 0;
   int opt_debug = 0;
 
@@ -98,16 +97,16 @@ linogram_main (int argc, char *const argv[])
     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++) {