Initial snark14m import
[snark14.git] / src / snark / inputfile.h
1 /* 
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/inputfile.h $
5  $LastChangedRevision: 80 $
6  $Date: 2014-07-01 21:01:54 -0400 (Tue, 01 Jul 2014) $
7  $Author: agulati $
8  ***********************************************************
9  */
10
11 #ifndef INPUTFILE_H
12 #define INPUTFILE_H
13
14 #define DATASIZ 256
15
16 //jk 11/18/2007 introducing variability
17 extern REAL variability;
18 //jk 02/06/09 bug 251
19 //extern long newseed;  //the variable Creacm.varseed is used instead
20 //the array stores values of variability added to each pixel of the phantom
21 extern REAL * variab_array[7];
22 //the flag is set if the value of variability in the input file is other than zero
23 extern BOOLEAN variab_set;
24 //saves the value of the origical scale which is the mean value for variability calculations
25 extern REAL mean;
26
27 extern REAL * phantom_poly_array[7];
28
29 class InputFile_class
30 {
31 protected:
32
33         FILE* infile;
34         INTEGER word;
35
36         INTEGER ptr;
37         CHAR data[DATASIZ + 2];     // bug 190 - swr - 12/09/05
38
39 public:
40         void Open();
41         void GetName();
42         void ReadEnergySpectralDistribution();
43         void GetInformationABoutCreationOfPhantom(INTEGER invoke);
44         void ReadBackgroundAbsorption();
45         void ReadRaysumInformation();
46         void ReadGeometryData(INTEGER invoke);
47         void ReadNumberOfRaysAndRaySpacing(INTEGER invoke);
48
49         void ReadProjectionAngles(BOOLEAN f11);
50         void GetMesurementStatistics();
51         void ReadIfoForComputionRaysums();
52         void ReadObjects(INTEGER invoke);
53
54         REAL getnum(BOOLEAN NewLine, BOOLEAN* eol);
55         // removed old (2-parameter) version of getwrd. Lajos, Dec 16, 2004
56         INTEGER getwrd(BOOLEAN NewLine, BOOLEAN* eol, const INTEGER *expect,
57                         int nexpect);
58         INTEGER getint(BOOLEAN NewLine, BOOLEAN* eol);
59         void getnxt(BOOLEAN flag, BOOLEAN newline = TRUE);
60
61         void echoline(BOOLEAN flag);  // added by Lajos, Jan 25, 2005
62 };
63
64 #endif