CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
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-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 IEVENTCT_HH
31 #define IEVENTCT_HH 1
32 
33 #include "vEvent.hh"
34 
41 class iEventCT : public vEvent
42 {
43  // -------------------------------------------------------------------
44  // Constructor & Destructor
45  public:
50  iEventCT();
54  virtual ~iEventCT();
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:
80  {return m_eventBlankValue;}
86  {return m_eventScatRate;}
92  inline void SetBlankValue(FLTNBDATA a_value)
93  {m_eventBlankValue = (FLTNB)a_value;}
99  inline void SetScatterRate(FLTNBDATA a_value)
100  {m_eventScatRate = (FLTNB)a_value;}
106  inline FLTNB GetAdditiveCorrections(int a_bin)
107  {
108  (void)a_bin; // avoid 'unused parameter' compil. warnings
109  return m_eventScatRate;
110  }
116  {return 1.;}
123  virtual FLTNB GetEventValue(int a_bin) = 0;
130  virtual void SetEventValue(int a_bin, FLTNBDATA a_value) = 0;
136  virtual INTNB GetNbValueBins() = 0;
142  inline void MultiplyAdditiveCorrections(FLTNB a_factor)
143  {m_eventScatRate *= a_factor;}
144 
145  // -------------------------------------------------------------------
146  // Private member functions
147  private:
148 
149  // -------------------------------------------------------------------
150  // Data members
151  protected:
154 };
155 
156 #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:99
Inherit from vEvent. Main CT class for the Event objects.
Definition: iEventCT.hh:41
virtual int AllocateSpecificData()=0
Pure virtual function implemented in the child classes, dedicated to the allocation of specific data ...
FLTNB GetEventScatRate()
Definition: iEventCT.hh:85
void MultiplyAdditiveCorrections(FLTNB a_factor)
Divide additive corrections by the provided factor (scatters)
Definition: iEventCT.hh:142
virtual ~iEventCT()
iEventCT destructor.
Definition: iEventCT.cc:54
virtual void Describe()
This function can be used to get a description of the event printed out.
Definition: iEventCT.cc:61
#define FLTNBDATA
Definition: gVariables.hh:87
iEventCT()
iEventCT constructor. Initialize the member variables to their default values.
Definition: iEventCT.cc:40
FLTNB m_eventScatRate
Definition: iEventCT.hh:152
Declaration of class vEvent.
FLTNB m_eventBlankValue
Definition: iEventCT.hh:153
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:79
void SetBlankValue(FLTNBDATA a_value)
Cast the FLTNBDATA value passed as parameter in FLTNB, and set it to the blank value.
Definition: iEventCT.hh:92
Mother class for the Event objects.
Definition: vEvent.hh:42
FLTNB GetAdditiveCorrections(int a_bin)
Definition: iEventCT.hh:106
virtual FLTNB GetEventValue(int a_bin)=0
Pure virtual function implemented in the child classes.
FLTNB GetMultiplicativeCorrections()
Definition: iEventCT.hh:115