CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
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-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 OPROJECTORMANAGER_HH
31 #define OPROJECTORMANAGER_HH 1
32 
33 #include "gVariables.hh"
34 #include "vScanner.hh"
35 #include "vProjector.hh"
36 #include "oSystemMatrix.hh"
37 #include "oProjectionLine.hh"
38 #include "vDataFile.hh"
39 #include "vEvent.hh"
40 
53 {
54  // -------------------------------------------------------------------
55  // Constructor & Destructor
56  public:
71 
72 
73  // -------------------------------------------------------------------
74  // Public member functions
75  public:
83  int CheckParameters();
93  int CheckSPECTAttenuationCompatibility(const string& a_pathToAttenuationImage);
103  int Initialize();
109  void ApplyBedOffset(int a_bed);
115  void SetSensitivityModeOn();
121  void SetSensitivityModeOff();
131  oProjectionLine* ComputeProjectionLine(vEvent* ap_Event, int a_th);
132 
133 
134  // -------------------------------------------------------------------
135  // Public Get & Set functions
136  public:
142  inline void SetVerbose(int a_verboseLevel)
143  {m_verbose = a_verboseLevel;}
149  inline void SetScanner(vScanner* ap_Scanner)
150  {mp_Scanner = ap_Scanner;}
156  inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification)
157  {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;}
163  inline void SetDataFile(vDataFile* ap_DataFile)
164  {mp_DataFile = ap_DataFile;}
170  inline void SetComputationStrategy(int a_computationStrategy)
171  {m_computationStrategy = a_computationStrategy;}
177  inline void SetOptionsForward(const string& a_optionsForward)
178  {m_optionsForward = a_optionsForward;}
184  inline void SetOptionsBackward(const string& a_optionsBackward)
185  {m_optionsBackward = a_optionsBackward;}
191  inline void SetOptionsCommon(const string& a_optionsCommon)
192  {m_optionsCommon = a_optionsCommon;}
198  inline int GetNbTOFBins()
199  {return m_nbTOFBins;}
206  {return m_computationStrategy;}
222  int ProcessAndSetMask(FLTNB* ap_maskImage);
223 
224  // -------------------------------------------------------------------
225  // Private member functions
226  private:
240 
241 
242  // -------------------------------------------------------------------
243  // Data members
244  private:
245  // Scanner and image dimensions
249  // DataFile
251  // TOF and POI options
257  bool m_applyPOI;
258  // Computation strategy for projection lines
260  // Forward and backward options for projectors
263  // Common options for projectors
265  // Forward and backward projectors
277  // Forward and backward projection lines (as many as threads)
279  // Verbose level
280  int m_verbose;
281  // Has been checked ?
282  bool m_checked;
283  // Has been initialized ?
285  // Voxel mask
286  bool m_applyMask;
287  bool* mp_mask;
288 };
289 
290 #endif
oProjectionLine ** m2p_ProjectionLines
This class is designed to be a mother virtual class for DataFile.
Definition: vDataFile.hh:102
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:75
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:42
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:61
bool IsForwardOperatorCompatibleWithSPECTAttenuationCorrection()