CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iEventSPECT.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 IEVENTSPECT_HH
32 #define IEVENTSPECT_HH 1
33 
34 #include "vEvent.hh"
35 
42 class iEventSPECT : public vEvent
43 {
44  // -------------------------------------------------------------------
45  // Constructor & Destructor
46  public:
51  iEventSPECT();
55  virtual ~iEventSPECT();
56 
57  // -------------------------------------------------------------------
58  // Public member functions
59  public:
65  virtual int AllocateSpecificData() = 0;
70  virtual void Describe();
71 
72  // -------------------------------------------------------------------
73  // Public Get & Set functions
74  public:
80  {return m_eventNormFactor;}
86  {return m_eventScatRate;}
92  inline void SetNormalizationFactor(FLTNBDATA a_value)
93  {m_eventNormFactor = (FLTNB)a_value;}
99  inline void SetScatterRate(FLTNBDATA a_value)
100  {m_eventScatRate = (FLTNB)a_value;}
106  inline FLTNB GetAdditiveCorrections(int a_bin)
107  {return m_eventScatRate;}
113  {return m_eventNormFactor;}
120  virtual FLTNB GetEventValue(int a_bin) = 0;
127  virtual void SetEventValue(int a_bin, FLTNBDATA a_value) = 0;
133  virtual INTNB GetNbValueBins() = 0;
139  inline void MultiplyAdditiveCorrections(FLTNB a_factor)
140  {m_eventScatRate *= a_factor;}
141 
142  // -------------------------------------------------------------------
143  // Private member functions
144  private:
145 
146  // -------------------------------------------------------------------
147  // Data members
148  protected:
151 };
152 
153 #endif
void SetNormalizationFactor(FLTNBDATA a_value)
Cast the FLTNBDATA value passed as parameter in FLTNB, and set it to the normalization term...
Definition: iEventSPECT.hh:92
#define FLTNB
Definition: gVariables.hh:81
virtual void SetEventValue(int a_bin, FLTNBDATA a_value)=0
Set the event value, this is a pure virtual function implemented in the child classes.
virtual int AllocateSpecificData()=0
Pure virtual function implemented in the child classes, dedicated to the allocation of specific data ...
FLTNB GetMultiplicativeCorrections()
Definition: iEventSPECT.hh:112
virtual void Describe()
This function can be used to get a description of the event printed out.
Definition: iEventSPECT.cc:62
#define FLTNBDATA
Definition: gVariables.hh:87
void MultiplyAdditiveCorrections(FLTNB a_factor)
Divide additive corrections by the provided factor (scatters)
Definition: iEventSPECT.hh:139
virtual ~iEventSPECT()
iEventSPECT destructor.
Definition: iEventSPECT.cc:55
Declaration of class vEvent.
FLTNB m_eventScatRate
Definition: iEventSPECT.hh:149
FLTNB GetNormFactor()
Definition: iEventSPECT.hh:79
virtual INTNB GetNbValueBins()=0
Get the number of event value bins.
#define INTNB
Definition: gVariables.hh:92
FLTNB m_eventNormFactor
Definition: iEventSPECT.hh:150
iEventSPECT()
iEventSPECT constructor. Initialize the member variables to their default values. ...
Definition: iEventSPECT.cc:41
Mother class for the Event objects.
Definition: vEvent.hh:43
Inherit from vEvent. Main SPECT class for the Event objects.
Definition: iEventSPECT.hh:42
FLTNB GetAdditiveCorrections(int a_bin)
Definition: iEventSPECT.hh:106
virtual FLTNB GetEventValue(int a_bin)=0
Pure virtual function implemented in the child classes.
FLTNB GetEventScatRate()
Definition: iEventSPECT.hh:85
void SetScatterRate(FLTNBDATA a_value)
Cast the FLTNBDATA value passed as parameter in FLTNB, and set it to the scatter correction rate...
Definition: iEventSPECT.hh:99