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.1 2000/06/10 23:00:17 kevin Exp $
13 ** $Log: backprojectors.h,v $
14 ** Revision 1.1 2000/06/10 23:00:17 kevin
15 ** *** empty log message ***
18 ** This program is free software; you can redistribute it and/or modify
19 ** it under the terms of the GNU General Public License (version 2) as
20 ** published by the Free Software Foundation.
22 ** This program is distributed in the hope that it will be useful,
23 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
24 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ** GNU General Public License for more details.
27 ** You should have received a copy of the GNU General Public License
28 ** along with this program; if not, write to the Free Software
29 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 ******************************************************************************/
35 Backproject (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
37 virtual ~Backproject ();
39 virtual void BackprojectView (const double* const t, const double view_angle) {};
42 void ScaleImageByRotIncrement (void);
43 void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double r, double phi, double L, int ni);
44 void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int ni);
46 InterpolationType interpType;
54 int ncent; // index refering to L=0 projection
56 double xmin, xmax, ymin, ymax; // Retangular coords of phantom
57 double xinc, yinc; // size of cells
60 Backproject (const Backproject& rhs);
61 Backproject& operator= (const Backproject& rhs);
65 class BackprojectTrig : public Backproject
68 BackprojectTrig (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
69 : Backproject::Backproject (rs, im, interpType)
72 void BackprojectView (const double* const t, double view_angle);
76 class BackprojectTable : public Backproject
79 BackprojectTable (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
82 void BackprojectView (const double* const t, double view_angle);
85 Array2d<kfloat64> arrayR;
86 Array2d<kfloat64> arrayPhi;
92 class BackprojectDiff : public Backproject
95 BackprojectDiff (const RAYSUM* rs, ImageFile& im, InterpolationType interpType);
98 void BackprojectView (const double* const t, double view_angle);
103 double im_xinc, im_yinc;
106 class BackprojectDiff2 : public BackprojectDiff
109 BackprojectDiff2 (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
110 : BackprojectDiff::BackprojectDiff (rs, im, interpType)
113 void BackprojectView (const double* const t, double view_angle);
116 class BackprojectIntDiff2 : public BackprojectDiff
119 BackprojectIntDiff2 (const RAYSUM* rs, ImageFile& im, InterpolationType interpType)
120 : BackprojectDiff::BackprojectDiff (rs, im, interpType)
123 void BackprojectView (const double* const t, double view_angle);
127 Backproject* selectBackprojector (BackprojType type, const RAYSUM*, ImageFile& im, InterpolationType interpType);