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.3 2000/06/17 20:12:14 kevin Exp $
13 ** $Log: backprojectors.h,v $
14 ** Revision 1.3 2000/06/17 20:12:14 kevin
15 ** Converted Scanner and Projections to C++
17 ** Revision 1.2 2000/06/13 16:20:31 kevin
18 ** finished c++ conversions
20 ** Revision 1.1 2000/06/10 23:00:17 kevin
21 ** *** empty log message ***
24 ** This program is free software; you can redistribute it and/or modify
25 ** it under the terms of the GNU General Public License (version 2) as
26 ** published by the Free Software Foundation.
28 ** This program is distributed in the hope that it will be useful,
29 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
30 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ** GNU General Public License for more details.
33 ** You should have received a copy of the GNU General Public License
34 ** along with this program; if not, write to the Free Software
35 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
36 ******************************************************************************/
41 Backproject (const Projections& proj, ImageFile& im, InterpolationType interpType);
43 virtual ~Backproject ();
45 virtual void BackprojectView (const double* const t, const double view_angle) {};
48 void ScaleImageByRotIncrement (void);
49 void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double r, double phi, double L, int ni);
50 void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int ni);
52 InterpolationType interpType;
53 const Projections& proj;
60 int iDetCenter; // index refering to L=0 projection
62 double xMin, xMax, yMin, yMax; // Retangular coords of phantom
63 double xInc, yInc; // size of cells
66 Backproject (const Backproject& rhs);
67 Backproject& operator= (const Backproject& rhs);
71 class BackprojectTrig : public Backproject
74 BackprojectTrig (const Projections& proj, ImageFile& im, InterpolationType interpType)
75 : Backproject::Backproject (proj, im, interpType)
78 void BackprojectView (const double* const t, double view_angle);
82 class BackprojectTable : public Backproject
85 BackprojectTable (const Projections& proj, ImageFile& im, InterpolationType interpType);
88 void BackprojectView (const double* const t, double view_angle);
91 Array2d<kfloat64> arrayR;
92 Array2d<kfloat64> arrayPhi;
98 class BackprojectDiff : public Backproject
101 BackprojectDiff (const Projections& proj, ImageFile& im, InterpolationType interpType);
104 void BackprojectView (const double* const t, double view_angle);
109 double im_xinc, im_yinc;
112 class BackprojectDiff2 : public BackprojectDiff
115 BackprojectDiff2 (const Projections& proj, ImageFile& im, InterpolationType interpType)
116 : BackprojectDiff::BackprojectDiff (proj, im, interpType)
119 void BackprojectView (const double* const t, double view_angle);
122 class BackprojectIntDiff2 : public BackprojectDiff
125 BackprojectIntDiff2 (const Projections& proj, ImageFile& im, InterpolationType interpType)
126 : BackprojectDiff::BackprojectDiff (proj, im, interpType)
129 void BackprojectView (const double* const t, double view_angle);
133 Backproject* selectBackprojector (BackprojType type, const Projections& proj, ImageFile& im, InterpolationType interpType);