CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
iEventListPET.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 IEVENTLISTPET_HH
31 #define IEVENTLISTPET_HH 1
32 
33 #include "iEventPET.hh"
34 
44 #define KIND_UNKNOWN 0
45 
46 #define KIND_TRUE 1
47 
48 #define KIND_SCAT 2
49 
50 #define KIND_MSCAT 3
51 
52 #define KIND_RDM 4
53 
62 class iEventListPET : public iEventPET
63 {
64  // -------------------------------------------------------------------
65  // Constructor & Destructor
66  public:
71  iEventListPET();
76 
77  // -------------------------------------------------------------------
78  // Public member functions
79  public:
85  inline int AllocateSpecificData() {return 0;}
90  void Describe();
91 
92  // -------------------------------------------------------------------
93  // Public Get & Set functions
94  public:
99  inline uint8_t GetKind()
100  {return m_kind;}
106  inline FLTNB GetEventScatRate(int a_bin)
107  {
108  (void)a_bin; // avoid 'unused parameter' compil. warnings
109  return m_eventScatRate;
110  }
116  {return m_TOFMeasurementInPs;}
121  inline FLTNB* GetPOI1()
122  {return mp_POI1;}
127  inline FLTNB* GetPOI2()
128  {return mp_POI2;}
134  inline FLTNB GetPOI1(uint8_t axis)
135  {return mp_POI1[axis];}
141  inline FLTNB GetPOI2(uint8_t axis)
142  {return mp_POI2[axis];}
148  inline FLTNB GetEventValue(int a_bin)
149  {
150  (void)a_bin; // avoid 'unused parameter' compil. warnings
151  return 1.;
152  }
158  inline void SetKind(uint8_t a_value)
159  {m_kind = a_value;}
167  inline void SetScatterRate(int a_bin, FLTNBDATA a_value)
168  {
169  (void)a_bin; // avoid 'unused parameter' compil. warnings
170  m_eventScatRate = (FLTNB)a_value;
171  }
177  inline void SetTOFMeasurementInPs(FLTNB a_value)
178  {m_TOFMeasurementInPs = a_value;}
184  inline void SetTOFMeasurementRangeInPs(FLTNB a_value)
185  {m_TOFMeasurementRangeInPs = a_value;}
192  inline void SetPOI1(int a_axis, FLTNBDATA a_value)
193  {mp_POI1[a_axis] = (FLTNB)a_value;}
200  inline void SetPOI2(int a_axis, FLTNBDATA a_value)
201  {mp_POI2[a_axis] = (FLTNB)a_value;}
208  void SetEventValue(int a_bin, FLTNBDATA a_value);
214  FLTNB GetAdditiveCorrections(int a_bin);
221  {return 1;}
228  void SetHasTOFInfo(bool a_hasTOFInfo)
229  {m_hasTOFInfo = a_hasTOFInfo;}
235  inline void MultiplyAdditiveCorrections(FLTNB a_factor)
236  {m_eventRdmRate *= a_factor; m_eventScatRate *= a_factor;}
237 
238  // -------------------------------------------------------------------
239  // Private member functions
240  private:
241 
242  // -------------------------------------------------------------------
243  // Data members
244  private:
245  uint8_t m_kind;
252 };
253 
254 #endif
FLTNB GetPOI1(uint8_t axis)
void SetEventValue(int a_bin, FLTNBDATA a_value)
Throw a warning (depending of verbosity) as the event value of a list-mode Event should be equal to 1...
void SetScatterRate(int a_bin, FLTNBDATA a_value)
Cast the FLTNBDATA value passed as parameter in FLTNB, and set it to the scatter correction rate in 1...
#define FLTNB
Definition: gVariables.hh:81
iEventListPET()
iEventListPET constructor. Initialize the member variables to their default values.
void SetPOI2(int a_axis, FLTNBDATA a_value)
Initialize the POI of the crystal #2 with a value for the specific axis.
FLTNB m_eventRdmRate
Definition: iEventPET.hh:161
~iEventListPET()
iEventListPET destructor.
void SetTOFMeasurementRangeInPs(FLTNB a_value)
Initialize the TOFMeasurementRange with a value passed in parameters (in ps)
void SetKind(uint8_t a_value)
Set the kind of coincidence.
void SetPOI1(int a_axis, FLTNBDATA a_value)
Initialize the POI of the crystal #1 with a value for the specific axis.
void SetTOFMeasurementInPs(FLTNB a_value)
Initialize the TOFmeasurement with a value passed in parameters, in ps.
FLTNB GetEventValue(int a_bin)
FLTNB mp_POI1[3]
#define FLTNBDATA
Definition: gVariables.hh:87
Inherit from iEventPET. Class for PET list-mode events.
FLTNB m_TOFMeasurementInPs
void MultiplyAdditiveCorrections(FLTNB a_factor)
Divide additive corrections by the provided factor (scatters and randoms)
FLTNB GetPOI2(uint8_t axis)
FLTNB m_TOFMeasurementRangeInPs
uint8_t GetKind()
void Describe()
This function can be used to get a description of the event printed out.
FLTNB GetAdditiveCorrections(int a_bin)
FLTNB * GetPOI2()
Inherit from vEvent. Main PET class for the Event objects.
Definition: iEventPET.hh:41
#define INTNB
Definition: gVariables.hh:92
Declaration of class iEventPET.
FLTNB * GetPOI1()
INTNB GetNbValueBins()
Get the number of event value bins.
FLTNB mp_POI2[3]
int AllocateSpecificData()
Function allowing the allocation of specific data. Return 0 by default for iEventListPET.
FLTNB GetEventScatRate(int a_bin)
void SetHasTOFInfo(bool a_hasTOFInfo)
Set whether this event contains TOF information or not, awareness of TOF info existence is important ...
FLTNB GetTOFMeasurementInPs()