CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
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-2019 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF
20 
21 This is CASToR version 3.0.
22 */
23 
30 #ifndef IEVENTHISTOPET_HH
31 #define IEVENTHISTOPET_HH 1
32 
33 #include "iEventPET.hh"
34 
40 class iEventHistoPET : public iEventPET
41 {
42  // -------------------------------------------------------------------
43  // Constructor & Destructor
44  public:
54 
55  // -------------------------------------------------------------------
56  // Public member functions
57  public:
69  void Describe();
70 
71  // -------------------------------------------------------------------
72  // Public Get & Set functions
73  public:
79  inline FLTNB GetEventScatRate(int a_bin)
80  {return mp_eventScatRate[a_bin];}
85  inline uint16_t GetEventNbTOFBins()
86  {return m_eventNbTOFBins;}
92  inline FLTNB GetEventValue(int a_bin)
93  {return mp_eventValue[a_bin];}
100  inline void SetScatterRate(int a_bin, FLTNBDATA a_value)
101  {mp_eventScatRate[a_bin] = (FLTNB)a_value;}
107  inline void SetEventNbTOFBins(uint16_t a_value)
108  {m_eventNbTOFBins = a_value;}
115  inline void SetEventValue(int a_bin, FLTNBDATA a_value)
116  {mp_eventValue[a_bin] = (FLTNB)a_value;}
123  {return m_eventNbTOFBins;}
128  FLTNB GetAdditiveCorrections(int a_bin);
134  inline void MultiplyAdditiveCorrections(FLTNB a_factor)
135  {m_eventRdmRate *= a_factor; for (uint16_t tof=0; tof<m_eventNbTOFBins; tof++) mp_eventScatRate[tof] *= a_factor;}
136 
137  // -------------------------------------------------------------------
138  // Private member functions
139  private:
140 
141  // -------------------------------------------------------------------
142  // Data members
143  private:
146  uint16_t m_eventNbTOFBins;
147 };
148 
149 #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:161
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:41
#define INTNB
Definition: gVariables.hh:92
Declaration of class iEventPET.
INTNB GetNbValueBins()
Get the number of event value bins.