CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
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-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 
30 #ifndef IEVENTSPECT_HH
31 #define IEVENTSPECT_HH 1
32 
33 #include "vEvent.hh"
34 
41 class iEventSPECT : public vEvent
42 {
43  // -------------------------------------------------------------------
44  // Constructor & Destructor
45  public:
50  iEventSPECT();
54  virtual ~iEventSPECT();
55 
56  // -------------------------------------------------------------------
57  // Public member functions
58  public:
64  virtual int AllocateSpecificData() = 0;
69  virtual void Describe();
70 
71  // -------------------------------------------------------------------
72  // Public Get & Set functions
73  public:
79  {return m_eventNormFactor;}
85  {return m_eventScatRate;}
91  inline void SetNormalizationFactor(FLTNBDATA a_value)
92  {m_eventNormFactor = (FLTNB)a_value;}
98  inline void SetScatterRate(FLTNBDATA a_value)
99  {m_eventScatRate = (FLTNB)a_value;}
105  inline FLTNB GetAdditiveCorrections(int a_bin)
106  {
107  (void)a_bin; // avoid 'unused parameter' compil. warnings
108  return m_eventScatRate;
109  }
115  {return m_eventNormFactor;}
122  virtual FLTNB GetEventValue(int a_bin) = 0;
129  virtual void SetEventValue(int a_bin, FLTNBDATA a_value) = 0;
135  virtual INTNB GetNbValueBins() = 0;
141  inline void MultiplyAdditiveCorrections(FLTNB a_factor)
142  {m_eventScatRate *= a_factor;}
143 
144  // -------------------------------------------------------------------
145  // Private member functions
146  private:
147 
148  // -------------------------------------------------------------------
149  // Data members
150  protected:
153 };
154 
155 #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:91
#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:114
virtual void Describe()
This function can be used to get a description of the event printed out.
Definition: iEventSPECT.cc:61
#define FLTNBDATA
Definition: gVariables.hh:87
void MultiplyAdditiveCorrections(FLTNB a_factor)
Divide additive corrections by the provided factor (scatters)
Definition: iEventSPECT.hh:141
virtual ~iEventSPECT()
iEventSPECT destructor.
Definition: iEventSPECT.cc:54
Declaration of class vEvent.
FLTNB m_eventScatRate
Definition: iEventSPECT.hh:151
FLTNB GetNormFactor()
Definition: iEventSPECT.hh:78
virtual INTNB GetNbValueBins()=0
Get the number of event value bins.
#define INTNB
Definition: gVariables.hh:92
FLTNB m_eventNormFactor
Definition: iEventSPECT.hh:152
iEventSPECT()
iEventSPECT constructor. Initialize the member variables to their default values. ...
Definition: iEventSPECT.cc:40
Mother class for the Event objects.
Definition: vEvent.hh:42
Inherit from vEvent. Main SPECT class for the Event objects.
Definition: iEventSPECT.hh:41
FLTNB GetAdditiveCorrections(int a_bin)
Definition: iEventSPECT.hh:105
virtual FLTNB GetEventValue(int a_bin)=0
Pure virtual function implemented in the child classes.
FLTNB GetEventScatRate()
Definition: iEventSPECT.hh:84
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:98