CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iEventListSPECT.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 "iEventListSPECT.hh"
33 #include "vDataFile.hh"
34 #include "sOutputManager.hh"
35 
36 // =====================================================================
37 // ---------------------------------------------------------------------
38 // ---------------------------------------------------------------------
39 // =====================================================================
40 
42 {
46  mp_POI[0] = 0.;
47  mp_POI[1] = 0.;
48  mp_POI[2] = -1.;
50  m_eventValue = 1.;
51 }
52 
53 // =====================================================================
54 // ---------------------------------------------------------------------
55 // ---------------------------------------------------------------------
56 // =====================================================================
57 
59 
60 // =====================================================================
61 // ---------------------------------------------------------------------
62 // ---------------------------------------------------------------------
63 // =====================================================================
64 
65 void iEventListSPECT::SetEventValue(int a_bin, FLTNBDATA a_value)
66 {
68  Cout("***** iEventListSPECT::SetEventValue() -> Trying to set the value of a list mode event !");
69  Exit(EXIT_FAILURE);
70 }
71 
72 // =====================================================================
73 // ---------------------------------------------------------------------
74 // ---------------------------------------------------------------------
75 // =====================================================================
76 
78 {
80  Cout("iEventListSPECT::Describe() -> Display contents" << endl);
81  Cout("Time: " << m_timeInMs << " ms" << endl);
82  Cout("Number of lines: " << m_nbLines << endl);
83  for (uint16_t l=0; l<m_nbLines; l++) Cout(" --> ID1: " << mp_ID1[l] << " | ID2: " << mp_ID2[l] << endl);
84  Cout("Scatter rate: " << m_eventScatRate << endl);
85  Cout("Normalization factor: " << m_eventNormFactor << endl);
86  Cout("kind: " << m_kind << endl);
87  Cout("POI (x ; y ; z ) = " << mp_POI[0] <<" ; " << mp_POI[1] <<" ; " << mp_POI[2] <<" ; " << endl);
88  Cout(flush);
89 }
90 
91 // =====================================================================
92 // ---------------------------------------------------------------------
93 // ---------------------------------------------------------------------
94 // =====================================================================
#define MODE_LIST
Definition: vDataFile.hh:57
int m_verbose
Definition: vEvent.hh:233
uint32_t * mp_ID2
Definition: vEvent.hh:228
int m_dataType
Definition: vEvent.hh:230
#define TYPE_SPECT
Definition: vDataFile.hh:76
#define KIND_UNKNOWN
void Exit(int code)
#define FLTNBDATA
Definition: gVariables.hh:87
~iEventListSPECT()
iEventListSPECT destructor.
iEventListSPECT()
iEventListSPECT constructor. Initialize the member variables to their default values.
#define VERBOSE_DEBUG_LIGHT
uint32_t * mp_ID1
Definition: vEvent.hh:227
Declaration of class vDataFile.
FLTNB m_eventValue
Definition: vEvent.hh:229
Declaration of class iEventListSPECT.
FLTNB m_eventScatRate
Definition: iEventSPECT.hh:149
FLTNB m_eventNormFactor
Definition: iEventSPECT.hh:150
int m_dataMode
Definition: vEvent.hh:231
Declaration of class sOutputManager.
void Describe()
This function can be used to get a description of the event printed out.
Inherit from vEvent. Main SPECT class for the Event objects.
Definition: iEventSPECT.hh:42
#define SPEC_EMISSION
Definition: vDataFile.hh:91
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 DEBUG_VERBOSE(IGNORED1, IGNORED2)
#define Cout(MESSAGE)
uint16_t m_nbLines
Definition: vEvent.hh:226
uint32_t m_timeInMs
Definition: vEvent.hh:225
int m_dataSpec
Definition: vEvent.hh:232