r261: Use explicit std:: namespace
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 16 Dec 2000 06:12:47 +0000 (06:12 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 16 Dec 2000 06:12:47 +0000 (06:12 +0000)
31 files changed:
getopt/getopt.h
include/array2dfile.h
include/backprojectors.h
include/ct.h
include/ctsupport.h
include/ezplot.h
include/filter.h
include/fnetorderstream.h
include/imagefile.h
include/phantom.h
include/procsignal.h
include/projections.h
include/reconstruct.h
include/sgp.h
libctgraphics/ezplot.cpp
libctgraphics/sgp.cpp
libctsim/array2dfile.cpp
libctsim/backprojectors.cpp
libctsim/imagefile.cpp
libctsim/phantom.cpp
libctsim/procsignal.cpp
libctsim/projections.cpp
libctsim/reconstruct.cpp
libctsim/scanner.cpp
libctsupport/msvc.cpp
src/ctsim.cpp
src/ctsim.h
src/dialogs.cpp
src/docs.cpp
src/views.cpp
tools/pjrec.cpp

index 6d73e9fd38a4472534d44311b4be134b1d863666..c5f98619b9a033d5fc4decebd39840598d0c064d 100644 (file)
@@ -126,7 +126,7 @@ struct option
    arguments to the option '\0'.  This behavior is specific to the GNU
    `getopt'.  */
 
    arguments to the option '\0'.  This behavior is specific to the GNU
    `getopt'.  */
 
-#if defined __STDC__ && __STDC__
+#if defined __STDC__ 
 # ifdef __GNU_LIBRARY__
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in stdlib.h.  To avoid compilation
 # ifdef __GNU_LIBRARY__
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in stdlib.h.  To avoid compilation
@@ -152,10 +152,15 @@ extern int _getopt_internal (int __argc, char *const *__argv,
 #else /* not __STDC__ */
 extern int getopt ();
 # ifndef __need_getopt
 #else /* not __STDC__ */
 extern int getopt ();
 # ifndef __need_getopt
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,\r
+                       const struct option *longopts, int *longind);\r
+extern int getopt_long_only (int __argc, char *const *__argv,\r
+                            const char *__shortopts,\r
+                            const struct option *__longopts, int *__longind);\r
+extern int _getopt_internal (int __argc, char *const *__argv,\r
+                            const char *__shortopts,\r
+                            const struct option *__longopts, int *__longind,\r
+                            int __long_only);\r
 # endif
 #endif /* __STDC__ */
 
 # endif
 #endif /* __STDC__ */
 
index e5276e793f9a1f6ef2b6a5b5efe9286ec7368030..21023dc3c33f83e63646ec0f4c04717a1039aaf4 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: array2dfile.h,v 1.11 2000/12/16 03:29:02 kevin Exp $
+**  $Id: array2dfile.h,v 1.12 2000/12/16 06:12:47 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
 **
 **  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
@@ -44,8 +44,6 @@
 #include "fnetorderstream.h"
 #include "array2d.h"
 
 #include "fnetorderstream.h"
 #include "array2d.h"
 
-using namespace std;
-
 class Array2dFileLabel
 {
 public:
 class Array2dFileLabel
 {
 public:
@@ -63,7 +61,7 @@ public:
 
     ~Array2dFileLabel();
 
 
     ~Array2dFileLabel();
 
-    const string& getLabelString (void) const
+    const std::string& getLabelString (void) const
        { return m_strLabel; }
 
     kfloat64 getCalcTime (void) const
        { return m_strLabel; }
 
     kfloat64 getCalcTime (void) const
@@ -78,17 +76,17 @@ public:
     int getLabelType (void) const
        { return m_labelType; }
 
     int getLabelType (void) const
        { return m_labelType; }
 
-    string& setLabelString (const char* const str)
+       std::string& setLabelString (const char* const str)
        { m_strLabel = str; return (m_strLabel); }
 
        { m_strLabel = str; return (m_strLabel); }
 
-    string& setLabelString (const string& str)
+       std::string& setLabelString (const std::string& str)
        { m_strLabel = str; return (m_strLabel); }
 
     void setDateTime (int year, int month, int day, int hour, int minute, int second);
 
     void getDateTime (int& year, int& month, int& day, int& hour, int& minute, int& second) const;
 
        { m_strLabel = str; return (m_strLabel); }
 
     void setDateTime (int year, int month, int day, int hour, int minute, int second);
 
     void getDateTime (int& year, int& month, int& day, int& hour, int& minute, int& second) const;
 
-    const string& getDateString () const;
+    const std::string& getDateString () const;
 
     void print (std::ostream& os) const;
 
 
     void print (std::ostream& os) const;
 
@@ -106,10 +104,10 @@ private:
     kuint16 m_hour;
     kuint16 m_minute;
     kuint16 m_second;
     kuint16 m_hour;
     kuint16 m_minute;
     kuint16 m_second;
-    string m_strLabel;
+       std::string m_strLabel;
     kfloat64 m_calcTime;
 
     kfloat64 m_calcTime;
 
-    mutable string m_strDate;
+    mutable std::string m_strDate;
 };
 
 
 };
 
 
@@ -173,26 +171,26 @@ public:
 
   bool fileRead (const char* const filename);
 
 
   bool fileRead (const char* const filename);
 
-  bool fileRead (const string& filename);
+  bool fileRead (const std::string& filename);
 
   bool fileWrite (const char* const filename);
 
 
   bool fileWrite (const char* const filename);
 
-  bool fileWrite (const string& filename);
+  bool fileWrite (const std::string& filename);
 
 
-  const string& getFilename (void) const 
+  const std::string& getFilename (void) const 
       {  return m_filename; }
 
   void printLabels (std::ostream& os) const;
 
       {  return m_filename; }
 
   void printLabels (std::ostream& os) const;
 
-  typedef vector<Array2dFileLabel*>::iterator labelIterator;
-  typedef vector<Array2dFileLabel*>::const_iterator constLabelIterator;
+  typedef std::vector<Array2dFileLabel*>::iterator labelIterator;
+  typedef std::vector<Array2dFileLabel*>::const_iterator constLabelIterator;
 
  protected:
 
  protected:
-  typedef vector<Array2dFileLabel*> labelContainer;
+        typedef std::vector<Array2dFileLabel*> labelContainer;
 
   static const kuint16 m_signature;
   kuint16 m_headersize;
 
   static const kuint16 m_signature;
   kuint16 m_headersize;
-  string  m_filename;
+  std::string  m_filename;
 
   kuint16 m_pixelSize;
   kuint16 m_pixelFormat;
 
   kuint16 m_pixelSize;
   kuint16 m_pixelFormat;
index c3196f67f8d32fb5967ecc811e44823f710bfb5b..4ee4ebbbe09ddb947c7da086491173d77c8b2148 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: backprojectors.h,v 1.17 2000/12/06 01:46:43 kevin Exp $
+**  $Id: backprojectors.h,v 1.18 2000/12/16 06:12:47 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
 **
 **  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
@@ -67,7 +67,7 @@ class Backprojector
   void BackprojectView (const double* const viewData, const double viewAngle);
 
   bool fail() const {return m_fail;}
   void BackprojectView (const double* const viewData, const double viewAngle);
 
   bool fail() const {return m_fail;}
-  const string& failMessage() const {return m_failMessage;}
+  const std::string& failMessage() const {return m_failMessage;}
 
   static const int getBackprojectCount() {return s_iBackprojectCount;}
   static const char** getBackprojectNameArray() {return s_aszBackprojectName;}
 
   static const int getBackprojectCount() {return s_iBackprojectCount;}
   static const char** getBackprojectNameArray() {return s_aszBackprojectName;}
@@ -85,13 +85,13 @@ class Backprojector
 
 
  private:
 
 
  private:
-  string m_nameBackproject;
-  string m_nameInterpolation;
+  std::string m_nameBackproject;
+  std::string m_nameInterpolation;
   int m_idBackproject;
   int m_idInterpolation;
   Backproject* m_pBackprojectImplem;
   bool m_fail;
   int m_idBackproject;
   int m_idInterpolation;
   Backproject* m_pBackprojectImplem;
   bool m_fail;
-  string m_failMessage;
+  std::string m_failMessage;
 
   static const char* s_aszBackprojectName[];
   static const char* s_aszBackprojectTitle[];
 
   static const char* s_aszBackprojectName[];
   static const char* s_aszBackprojectTitle[];
index 255e905d01eb138300c55d26adbd1b1d1f7b65c3..e920a562bcf4a1ad503779b89b6afa49856d79ce 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ct.h,v 1.44 2000/12/16 02:44:26 kevin Exp $
+**  $Id: ct.h,v 1.45 2000/12/16 06:12:47 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
 **
 **  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
@@ -52,7 +52,6 @@
 #include <cstddef>
 #include <cstdarg>
 #include <cstdlib>
 #include <cstddef>
 #include <cstdarg>
 #include <cstdlib>
-using namespace std;
 \r
 #if defined(MSVC) || HAVE_SSTREAM\r
 #include <sstream>
 \r
 #if defined(MSVC) || HAVE_SSTREAM\r
 #include <sstream>
@@ -62,7 +61,7 @@ using namespace std;
 \r
 #include <fstream>
 #include <iostream>
 \r
 #include <fstream>
 #include <iostream>
-#include <string>
+#include <string>\r
 #include <iterator>
 #include <algorithm>
 #include <exception>
 #include <iterator>
 #include <algorithm>
 #include <exception>
index 617554362cfffb3e78f9b65d7f7430a9cc3a988a..ba6030d95e3ec51c936e19d137c5e626405d4d05 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsupport.h,v 1.12 2000/12/16 03:29:02 kevin Exp $
+**  $Id: ctsupport.h,v 1.13 2000/12/16 06:12:47 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -82,7 +82,7 @@
 
 /*----------------------------------------------------------------------*/
 
 
 /*----------------------------------------------------------------------*/
 
-#ifndef O_BINARY
+#if !defined(O_BINARY) && !defined(MSVC)
 #define O_BINARY (0)
 #endif
 
 #define O_BINARY (0)
 #endif
 
index c15428b20dc1675a4c9df69d4dfd4fdb1a707191..31291bd617872d2b6c7c77313515fdb08306ff6c 100644 (file)
@@ -7,7 +7,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ezplot.h,v 1.17 2000/12/06 15:17:51 kevin Exp $
+**  $Id: ezplot.h,v 1.18 2000/12/16 06:12:47 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
 **
 **  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
@@ -44,9 +44,9 @@ class EZPlotCurve {
     int m_iSymbol;
     int m_iSymbolFreq;
     int m_iColor;
     int m_iSymbol;
     int m_iSymbolFreq;
     int m_iColor;
-    string m_sLegend;
+    std::string m_sLegend;
 
 
-    EZPlotCurve (const double* x, const double* y, int n, int color, int linestyle, int symbol, int sumbolFreq, const string& legend);
+    EZPlotCurve (const double* x, const double* y, int n, int color, int linestyle, int symbol, int sumbolFreq, const std::string& legend);
 
     ~EZPlotCurve();
 };
 
     ~EZPlotCurve();
 };
@@ -111,15 +111,14 @@ class EZPlotCurve {
  *---------------------------------------------------------------------------*/
 
 #include <vector>
  *---------------------------------------------------------------------------*/
 
 #include <vector>
-using namespace std;
 
 
-typedef vector<EZPlotCurve*>::iterator EZPlotCurveIterator;
-typedef vector<EZPlotCurve*>::const_iterator EZPlotCurveConstIterator;
+typedef std::vector<EZPlotCurve*>::iterator EZPlotCurveIterator;
+typedef std::vector<EZPlotCurve*>::const_iterator EZPlotCurveConstIterator;
 
 class SGP;
 class EZPlot {
  private:
 
 class SGP;
 class EZPlot {
  private:
-    vector<class EZPlotCurve*> m_vecCurves;
+        std::vector<class EZPlotCurve*> m_vecCurves;
 
     // Colors
     int clr_axis;                      // color of all axis lines 
 
     // Colors
     int clr_axis;                      // color of all axis lines 
@@ -133,10 +132,10 @@ class EZPlot {
     double o_xporigin, o_yporigin;     // origin of plot frame in NDC 
     double o_xlength, o_ylength;       // length of plot frame in NDC 
 
     double o_xporigin, o_yporigin;     // origin of plot frame in NDC 
     double o_xlength, o_ylength;       // length of plot frame in NDC 
 
-    string c_xlabel;   // label for x axis 
-    string c_ylabel;   // label for y axis 
-    string c_title;            // title to print above graph 
-    string c_legend;;  // current legend specified 
+    std::string c_xlabel;      // label for x axis 
+    std::string c_ylabel;      // label for y axis 
+    std::string c_title;               // title to print above graph 
+    std::string c_legend;;     // current legend specified 
     
     int o_linestyle, o_color;  // style to use for curves all subsequent curves to EZPLOT 
     int o_xaxis, o_yaxis;              // Specifies where axis & labels are drawn 
     
     int o_linestyle, o_color;  // style to use for curves all subsequent curves to EZPLOT 
     int o_xaxis, o_yaxis;              // Specifies where axis & labels are drawn 
index d6a3e8fad4cc3dac970a74dabb8357009c94db0c..ca6e67b0314e405d91bbfbf8711bd2353a37f78e 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: filter.h,v 1.21 2000/11/28 14:54:07 kevin Exp $
+**  $Id: filter.h,v 1.22 2000/12/16 06:12:47 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
 **
 **  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
@@ -77,10 +77,10 @@ class SignalFilter {
       { return m_adFilter; }
 
     bool fail(void) const      {return m_fail;}
       { return m_adFilter; }
 
     bool fail(void) const      {return m_fail;}
-    const string& failMessage(void) const {return m_failMessage;}
+    const std::string& failMessage(void) const {return m_failMessage;}
 
 
-    const string& nameFilter(void) const       { return m_nameFilter;}
-    const string& nameDomain(void) const       { return m_nameDomain;}
+    const std::string& nameFilter(void) const  { return m_nameFilter;}
+    const std::string& nameDomain(void) const  { return m_nameDomain;}
     const int idFilter(void) const     { return m_idFilter;}
     const int idDomain(void) const     { return m_idDomain;}
 
     const int idFilter(void) const     { return m_idFilter;}
     const int idDomain(void) const     { return m_idDomain;}
 
@@ -125,13 +125,13 @@ class SignalFilter {
     double m_dFilterMax;
     double* m_adFilter;
 
     double m_dFilterMax;
     double* m_adFilter;
 
-    string m_nameFilter;
-    string m_nameDomain;
+    std::string m_nameFilter;
+    std::string m_nameDomain;
     int m_idFilter;
     int m_idDomain;
 
     bool m_fail;
     int m_idFilter;
     int m_idDomain;
 
     bool m_fail;
-    string m_failMessage;
+    std::string m_failMessage;
 
     static const char* s_aszFilterName[];
     static const char* s_aszFilterTitle[];
 
     static const char* s_aszFilterName[];
     static const char* s_aszFilterTitle[];
index b682105b9dfecb322a6f06163148193e5b67a7db..a8559390b857ca874b7bc578253fdd3e4c618af4 100644 (file)
@@ -1,3 +1,31 @@
+/*****************************************************************************\r
+** FILE IDENTIFICATION\r
+**\r
+**   Name:          fnetorderstream.h\r
+**   Purpose:       Network-order file stream header\r
+**   Programmer:    Kevin Rosenberg\r
+**   Date Started:  Sep 2000\r
+**\r
+**  This is part of the CTSim program\r
+**  Copyright (C) 1983-2000 Kevin Rosenberg\r
+**\r
+**  $Id: fnetorderstream.h,v 1.6 2000/12/16 06:12:47 kevin Exp $\r
+**\r
+**  This program is free software; you can redistribute it and/or modify\r
+**  it under the terms of the GNU General Public License (version 2) as\r
+**  published by the Free Software Foundation.\r
+**\r
+**  This program is distributed in the hope that it will be useful,\r
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+**  GNU General Public License for more details.\r
+**\r
+**  You should have received a copy of the GNU General Public License\r
+**  along with this program; if not, write to the Free Software\r
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+******************************************************************************/\r
+\r
+\r
 #ifndef NETORDER_H
 #define NETORDER_H
 
 #ifndef NETORDER_H
 #define NETORDER_H
 
@@ -8,7 +36,6 @@
 #include <fstream>
 #include <iostream>
 #include <string>
 #include <fstream>
 #include <iostream>
 #include <string>
-using namespace std;
 
 
 inline bool NativeBigEndian (void)
 
 
 inline bool NativeBigEndian (void)
@@ -65,11 +92,11 @@ SwapBytes8 (void* buffer)
 void ConvertNetworkOrder (void* buffer, size_t bytes);
 void ConvertReverseNetworkOrder (void* buffer, size_t bytes);
 
 void ConvertNetworkOrder (void* buffer, size_t bytes);
 void ConvertReverseNetworkOrder (void* buffer, size_t bytes);
 
-
+using std::fstream;
 class fnetorderstream : public fstream {
  public:
   fnetorderstream (const char* filename, int mode)
 class fnetorderstream : public fstream {
  public:
   fnetorderstream (const char* filename, int mode)
-    : fstream (filename, mode) {}
+         : fstream (filename, mode) {}
 
   ~fnetorderstream (void)
       {}
 
   ~fnetorderstream (void)
       {}
index dd0c0c9d5744e3a2c64b5a849a520f832b905175..443bf33a78547703a8a4edcbe7b118dc464fb3dc 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: imagefile.h,v 1.21 2000/12/16 03:29:02 kevin Exp $
+**  $Id: imagefile.h,v 1.22 2000/12/16 06:12:47 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
 **
 **  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
@@ -39,8 +39,6 @@
 #include "fnetorderstream.h"
 #include "array2dfile.h"
 
 #include "fnetorderstream.h"
 #include "array2dfile.h"
 
-using namespace std;
-
 #ifdef HAVE_MPI
 #include <mpi++.h>
 #endif
 #ifdef HAVE_MPI
 #include <mpi++.h>
 #endif
index 651e1ebd8a3a1275648edee15eaf6b05186a49a5..e30ce87934c8234344b895d96be5c9cd56dd6233 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phantom.h,v 1.16 2000/12/06 01:46:43 kevin Exp $
+**  $Id: phantom.h,v 1.17 2000/12/16 06:12:47 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
 **
 **  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
@@ -31,8 +31,6 @@
 #include <list>
 #include "ctsupport.h"
 
 #include <list>
 #include "ctsupport.h"
 
-using namespace std;
-
 typedef enum {
     PELEM_INVALID,
     PELEM_RECTANGLE,
 typedef enum {
     PELEM_INVALID,
     PELEM_RECTANGLE,
@@ -165,8 +163,8 @@ class Phantom
     void convertToImagefile (ImageFile& im, const int in_nsample, const int trace) const;
 
     bool fail() const             {return m_fail;}
     void convertToImagefile (ImageFile& im, const int in_nsample, const int trace) const;
 
     bool fail() const             {return m_fail;}
-    const string& failMessage() const {return m_failMessage;}
-    const string& name() const     {return m_name;}
+    const std::string& failMessage() const {return m_failMessage;}
+    const std::string& name() const     {return m_name;}
     const int id() const     {return m_id;}
 
 #if HAVE_SGP
     const int id() const     {return m_id;}
 
 #if HAVE_SGP
@@ -189,8 +187,8 @@ class Phantom
     const double xmax() const {return m_xmax;}
     const double ymin() const {return m_ymin;}
     const double ymax() const {return m_ymax;}
     const double xmax() const {return m_xmax;}
     const double ymin() const {return m_ymin;}
     const double ymax() const {return m_ymax;}
-    list<PhantomElement*>& listPElem() {return m_listPElem;}
-    const list<PhantomElement*>& listPElem() const {return m_listPElem;}
+       std::list<PhantomElement*>& listPElem() {return m_listPElem;}
+    const std::list<PhantomElement*>& listPElem() const {return m_listPElem;}
     const int nPElem() const {return m_nPElem;}
 
     static const int getPhantomCount() {return s_iPhantomCount;}
     const int nPElem() const {return m_nPElem;}
 
     static const int getPhantomCount() {return s_iPhantomCount;}
@@ -205,11 +203,11 @@ class Phantom
     int m_nPElem;                          // number of pelems in phantom 
     double m_xmin, m_xmax, m_ymin, m_ymax;  // extent of pelems in pelem coordinates
     double m_diameter;                        // diameter of object
     int m_nPElem;                          // number of pelems in phantom 
     double m_xmin, m_xmax, m_ymin, m_ymax;  // extent of pelems in pelem coordinates
     double m_diameter;                        // diameter of object
-    mutable list<PhantomElement*> m_listPElem;      // pelem lists
-    string m_name;
+    mutable std::list<PhantomElement*> m_listPElem;      // pelem lists
+    std::string m_name;
     int m_id;
     bool m_fail;
     int m_id;
     bool m_fail;
-    string m_failMessage;
+    std::string m_failMessage;
 
     static const char* s_aszPhantomName[];
     static const char* s_aszPhantomTitle[];
 
     static const char* s_aszPhantomName[];
     static const char* s_aszPhantomTitle[];
@@ -221,7 +219,7 @@ class Phantom
     Phantom& operator= (const Phantom&); // assignment operator
 };
 
     Phantom& operator= (const Phantom&); // assignment operator
 };
 
-typedef list<PhantomElement*>::iterator PElemIterator;
-typedef list<PhantomElement*>::const_iterator PElemConstIterator;
+typedef std::list<PhantomElement*>::iterator PElemIterator;
+typedef std::list<PhantomElement*>::const_iterator PElemConstIterator;
 
 #endif
 
 #endif
index 65bef2af34ab5c899961b59021b1fa9b870fce7f..7a3cb62fde6725b8221e01895e0a0da01d182129 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: procsignal.h,v 1.7 2000/12/02 01:29:11 kevin Exp $
+**  $Id: procsignal.h,v 1.8 2000/12/16 06:12:47 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
 **
 **  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
@@ -39,7 +39,6 @@
 
 #include <complex>
 
 
 #include <complex>
 
-
 class SignalFilter;
 class SGP;
 
 class SignalFilter;
 class SGP;
 
@@ -66,7 +65,7 @@ class ProcessSignal {
     void filterSignal (const float input[], double output[]) const;
 
     bool fail(void) const      {return m_fail;}
     void filterSignal (const float input[], double output[]) const;
 
     bool fail(void) const      {return m_fail;}
-    const string& failMessage(void) const {return m_failMessage;}
+    const std::string& failMessage(void) const {return m_failMessage;}
 
     void setTraceLevel (int traceLevel) {m_traceLevel = traceLevel; }
 
 
     void setTraceLevel (int traceLevel) {m_traceLevel = traceLevel; }
 
@@ -95,9 +94,9 @@ class ProcessSignal {
 
     // transforms using direct trigometric calculation
     static void finiteFourierTransform (const double input[], double output[], const int n, const int direction);
 
     // transforms using direct trigometric calculation
     static void finiteFourierTransform (const double input[], double output[], const int n, const int direction);
-    static void finiteFourierTransform (const double input[], complex<double> output[], const int n, const int direction);
-    static void finiteFourierTransform (const complex<double> input[], complex<double> output[], const int n, const int direction);
-    static void finiteFourierTransform (const complex<double> input[], double output[], const int n, const int direction);
+    static void finiteFourierTransform (const double input[], std::complex<double> output[], const int n, const int direction);
+    static void finiteFourierTransform (const std::complex<double> input[], std::complex<double> output[], const int n, const int direction);
+    static void finiteFourierTransform (const std::complex<double> input[], double output[], const int n, const int direction);
 
 
     static void shuffleNaturalToFourierOrder (double* pdVector, const int n);
 
 
     static void shuffleNaturalToFourierOrder (double* pdVector, const int n);
@@ -105,8 +104,8 @@ class ProcessSignal {
     static void shuffleFourierToNaturalOrder (double* pdVector, const int n);
 
  private:
     static void shuffleFourierToNaturalOrder (double* pdVector, const int n);
 
  private:
-    string m_nameFilterMethod;
-    string m_nameFilterGeneration;
+        std::string m_nameFilterMethod;
+        std::string m_nameFilterGeneration;
     int m_idFilterMethod;
     int m_idFilterGeneration;
     int m_nSignalPoints;
     int m_idFilterMethod;
     int m_idFilterGeneration;
     int m_nSignalPoints;
@@ -134,7 +133,7 @@ class ProcessSignal {
     double m_dFocalLength;
 
     bool m_fail;
     double m_dFocalLength;
 
     bool m_fail;
-    string m_failMessage;
+    std::string m_failMessage;
 
     static const char* s_aszFilterMethodName[];
     static const char* s_aszFilterMethodTitle[];
 
     static const char* s_aszFilterMethodName[];
     static const char* s_aszFilterMethodTitle[];
@@ -154,9 +153,9 @@ class ProcessSignal {
 
     // transforms that use precalculated trig tables, therefore don't 
     // require number of data points (n) as an argument
 
     // transforms that use precalculated trig tables, therefore don't 
     // require number of data points (n) as an argument
-    void finiteFourierTransform (const double input[], complex<double> output[], const int direction) const;
-    void finiteFourierTransform (const complex<double> input[], complex<double> output[], const int direction) const;
-    void finiteFourierTransform (const complex<double> input[], double output[], const int direction) const;
+    void finiteFourierTransform (const double input[], std::complex<double> output[], const int direction) const;
+    void finiteFourierTransform (const std::complex<double> input[], std::complex<double> output[], const int direction) const;
+    void finiteFourierTransform (const std::complex<double> input[], double output[], const int direction) const;
 
     double convolve (const double func[], const double filter[], const double dx, const int n, const int np) const;
     double convolve (const double f[], const double dx, const int n, const int np) const;
 
     double convolve (const double func[], const double filter[], const double dx, const int n, const int np) const;
     double convolve (const double f[], const double dx, const int n, const int np) const;
index eb1c3c7d03b852b4e2085eb976ab259b31e1ba8b..aa76b1a05a21620eb7fc7556c7c7c68f813c7457 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: projections.h,v 1.17 2000/12/16 03:29:02 kevin Exp $
+**  $Id: projections.h,v 1.18 2000/12/16 06:12:47 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -47,12 +47,12 @@ class Projections
 
   void printProjectionData (int startView, int endView);
   void printProjectionData ();
 
   void printProjectionData (int startView, int endView);
   void printProjectionData ();
-  void printScanInfo (ostringstream& os) const;
+  void printScanInfo (std::ostringstream& os) const;
 
 
-  bool read (const string& fname);
+  bool read (const std::string& fname);
   bool read (const char* fname);
   bool write (const char* fname);
   bool read (const char* fname);
   bool write (const char* fname);
-  bool write (const string& fname);
+  bool write (const std::string& fname);
   bool detarrayRead (fnetorderstream& fs, DetectorArray& darray, const int view_num);
   bool detarrayWrite (fnetorderstream& fs, const DetectorArray& darray, const int view_num);
 
   bool detarrayRead (fnetorderstream& fs, DetectorArray& darray, const int view_num);
   bool detarrayWrite (fnetorderstream& fs, const DetectorArray& darray, const int view_num);
 
@@ -64,7 +64,7 @@ class Projections
   void setPhmLen (double phmLen) { m_phmLen = phmLen;}
   void setCalcTime (double calcTime) {m_calcTime = calcTime;}
   void setRemark (const char* remark) {m_remark = remark; m_label.setLabelString(remark);}
   void setPhmLen (double phmLen) { m_phmLen = phmLen;}
   void setCalcTime (double calcTime) {m_calcTime = calcTime;}
   void setRemark (const char* remark) {m_remark = remark; m_label.setLabelString(remark);}
-  void setRemark (const string& remark) {setRemark(remark.c_str());}
+  void setRemark (const std::string& remark) {setRemark(remark.c_str());}
 
   double detStart() const {return m_detStart;}
   double rotStart() const {return m_rotStart;}
 
   double detStart() const {return m_detStart;}
   double rotStart() const {return m_rotStart;}
@@ -79,7 +79,7 @@ class Projections
   double focalLength() const {return m_focalLength;}
   double fieldOfView() const {return m_fieldOfView;}
 
   double focalLength() const {return m_focalLength;}
   double fieldOfView() const {return m_fieldOfView;}
 
-  const string& getFilename() const {return m_filename;}
+  const std::string& getFilename() const {return m_filename;}
   Array2dFileLabel& getLabel() {return m_label;}
   const Array2dFileLabel& getLabel() const {return m_label;}
 
   Array2dFileLabel& getLabel() {return m_label;}
   const Array2dFileLabel& getLabel() const {return m_label;}
 
@@ -90,16 +90,16 @@ class Projections
       { return (*m_projData[iview]); }
 
   static bool copyHeader (const char* const filename, std::ostream& os);
       { return (*m_projData[iview]); }
 
   static bool copyHeader (const char* const filename, std::ostream& os);
-  static bool copyHeader (const string& filename, std::ostream& os);
+  static bool copyHeader (const std::string& filename, std::ostream& os);
 
   static bool copyViewData (const char* const filename, std::ostream& os, int startView, int endView);
 
   static bool copyViewData (const char* const filename, std::ostream& os, int startView, int endView);
-  static bool copyViewData (const string& filename, std::ostream& os, int startView, int endView);
+  static bool copyViewData (const std::string& filename, std::ostream& os, int startView, int endView);
   
  private:
   int m_headerSize;            // Size of disk file header 
   int m_geometry;              // Geometry of scanner 
   class DetectorArray **m_projData;    // Pointer to array of detarray_st pointers 
   
  private:
   int m_headerSize;            // Size of disk file header 
   int m_geometry;              // Geometry of scanner 
   class DetectorArray **m_projData;    // Pointer to array of detarray_st pointers 
-  string m_remark;             // description of raysum data 
+  std::string m_remark;                // description of raysum data 
   int m_nDet;                  // number of detectors in array 
   int m_nView;                 // number of rotated views 
   double m_calcTime;           // time required to calculate raysums 
   int m_nDet;                  // number of detectors in array 
   int m_nView;                 // number of rotated views 
   double m_calcTime;           // time required to calculate raysums 
@@ -116,7 +116,7 @@ class Projections
   kuint32 m_hour;
   kuint32 m_minute;
   kuint32 m_second;
   kuint32 m_hour;
   kuint32 m_minute;
   kuint32 m_second;
-  string m_filename;
+  std::string m_filename;
   Array2dFileLabel m_label;
 
   const static kuint16 m_signature;
   Array2dFileLabel m_label;
 
   const static kuint16 m_signature;
index 422b6c98b8477b7ba34ded09a61da4e063efe2ee..70c2ca6f28aafd88dbad4ded7fd64fb14cc95ca5 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: reconstruct.h,v 1.1 2000/09/02 05:13:57 kevin Exp $
+**  $Id: reconstruct.h,v 1.2 2000/12/16 06:12:47 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
 **
 **  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
@@ -43,7 +43,7 @@ public:
     ~Reconstructor ();
 
     bool fail() const {return m_bFail;}
     ~Reconstructor ();
 
     bool fail() const {return m_bFail;}
-    const string& failMessage() const {return m_strFailMessage;}
+    const std::string& failMessage() const {return m_strFailMessage;}
     
     void plotFilter (SGP* pSGP = NULL);
 
     
     void plotFilter (SGP* pSGP = NULL);
 
@@ -60,7 +60,7 @@ public:
     int m_iTrace;
 
     bool m_bFail;
     int m_iTrace;
 
     bool m_bFail;
-    string m_strFailMessage;
+    std::string m_strFailMessage;
 
     double* m_adPlotXAxis;
 };
 
     double* m_adPlotXAxis;
 };
index 174d83b00486b602156e6f60c2b5213103571450..36b3b759db29c7dae3469a5f729d9dd64accd72c 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: sgp.h,v 1.21 2000/12/06 15:17:51 kevin Exp $
+**  $Id: sgp.h,v 1.22 2000/12/16 06:12:47 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
 **
 **  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
@@ -47,13 +47,12 @@ extern "C" {
 #endif
 
 #include <string>
 #endif
 
 #include <string>
-using namespace std;
 
 class SGPDriver {
 private:
   int m_iPhysicalXSize;
   int m_iPhysicalYSize;
 
 class SGPDriver {
 private:
   int m_iPhysicalXSize;
   int m_iPhysicalYSize;
-  string m_sWindowTitle;
+  std::string m_sWindowTitle;
   int m_idDriver;
 
 #ifdef HAVE_WXWINDOWS
   int m_idDriver;
 
 #ifdef HAVE_WXWINDOWS
@@ -82,7 +81,7 @@ public:
   int getPhysicalYSize () const
     { return m_iPhysicalYSize; }
 
   int getPhysicalYSize () const
     { return m_iPhysicalYSize; }
 
-  const string& getWindowTitle () const
+  const std::string& getWindowTitle () const
     { return m_sWindowTitle; }
 
   bool isWX () const
     { return m_sWindowTitle; }
 
   bool isWX () const
@@ -184,7 +183,7 @@ public:
   void lineRel(double x, double y);
   void moveRel(double x, double y);
   void drawText(const char *szMessage);
   void lineRel(double x, double y);
   void moveRel(double x, double y);
   void drawText(const char *szMessage);
-  void drawText(const string& rsMessage);
+  void drawText(const std::string& rsMessage);
   void polylineAbs(double x[], double y[], int n);
   void markerAbs (double x, double y);
   void markerRel(double x, double y);
   void polylineAbs(double x[], double y[], int n);
   void markerAbs (double x, double y);
   void markerRel(double x, double y);
index 8d7b516bb3dd495c98932cebdbe99437f39e4881..14c0a5b29f86aea97db1da7653c3c1b9a36d4e0e 100644 (file)
@@ -6,7 +6,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ezplot.cpp,v 1.16 2000/12/06 01:46:43 kevin Exp $
+**  $Id: ezplot.cpp,v 1.17 2000/12/16 06:12:47 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
 **
 **  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
@@ -37,7 +37,7 @@ static const double DEF_CHARWIDTH = (1./80.); // size of characters in NDC
 static const int DEF_CURVE_CLR = C_RED;
 
 
 static const int DEF_CURVE_CLR = C_RED;
 
 
-EZPlotCurve::EZPlotCurve (const double* xData, const double* yData, int n, int color, int linestyle, int symbol, int symfreq, const string& legend)
+EZPlotCurve::EZPlotCurve (const double* xData, const double* yData, int n, int color, int linestyle, int symbol, int symfreq, const std::string& legend)
   : x(NULL), y(NULL), m_sLegend (legend)
 {
   x = new double [n];
   : x(NULL), y(NULL), m_sLegend (legend)
 {
   x = new double [n];
index 3626555c86f0e67d0fc0aad46a503a8326324fae..ad33f758cda20e764a55cc52909ad788c8feaa6b 100644 (file)
@@ -7,7 +7,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: sgp.cpp,v 1.17 2000/12/06 01:46:43 kevin Exp $
+**  $Id: sgp.cpp,v 1.18 2000/12/16 06:12:47 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
 **
 **  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
@@ -596,7 +596,7 @@ SGP::pointRel (double x, double y)
 
 
 void
 
 
 void
-SGP::drawText (const string& rsMessage)
+SGP::drawText (const std::string& rsMessage)
 {
   drawText (rsMessage.c_str());
 }
 {
   drawText (rsMessage.c_str());
 }
index b3dc43263beaf1a54e01455126a907a31a614960..6c400ad77f35ebae4c1a5ab5f1dddc368433c743 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: array2dfile.cpp,v 1.20 2000/12/16 02:44:26 kevin Exp $
+**  $Id: array2dfile.cpp,v 1.21 2000/12/16 06:12:47 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
 **
 **  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
@@ -31,7 +31,6 @@
 typedef long off_t;\r
 #endif
 
 typedef long off_t;\r
 #endif
 
-using namespace std;
 
 const kuint16 Array2dFile::m_signature = ('I'*256+'F');
 
 
 const kuint16 Array2dFile::m_signature = ('I'*256+'F');
 
@@ -106,7 +105,7 @@ Array2dFileLabel::getDateTime (int& year, int& month, int& day, int& hour, int&
   second = m_second;
 }
 
   second = m_second;
 }
 
-const string& 
+const std::string& 
 Array2dFileLabel::getDateString (void) const
 {
   char szDate [128];\r
 Array2dFileLabel::getDateString (void) const
 {
   char szDate [128];\r
@@ -142,16 +141,16 @@ void
 Array2dFileLabel::print (std::ostream& os) const
 {
   if (m_labelType == L_HISTORY) {
 Array2dFileLabel::print (std::ostream& os) const
 {
   if (m_labelType == L_HISTORY) {
-    os << "History: " << endl;
-    os << "  " << m_strLabel << endl;
-    os << "  calc time = " << m_calcTime << " secs" << endl;
-    os << "  Timestamp = " << getDateString() << endl;
+         os << "History: " << std::endl;
+    os << "  " << m_strLabel << std::endl;
+    os << "  calc time = " << m_calcTime << " secs" << std::endl;
+    os << "  Timestamp = " << getDateString() << std::endl;
   } else if (m_labelType == L_USER) {
   } else if (m_labelType == L_USER) {
-    os << "Note: " <<  m_strLabel << endl;
-    os << "  Timestamp = %s" << getDateString() << endl;
+    os << "Note: " <<  m_strLabel << std::endl;
+    os << "  Timestamp = %s" << getDateString() << std::endl;
   } else {
   } else {
-    os << "Unknown (" << m_labelType << "): " <<  m_strLabel << endl;
-    os << "  Timestamp = %s" << getDateString() << endl;
+    os << "Unknown (" << m_labelType << "): " <<  m_strLabel << std::endl;
+    os << "  Timestamp = %s" << getDateString() << std::endl;
   }
 }
 
   }
 }
 
@@ -242,7 +241,7 @@ Array2dFile::freeArray (void)
 }
 
 bool
 }
 
 bool
-Array2dFile::fileWrite (const string& filename)
+Array2dFile::fileWrite (const std::string& filename)
 {
   return fileWrite (filename.c_str());
 }
 {
   return fileWrite (filename.c_str());
 }
@@ -252,7 +251,7 @@ Array2dFile::fileWrite (const char* const filename)
 {
     m_filename = filename;
 
 {
     m_filename = filename;
 
-    frnetorderstream fs (m_filename.c_str(), ios::out | ios::in | ios::trunc | ios::binary);
+    frnetorderstream fs (m_filename.c_str(), std::ios::out | std::ios::in | std::ios::trunc | std::ios::binary);
     if (fs.fail()) {
        sys_error (ERR_WARNING, "Error opening file %s for writing [fileCreate]", m_filename.c_str());
       return false;
     if (fs.fail()) {
        sys_error (ERR_WARNING, "Error opening file %s for writing [fileCreate]", m_filename.c_str());
       return false;
@@ -270,7 +269,7 @@ Array2dFile::fileWrite (const char* const filename)
 }
 
 bool
 }
 
 bool
-Array2dFile::fileRead (const string& filename)
+Array2dFile::fileRead (const std::string& filename)
 {
   return fileRead (filename.c_str());
 }
 {
   return fileRead (filename.c_str());
 }
@@ -281,9 +280,9 @@ Array2dFile::fileRead (const char* const filename)
     m_filename = filename;
 
 #ifdef MSVC\r
     m_filename = filename;
 
 #ifdef MSVC\r
-    frnetorderstream fs (m_filename.c_str(), ios::out | ios::in | ios::binary);\r
+    frnetorderstream fs (m_filename.c_str(), std::ios::out | std::ios::in | std::ios::binary);\r
 #else\r
 #else\r
-    frnetorderstream fs (m_filename.c_str(), ios::out | ios::in | ios::binary | ios::nocreate);\r
+    frnetorderstream fs (m_filename.c_str(), std::ios::out | std::ios::in | std::ios::binary | std::ios::nocreate);\r
 #endif\r
     if (fs.fail()) {
       sys_error (ERR_WARNING, "Unable to open file %s [fileRead]", m_filename.c_str());
 #endif\r
     if (fs.fail()) {
       sys_error (ERR_WARNING, "Unable to open file %s [fileRead]", m_filename.c_str());
@@ -557,12 +556,12 @@ Array2dFile::labelAdd (const Array2dFileLabel& label)
 void
 Array2dFile::labelsCopy (Array2dFile& copyFile, const char* const pszId)
 {
 void
 Array2dFile::labelsCopy (Array2dFile& copyFile, const char* const pszId)
 {
-    string id;
+       std::string id;
     if (pszId)
       id = pszId;
     for (unsigned int i = 0; i < copyFile.getNumLabels(); i++) {
       Array2dFileLabel l (copyFile.labelGet (i));
     if (pszId)
       id = pszId;
     for (unsigned int i = 0; i < copyFile.getNumLabels(); i++) {
       Array2dFileLabel l (copyFile.labelGet (i));
-      string lstr = l.getLabelString();
+         std::string lstr = l.getLabelString();
       lstr = id + lstr;
       l.setLabelString (lstr);
       labelAdd (l);
       lstr = id + lstr;
       l.setLabelString (lstr);
       labelAdd (l);
@@ -580,13 +579,13 @@ Array2dFile::arrayDataClear (void)
 }
 
 void
 }
 
 void
-Array2dFile::printLabels (ostream& os) const
+Array2dFile::printLabels (std::ostream& os) const
 {
     for (constLabelIterator l = m_labels.begin(); l != m_labels.end(); l++) {
       const Array2dFileLabel& label = **l;
 
       label.print (os);
 {
     for (constLabelIterator l = m_labels.begin(); l != m_labels.end(); l++) {
       const Array2dFileLabel& label = **l;
 
       label.print (os);
-      os << endl;
+      os << std::endl;
     }
 }
 
     }
 }
 
index 0d3cd804892ec01ed3b8e5299122fbfd9781b6de..4e82edd0c03858be6b3eb564e0edbfd403bec27e 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: backprojectors.cpp,v 1.18 2000/12/06 15:17:51 kevin Exp $
+**  $Id: backprojectors.cpp,v 1.19 2000/12/16 06:12:47 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
 **
 **  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
@@ -301,7 +301,7 @@ void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, doubl
 void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int iDetPos)
 {\r
 #if 1
 void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int iDetPos)
 {\r
 #if 1
-  ostringstream os;
+  std::ostringstream os;
   os << "ix=" << ix << ", iy=" << iy << ", theta=" << theta << ", L=" << L << ", detinc=" << detInc << "\n";
   os << "ndet=" << nDet << ", detInc=" << detInc << ", iDetCenter=" << iDetCenter << "\n";
   os << "xMin=" << xMin << ", xMax=" << xMax << ", xInc=" << xInc << "\n";
   os << "ix=" << ix << ", iy=" << iy << ", theta=" << theta << ", L=" << L << ", detinc=" << detInc << "\n";
   os << "ndet=" << nDet << ", detInc=" << detInc << ", iDetCenter=" << iDetCenter << "\n";
   os << "xMin=" << xMin << ", xMax=" << xMax << ", xInc=" << xInc << "\n";
index a751573aef3e35ab0ee60b80c7c37d603228966b..81de74181519a27e93db82c9d4eac71748b5bd2b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: imagefile.cpp,v 1.19 2000/12/16 02:44:26 kevin Exp $
+**  $Id: imagefile.cpp,v 1.20 2000/12/16 06:12:47 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
 **
 **  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
@@ -193,14 +193,14 @@ ImageFile::comparativeStatistics (const ImageFile& imComp, double& d, double& r,
 
 
 bool
 
 
 bool
-ImageFile::printComparativeStatistics (const ImageFile& imComp, ostream& os) const
+ImageFile::printComparativeStatistics (const ImageFile& imComp, std::ostream& os) const
 {
   double d, r, e;
 
   if (comparativeStatistics (imComp, d, r, e)) {
 {
   double d, r, e;
 
   if (comparativeStatistics (imComp, d, r, e)) {
-    os << "  Normalized root mean squared distance (d): " << d << endl;
-    os << "      Normalized mean absolute distance (r): " << r << endl;
-    os << "Worst case distance (2x2 pixel average) (e): " << e << endl;
+         os << "  Normalized root mean squared distance (d): " << d << std::endl;
+         os << "      Normalized mean absolute distance (r): " << r << std::endl;
+         os << "Worst case distance (2x2 pixel average) (e): " << e << std::endl;
     return true;
   }
   return false;
     return true;
   }
   return false;
@@ -208,18 +208,18 @@ ImageFile::printComparativeStatistics (const ImageFile& imComp, ostream& os) con
 
 
 void
 
 
 void
-ImageFile::printStatistics (ostream& os) const
+ImageFile::printStatistics (std::ostream& os) const
 {
     double min, max, mean, mode, median, stddev;
 
     statistics (min, max, mean, mode, median, stddev);
 
 {
     double min, max, mean, mode, median, stddev;
 
     statistics (min, max, mean, mode, median, stddev);
 
-    os << "   min: " << min << endl;
-    os << "   max: " << max << endl;
-    os << "  mean: " << mean << endl;
-    os << "  mode: " << mode << endl;
-    os << "median: " << median << endl;
-    os << "stddev: " << stddev << endl;
+    os << "   min: " << min << std::endl;
+    os << "   max: " << max << std::endl;
+    os << "  mean: " << mean << std::endl;
+    os << "  mode: " << mode << std::endl;
+    os << "median: " << median << std::endl;
+    os << "stddev: " << stddev << std::endl;
 }
 
 
 }
 
 
@@ -274,12 +274,12 @@ ImageFile::statistics (double& min, double& max, double& mean, double& mode, dou
     mode = (max_binindex * spread / (nbin - 1)) + min;
 
     int nPixels = nx * ny;
     mode = (max_binindex * spread / (nbin - 1)) + min;
 
     int nPixels = nx * ny;
-    list<double> vecImage;
+       std::list<double> vecImage;
     for (int ix5 = 0; ix5 < nx; ix5++)
       for (int iy = 0; iy < ny; iy++)
        vecImage.push_front (v[ix5][iy]);
     vecImage.sort();
     for (int ix5 = 0; ix5 < nx; ix5++)
       for (int iy = 0; iy < ny; iy++)
        vecImage.push_front (v[ix5][iy]);
     vecImage.sort();
-    list<double>::const_iterator iter = vecImage.begin();
+       std::list<double>::const_iterator iter = vecImage.begin();
     for (int i = 0; i < (nPixels / 2) - 1; i++)
       iter++; // Advance iterator to (nPixels / 2) - 1;
 
     for (int i = 0; i < (nPixels / 2) - 1; i++)
       iter++; // Advance iterator to (nPixels / 2) - 1;
 
index 6e3537dbe4757fd1e787e94d8ad08e697e0fcfdd..e6d4a6299fad95ee07d0af777f2c62ee2219247b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phantom.cpp,v 1.21 2000/12/06 01:46:43 kevin Exp $
+**  $Id: phantom.cpp,v 1.22 2000/12/16 06:12:47 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
 **
 **  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
@@ -311,7 +311,7 @@ Phantom::show () const
 
   show (sgp);
 
 
   show (sgp);
 
-  cout << "Press return to continue";
+  std::cout << "Press return to continue";
   cio_kb_getc();
 }
 
   cio_kb_getc();
 }
 
index cd44cf834d8bd0d2b776c1a0a48f958229114329..7bf2711f0a626190dd01fa297d478b0d5c1a1431 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: procsignal.cpp,v 1.9 2000/12/16 02:44:26 kevin Exp $
+**  $Id: procsignal.cpp,v 1.10 2000/12/16 06:12:47 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
 **
 **  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
@@ -256,7 +256,7 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
        m_nFilterPoints = 1 << nextPowerOf2;
 #ifdef DEBUG
        if (m_traceLevel >= Trace::TRACE_CONSOLE)
        m_nFilterPoints = 1 << nextPowerOf2;
 #ifdef DEBUG
        if (m_traceLevel >= Trace::TRACE_CONSOLE)
-         cout << "nFilterPoints = " << m_nFilterPoints << endl;
+               std::cout << "nFilterPoints = " << m_nFilterPoints << endl;
 #endif
       }
       m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
 #endif
       }
       m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
@@ -333,7 +333,7 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
       m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
 #ifdef DEBUG
       if (m_traceLevel >= Trace::TRACE_CONSOLE)
       m_nOutputPoints = m_nFilterPoints * m_iPreinterpolationFactor;
 #ifdef DEBUG
       if (m_traceLevel >= Trace::TRACE_CONSOLE)
-       cout << "nFilterPoints = " << m_nFilterPoints << endl;
+                 std::cout << "nFilterPoints = " << m_nFilterPoints << endl;
 #endif
       double* adSpatialFilter = new double [m_nFilterPoints];\r
       SignalFilter filter (m_idFilter, m_dFilterMin, m_dFilterMax, nSpatialPoints, m_dBandwidth, m_dFilterParam, SignalFilter::DOMAIN_SPATIAL);
 #endif
       double* adSpatialFilter = new double [m_nFilterPoints];\r
       SignalFilter filter (m_idFilter, m_dFilterMin, m_dFilterMax, nSpatialPoints, m_dBandwidth, m_dFilterParam, SignalFilter::DOMAIN_SPATIAL);
@@ -369,11 +369,11 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
        adSpatialFilter[i] = 0;
 
       m_adFilter = new double [m_nFilterPoints];
        adSpatialFilter[i] = 0;
 
       m_adFilter = new double [m_nFilterPoints];
-      complex<double>* acInverseFilter = new complex<double> [m_nFilterPoints];\r
+      std::complex<double>* acInverseFilter = new std::complex<double> [m_nFilterPoints];\r
       finiteFourierTransform (adSpatialFilter, acInverseFilter, m_nFilterPoints, 1);
        delete adSpatialFilter;\r
        for (i = 0; i < m_nFilterPoints; i++)
       finiteFourierTransform (adSpatialFilter, acInverseFilter, m_nFilterPoints, 1);
        delete adSpatialFilter;\r
        for (i = 0; i < m_nFilterPoints; i++)
-         m_adFilter[i] = abs(acInverseFilter[i]) * m_dSignalInc;
+               m_adFilter[i] = std::abs(acInverseFilter[i]) * m_dSignalInc;
        delete acInverseFilter;\r
 #ifdef HAVE_SGP
       if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) {
        delete acInverseFilter;\r
 #ifdef HAVE_SGP
       if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) {
@@ -552,7 +552,7 @@ ProcessSignal::filterSignal (const float constInput[], double output[]) const
       inputSignal[i] = input[i];
     for (i = m_nSignalPoints; i < m_nFilterPoints; i++)
       inputSignal[i] = 0;  // zeropad
       inputSignal[i] = input[i];
     for (i = m_nSignalPoints; i < m_nFilterPoints; i++)
       inputSignal[i] = 0;  // zeropad
-    complex<double>* fftSignal = new complex<double> [m_nFilterPoints];
+    std::complex<double>* fftSignal = new std::complex<double> [m_nFilterPoints];
     finiteFourierTransform (inputSignal, fftSignal, m_nFilterPoints, -1);\r
        delete inputSignal;
     for (i = 0; i < m_nFilterPoints; i++)
     finiteFourierTransform (inputSignal, fftSignal, m_nFilterPoints, -1);\r
        delete inputSignal;
     for (i = 0; i < m_nFilterPoints; i++)
@@ -569,7 +569,7 @@ ProcessSignal::filterSignal (const float constInput[], double output[]) const
       inputSignal[i] = input[i];
     for (i = m_nSignalPoints; i < m_nFilterPoints; i++)
       inputSignal[i] = 0;  // zeropad
       inputSignal[i] = input[i];
     for (i = m_nSignalPoints; i < m_nFilterPoints; i++)
       inputSignal[i] = 0;  // zeropad
-    complex<double>* fftSignal = new complex<double> [m_nFilterPoints];
+    std::complex<double>* fftSignal = new std::complex<double> [m_nFilterPoints];
     finiteFourierTransform (inputSignal, fftSignal, -1);\r
        delete inputSignal;
     for (i = 0; i < m_nFilterPoints; i++)
     finiteFourierTransform (inputSignal, fftSignal, -1);\r
        delete inputSignal;
     for (i = 0; i < m_nFilterPoints; i++)
@@ -686,7 +686,7 @@ for (int i = 0; i < np; i++)
 void
 ProcessSignal::finiteFourierTransform (const double input[], double output[], const int n, int direction)
 {
 void
 ProcessSignal::finiteFourierTransform (const double input[], double output[], const int n, int direction)
 {
-    complex<double>* complexOutput = new complex<double> [n];
+    std::complex<double>* complexOutput = new std::complex<double> [n];
 
     finiteFourierTransform (input, complexOutput, n, direction);
     for (int i = 0; i < n; i++)
 
     finiteFourierTransform (input, complexOutput, n, direction);
     for (int i = 0; i < n; i++)
@@ -695,7 +695,7 @@ ProcessSignal::finiteFourierTransform (const double input[], double output[], co
 }
 
 void
 }
 
 void
-ProcessSignal::finiteFourierTransform (const double input[], complex<double> output[], const int n, int direction)
+ProcessSignal::finiteFourierTransform (const double input[], std::complex<double> output[], const int n, int direction)
 {
   if (direction < 0)
     direction = -1;
 {
   if (direction < 0)
     direction = -1;
@@ -715,13 +715,13 @@ ProcessSignal::finiteFourierTransform (const double input[], complex<double> out
       sumReal /= n;
       sumImag /= n;
     }
       sumReal /= n;
       sumImag /= n;
     }
-    output[i] = complex<double> (sumReal, sumImag);
+    output[i] = std::complex<double> (sumReal, sumImag);
   }
 }
 
 
 void
   }
 }
 
 
 void
-ProcessSignal::finiteFourierTransform (const complex<double> input[], complex<double> output[], const int n, int direction)
+ProcessSignal::finiteFourierTransform (const std::complex<double> input[], std::complex<double> output[], const int n, int direction)
 {
   if (direction < 0)
     direction = -1;
 {
   if (direction < 0)
     direction = -1;
@@ -730,10 +730,10 @@ ProcessSignal::finiteFourierTransform (const complex<double> input[], complex<do
     
   double angleIncrement = direction * 2 * PI / n;
   for (int i = 0; i < n; i++) {
     
   double angleIncrement = direction * 2 * PI / n;
   for (int i = 0; i < n; i++) {
-    complex<double> sum (0,0);
+    std::complex<double> sum (0,0);
     for (int j = 0; j < n; j++) {
       double angle = i * j * angleIncrement;
     for (int j = 0; j < n; j++) {
       double angle = i * j * angleIncrement;
-      complex<double> exponentTerm (cos(angle), sin(angle));
+      std::complex<double> exponentTerm (cos(angle), sin(angle));
       sum += input[j] * exponentTerm;
     }
     if (direction < 0) {
       sum += input[j] * exponentTerm;
     }
     if (direction < 0) {
@@ -744,7 +744,7 @@ ProcessSignal::finiteFourierTransform (const complex<double> input[], complex<do
 }
 
 void
 }
 
 void
-ProcessSignal::finiteFourierTransform (const complex<double> input[], double output[], const int n, int direction)
+ProcessSignal::finiteFourierTransform (const std::complex<double> input[], double output[], const int n, int direction)
 {
   if (direction < 0)
     direction = -1;
 {
   if (direction < 0)
     direction = -1;
@@ -768,7 +768,7 @@ ProcessSignal::finiteFourierTransform (const complex<double> input[], double out
 // Table-based routines
 
 void
 // Table-based routines
 
 void
-ProcessSignal::finiteFourierTransform (const double input[], complex<double> output[], int direction) const
+ProcessSignal::finiteFourierTransform (const double input[], std::complex<double> output[], int direction) const
 {
   if (direction < 0)
     direction = -1;
 {
   if (direction < 0)
     direction = -1;
@@ -791,13 +791,13 @@ ProcessSignal::finiteFourierTransform (const double input[], complex<double> out
       sumReal /= m_nFilterPoints;
       sumImag /= m_nFilterPoints;
     }
       sumReal /= m_nFilterPoints;
       sumImag /= m_nFilterPoints;
     }
-    output[i] = complex<double> (sumReal, sumImag);
+    output[i] = std::complex<double> (sumReal, sumImag);
   }
 }
 
 // (a+bi) * (c + di) = (ac - bd) + (ad + bc)i
 void
   }
 }
 
 // (a+bi) * (c + di) = (ac - bd) + (ad + bc)i
 void
-ProcessSignal::finiteFourierTransform (const complex<double> input[], complex<double> output[], int direction) const
+ProcessSignal::finiteFourierTransform (const std::complex<double> input[], std::complex<double> output[], int direction) const
 {
   if (direction < 0)
     direction = -1;
 {
   if (direction < 0)
     direction = -1;
@@ -824,12 +824,12 @@ ProcessSignal::finiteFourierTransform (const complex<double> input[], complex<do
       sumReal /= m_nFilterPoints;
       sumImag /= m_nFilterPoints;
     }
       sumReal /= m_nFilterPoints;
       sumImag /= m_nFilterPoints;
     }
-    output[i] = complex<double> (sumReal, sumImag);
+    output[i] = std::complex<double> (sumReal, sumImag);
   }
 }
 
 void
   }
 }
 
 void
-ProcessSignal::finiteFourierTransform (const complex<double> input[], double output[], int direction) const
+ProcessSignal::finiteFourierTransform (const std::complex<double> input[], double output[], int direction) const
 {
   if (direction < 0)
     direction = -1;
 {
   if (direction < 0)
     direction = -1;
index 42cc23ccfadd7a308e47c990b42774a891232bd6..edbed03dc8ecbea37166d9ebde3589a16f036053 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: projections.cpp,v 1.31 2000/12/16 02:54:47 kevin Exp $
+**  $Id: projections.cpp,v 1.32 2000/12/16 06:12:47 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
 **
 **  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
@@ -91,7 +91,7 @@ Projections::initFromScanner (const Scanner& scanner)
 #if 0
   if (m_geometry == Scanner::GEOMETRY_EQUILINEAR) {
     m_detInc /= 2;
 #if 0
   if (m_geometry == Scanner::GEOMETRY_EQUILINEAR) {
     m_detInc /= 2;
-    cout << "Kludge: detInc /= 2 in Projections::initFromScanner" << endl;
+       std::cout << "Kludge: detInc /= 2 in Projections::initFromScanner" << endl;
   }
 #endif
 }
   }
 #endif
 }
@@ -298,7 +298,7 @@ Projections::headerRead (fnetorderstream& fs)
 }
 
 bool
 }
 
 bool
-Projections::read (const string& filename)
+Projections::read (const std::string& filename)
 {
   return read (filename.c_str());
 }
 {
   return read (filename.c_str());
 }
@@ -330,13 +330,13 @@ Projections::read (const char* filename)
 
 
 bool 
 
 
 bool 
-Projections::copyViewData (const string& filename, ostream& os, int startView, int endView)
+Projections::copyViewData (const std::string& filename, std::ostream& os, int startView, int endView)
 {
     return copyViewData (filename.c_str(), os, startView, endView);
 }
 
 bool 
 {
     return copyViewData (filename.c_str(), os, startView, endView);
 }
 
 bool 
-Projections::copyViewData (const char* const filename, ostream& os, int startView, int endView)
+Projections::copyViewData (const char* const filename, std::ostream& os, int startView, int endView)
 {
   frnetorderstream is (filename, ios::in | ios::binary);
   kuint16 sizeHeader, signature;
 {
   frnetorderstream is (filename, ios::in | ios::binary);
   kuint16 sizeHeader, signature;
@@ -388,15 +388,15 @@ Projections::copyViewData (const char* const filename, ostream& os, int startVie
 }
 
 bool 
 }
 
 bool 
-Projections::copyHeader (const string& filename, ostream& os)
+Projections::copyHeader (const std::string& filename, std::ostream& os)
 {
     return copyHeader (filename.c_str(), os);
 }
 
 bool
 {
     return copyHeader (filename.c_str(), os);
 }
 
 bool
-Projections::copyHeader (const char* const filename, ostream& os)
+Projections::copyHeader (const char* const filename, std::ostream& os)
 {
 {
-  frnetorderstream is (filename, ios::in | ios::binary);
+  frnetorderstream is (filename, std::ios::in | std::ios::binary);
   kuint16 sizeHeader, signature;
   is.readInt16 (sizeHeader);
   is.readInt16 (signature);
   kuint16 sizeHeader, signature;
   is.readInt16 (sizeHeader);
   is.readInt16 (signature);
@@ -423,7 +423,7 @@ Projections::copyHeader (const char* const filename, ostream& os)
 }
 
 bool
 }
 
 bool
-Projections::write (const string& filename)
+Projections::write (const std::string& filename)
 {
   return write (filename.c_str());
 }
 {
   return write (filename.c_str());
 }
@@ -431,7 +431,7 @@ Projections::write (const string& filename)
 bool
 Projections::write (const char* filename)
 {
 bool
 Projections::write (const char* filename)
 {
-  frnetorderstream fs (filename, ios::out | ios::binary | ios::trunc | ios::ate);
+  frnetorderstream fs (filename, std::ios::out | std::ios::binary | std::ios::trunc | std::ios::ate);
   m_filename = filename;
   if (! fs) {
     sys_error (ERR_SEVERE, "Error opening file %s for output [projections_create]", filename);
   m_filename = filename;
   if (! fs) {
     sys_error (ERR_SEVERE, "Error opening file %s for output [projections_create]", filename);
@@ -591,7 +591,7 @@ Projections::printProjectionData (int startView, int endView)
 }
 
 void 
 }
 
 void 
-Projections::printScanInfo (ostringstream& os) const
+Projections::printScanInfo (std::ostringstream& os) const
 {
   os << "Number of detectors: " << m_nDet << "\n";
   os << "    Number of views: " << m_nView<< "\n";
 {
   os << "Number of detectors: " << m_nDet << "\n";
   os << "    Number of views: " << m_nView<< "\n";
index 591aed28282888f9441c2e190b1a5a38093740d5..7a27208597d1be2f515dd64ffc4ac23c20355814 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: reconstruct.cpp,v 1.3 2000/12/16 02:44:26 kevin Exp $
+**  $Id: reconstruct.cpp,v 1.4 2000/12/16 06:12:47 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
 **
 **  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
@@ -147,7 +147,7 @@ Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP)
       
   for (int iView = iStartView; iView < (iStartView + iViewCount); iView++)  {
     if (m_iTrace == Trace::TRACE_CONSOLE) 
       
   for (int iView = iStartView; iView < (iStartView + iViewCount); iView++)  {
     if (m_iTrace == Trace::TRACE_CONSOLE) 
-      cout <<"Reconstructing view " << iView << " (last = " << m_rProj.nView() - 1 << ")\n";
+               std::cout <<"Reconstructing view " << iView << " (last = " << m_rProj.nView() - 1 << ")\n";
       
     const DetectorArray& rDetArray = m_rProj.getDetectorArray (iView);
     const DetectorValue* detval = rDetArray.detValues();
       
     const DetectorArray& rDetArray = m_rProj.getDetectorArray (iView);
     const DetectorValue* detval = rDetArray.detValues();
index cf6c78cf8a8a55e99f3985e1ef9b3381ca39c2b0..59bcf943fa1eefd17fdbd1a74b8dae5c5bdf4330 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: scanner.cpp,v 1.19 2000/12/16 02:44:26 kevin Exp $
+**  $Id: scanner.cpp,v 1.20 2000/12/16 06:12:47 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
 **
 **  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
@@ -365,7 +365,7 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iS
       traceShowParam ("Current View:", "%d (%.0f%%)", PROJECTION_TRACE_ROW_CURR_VIEW, C_RED, iView + iStartView, (iView + iStartView) / static_cast<double>(m_nView) * 100.);
 #endif
     if (m_trace == Trace::TRACE_CONSOLE)
       traceShowParam ("Current View:", "%d (%.0f%%)", PROJECTION_TRACE_ROW_CURR_VIEW, C_RED, iView + iStartView, (iView + iStartView) / static_cast<double>(m_nView) * 100.);
 #endif
     if (m_trace == Trace::TRACE_CONSOLE)
-       cout << "Current View: " << iView+iStartView << endl;
+               std::cout << "Current View: " << iView+iStartView << std::endl;
 
     projectSingleView (phm, detArray, xd1, yd1, xd2, yd2, xs1, ys1, xs2, ys2, viewAngle + 3 * HALFPI);
     detArray.setViewAngle (viewAngle);
 
     projectSingleView (phm, detArray, xd1, yd1, xd2, yd2, xs1, ys1, xs2, ys2, viewAngle + 3 * HALFPI);
     detArray.setViewAngle (viewAngle);
index 02266ae87557246f033de43fac146a6879f6e59d..99e1caa85f6313fe33250f192939d6c5aecf149a 100644 (file)
@@ -2,7 +2,7 @@
 
 // Work around bug in VC6
 #ifdef MSVC
 
 // Work around bug in VC6
 #ifdef MSVC
-const  struct fpos_t std::_Fpz = {0, 0};
+const  fpos_t std::_Fpz = 0;
 #endif
 
 \r
 #endif
 
 \r
index d07eb2b3bb5ffd5e0a3a2ca60b64f290bfc133ef..95894c15a0b1f1eac2634e1e8068036a50c3a4d3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.15 2000/12/16 03:39:06 kevin Exp $
+**  $Id: ctsim.cpp,v 1.16 2000/12/16 06:12:47 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
 **
 **  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
 **  along with this program; if not, write to the Free Software
 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ******************************************************************************/
 **  along with this program; if not, write to the Free Software
 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ******************************************************************************/
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#if !wxUSE_DOC_VIEW_ARCHITECTURE
-#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h!
-#endif
-
-#include "wx/docview.h"
+\r
+\r
+// For compilers that support precompilation, includes "wx/wx.h".\r
+#include "wx/wxprec.h"\r
+\r
+#ifdef __BORLANDC__\r
+#pragma hdrstop\r
+#endif\r
+\r
+#ifndef WX_PRECOMP\r
+#include "wx/wx.h"\r
+#endif\r
+\r
+#if !wxUSE_DOC_VIEW_ARCHITECTURE\r
+#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h!\r
+#endif\r
+\r
+#include "ct.h"\r
 #include "ctsim.h"
 #include "docs.h"
 #include "views.h"
 #include "dialogs.h"
 #include "ctsim.h"
 #include "docs.h"
 #include "views.h"
 #include "dialogs.h"
-#include "ctsupport.h"
+\r
 #if defined(HAVE_CONFIG_H)
 #include "config.h"
 #if defined(HAVE_CONFIG_H)
 #include "config.h"
-#endif
+#endif\r
+\r
 #if defined(HAVE_GETOPT_H) || defined(HAVE_GETOPT_LONG)
 #ifdef MSVC\r
 #define __STDC__ 1\r
 #if defined(HAVE_GETOPT_H) || defined(HAVE_GETOPT_LONG)
 #ifdef MSVC\r
 #define __STDC__ 1\r
+#endif\r
 #include "getopt.h"\r
 #include "getopt.h"\r
+#ifdef MSVC\r
 #undef __STDC__\r
 #endif
 #endif
 #undef __STDC__\r
 #endif
 #endif
-
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.15 2000/12/16 03:39:06 kevin Exp $";
+\r
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.16 2000/12/16 06:12:47 kevin Exp $";
 
 class CTSimApp* theApp = NULL;
 
 
 class CTSimApp* theApp = NULL;
 
index 62d97c28a7c22ca5a822d9b36ce63d382d466d0a..976de33b0e45be61dd9bf776fd1ce3075b609201 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.h,v 1.7 2000/12/16 03:29:02 kevin Exp $
+**  $Id: ctsim.h,v 1.8 2000/12/16 06:12:47 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
 **
 **  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
@@ -28,7 +28,6 @@
 #ifndef __CTSIMH__
 #define __CTSIMH__
 
 #ifndef __CTSIMH__
 #define __CTSIMH__
 
-#include "wx/docview.h"
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -38,6 +37,7 @@
 
 class wxMenu;
 class wxDocument;
 
 class wxMenu;
 class wxDocument;
+#include "wx/docview.h"\r
 
 // Define a new frame for main window
 class MainFrame: public wxDocParentFrame
 
 // Define a new frame for main window
 class MainFrame: public wxDocParentFrame
index 87542a9e64e6f8208f90e77b388210e12dac7614..6f55dea0b324cc275549728745ac13202420491b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dialogs.cpp,v 1.14 2000/12/16 03:29:02 kevin Exp $
+**  $Id: dialogs.cpp,v 1.15 2000/12/16 06:12:47 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
 **
 **  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
@@ -122,10 +122,10 @@ DialogGetImageMinMax::DialogGetImageMinMax (wxFrame* pParent, const ImageFile& r
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
-  ostringstream os;
+  std::ostringstream os;
   os << dDefaultMin;
   m_pTextCtrlMin = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   os << dDefaultMin;
   m_pTextCtrlMin = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osMax;
+  std::ostringstream osMax;
   osMax << dDefaultMax;
   m_pTextCtrlMax = new wxTextCtrl (this, -1, osMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
 
   osMax << dDefaultMax;
   m_pTextCtrlMax = new wxTextCtrl (this, -1, osMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
 
@@ -198,13 +198,13 @@ DialogGetRasterParameters::DialogGetRasterParameters (wxFrame* pParent, int iDef
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
-  ostringstream os;
+  std::ostringstream os;
   os << iDefaultXSize;
   m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   os << iDefaultXSize;
   m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osYSize;
+  std::ostringstream osYSize;
   osYSize << iDefaultYSize;
   m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   osYSize << iDefaultYSize;
   m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osNSamples;
+  std::ostringstream osNSamples;
   osNSamples << iDefaultNSamples;
   m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
 
   osNSamples << iDefaultNSamples;
   m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
 
@@ -299,22 +299,22 @@ DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent,
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
-  ostringstream os;
+  std::ostringstream os;
   os << iDefaultNDet;
   m_pTextCtrlNDet = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   os << iDefaultNDet;
   m_pTextCtrlNDet = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osNView;
+  std::ostringstream osNView;
   osNView << iDefaultNView;
   m_pTextCtrlNView = new wxTextCtrl (this, -1, osNView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   osNView << iDefaultNView;
   m_pTextCtrlNView = new wxTextCtrl (this, -1, osNView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osNSamples;
+  std::ostringstream osNSamples;
   osNSamples << iDefaultNSamples;
   m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   osNSamples << iDefaultNSamples;
   m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osRotAngle;
+  std::ostringstream osRotAngle;
   osRotAngle << dDefaultRotAngle;
   m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   osRotAngle << dDefaultRotAngle;
   m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osFocalLength;
+  std::ostringstream osFocalLength;
   osFocalLength << dDefaultFocalLength;
   m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   osFocalLength << dDefaultFocalLength;
   m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osFieldOfView;
+  std::ostringstream osFieldOfView;
   osFieldOfView << dDefaultFieldOfView;
   m_pTextCtrlFieldOfView = new wxTextCtrl (this, -1, osFieldOfView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
 
   osFieldOfView << dDefaultFieldOfView;
   m_pTextCtrlFieldOfView = new wxTextCtrl (this, -1, osFieldOfView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
 
@@ -463,19 +463,19 @@ DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* p
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
                   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
 
-  ostringstream os;
+  std::ostringstream os;
   os << iDefaultXSize;
   m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   os << iDefaultXSize;
   m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osYSize;
+  std::ostringstream osYSize;
   osYSize << iDefaultYSize;
   m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   osYSize << iDefaultYSize;
   m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osFilterParam;
+  std::ostringstream osFilterParam;
   osFilterParam << dDefaultFilterParam;
   m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   osFilterParam << dDefaultFilterParam;
   m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osZeropad;
+  std::ostringstream osZeropad;
   osZeropad << iDefaultZeropad;
   m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   osZeropad << iDefaultZeropad;
   m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  ostringstream osInterpParam;
+  std::ostringstream osInterpParam;
   osInterpParam << iDefaultInterpParam;
   m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
 
   osInterpParam << iDefaultInterpParam;
   m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
 
@@ -665,7 +665,7 @@ DialogAutoScaleParameters::DialogAutoScaleParameters (wxFrame *pParent, const Im
 
   wxGridSizer *pGridSizer = new wxGridSizer (2);
   pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
 
   wxGridSizer *pGridSizer = new wxGridSizer (2);
   pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  ostringstream osDefaultFactor;
+  std::ostringstream osDefaultFactor;
   osDefaultFactor << dDefaultScaleFactor;
   m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, osDefaultFactor.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   pGridSizer->Add (m_pTextCtrlStdDevFactor, 0, wxALIGN_CENTER_VERTICAL);
   osDefaultFactor << dDefaultScaleFactor;
   m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, osDefaultFactor.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   pGridSizer->Add (m_pTextCtrlStdDevFactor, 0, wxALIGN_CENTER_VERTICAL);
index 6722ef5946b874408639e4ad7cedae90fe47750c..034cfe710041604be7815baf7575c92feb095ee6 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: docs.cpp,v 1.3 2000/09/07 01:28:33 kevin Exp $
+**  $Id: docs.cpp,v 1.4 2000/12/16 06:12:47 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
 **
 **  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
@@ -51,7 +51,6 @@
 #include "docs.h"
 #include "views.h"
 
 #include "docs.h"
 #include "views.h"
 
-
 // ImageFileDocument
 
 IMPLEMENT_DYNAMIC_CLASS(ImageFileDocument, wxDocument)
 // ImageFileDocument
 
 IMPLEMENT_DYNAMIC_CLASS(ImageFileDocument, wxDocument)
index e94ca255c4563dd440d1419f2bdc099160292f5c..cd16c7c1d7f2588dc20732769c98571814e1872b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.24 2000/12/16 03:29:02 kevin Exp $
+**  $Id: views.cpp,v 1.25 2000/12/16 06:12:47 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
 **
 **  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
 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ******************************************************************************/
 
 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ******************************************************************************/
 
-#ifdef __GNUG__
-// #pragma implementation
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -97,7 +93,7 @@ ImageFileCanvas::OnMouseEvent(wxMouseEvent& event)
        int ny = rIF.ny();
 
        if (pt.x >= 0 && pt.x < nx && pt.y >= 0 && pt.y < ny) {
        int ny = rIF.ny();
 
        if (pt.x >= 0 && pt.x < nx && pt.y >= 0 && pt.y < ny) {
-         ostringstream os;
+         std::ostringstream os;
          os << "Image value (" << pt.x << "," << pt.y << ") = " << v[pt.x][ny - 1 - pt.y] << "\n";
            *theApp->getLog() << os.str().c_str();
        } else
          os << "Image value (" << pt.x << "," << pt.y << ") = " << v[pt.x][ny - 1 - pt.y] << "\n";
            *theApp->getLog() << os.str().c_str();
        } else
@@ -134,9 +130,9 @@ ImageFileView::OnProperties (wxCommandEvent& event)
   if (rIF.nx() == 0 || rIF.ny() == 0)
     *theApp->getLog() << "Properties: empty imagefile\n";
   else {
   if (rIF.nx() == 0 || rIF.ny() == 0)
     *theApp->getLog() << "Properties: empty imagefile\n";
   else {
-    const string& rFilename = rIF.getFilename();
+    const std::string& rFilename = rIF.getFilename();
     rIF.statistics (min, max, mean, mode, median, stddev);
     rIF.statistics (min, max, mean, mode, median, stddev);
-    ostringstream os;
+    std::ostringstream os;
     os << "file: " << rFilename << "\nmin: "<<min<<"\nmax: "<<max<<"\nmean: "<<mean<<"\nmode: "<<mode<<"\nstddev: "<<stddev << "\n";
     *theApp->getLog() << os.str().c_str();
     wxMessageDialog dialogMsg (m_frame, os.str().c_str(), "Imagefile Properties", wxOK | wxICON_INFORMATION);
     os << "file: " << rFilename << "\nmin: "<<min<<"\nmax: "<<max<<"\nmean: "<<mean<<"\nmode: "<<mode<<"\nstddev: "<<stddev << "\n";
     *theApp->getLog() << os.str().c_str();
     wxMessageDialog dialogMsg (m_frame, os.str().c_str(), "Imagefile Properties", wxOK | wxICON_INFORMATION);
@@ -397,7 +393,7 @@ PhantomView::OnProperties (wxCommandEvent& event)
 {
   const int idPhantom = GetDocument()->getPhantomID();
   const wxString& namePhantom = GetDocument()->getPhantomName();
 {
   const int idPhantom = GetDocument()->getPhantomID();
   const wxString& namePhantom = GetDocument()->getPhantomName();
-  ostringstream os;
+  std::ostringstream os;
   os << "Phantom " << namePhantom.c_str() << " (" << idPhantom << ")\n";
   *theApp->getLog() << os.str().c_str();
 #if DEBUG
   os << "Phantom " << namePhantom.c_str() << " (" << idPhantom << ")\n";
   *theApp->getLog() << os.str().c_str();
 #if DEBUG
@@ -462,7 +458,7 @@ PhantomView::OnProjections (wxCommandEvent& event)
        }
       }
 
        }
       }
 
-      ostringstream os;
+      std::ostringstream os;
       os << "Projections for " << rPhantom.name() << ": nDet=" << m_iDefaultNDet << ", nView=" << m_iDefaultNView << ", nSamples=" << m_iDefaultNSample << ", RotAngle=" << m_dDefaultRotation << ", FocalLengthRatio=" << m_dDefaultFocalLength << ", FieldOfViewRatio=" << m_dDefaultFieldOfView << ", Geometry=" << sGeometry.c_str() << "\n";
       rProj.setRemark (os.str());
       *theApp->getLog() << os.str().c_str();
       os << "Projections for " << rPhantom.name() << ": nDet=" << m_iDefaultNDet << ", nView=" << m_iDefaultNView << ", nSamples=" << m_iDefaultNSample << ", RotAngle=" << m_dDefaultRotation << ", FocalLengthRatio=" << m_dDefaultFocalLength << ", FieldOfViewRatio=" << m_dDefaultFieldOfView << ", Geometry=" << sGeometry.c_str() << "\n";
       rProj.setRemark (os.str());
       *theApp->getLog() << os.str().c_str();
@@ -512,7 +508,7 @@ PhantomView::OnRasterize (wxCommandEvent& event)
       pRasterDoc->Modify(true);
       pRasterDoc->UpdateAllViews(this);
 
       pRasterDoc->Modify(true);
       pRasterDoc->UpdateAllViews(this);
 
-      ostringstream os;
+      std::ostringstream os;
       os << "Rasterize Phantom " << rPhantom.name() << ": XSize=" << xSize << ", YSize=" << ySize << ", nSamples=" << nSamples << "\n";
       *theApp->getLog() << os.str().c_str();
     }
       os << "Rasterize Phantom " << rPhantom.name() << ": XSize=" << xSize << ", YSize=" << ySize << ", nSamples=" << nSamples << "\n";
       *theApp->getLog() << os.str().c_str();
     }
@@ -695,7 +691,7 @@ void
 ProjectionFileView::OnProperties (wxCommandEvent& event)
 {
   const Projections& rProj = GetDocument()->getProjections();
 ProjectionFileView::OnProperties (wxCommandEvent& event)
 {
   const Projections& rProj = GetDocument()->getProjections();
-  ostringstream os;
+  std::ostringstream os;
   rProj.printScanInfo(os);
   *theApp->getLog() << os.str().c_str();
   wxMessageDialog dialogMsg (m_frame, os.str().c_str(), "Projection File Properties", wxOK | wxICON_INFORMATION);
   rProj.printScanInfo(os);
   *theApp->getLog() << os.str().c_str();
   wxMessageDialog dialogMsg (m_frame, os.str().c_str(), "Projection File Properties", wxOK | wxICON_INFORMATION);
@@ -788,7 +784,7 @@ ProjectionFileView::OnReconstruct (wxCommandEvent& event)
       delete pReconstruct;
       pReconDoc->Modify(true);
       pReconDoc->UpdateAllViews(this);
       delete pReconstruct;
       pReconDoc->Modify(true);
       pReconDoc->UpdateAllViews(this);
-      ostringstream os;
+      std::ostringstream os;
       os << "Reconstruct " << rProj.getFilename() << ": xSize=" << m_iDefaultNX << ", ySize=" << m_iDefaultNY << ", Filter=" << optFilterName.c_str() << ", FilterParam=" << m_dDefaultFilterParam << ", FilterMethod=" << optFilterMethodName.c_str() << ", FilterGeneration=" << optFilterGenerationName.c_str() << ", Zeropad=" << m_iDefaultZeropad << ", Interpolation=" << optInterpName.c_str() << ", InterpolationParam=" << m_iDefaultInterpParam << ", Backprojection=" << optBackprojectName.c_str() << "\n";
       *theApp->getLog() << os.str().c_str();
       imageFile.labelAdd (rProj.getLabel());
       os << "Reconstruct " << rProj.getFilename() << ": xSize=" << m_iDefaultNX << ", ySize=" << m_iDefaultNY << ", Filter=" << optFilterName.c_str() << ", FilterParam=" << m_dDefaultFilterParam << ", FilterMethod=" << optFilterMethodName.c_str() << ", FilterGeneration=" << optFilterGenerationName.c_str() << ", Zeropad=" << m_iDefaultZeropad << ", Interpolation=" << optInterpName.c_str() << ", InterpolationParam=" << m_iDefaultInterpParam << ", Backprojection=" << optBackprojectName.c_str() << "\n";
       *theApp->getLog() << os.str().c_str();
       imageFile.labelAdd (rProj.getLabel());
index 841a1981f19f386ee1661af79100b9a6091ff05d..d87a76d521653d4998d8f3851312a6f4614945aa 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: pjrec.cpp,v 1.18 2000/12/16 02:44:26 kevin Exp $
+**  $Id: pjrec.cpp,v 1.19 2000/12/16 06:12:47 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
 **
 **  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
@@ -49,70 +49,70 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: pjrec.cpp,v 1.18 2000/12/16 02:44:26 kevin Exp $";
-
+static const char* g_szIdStr = "$Id: pjrec.cpp,v 1.19 2000/12/16 06:12:47 kevin Exp $";
+\r
 void 
 pjrec_usage (const char *program)
 {
 void 
 pjrec_usage (const char *program)
 {
-  cout << "usage: " << fileBasename(program) << " raysum-file image-file nx-image ny-image [OPTIONS]" << endl;
-  cout << "Image reconstruction from raysum projections" << endl;
-  cout << endl;
-  cout << "  raysum-file     Input raysum file" << endl;
-  cout << "  image-file      Output image file in SDF2D format" << endl;
-  cout << "  nx-image        Number of columns in output image" << endl;
-  cout << "  ny-image        Number of rows in output image" << endl;
-  cout << "  --interp        Interpolation method during backprojection" << endl;
-  cout << "    nearest     Nearest neighbor interpolation" << endl;
-  cout << "    linear      Linear interpolation" << endl;
+  std::cout << "usage: " << fileBasename(program) << " raysum-file image-file nx-image ny-image [OPTIONS]" << std::endl;
+  std::cout << "Image reconstruction from raysum projections" << std::endl;
+  std::cout << std::endl;
+  std::cout << "  raysum-file     Input raysum file" << std::endl;
+  std::cout << "  image-file      Output image file in SDF2D format" << std::endl;
+  std::cout << "  nx-image        Number of columns in output image" << std::endl;
+  std::cout << "  ny-image        Number of rows in output image" << std::endl;
+  std::cout << "  --interp        Interpolation method during backprojection" << std::endl;
+  std::cout << "    nearest     Nearest neighbor interpolation" << std::endl;
+  std::cout << "    linear      Linear interpolation" << std::endl;
 #if HAVE_BSPLINE_INTERP
 #if HAVE_BSPLINE_INTERP
-  cout << "    bspline     B-spline interpolation" << endl;
+  std::cout << "    bspline     B-spline interpolation" << std::endl;
 #endif
 #endif
-  cout << "  --preinterpolate  Preinterpolation factor (default = 1)\n";
-  cout << "                    Used only with frequency-based filtering\n";
-  cout << "  --filter       Filter name" << endl;
-  cout << "    abs_bandlimit Abs * Bandlimiting (default)" << endl;
-  cout << "    abs_sinc      Abs * Sinc" << endl;
-  cout << "    abs_cosine    Abs * Cosine" << endl;
-  cout << "    abs_hamming   Abs * Hamming" << endl;
-  cout << "    shepp         Shepp-Logan" << endl;
-  cout << "    bandlimit     Bandlimiting" << endl;
-  cout << "    sinc          Sinc" << endl;
-  cout << "    cosine        Cosine" << endl;
-  cout << "    triangle      Triangle" << endl;
-  cout << "    hamming       Hamming" << endl;
-  cout << "  --filter-method  Filter method before backprojections\n";;
-  cout << "    convolution      Spatial filtering (default)\n";
-  cout << "    fourier          Frequency filtering with discete fourier\n";
-  cout << "    fourier_table    Frequency filtering with table lookup fourier\n";
-  cout << "    fft              Fast Fourier Transform\n";
+  std::cout << "  --preinterpolate  Preinterpolation factor (default = 1)\n";
+  std::cout << "                    Used only with frequency-based filtering\n";
+  std::cout << "  --filter       Filter name" << std::endl;
+  std::cout << "    abs_bandlimit Abs * Bandlimiting (default)" << std::endl;
+  std::cout << "    abs_sinc      Abs * Sinc" << std::endl;
+  std::cout << "    abs_cosine    Abs * Cosine" << std::endl;
+  std::cout << "    abs_hamming   Abs * Hamming" << std::endl;
+  std::cout << "    shepp         Shepp-Logan" << std::endl;
+  std::cout << "    bandlimit     Bandlimiting" << std::endl;
+  std::cout << "    sinc          Sinc" << std::endl;
+  std::cout << "    cosine        Cosine" << std::endl;
+  std::cout << "    triangle      Triangle" << std::endl;
+  std::cout << "    hamming       Hamming" << std::endl;
+  std::cout << "  --filter-method  Filter method before backprojections\n";;
+  std::cout << "    convolution      Spatial filtering (default)\n";
+  std::cout << "    fourier          Frequency filtering with discete fourier\n";
+  std::cout << "    fourier_table    Frequency filtering with table lookup fourier\n";
+  std::cout << "    fft              Fast Fourier Transform\n";
 #if HAVE_FFTW
 #if HAVE_FFTW
-  cout << "    fftw             Fast Fourier Transform West library\n";
-  cout << "    rfftw            Fast Fourier Transform West (real-mode) library\n";
+  std::cout << "    fftw             Fast Fourier Transform West library\n";
+  std::cout << "    rfftw            Fast Fourier Transform West (real-mode) library\n";
 #endif
 #endif
-  cout << "  --zeropad n   Set zeropad level (default = 0)\n";
-  cout << "                set n to number of powers to two to pad\n";
-  cout << "  --filter-generation  Filter Generation mode\n";
-  cout << "    direct       Use direct filter in spatial or frequency domain (default)\n";
-  cout << "    inverse_fourier  Use inverse fourier transform of inverse filter\n";
-  cout << "  --backproj    Backprojection Method" << endl;
-  cout << "    trig        Trigometric functions at every point" << endl;
-  cout << "    table       Trigometric functions with precalculated table" << endl;
-  cout << "    diff        Difference method" << endl;
-  cout << "    diff2       Optimized difference method (default)" << endl;
-  cout << "    idiff2      Optimized difference method with integer math" << endl;
-  cout << "    idiff3      Highly-optimized difference method with integer math" << endl;
-  cout << "  --filter-param Alpha level for Hamming filter" << endl;
-  cout << "  --trace        Set tracing to level" << endl;
-  cout << "     none        No tracing (default)" << endl;
-  cout << "     console     Text level tracing" << endl;
-  cout << "     phantom     Trace phantom" << endl;
-  cout << "     proj        Trace allrays" << endl;
-  cout << "     plot        Trace plotting" << endl;
-  cout << "     clipping    Trace clipping" << endl;
-  cout << "  --verbose      Turn on verbose mode" << endl;
-  cout << "  --debug        Turn on debug mode" << endl;
-  cout << "  --version      Print version" << endl;
-  cout << "  --help         Print this help message" << endl;
+  std::cout << "  --zeropad n   Set zeropad level (default = 0)\n";
+  std::cout << "                set n to number of powers to two to pad\n";
+  std::cout << "  --filter-generation  Filter Generation mode\n";
+  std::cout << "    direct       Use direct filter in spatial or frequency domain (default)\n";
+  std::cout << "    inverse_fourier  Use inverse fourier transform of inverse filter\n";
+  std::cout << "  --backproj    Backprojection Method" << std::endl;
+  std::cout << "    trig        Trigometric functions at every point" << std::endl;
+  std::cout << "    table       Trigometric functions with precalculated table" << std::endl;
+  std::cout << "    diff        Difference method" << std::endl;
+  std::cout << "    diff2       Optimized difference method (default)" << std::endl;
+  std::cout << "    idiff2      Optimized difference method with integer math" << std::endl;
+  std::cout << "    idiff3      Highly-optimized difference method with integer math" << std::endl;
+  std::cout << "  --filter-param Alpha level for Hamming filter" << std::endl;
+  std::cout << "  --trace        Set tracing to level" << std::endl;
+  std::cout << "     none        No tracing (default)" << std::endl;
+  std::cout << "     console     Text level tracing" << std::endl;
+  std::cout << "     phantom     Trace phantom" << std::endl;
+  std::cout << "     proj        Trace allrays" << std::endl;
+  std::cout << "     plot        Trace plotting" << std::endl;
+  std::cout << "     clipping    Trace clipping" << std::endl;
+  std::cout << "  --verbose      Turn on verbose mode" << std::endl;
+  std::cout << "  --debug        Turn on debug mode" << std::endl;
+  std::cout << "  --version      Print version" << std::endl;
+  std::cout << "  --help         Print this help message" << std::endl;
 }
 
 
 }
 
 
@@ -129,17 +129,17 @@ pjrec_main (int argc, char * argv[])
   ImageFile* imGlobal = NULL;
   char* pszFilenameProj = NULL;
   char* pszFilenameImage = NULL;
   ImageFile* imGlobal = NULL;
   char* pszFilenameProj = NULL;
   char* pszFilenameImage = NULL;
-  string sRemark;
+  std::string sRemark;
   bool bOptVerbose = false;
   bool bOptDebug = 1;
   int iOptZeropad = 1;
   int optTrace = Trace::TRACE_NONE;
   double dOptFilterParam = -1;
   bool bOptVerbose = false;
   bool bOptDebug = 1;
   int iOptZeropad = 1;
   int optTrace = Trace::TRACE_NONE;
   double dOptFilterParam = -1;
-  string sOptFilterName (SignalFilter::convertFilterIDToName (SignalFilter::FILTER_ABS_BANDLIMIT));
-  string sOptFilterMethodName (ProcessSignal::convertFilterMethodIDToName (ProcessSignal::FILTER_METHOD_CONVOLUTION));
-  string sOptFilterGenerationName (ProcessSignal::convertFilterGenerationIDToName (ProcessSignal::FILTER_GENERATION_DIRECT));
-  string sOptInterpName (Backprojector::convertInterpIDToName (Backprojector::INTERP_LINEAR));
-  string sOptBackprojectName (Backprojector::convertBackprojectIDToName (Backprojector::BPROJ_IDIFF3));
+  std::string sOptFilterName (SignalFilter::convertFilterIDToName (SignalFilter::FILTER_ABS_BANDLIMIT));
+  std::string sOptFilterMethodName (ProcessSignal::convertFilterMethodIDToName (ProcessSignal::FILTER_METHOD_CONVOLUTION));
+  std::string sOptFilterGenerationName (ProcessSignal::convertFilterGenerationIDToName (ProcessSignal::FILTER_GENERATION_DIRECT));
+  std::string sOptInterpName (Backprojector::convertInterpIDToName (Backprojector::INTERP_LINEAR));
+  std::string sOptBackprojectName (Backprojector::convertBackprojectIDToName (Backprojector::BPROJ_IDIFF3));
   int iOptPreinterpolationFactor = 1;
   int nx, ny;
   char *endptr;
   int iOptPreinterpolationFactor = 1;
   int nx, ny;
   char *endptr;
@@ -214,9 +214,9 @@ pjrec_main (int argc, char * argv[])
          break;
         case O_VERSION:
 #ifdef VERSION
          break;
         case O_VERSION:
 #ifdef VERSION
-         cout <<  "Version " <<  VERSION << endl << g_szIdStr << endl;
+         std::cout <<  "Version " <<  VERSION << std::endl << g_szIdStr << std::endl;
 #else
 #else
-          cout << "Unknown version number" << endl;
+          std::cout << "Unknown version number" << std::endl;
 #endif
          return (0);
        case O_HELP:
 #endif
          return (0);
        case O_HELP:
@@ -241,18 +241,18 @@ pjrec_main (int argc, char * argv[])
     nx = strtol(argv[optind + 2], &endptr, 10);
     ny = strtol(argv[optind + 3], &endptr, 10);
   
     nx = strtol(argv[optind + 2], &endptr, 10);
     ny = strtol(argv[optind + 3], &endptr, 10);
   
-    ostringstream filterDesc;
+    std::ostringstream filterDesc;
     if (dOptFilterParam >= 0)
       filterDesc << sOptFilterName << ": alpha=" << dOptFilterParam; 
     else
       filterDesc << sOptFilterName;
 
     if (dOptFilterParam >= 0)
       filterDesc << sOptFilterName << ": alpha=" << dOptFilterParam; 
     else
       filterDesc << sOptFilterName;
 
-    ostringstream label;
+    std::ostringstream label;
     label << "pjrec: " << nx << "x" << ny << ", " << filterDesc.str() << ", " << sOptInterpName << ", preinterpolationFactor=" << iOptPreinterpolationFactor << ", " << sOptBackprojectName;
     sRemark = label.str();
   
     if (bOptVerbose)
     label << "pjrec: " << nx << "x" << ny << ", " << filterDesc.str() << ", " << sOptInterpName << ", preinterpolationFactor=" << iOptPreinterpolationFactor << ", " << sOptBackprojectName;
     sRemark = label.str();
   
     if (bOptVerbose)
-      cout << "SRemark: " << sRemark << endl;
+      std::cout << "SRemark: " << sRemark << std::endl;
 #ifdef HAVE_MPI
   }
 #endif
 #ifdef HAVE_MPI
   }
 #endif
@@ -263,7 +263,7 @@ pjrec_main (int argc, char * argv[])
     if (bOptVerbose) {
       ostringstream os;
       projGlobal.printScanInfo (os);
     if (bOptVerbose) {
       ostringstream os;
       projGlobal.printScanInfo (os);
-      cout << os.str();
+      std::cout << os.str();
     }
 
     mpi_ndet = projGlobal.nDet();
     }
 
     mpi_ndet = projGlobal.nDet();
@@ -314,9 +314,9 @@ pjrec_main (int argc, char * argv[])
 #else
   projGlobal.read (pszFilenameProj);
   if (bOptVerbose) {
 #else
   projGlobal.read (pszFilenameProj);
   if (bOptVerbose) {
-    ostringstream os;
+    std::ostringstream os;
     projGlobal.printScanInfo(os);
     projGlobal.printScanInfo(os);
-    cout << os.str();
+    std::cout << os.str();
   }
 
   imGlobal = new ImageFile (nx, ny);
   }
 
   imGlobal = new ImageFile (nx, ny);
@@ -327,7 +327,7 @@ pjrec_main (int argc, char * argv[])
 
   Reconstructor reconstruct (projLocal, *imLocal, sOptFilterName.c_str(), dOptFilterParam, sOptFilterMethodName.c_str(), iOptZeropad, sOptFilterGenerationName.c_str(), sOptInterpName.c_str(), iOptPreinterpolationFactor, sOptBackprojectName.c_str(), optTrace);
   if (reconstruct.fail()) {
 
   Reconstructor reconstruct (projLocal, *imLocal, sOptFilterName.c_str(), dOptFilterParam, sOptFilterMethodName.c_str(), iOptZeropad, sOptFilterGenerationName.c_str(), sOptInterpName.c_str(), iOptPreinterpolationFactor, sOptBackprojectName.c_str(), optTrace);
   if (reconstruct.fail()) {
-    cout << reconstruct.failMessage();
+    std::cout << reconstruct.failMessage();
     return (1);
   }
   reconstruct.reconstructAllViews();
     return (1);
   }
   reconstruct.reconstructAllViews();
@@ -342,7 +342,7 @@ pjrec_main (int argc, char * argv[])
 #else
   Reconstructor reconstruct (projGlobal, *imGlobal, sOptFilterName.c_str(), dOptFilterParam, sOptFilterMethodName.c_str(), iOptZeropad, sOptFilterGenerationName.c_str(), sOptInterpName.c_str(), iOptPreinterpolationFactor, sOptBackprojectName.c_str(), optTrace);
   if (reconstruct.fail()) {
 #else
   Reconstructor reconstruct (projGlobal, *imGlobal, sOptFilterName.c_str(), dOptFilterParam, sOptFilterMethodName.c_str(), iOptZeropad, sOptFilterGenerationName.c_str(), sOptInterpName.c_str(), iOptPreinterpolationFactor, sOptBackprojectName.c_str(), optTrace);
   if (reconstruct.fail()) {
-    cout << reconstruct.failMessage();
+    std::cout << reconstruct.failMessage();
     return (1);
   }
   reconstruct.reconstructAllViews();
     return (1);
   }
   reconstruct.reconstructAllViews();
@@ -357,7 +357,7 @@ pjrec_main (int argc, char * argv[])
       imGlobal->labelAdd (Array2dFileLabel::L_HISTORY, sRemark.c_str(), dCalcTime);
       imGlobal->fileWrite (pszFilenameImage);
       if (bOptVerbose)
       imGlobal->labelAdd (Array2dFileLabel::L_HISTORY, sRemark.c_str(), dCalcTime);
       imGlobal->fileWrite (pszFilenameImage);
       if (bOptVerbose)
-       cout << "Run time: " << dCalcTime << " seconds" << endl;
+       std::cout << "Run time: " << dCalcTime << " seconds" << std::endl;
     }
 #ifdef HAVE_MPI
   MPI::Finalize();
     }
 #ifdef HAVE_MPI
   MPI::Finalize();
@@ -430,9 +430,9 @@ main (int argc, char* argv[])
   try {
     retval = pjrec_main(argc, argv);
   } catch (exception e) {
   try {
     retval = pjrec_main(argc, argv);
   } catch (exception e) {
-    cerr << "Exception: " << e.what() << endl;
+         std::cerr << "Exception: " << e.what() << std::endl;
   } catch (...) {
   } catch (...) {
-    cerr << "Unknown exception" << endl;
+         std::cerr << "Unknown exception" << std::endl;
   }
 
   return (retval);
   }
 
   return (retval);