CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
include/datafile/iDataFileCT.hh
Go to the documentation of this file.
1 
8 #ifndef IDATAFILECT_HH
9 #define IDATAFILECT_HH 1
10 
11 #include "gVariables.hh"
12 #include "vDataFile.hh"
13 #include "vScanner.hh"
14 #include "iEventHistoCT.hh"
15 #include "iEventListCT.hh"
16 
17 
25 class iDataFileCT : public vDataFile
26 {
27  // -------------------------------------------------------------------
28  // Constructor & Destructor
29  public:
34  iDataFileCT();
38  ~iDataFileCT();
39 
40  // -------------------------------------------------------------------
41  // Public member functions
42  public:
51  int ReadSpecificInfoInHeader(bool a_affectQuantificationFlag);
57  int WriteHeader();
63  int ComputeSizeEvent();
70  int PrepareDataFile();
78  int WriteEvent(vEvent* ap_Event, int a_th=0);
86  vEvent* GetEventSpecific(char* ap_buffer, int a_th);
94  int InitAngles(FLTNB* ap_angles);
99  void DescribeSpecific();
100 
101  // -------------------------------------------------------------------
102  // Public functions dedicated to the projection script
103  public:
109  int PROJ_InitFile();
116 
117  // -------------------------------------------------------------------
118  // Public Get & Set functions
119  public:
124  inline uint16_t GetNbProjections()
125  {return m_nbOfProjections;};
130  inline FLTNB* GetAngles()
131  {return mp_angles;};
137  inline void SetEventKindFlagOn()
138  {m_eventKindFlag = true;}
144  inline void SetNbProjections(uint16_t a_nbProjections)
145  {m_nbOfProjections = a_nbProjections;}
152  {return m_detectorRotDirection;}
158  inline void SetDetectorRotDirection(int a_direction)
159  {m_detectorRotDirection = a_direction;}
165  inline bool GetEventKindFlag()
166  {return m_eventKindFlag;}
172  inline bool GetScatCorrectionFlag()
173  {return m_scatCorrectionFlag;}
180  {return m_blankCorrectionFlag;}
181 
182  // -------------------------------------------------------------------
183  // Private member functions
184  private:
190  int SetSpecificParametersFrom(vDataFile* ap_DataFile);
211  int WriteHistoEvent(iEventHistoCT* ap_Event, int a_th);
219  int WriteListEvent(iEventListCT* ap_Event, int a_th);
228 
229  // -------------------------------------------------------------------
230  // Data members
231  private:
232  bool m_eventKindFlag;
233  bool m_blankCorrectionFlag;
235  bool m_scatCorrectionFlag;
237  uint16_t m_nbOfProjections;
238  FLTNB* mp_angles;
240 };
241 
242 #endif
This class is designed to be a mother virtual class for DataFile.
Declaration of class vDataFile.
int InitAngles(FLTNB *ap_angles)
void SetDetectorRotDirection(int a_direction)
int SetSpecificParametersFrom(vDataFile *ap_DataFile)
Declaration of class iEventHistoCT.
Inherit from iEventCT. Class for CT list-mode events.
iDataFileCT()
iDataFileCT constructor. Initialize the member variables to their default values. ...
int ReadSpecificInfoInHeader(bool a_affectQuantificationFlag)
int WriteHeader()
Generate a header file according to the data output information.
int WriteListEvent(iEventListCT *ap_Event, int a_th)
int ComputeSizeEvent()
Computation of the size of each event according to the mandatory/optional correction fields...
vEvent * GetEventSpecific(char *ap_buffer, int a_th)
void SetNbProjections(uint16_t a_nbProjections)
int PROJ_GetScannerSpecificParameters()
Get SPECT specific parameters for projections from the scanner object, through the scannerManager...
int CheckSpecificParameters()
Check parameters specific to CT data.
void DescribeSpecific()
Implementation of the pure virtual eponym function that simply prints info about the datafile...
Inherit from iEventCT. Class for CT histogram mode events.
int PROJ_InitFile()
Initialize the fstream objets for output writing as well as some other variables specific to the Proj...
int CheckSpecificConsistencyWithAnotherDataFile(vDataFile *ap_DataFile)
Declaration of class iEventListCT.
int WriteEvent(vEvent *ap_Event, int a_th=0)
Mother class for the Event objects.
Inherit from vDataFile. Class that manages the reading of a CT input file (header + data)...
~iDataFileCT()
iDataFileCT destructor.
int WriteHistoEvent(iEventHistoCT *ap_Event, int a_th)
int PrepareDataFile()
Store different kind of information inside arrays (data relative to specific correction as well as ba...
int CheckFileSizeConsistency()
This function is implemented in child classes Check if file size is consistent. ...