CASToR
1.0
Tomographic Reconstruction (PET/SPECT)
|
00001 00009 #ifndef IDATAFILESPECT_HH 00010 #define IDATAFILESPECT_HH 1 00011 00012 #include "gVariables.hh" 00013 #include "vDataFile.hh" 00014 #include "vScanner.hh" 00015 #include "iEventHistoSPECT.hh" 00016 #include "iEventListSPECT.hh" 00017 00018 00019 00020 00028 class iDataFileSPECT : public vDataFile 00029 { 00030 // ------------------------------------------------------------------- 00031 // Constructor & Destructor 00032 public: 00037 iDataFileSPECT(); 00041 ~iDataFileSPECT(); 00042 00043 00044 // ------------------------------------------------------------------- 00045 // Public member functions 00046 public: 00052 int ReadSpecificInfoInHeader(); 00058 int ComputeSizeEvent(); 00065 int PrepareDataFile(); 00073 vEvent* GetEventFromBuffer(char* ap_buffer, int a_th); 00074 00075 00076 // ------------------------------------------------------------------- 00077 // Public functions dedicated to the projection script 00078 public: 00084 int PROJ_InitFile(); 00085 00086 00096 int PROJ_WriteEvent(vEvent* ap_Event, int a_th); 00097 00104 int PROJ_WriteHeader(); 00105 00111 int PROJ_GetScannerSpecificParameters(); 00116 uint16_t GetNbProjections() {return m_nbOfProjections;}; 00122 uint16_t GetNbBins(int axis) {return mp_nbOfBins[axis];}; 00123 00129 inline void SetEventKindFlagOn() 00130 {m_eventKindFlag = true;} 00131 00139 inline void SetIsotope(string a_value) 00140 {m_isotope = a_value;} 00141 00148 inline void SetNbBins(uint16_t a_binTrs, uint16_t a_binAxl) 00149 {mp_nbOfBins[0] = a_binTrs; mp_nbOfBins[1]=a_binAxl;} 00150 00156 inline void SetNbProjections(uint16_t a_nbProjections) 00157 {m_nbOfProjections = a_nbProjections;} 00158 00166 int InitAngles(FLTNB* ap_angles); 00167 00176 int InitCorToDetectorDistance(FLTNB* ap_CORtoDetectorDistance); 00177 00183 inline void SetHeadRotDirection(int a_direction) 00184 {m_headRotDirection = a_direction;} 00185 00186 00187 // ------------------------------------------------------------------- 00188 // Private member functions 00189 private: 00195 int CheckSpecificParameters(); 00202 int CheckFileSizeConsistency(); 00210 int PROJ_WriteHistoEvent(iEventHistoSPECT* ap_Event, int a_th); 00218 int PROJ_WriteListEvent(iEventListSPECT* ap_Event, int a_th); 00219 00220 00221 // ------------------------------------------------------------------- 00222 // Data members 00223 private: 00224 string m_isotope; 00225 bool m_eventKindFlag; 00226 bool m_normCorrectionFlag; 00227 bool m_ignoreNormCorrectionFlag; 00228 bool m_scatCorrectionFlag; 00229 bool m_ignoreScatCorrectionFlag; 00230 uint16_t mp_nbOfBins[2]; 00231 uint16_t m_nbOfProjections; 00232 FLTNB* mp_angles; 00234 uint16_t m_nbHeads; 00235 FLTNB* mp_CORtoDetectorDistance; 00240 int m_headRotDirection; 00241 }; 00242 00243 #endif