r183: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 22 Aug 2000 17:05:22 +0000 (17:05 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 22 Aug 2000 17:05:22 +0000 (17:05 +0000)
ChangeLog
rpm/ctsim-2.0.0b9-1.spec [new file with mode: 0644]
tools/if2img.cpp

index 50bb4f2cc59ec556f2e01d3db1a8d4ad2479abf5..465d37e2b0114d5d01c2f3ca9183f2e2543a0543 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,7 +6,8 @@
    Decomposed SignalFilter class into ProcessSignal and SignalFilter classes
    Added Filter-Generation option to reconstruction to allow direct or 
        inverse_fourier construction of filters
-
+   Added median to statistics and to auto-windowing
+       
 2.0.0-b8 - 8/1/00
    Added line color support to SGP
    Fixed lineAbs bug
diff --git a/rpm/ctsim-2.0.0b9-1.spec b/rpm/ctsim-2.0.0b9-1.spec
new file mode 100644 (file)
index 0000000..948cf19
--- /dev/null
@@ -0,0 +1,50 @@
+# Version of CTSim
+%define version 2.0.0b8
+
+Summary: CTSim - Open-Source Computed Tomography Simulator
+Name: ctsim
+Version: %{version}
+Release: 1
+Packager: Kevin Rosenberg <kevin@rosenberg.net>
+Source: ftp.ctsim.org:/pub/ctsim/ctsim-%{version}.tar.gz
+Copyright: GPL
+Group: Applications/Scientific
+
+%description
+CTSim is a Computed Tomography Simulator.
+
+%prep
+%setup 
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" \
+       ./configure --prefix=/usr/local
+make
+
+%install
+install -s -m 755 -o 0 -g 0 src/ctsim /usr/local/bin/ctsim
+install -s -m 755 -o 0 -g 0 tools/pjrec /usr/local/bin/pjrec
+install -s -m 755 -o 0 -g 0 tools/pj2if /usr/local/bin/pj2if
+install -s -m 755 -o 0 -g 0 tools/phm2pj /usr/local/bin/phm2pj
+install -s -m 755 -o 0 -g 0 tools/phm2if /usr/local/bin/phm2if
+install -s -m 755 -o 0 -g 0 tools/if-1 /usr/local/bin/if-1
+install -s -m 755 -o 0 -g 0 tools/if-2 /usr/local/bin/if-2
+install -s -m 755 -o 0 -g 0 tools/if2img /usr/local/bin/if2img
+install -s -m 755 -o 0 -g 0 tools/if-1 /usr/local/bin/ifinfo
+install -m 755 -o 0 -g 0 tools/sample-ctsim.sh /usr/local/bin/sample-ctsim.sh
+
+%files
+%doc README COPYING ChangeLog INSTALL
+
+/usr/local/bin/ctsim
+/usr/local/bin/pjrec
+/usr/local/bin/pj2if
+/usr/local/bin/phm2pj
+/usr/local/bin/phm2if
+/usr/local/bin/if-1
+/usr/local/bin/if-2
+/usr/local/bin/if2img
+/usr/local/bin/ifinfo
+/usr/local/bin/sample-ctsim.sh
+
+
index 8e6444c686bb0b0bc388d544de0622760a36405b..d9e7004ee25c504be31145fb363995fb839fa054 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: if2img.cpp,v 1.4 2000/08/03 09:57:29 kevin Exp $
+**  $Id: if2img.cpp,v 1.5 2000/08/22 17:03:54 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
@@ -48,7 +48,7 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: if2img.cpp,v 1.4 2000/08/03 09:57:29 kevin Exp $";
+static const char* g_szIdStr = "$Id: if2img.cpp,v 1.5 2000/08/22 17:03:54 kevin Exp $";
 
 enum { O_AUTO_FULL, O_AUTO_STD0_1, O_AUTO_STD0_5, O_AUTO_STD1, O_AUTO_STD2, O_AUTO_STD3 };
 static const char O_AUTO_FULL_STR[]="full";
@@ -58,9 +58,10 @@ static const char O_AUTO_STD1_STR[]="std1";
 static const char O_AUTO_STD2_STR[]="std2";
 static const char O_AUTO_STD3_STR[]="std3";
 
-enum { O_CENTER_MEAN, O_CENTER_MODE };
+enum { O_CENTER_MEDIAN, O_CENTER_MEAN, O_CENTER_MODE };
 static const char O_CENTER_MEAN_STR[]="mean";
 static const char O_CENTER_MODE_STR[]="mode";
+static const char O_CENTER_MEDIAN_STR[]="median";
 
 enum { O_FORMAT_GIF, O_FORMAT_PNG, O_FORMAT_PNG16, O_FORMAT_PGM, O_FORMAT_PGMASC, O_FORMAT_DISP };
 static const char O_FORMAT_GIF_STR[]="gif";
@@ -90,7 +91,8 @@ if2img_usage (const char *program)
 #endif
   cout << "         disp   Display on screen" << endl;
   cout << "     --center   Center of window" << endl;
-  cout << "         mode   Mode is center of window (default)" << endl;
+  cout << "         median Median is center of window (default)" << endl;
+  cout << "         mode   Mode is center of window" << endl;
   cout << "         mean   Mean is center of window" << endl;
   cout << "     --auto     Set auto window" << endl;
   cout << "         full   Use full window (default)" << endl;
@@ -124,7 +126,7 @@ if2img_main (int argc, char *const argv[])
   int opt_set_min = 0;
   int opt_stats = 0;
   int opt_debug = 0;
-  int opt_center = O_CENTER_MODE;
+  int opt_center = O_CENTER_MEDIAN;
   int opt_format = O_FORMAT_PGM;
   int opt_labels = 0;
 
@@ -192,7 +194,9 @@ if2img_main (int argc, char *const argv[])
            }
                break;
        case O_CENTER:
-         if (strcmp(optarg, O_CENTER_MEAN_STR) == 0)
+         if (strcmp(optarg, O_CENTER_MEDIAN_STR) == 0)
+           opt_center = O_CENTER_MEDIAN;
+         else if (strcmp(optarg, O_CENTER_MEAN_STR) == 0)
            opt_center = O_CENTER_MEAN;
          else if (strcmp(optarg, O_CENTER_MODE_STR) == 0)
            opt_center = O_CENTER_MODE;
@@ -320,7 +324,9 @@ if2img_main (int argc, char *const argv[])
       if (opt_auto != O_AUTO_FULL) {
          double center;
          
-         if (opt_center == O_CENTER_MODE)
+         if (opt_center == O_CENTER_MEDIAN)
+             center = median;
+         else if (opt_center == O_CENTER_MODE)
              center = mode;
          else if (opt_center == O_CENTER_MEAN)
              center = mean;