CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iEventCT.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 IEVENTCT_HH
32 #define IEVENTCT_HH 1
33 
34 #include "vEvent.hh"
35 
42 class iEventCT : public vEvent
43 {
44  // -------------------------------------------------------------------
45  // Constructor & Destructor
46  public:
51  iEventCT();
55  virtual ~iEventCT();
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:
81  {return m_eventBlankValue;}
87  {return m_eventScatRate;}
93  inline void SetBlankValue(FLTNBDATA a_value)
94  {m_eventBlankValue = (FLTNB)a_value;}
100  inline void SetScatterRate(FLTNBDATA a_value)
101  {m_eventScatRate = (FLTNB)a_value;}
107  inline FLTNB GetAdditiveCorrections(int a_bin)
108  {return m_eventScatRate;}
114  {return 1.;}
121  virtual FLTNB GetEventValue(int a_bin) = 0;
128  virtual void SetEventValue(int a_bin, FLTNBDATA a_value) = 0;
134  virtual INTNB GetNbValueBins() = 0;
140  inline void MultiplyAdditiveCorrections(FLTNB a_factor)
141  {m_eventScatRate *= a_factor;}
142 
143  // -------------------------------------------------------------------
144  // Private member functions
145  private:
146 
147  // -------------------------------------------------------------------
148  // Data members
149  protected:
152 };
153 
154 #endif
virtual INTNB GetNbValueBins()=0
Get the number of event value bins.
#define FLTNB
Definition: gVariables.hh:81
void SetScatterRate(FLTNBDATA a_value)
Cast the FLTNBDATA value passed as parameter in FLTNB, and set it to the scatter correction rate...
Definition: iEventCT.hh:100
Inherit from vEvent. Main CT class for the Event objects.
Definition: iEventCT.hh:42
virtual int AllocateSpecificData()=0
Pure virtual function implemented in the child classes, dedicated to the allocation of specific data ...
FLTNB GetEventScatRate()
Definition: iEventCT.hh:86
void MultiplyAdditiveCorrections(FLTNB a_factor)
Divide additive corrections by the provided factor (scatters)
Definition: iEventCT.hh:140
virtual ~iEventCT()
iEventCT destructor.
Definition: iEventCT.cc:55
virtual void Describe()
This function can be used to get a description of the event printed out.
Definition: iEventCT.cc:62
#define FLTNBDATA
Definition: gVariables.hh:87
iEventCT()
iEventCT constructor. Initialize the member variables to their default values.
Definition: iEventCT.cc:41
FLTNB m_eventScatRate
Definition: iEventCT.hh:150
Declaration of class vEvent.
FLTNB m_eventBlankValue
Definition: iEventCT.hh:151
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.
#define INTNB
Definition: gVariables.hh:92
FLTNB GetBlankValue()
Definition: iEventCT.hh:80
void SetBlankValue(FLTNBDATA a_value)
Cast the FLTNBDATA value passed as parameter in FLTNB, and set it to the blank value.
Definition: iEventCT.hh:93
Mother class for the Event objects.
Definition: vEvent.hh:43
FLTNB GetAdditiveCorrections(int a_bin)
Definition: iEventCT.hh:107
virtual FLTNB GetEventValue(int a_bin)=0
Pure virtual function implemented in the child classes.
FLTNB GetMultiplicativeCorrections()
Definition: iEventCT.hh:113