2 ***********************************************************
3 $SNARK_Header: S N A R K 1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4 $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/bckprj.cpp $
5 $LastChangedRevision: 85 $
6 $Date: 2014-07-02 16:07:08 -0400 (Wed, 02 Jul 2014) $
8 ***********************************************************
10 SUBROUTINE TO BACK-PROJECT THE DATA GIVEN THE THE ARRAY 'G'
11 ONTO THE SQUARE ARRAY 'A'. G IS A VECTOR OF LENGTH M; A IS AN
12 N*N MATRIX. THE BACK PROJECTION IS PERFORMED USING THE
13 INTERPOLATION METHOD GIVEN BY 'INTERP' PARALLEL TO THE UNIT
14 VECTOR GIVEN BY (CTH,STH).
17 This subroutine is modified so that it is not necessary to
18 call qintp for linear iteration (two-point Lagrange).
19 The exacution is done within this subroutine.
30 void bckprj(REAL* a, INTEGER n, REAL* g, INTEGER m, REAL sth, REAL cth,
31 REAL spac, INTEGER interp)
51 ypos = nmid * yinc + mmid;
55 for (i = 0; i < n; i++)
57 pos = -nmid * xinc + ypos;
58 for (j = 0; j < n; j++)
62 qintp1 = g[epos - 1] + er * (g[epos] - g[epos - 1]);
71 for (i = 0; i < n; i++)
73 pos = -nmid * xinc + ypos;
74 for (j = 0; j < n; j++)
76 a[ind++] += qintp(pos, g, m, interp);