CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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-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 IEVENTLISTPET_HH
32 #define IEVENTLISTPET_HH 1
33 
34 #include "iEventPET.hh"
35 
45 #define KIND_UNKNOWN 0
46 
47 #define KIND_TRUE 1
48 
49 #define KIND_SCAT 2
50 
51 #define KIND_MSCAT 3
52 
53 #define KIND_RDM 4
54 
63 class iEventListPET : public iEventPET
64 {
65  // -------------------------------------------------------------------
66  // Constructor & Destructor
67  public:
72  iEventListPET();
77 
78  // -------------------------------------------------------------------
79  // Public member functions
80  public:
86  inline int AllocateSpecificData() {return 0;}
91  void Describe();
92 
93  // -------------------------------------------------------------------
94  // Public Get & Set functions
95  public:
100  inline uint8_t GetKind()
101  {return m_kind;}
107  inline FLTNB GetEventScatRate(int a_bin)
108  {return m_eventScatRate;}
114  {return m_TOFMeasurement;}
119  inline FLTNB* GetPOI1()
120  {return mp_POI1;}
125  inline FLTNB* GetPOI2()
126  {return mp_POI2;}
132  inline FLTNB GetPOI1(uint8_t axis)
133  {return mp_POI1[axis];}
139  inline FLTNB GetPOI2(uint8_t axis)
140  {return mp_POI2[axis];}
146  inline FLTNB GetEventValue(int a_bin)
147  {return 1.;}
153  inline void SetKind(uint8_t a_value)
154  {m_kind = a_value;}
162  inline void SetScatterRate(int a_bin, FLTNBDATA a_value)
163  {m_eventScatRate = (FLTNB)a_value;}
169  inline void SetTOFMeasurement(FLTNB a_value)
170  {m_TOFMeasurement = a_value;}
177  {m_spatialTOFMeasurementRange = a_value;}
184  inline void SetPOI1(int a_axis, FLTNBDATA a_value)
185  {mp_POI1[a_axis] = (FLTNB)a_value;}
192  inline void SetPOI2(int a_axis, FLTNBDATA a_value)
193  {mp_POI2[a_axis] = (FLTNB)a_value;}
200  void SetEventValue(int a_bin, FLTNBDATA a_value);
206  FLTNB GetAdditiveCorrections(int a_bin);
213  {return 1;}
220  void SetHasTOFinfo(bool a_hasTOFinfo)
221  {m_hasTOFinfo = a_hasTOFinfo;}
227  inline void MultiplyAdditiveCorrections(FLTNB a_factor)
228  {m_eventRdmRate *= a_factor; m_eventScatRate *= a_factor;}
229 
230  // -------------------------------------------------------------------
231  // Private member functions
232  private:
233 
234  // -------------------------------------------------------------------
235  // Data members
236  private:
237  uint8_t m_kind;
244 };
245 
246 #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:162
~iEventListPET()
iEventListPET destructor.
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 SetTOFMeasurement(FLTNB a_value)
Initialize the TOFmeasurement with a value passed in parameters.
FLTNB GetEventValue(int a_bin)
FLTNB mp_POI1[3]
#define FLTNBDATA
Definition: gVariables.hh:87
FLTNB GetTOFMeasurement()
Inherit from iEventPET. Class for PET list-mode events.
void MultiplyAdditiveCorrections(FLTNB a_factor)
Divide additive corrections by the provided factor (scatters and randoms)
void SetSpatialTOFMeasurementRange(FLTNB a_value)
Initialize the spatialTOFMeasurementRange with a value passed in parameters.
FLTNB GetPOI2(uint8_t axis)
void SetHasTOFinfo(bool a_hasTOFinfo)
Set whether this event contains TOF information or not, awareness of TOF info existence is important ...
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()
FLTNB m_spatialTOFMeasurementRange
Inherit from vEvent. Main PET class for the Event objects.
Definition: iEventPET.hh:42
#define INTNB
Definition: gVariables.hh:92
Declaration of class iEventPET.
FLTNB * GetPOI1()
FLTNB m_TOFMeasurement
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)