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