CASToR  1.0
Tomographic Reconstruction (PET/SPECT)
iDataFilePET.hh
Go to the documentation of this file.
00001 
00010 #ifndef IDATAFILEPET_HH
00011 #define IDATAFILEPET_HH 1
00012 
00013 #include "gVariables.hh"
00014 #include "vDataFile.hh"
00015 
00016 
00017 
00018 
00026 class iDataFilePET : public vDataFile
00027 {
00028   // -------------------------------------------------------------------
00029   // Constructor & Destructor
00030   public:
00035     iDataFilePET();
00039     ~iDataFilePET();
00040 
00041 
00042   // -------------------------------------------------------------------
00043   // Public member functions
00044   public:
00050     int ReadSpecificInfoInHeader();
00056     int ComputeSizeEvent();
00063     int PrepareDataFile();
00071     vEvent* GetEventFromBuffer(char* ap_buffer, int a_th);
00072 
00073 
00074   // -------------------------------------------------------------------
00075   // Public Get & Set functions
00076   public:
00081     inline bool GetTOFInfoFlag()
00082            {return m_TOFInfoFlag;}
00087     inline bool GetIgnoreTOFFlag()
00088            {return m_ignoreTOFFlag;}
00093     inline FLTNB GetResolutionTOF()
00094            {return m_resolutionTOF;}
00099     inline int GetNbBinsTOF()
00100            {return m_nbBinsTOF;}
00105     inline FLTNB GetBinSizeTOF()
00106            {return m_binSizeTOF;}
00111     inline int GetMaxRingDiff()
00112            {return m_maxRingDiff;}
00117     inline void SetMaxNberLinesPerEvent(uint16_t a_value)
00118            {m_maxNumberOfLinesPerEvent = a_value;}
00126     inline void SetIsotope(string a_value)
00127            {m_isotope = a_value;} 
00134     inline void SetTOFResolution(FLTNB a_value)
00135            {m_resolutionTOF = a_value; m_TOFInfoFlag = true;} 
00142     inline void SetNbTOFBins(int a_value)
00143            {m_nbBinsTOF = a_value; m_TOFInfoFlag = true;} 
00149     inline void SetIgnoreTOFFlag(bool a_ignoreTOFFlag)
00150            {m_ignoreTOFFlag = a_ignoreTOFFlag;}
00157     inline void SetTOFBinSize(FLTNB a_value)
00158            {m_binSizeTOF = a_value; m_TOFInfoFlag = true;} 
00165     inline void SetEventKindFlagOn()
00166            {m_eventKindFlag = true;} 
00172     inline void SetAtnCorrectionFlagOn()
00173            {m_atnCorrectionFlag = true;} 
00179     inline void SetNormCorrectionFlagOn()
00180            {m_normCorrectionFlag = true;} 
00186     inline void SetScatterCorrectionFlagOn()
00187            {m_scatCorrectionFlag = true;} 
00193     inline void SetRandomCorrectionFlagOn()
00194            {m_randCorrectionFlag = true;} 
00200     inline bool GetNormCorrectionFlag()
00201            {return m_normCorrectionFlag;}
00207     inline bool GetAtnCorrectionFlag()
00208            {return m_atnCorrectionFlag;}
00209            
00210 
00211   // -------------------------------------------------------------------
00212   // Public functions dedicated to the projection script
00213   public:
00220     int PROJ_InitFile();
00221     
00222 
00232     int PROJ_WriteEvent(vEvent* ap_Event, int a_th);
00233 
00240     int PROJ_WriteHeader();
00241     
00247     int PROJ_GetScannerSpecificParameters();
00248 
00249 
00250   // -------------------------------------------------------------------
00251   // Private member functions
00252   private:
00259     int CheckSpecificParameters();
00267     int PROJ_WriteListEvent(iEventListPET* ap_Event, int a_th);
00275     int PROJ_WriteHistoEvent(iEventHistoPET* ap_Event, int a_th);
00282     int CheckFileSizeConsistency();
00283 
00284 
00285   // -------------------------------------------------------------------
00286   // Data members
00287   private:
00288     uint16_t m_maxNumberOfLinesPerEvent; 
00289     int m_maxRingDiff;                   
00290     string m_isotope;                    
00291     bool m_eventKindFlag;                
00292     bool m_atnCorrectionFlag;            
00293     bool m_ignoreAttnCorrectionFlag;     
00294     bool m_normCorrectionFlag;           
00295     bool m_ignoreNormCorrectionFlag;     
00296     bool m_scatCorrectionFlag;           
00297     bool m_ignoreScatCorrectionFlag;     
00298     bool m_randCorrectionFlag;           
00299     bool m_ignoreRandCorrectionFlag;     
00300     bool m_TOFInfoFlag;                  
00301     bool m_ignoreTOFFlag;                
00302     FLTNB m_resolutionTOF;               
00303     int m_nbBinsTOF;                     
00304     FLTNB m_binSizeTOF;                  
00305 };
00306 
00307 #endif
 All Classes Files Functions Variables Typedefs Defines