--- /dev/null
+/*****************************************************************************
+** 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);