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/doline.cpp $
5 $LastChangedRevision: 79 $
6 $Date: 2014-07-01 15:33:39 -0400 (Tue, 01 Jul 2014) $
8 **********************************************************************
10 POST-PROCESSING ROUTINE TO GENERATE LINE DISPLAYS OF
21 //#include "int2str.h"
29 // was in post but it is realy local
34 // was in geo but it is realy local
38 REAL scale, denmin, denmax;
39 INTEGER word, lineno, linumb[4], flag[51];
43 unsigned INTEGER count, iter;
51 static const INTEGER hscal = CHAR2INT('s', 'c', 'a', 'l');
52 static const INTEGER hcolu = CHAR2INT('c', 'o', 'l', 'u');
54 // modified calls to getwrd() to use the 4-parameter version. Lajos, Dec 13, 2004
55 static const INTEGER doline_codes[2] = { CHAR2INT('s', 'c', 'a', 'l'), CHAR2INT('c', 'o', 'l', 'u') };
57 if (RecFile.Open("recfil") != 0)
59 fprintf(output, "\n **** unable to open recfil");
60 fprintf(output, "\n **** LINE execution aborted\n");
64 if (RecFile.GetNelem(&nelem) != 0)
69 if (RecFile.GetProjName(prjnam) != 0)
75 //GeoPar.midpix = (GeoPar.nelem + 1) / 2;
84 word = InFile.getwrd(FALSE, &eol, doline_codes, 2);
88 fprintf(output, "\n **** no columns requested");
89 fprintf(output, "\n **** LINE execution aborted\n");
96 scale = InFile.getnum(FALSE, &eol);
106 index = InFile.getint(FALSE, &eol);
111 if ((index >= 0) && (index < nelem))
116 linumb[lineno++] = index;
121 "\n **** requested column %d is not in the range (0, %d)",
123 fprintf(output, "\n **** COLUMN %d ignored", index);
130 fprintf(output, "\n **** no columns requested");
131 fprintf(output, "\n **** LINE execution aborted\n");
138 Phantom = new REAL[area];
139 Recon = new REAL[area];
142 if (RecFile.ReadPhan(phnnam, Phantom) != 0)
144 fprintf(output, "\n **** phantom not present");
145 fprintf(output, "\n **** LINE execution aborted\n");
153 for (i = 1; i < area; i++)
155 if (Phantom[i] < denmin)
162 for (i = 1; i < area; i++)
164 if (Phantom[i] > denmax)
169 // Load reconstructed images
170 while (RecFile.ReadRec(recnam, algn, &count, &iter, Recon) == 0)
173 if (flag[iter - 1] != 0)
176 "\n lines display of reconstruction using %s iter %d\n",
178 fprintf(output, "\n phantom name: %s", phnnam);
179 fprintf(output, "\n projection data: %s", prjnam);
180 fprintf(output, "\n execution name: %s", recnam);
181 lines(Phantom, Recon, nelem, nelem, scale, lineno, linumb, output);
185 delete[] Recon; // bug 92 - Lajos - 03/02/2005
186 delete[] Phantom; // bug 92 - Lajos - 03/02/2005
188 fprintf(output, "\n ");