CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
iEventListPET.cc
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 
31 #include "iEventListPET.hh"
32 #include "vDataFile.hh"
33 #include "sOutputManager.hh"
34 
35 // =====================================================================
36 // ---------------------------------------------------------------------
37 // ---------------------------------------------------------------------
38 // =====================================================================
39 
41 {
45  mp_POI1[0] = 0.;
46  mp_POI1[1] = 0.;
47  mp_POI1[2] = -1.;
48  mp_POI2[0] = 0.;
49  mp_POI2[1] = 0.;
50  mp_POI2[2] = -1.;
52  m_eventScatRate = 0.;
54  m_eventValue = 1.;
55  m_nbLines = 1;
57  m_hasTOFInfo = false;
58 }
59 
60 // =====================================================================
61 // ---------------------------------------------------------------------
62 // ---------------------------------------------------------------------
63 // =====================================================================
64 
66 
67 // =====================================================================
68 // ---------------------------------------------------------------------
69 // ---------------------------------------------------------------------
70 // =====================================================================
71 
72 void iEventListPET::SetEventValue(int a_bin, FLTNBDATA a_value)
73 {
75  Cout("***** iEventListPET::SetEventValue() -> Trying to set the value of a list mode event !");
76  Exit(EXIT_FAILURE);
77 }
78 
79 // =====================================================================
80 // ---------------------------------------------------------------------
81 // ---------------------------------------------------------------------
82 // =====================================================================
83 
85 {
87  Cout("iEventListPET::Describe() -> Display contents" << endl);
88  Cout("Time: " << m_timeInMs << " ms" << endl);
89  Cout("Number of lines: " << m_nbLines << endl);
90  for (uint16_t l=0; l<m_nbLines; l++) Cout(" --> ID1: " << mp_ID1[l] << " | ID2: " << mp_ID2[l] << endl);
91  Cout("Random rate: " << m_eventRdmRate << endl);
92  Cout("Normalization factor: " << m_eventNormFactor << endl);
93  Cout("ACF: " << m_atnCorrFactor << endl);
94 // Cout("kind: " << m_kind << endl);
95  Cout("Scatter rate: " << m_eventScatRate << endl);
96  Cout("TOF measurement: " << m_TOFMeasurementInPs << " ps" << endl);
97  Cout("TOF measurement range: " << m_TOFMeasurementRangeInPs << " ps" << endl);
98  Cout("POI1 (x ; y ; z ) = " << mp_POI1[0] <<" ; " << mp_POI1[1] <<" ; " << mp_POI1[2] <<" ; " << endl);
99  Cout("POI2 (x ; y ; z ) = " << mp_POI2[0] <<" ; " << mp_POI2[1] <<" ; " << mp_POI2[2] <<" ; " << endl);
100  Cout(flush);
101 }
102 
103 // =====================================================================
104 // ---------------------------------------------------------------------
105 // ---------------------------------------------------------------------
106 // =====================================================================
107 
109 {
111  // If TOF, convert the LOR random rate into the random rate matching a single event with continuous TOF measurement
112  // (division by the total range of TOF measurements)
114 }
115 
116 // =====================================================================
117 // ---------------------------------------------------------------------
118 // ---------------------------------------------------------------------
119 // =====================================================================
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...
#define VERBOSE_DEBUG_EVENT
#define TYPE_PET
Definition: vDataFile.hh:73
#define MODE_LIST
Definition: vDataFile.hh:56
#define FLTNB
Definition: gVariables.hh:81
iEventListPET()
iEventListPET constructor. Initialize the member variables to their default values.
int m_verbose
Definition: vEvent.hh:232
#define SPEED_OF_LIGHT_IN_MM_PER_PS
Definition: gVariables.hh:106
uint32_t * mp_ID2
Definition: vEvent.hh:227
FLTNB m_eventRdmRate
Definition: iEventPET.hh:161
~iEventListPET()
iEventListPET destructor.
FLTNB m_eventNormFactor
Definition: iEventPET.hh:162
int m_dataType
Definition: vEvent.hh:229
FLTNB mp_POI1[3]
#define KIND_UNKNOWN
void Exit(int code)
#define FLTNBDATA
Definition: gVariables.hh:87
FLTNB m_TOFMeasurementInPs
#define VERBOSE_DEBUG_LIGHT
uint32_t * mp_ID1
Definition: vEvent.hh:226
Declaration of class vDataFile.
FLTNB m_atnCorrFactor
Definition: iEventPET.hh:163
FLTNB m_eventValue
Definition: vEvent.hh:228
FLTNB m_TOFMeasurementRangeInPs
void Describe()
This function can be used to get a description of the event printed out.
FLTNB GetAdditiveCorrections(int a_bin)
Inherit from vEvent. Main PET class for the Event objects.
Definition: iEventPET.hh:41
Declaration of class iEventListPET.
int m_dataMode
Definition: vEvent.hh:230
Declaration of class sOutputManager.
#define SPEC_EMISSION
Definition: vDataFile.hh:90
#define DEBUG_VERBOSE(IGNORED1, IGNORED2)
#define Cout(MESSAGE)
FLTNB mp_POI2[3]
uint16_t m_nbLines
Definition: vEvent.hh:225
uint32_t m_timeInMs
Definition: vEvent.hh:224
int m_dataSpec
Definition: vEvent.hh:231