CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iEventHistoPET.hh
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2018 all CASToR contributors listed below:
18 
19  --> current contributors: Thibaut MERLIN, Simon STUTE, Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Mael MILLARDET
20  --> past contributors: Valentin VIELZEUF
21 
22 This is CASToR version 2.0.
23 */
24 
31 #ifndef IEVENTHISTOPET_HH
32 #define IEVENTHISTOPET_HH 1
33 
34 #include "iEventPET.hh"
35 
41 class iEventHistoPET : public iEventPET
42 {
43  // -------------------------------------------------------------------
44  // Constructor & Destructor
45  public:
55 
56  // -------------------------------------------------------------------
57  // Public member functions
58  public:
70  void Describe();
71 
72  // -------------------------------------------------------------------
73  // Public Get & Set functions
74  public:
80  inline FLTNB GetEventScatRate(int a_bin)
81  {return mp_eventScatRate[a_bin];}
86  inline uint16_t GetEventNbTOFBins()
87  {return m_eventNbTOFBins;}
93  inline FLTNB GetEventValue(int a_bin)
94  {return mp_eventValue[a_bin];}
101  inline void SetScatterRate(int a_bin, FLTNBDATA a_value)
102  {mp_eventScatRate[a_bin] = (FLTNB)a_value;}
108  inline void SetEventNbTOFBins(uint16_t a_value)
109  {m_eventNbTOFBins = a_value;}
116  inline void SetEventValue(int a_bin, FLTNBDATA a_value)
117  {mp_eventValue[a_bin] = (FLTNB)a_value;}
124  {return m_eventNbTOFBins;}
129  FLTNB GetAdditiveCorrections(int a_bin);
135  inline void MultiplyAdditiveCorrections(FLTNB a_factor)
136  {m_eventRdmRate *= a_factor; for (uint16_t tof=0; tof<m_eventNbTOFBins; tof++) mp_eventScatRate[tof] *= a_factor;}
137 
138  // -------------------------------------------------------------------
139  // Private member functions
140  private:
141 
142  // -------------------------------------------------------------------
143  // Data members
144  private:
147  uint16_t m_eventNbTOFBins;
148 };
149 
150 #endif
~iEventHistoPET()
iEventHistoPET destructor.
void Describe()
This function can be used to get a description of the event printed out.
int AllocateSpecificData()
Function allowing the allocation of specific data. Instantiate and initialize the mp_eventValue and...
#define FLTNB
Definition: gVariables.hh:81
FLTNB m_eventRdmRate
Definition: iEventPET.hh:162
FLTNB GetEventScatRate(int a_bin)
void SetEventNbTOFBins(uint16_t a_value)
void MultiplyAdditiveCorrections(FLTNB a_factor)
Divide additive corrections by the provided factor (scatters and randoms)
uint16_t GetEventNbTOFBins()
iEventHistoPET()
iEventHistoPET constructor. Initialize the member variables to their default values.
#define FLTNBDATA
Definition: gVariables.hh:87
FLTNB GetEventValue(int a_bin)
Inherit from iEventPET. Class for PET histogram mode events.
void SetEventValue(int a_bin, FLTNBDATA a_value)
Cast the FLTNBDATA value passed in parameters in FLTNB, and use it to set the event value of the spec...
FLTNB * mp_eventScatRate
void SetScatterRate(int a_bin, FLTNBDATA a_value)
Set the scatter rate correction term in 1/s, this is a pure virtual function implemented in the child...
uint16_t m_eventNbTOFBins
FLTNB GetAdditiveCorrections(int a_bin)
Inherit from vEvent. Main PET class for the Event objects.
Definition: iEventPET.hh:42
#define INTNB
Definition: gVariables.hh:92
Declaration of class iEventPET.
INTNB GetNbValueBins()
Get the number of event value bins.