CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
oProjectorManager.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 OPROJECTORMANAGER_HH
32 #define OPROJECTORMANAGER_HH 1
33 
34 #include "gVariables.hh"
35 #include "vScanner.hh"
36 #include "vProjector.hh"
37 #include "oSystemMatrix.hh"
38 #include "oProjectionLine.hh"
39 #include "vDataFile.hh"
40 #include "vEvent.hh"
41 
54 {
55  // -------------------------------------------------------------------
56  // Constructor & Destructor
57  public:
72 
73 
74  // -------------------------------------------------------------------
75  // Public member functions
76  public:
84  int CheckParameters();
94  int CheckSPECTAttenuationCompatibility(const string& a_pathToAttenuationImage);
104  int Initialize();
110  void ApplyBedOffset(int a_bed);
116  void SetSensitivityModeOn();
122  void SetSensitivityModeOff();
132  oProjectionLine* ComputeProjectionLine(vEvent* ap_Event, int a_th);
133 
134 
135  // -------------------------------------------------------------------
136  // Public Get & Set functions
137  public:
143  inline void SetVerbose(int a_verboseLevel)
144  {m_verbose = a_verboseLevel;}
150  inline void SetScanner(vScanner* ap_Scanner)
151  {mp_Scanner = ap_Scanner;}
157  inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification)
158  {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;}
164  inline void SetDataFile(vDataFile* ap_DataFile)
165  {mp_DataFile = ap_DataFile;}
171  inline void SetComputationStrategy(int a_computationStrategy)
172  {m_computationStrategy = a_computationStrategy;}
178  inline void SetOptionsForward(const string& a_optionsForward)
179  {m_optionsForward = a_optionsForward;}
185  inline void SetOptionsBackward(const string& a_optionsBackward)
186  {m_optionsBackward = a_optionsBackward;}
192  inline void SetOptionsCommon(const string& a_optionsCommon)
193  {m_optionsCommon = a_optionsCommon;}
199  inline int GetNbTOFBins()
200  {return m_nbTOFBins;}
207  {return m_computationStrategy;}
223  int ProcessAndSetMask(FLTNB* ap_maskImage);
224 
225  // -------------------------------------------------------------------
226  // Private member functions
227  private:
241 
242 
243  // -------------------------------------------------------------------
244  // Data members
245  private:
246  // Scanner and image dimensions
250  // DataFile
252  // TOF and POI options
254  bool m_applyPOI;
256  // Computation strategy for projection lines
258  // Forward and backward options for projectors
261  // Common options for projectors
263  // Forward and backward projectors
275  // Forward and backward projection lines (as many as threads)
277  // Verbose level
278  int m_verbose;
279  // Has been checked ?
280  bool m_checked;
281  // Has been initialized ?
283  bool m_applyMask;
284  bool* mp_mask;
285 };
286 
287 #endif
oProjectionLine ** m2p_ProjectionLines
This class is designed to be a mother virtual class for DataFile.
Definition: vDataFile.hh:103
This header file is mainly used to declare some macro definitions and all includes needed from the st...
#define FLTNB
Definition: gVariables.hh:81
void SetComputationStrategy(int a_computationStrategy)
Set the computation strategy for the system matrix elements storage.
int Initialize()
A function used to initialize the manager and the projectors or system matrices it manages...
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
Set the image dimensions in use.
This class is designed to generically described any on-the-fly projector.
Definition: vProjector.hh:76
oProjectorManager()
The constructor of oProjectorManager.
void SetOptionsForward(const string &a_optionsForward)
Set the forward projection options contained in the provided string.
void SetSensitivityModeOff()
Say that the projector will no longer be used to compute the global sensitivity.
void SetOptionsCommon(const string &a_optionsCommon)
Set the common projection options contained in the provided string.
Declaration of class oSystemMatrix.
void SetOptionsBackward(const string &a_optionsBackward)
Set the backward projection options contained in the provided string.
oSystemMatrix * mp_SystemMatrixBackward
Declaration of class oProjectionLine.
~oProjectorManager()
The destructor of oProjectorManager.
int ParseOptionsAndInitializeProjectors()
Parse forward and backward projection options contained in the previously provided strings...
Declaration of class vProjector.
Declaration of class vScanner.
Declaration of class vDataFile.
oSystemMatrix * mp_SystemMatrixForward
Declaration of class vEvent.
oProjectionLine * ComputeProjectionLine(vEvent *ap_Event, int a_th)
This function is used to compute system matrix elements from the associated projector or pre-computed...
int GetComputationStrategy()
Get the computation strategy for the storage in the projection line.
int CheckParameters()
A function used to check the parameters settings.
void ApplyBedOffset(int a_bed)
Compute the bed offset from the provided bed index and apply it to all projection lines...
void SetSensitivityModeOn()
Say that the projector will be used to compute the global sensitivity.
void SetVerbose(int a_verboseLevel)
Set the verbose level.
This class is designed to manage pre-computed system matrices.
void SetDataFile(vDataFile *ap_DataFile)
Set a data file in use to later recover some information from it.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
int ProcessAndSetMask(FLTNB *ap_maskImage)
Process and set the provided mask image for projector masking.
bool IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection()
This class is designed to manage and store system matrix elements associated to a vEvent...
vProjector * mp_ProjectorBackward
vProjector * mp_ProjectorForward
This class is designed to manage the projection part of the reconstruction.
int GetNbTOFBins()
Get the number of TOF bins associated to the projector.
Mother class for the Event objects.
Definition: vEvent.hh:43
This class is designed to manage all dimensions and quantification related stuff. ...
int CheckSPECTAttenuationCompatibility(const string &a_pathToAttenuationImage)
A function used to check specific compatibility with SPECT and attenuation correction.
void SetScanner(vScanner *ap_Scanner)
Set the scanner in use.
Generic class for scanner objects.
Definition: vScanner.hh:62
bool IsForwardOperatorCompatibleWithSPECTAttenuationCorrection()