1 /*****************************************************************************
5 ** Purpose: Backprojection classes
6 ** Programmer: Kevin Rosenberg
7 ** Date Started: June 2000
9 ** This is part of the CTSim program
10 ** Copyright (C) 1983-2000 Kevin Rosenberg
12 ** $Id: backprojectors.h,v 1.2 2000/06/13 16:20:31 kevin Exp $
13 ** $Log: backprojectors.h,v $
14 ** Revision 1.2 2000/06/13 16:20:31 kevin
15 ** finished c++ conversions
17 ** Revision 1.1 2000/06/10 23:00:17 kevin
18 ** *** empty log message ***
21 ** This program is free software; you can redistribute it and/or modify
22 ** it under the terms of the GNU General Public License (version 2) as
23 ** published by the Free Software Foundation.
25 ** This program is distributed in the hope that it will be useful,
26 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
27 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ** GNU General Public License for more details.
30 ** You should have received a copy of the GNU General Public License
31 ** along with this program; if not, write to the Free Software
32 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 ******************************************************************************/
38 Backproject (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
40 virtual ~Backproject ();
42 virtual void BackprojectView (const double* const t, const double view_angle) {};
45 void ScaleImageByRotIncrement (void);
46 void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double r, double phi, double L, int ni);
47 void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int ni);
49 InterpolationType interpType;
57 int iDetCenter; // index refering to L=0 projection
59 double xMin, xMax, yMin, yMax; // Retangular coords of phantom
60 double xInc, yInc; // size of cells
63 Backproject (const Backproject& rhs);
64 Backproject& operator= (const Backproject& rhs);
68 class BackprojectTrig : public Backproject
71 BackprojectTrig (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
72 : Backproject::Backproject (rs, im, interpType)
75 void BackprojectView (const double* const t, double view_angle);
79 class BackprojectTable : public Backproject
82 BackprojectTable (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
85 void BackprojectView (const double* const t, double view_angle);
88 Array2d<kfloat64> arrayR;
89 Array2d<kfloat64> arrayPhi;
95 class BackprojectDiff : public Backproject
98 BackprojectDiff (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
101 void BackprojectView (const double* const t, double view_angle);
106 double im_xinc, im_yinc;
109 class BackprojectDiff2 : public BackprojectDiff
112 BackprojectDiff2 (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
113 : BackprojectDiff::BackprojectDiff (rs, im, interpType)
116 void BackprojectView (const double* const t, double view_angle);
119 class BackprojectIntDiff2 : public BackprojectDiff
122 BackprojectIntDiff2 (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
123 : BackprojectDiff::BackprojectDiff (rs, im, interpType)
126 void BackprojectView (const double* const t, double view_angle);
130 Backproject* selectBackprojector (BackprojType type, const RAYSUM*, ImageFile& im, InterpolationType interpType);