r93: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 10 Jun 2000 23:00:17 +0000 (23:00 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 10 Jun 2000 23:00:17 +0000 (23:00 +0000)
include/Makefile.am
include/backprojectors.h [new file with mode: 0644]
include/ct.h

index 065df984476a015a5bd9a6c5d4ef1eed8b77908d..90bd58c49c1ace63961f270d176cad1524a63e91 100644 (file)
@@ -1,4 +1,4 @@
-noinst_HEADERS=ascii.h cio.h ct.h ezplot.h ir.h keyboard.h kmath.h kstddef.h pol.h sgp.h array2d.h imagefile.h backproj.h mpiworld.h
+noinst_HEADERS=ascii.h cio.h ct.h ezplot.h ir.h keyboard.h kmath.h kstddef.h pol.h sgp.h array2d.h imagefile.h backprojectors.h mpiworld.h
 
 
 
diff --git a/include/backprojectors.h b/include/backprojectors.h
new file mode 100644 (file)
index 0000000..923cee1
--- /dev/null
@@ -0,0 +1,127 @@
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+**     Name:         backproject.h
+**      Purpose:      Backprojection classes
+**     Programmer:   Kevin Rosenberg
+**     Date Started: June 2000
+**
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: backprojectors.h,v 1.1 2000/06/10 23:00:17 kevin Exp $
+**  $Log: backprojectors.h,v $
+**  Revision 1.1  2000/06/10 23:00:17  kevin
+**  *** empty log message ***
+**
+**
+**  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
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+
+class Backproject
+{
+ public:
+    Backproject (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
+
+    virtual ~Backproject ();
+
+    virtual void BackprojectView (const double* const t, const double view_angle) {};
+
+ protected:
+    void ScaleImageByRotIncrement (void);
+    void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double r, double phi, double L, int ni);
+    void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int ni);
+
+    InterpolationType interpType;
+    const RAYSUM* rs;
+    ImageFile& im;
+    ImageFileArray v;
+    kuint32 nx;
+    kuint32 ny;
+    double det_inc;
+    double rot_inc;
+    int ncent;         // index refering to L=0 projection 
+    int ndet;
+    double xmin, xmax, ymin, ymax;     // Retangular coords of phantom
+    double xinc, yinc; // size of cells
+
+ private:
+    Backproject (const Backproject& rhs);
+    Backproject& operator= (const Backproject& rhs);
+};
+
+
+class BackprojectTrig : public Backproject
+{
+ public:
+  BackprojectTrig (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
+      : Backproject::Backproject (rs, im, interpType)
+      {}
+
+  void BackprojectView (const double* const t, double view_angle);
+};
+
+
+class BackprojectTable : public Backproject
+{
+ public:
+  BackprojectTable (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
+  ~BackprojectTable ();
+
+  void BackprojectView (const double* const t, double view_angle);
+
+ private:
+  Array2d<kfloat64> arrayR;
+  Array2d<kfloat64> arrayPhi;
+  kfloat64** r;
+  kfloat64** phi;
+};
+
+
+class BackprojectDiff : public Backproject
+{
+ public:
+  BackprojectDiff (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
+  ~BackprojectDiff ();
+
+  void BackprojectView (const double* const t, double view_angle);
+
+ protected:
+  double start_r;
+  double start_phi;
+  double im_xinc, im_yinc;
+};
+
+class BackprojectDiff2 : public BackprojectDiff
+{
+ public:
+  BackprojectDiff2 (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
+    :  BackprojectDiff::BackprojectDiff (rs, im, interpType)
+    {}
+
+  void BackprojectView (const double* const t, double view_angle);
+};
+
+class BackprojectIntDiff2 : public BackprojectDiff
+{
+ public:
+  BackprojectIntDiff2 (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
+    :  BackprojectDiff::BackprojectDiff (rs, im, interpType)
+    {}
+  
+  void BackprojectView (const double* const t, double view_angle);
+};
+
+
+Backproject* selectBackprojector (BackprojType type, const RAYSUM*, ImageFile& im, InterpolationType interpType);
index 02992b34be34b70f1954a52a4cd22cdb6e0a77c9..72a01f2844221e78b68b9cdb98c99709adf27b7f 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ct.h,v 1.12 2000/06/09 01:35:33 kevin Exp $
+**  $Id: ct.h,v 1.13 2000/06/10 23:00:17 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
@@ -140,7 +140,7 @@ using namespace std;
 #include "array2d.h"
 #include "imagefile.h"
 #include "ir.h"
-#include "backproj.h"
+#include "backprojectors.h"
 
 
 #endif