CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
include/algorithm/oSensitivityGenerator.hh
Go to the documentation of this file.
1 
8 #ifndef OSENSITIVITYGENERATOR_HH
9 #define OSENSITIVITYGENERATOR_HH 1
10 
11 #include "gVariables.hh"
12 #include "oImageDimensionsAndQuantification.hh"
13 #include "oProjectorManager.hh"
14 #include "oImageConvolverManager.hh"
15 #include "oDeformationManager.hh"
16 #include "oDynamicModelManager.hh"
17 #include "oImageSpace.hh"
18 #include "vDataFile.hh"
19 #include "vDeformation.hh"
20 #include "sOutputManager.hh"
21 #include "vScanner.hh"
22 
23 
24 
34 {
35  // -------------------------------------------------------------------
36  // Constructor & Destructor
37  public:
52 
53 
54  // -------------------------------------------------------------------
55  // Public member functions
56  public:
64  int CheckParameters();
72  int Initialize();
81  int Launch();
82 
83 
84  // -------------------------------------------------------------------
85  // Private member functions
86  private:
111  int LaunchCPU();
112  #ifdef CASTOR_GPU
113 
119  int LaunchGPU();
120  #endif
121 
146  int ComputeSensitivityFromScanner(int a_bed);
162  int ProcessThisLine(oProjectionLine* ap_Line, vEvent* ap_Event, int a_bed, int a_frame, int a_respGate, int a_cardGate, int a_thread);
163 
164 
165  // -------------------------------------------------------------------
166  // Public Get & Set functions
167  public:
173  string GetPathToSensitivityImage();
179  inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification)
180  {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;};
186  inline void SetImageSpace(oImageSpace* ap_ImageSpace)
187  {mp_ImageSpace = ap_ImageSpace;};
193  inline void SetScanner(vScanner* ap_Scanner)
194  {mp_Scanner = ap_Scanner;}
200  inline void SetProjectorManager(oProjectorManager* ap_ProjectorManager)
201  {mp_ProjectorManager = ap_ProjectorManager;};
207  inline void SetImageConvolverManager(oImageConvolverManager* ap_ImageConvolverManager)
208  {mp_ImageConvolverManager = ap_ImageConvolverManager;}
214  inline void SetDeformationManager(oDeformationManager* ap_DeformationManager)
215  {mp_DeformationManager = ap_DeformationManager;};
221  inline void SetDataFile(vDataFile** a2p_DataFile)
222  {m2p_DataFile = a2p_DataFile;};
228  inline void SetComputeFromHistogramFlag(bool a_computeFromHistogramFlag)
229  {m_computeFromHistogramFlag = a_computeFromHistogramFlag;}
236  inline void SetPathToNormalizationFileName(vector<string> ap_pathToNormalizationFileName, bool a_inverseDataFileOrderFlag)
237  { mp_pathToNormalizationFileName = ap_pathToNormalizationFileName;
238  m_inverseDataFileOrderFlag = a_inverseDataFileOrderFlag; }
244  inline void SetPathToAttenuationImage(string a_pathToAttenuationImage)
245  {m_pathToAttenuationImage = a_pathToAttenuationImage;};
252  inline void SetNumberOfAtnGateImages(int a_nbAtnRespGateImages, int a_nbAtnCardGateImages)
253  {m_nbAtnRespGateImages = a_nbAtnRespGateImages; m_nbAtnCardGateImages = a_nbAtnCardGateImages;};
259  inline void SetGPUflag(bool a_flagGPU)
260  {m_flagGPU = a_flagGPU;};
266  inline void SetVerbose(int a_verboseLevel)
267  {m_verbose = a_verboseLevel;};
268 
269  // -------------------------------------------------------------------
270  // Data members
271  private:
272  string m_pathToSensitivityImage;
282  vector<string> mp_pathToNormalizationFileName;
287  string m_pathToAttenuationImage;
292  uint64_t* mp_lineCounter;
293  bool m_flagGPU;
294  int m_verbose;
295  bool m_checked;
296  bool m_initialized;
297 };
298 
299 #endif
300 
301 
302 
303 
304 
305 
306 
307 
308 
309 
310 
311 
312 
void SetDataFile(vDataFile **a2p_DataFile)
This class is designed to be a mother virtual class for DataFile.
void SetNumberOfAtnGateImages(int a_nbAtnRespGateImages, int a_nbAtnCardGateImages)
int ProcessThisLine(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_frame, int a_respGate, int a_cardGate, int a_thread)
oSensitivityGenerator()
The constructor of oSensitivityGenerator.
int Initialize()
A public function used to initialize the sensitivity generator.
void SetImageConvolverManager(oImageConvolverManager *ap_ImageConvolverManager)
void SetPathToAttenuationImage(string a_pathToAttenuationImage)
string GetPathToSensitivityImage()
This function return the path to the sensitivity image.
void SetProjectorManager(oProjectorManager *ap_ProjectorManager)
~oSensitivityGenerator()
The destructor of oSensitivityGenerator.
int Launch()
A public function used to launch the sensitivity generator (compute the sensitivity image) ...
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
void SetDeformationManager(oDeformationManager *ap_DeformationManager)
void SetComputeFromHistogramFlag(bool a_computeFromHistogramFlag)
This class is designed to manage the different image convolvers and to apply them.
int InitializeAttenuationFiles()
Initialize the attenuation images provided for sensitivity computation.
int LaunchCPU()
Launch the computation of the sensitivity image (CPU version)
void SetImageSpace(oImageSpace *ap_ImageSpace)
This class is designed to manage and store system matrix elements associated to a vEvent...
This class is designed to manage the image-based deformation part of the reconstruction.
void SetPathToNormalizationFileName(vector< string > ap_pathToNormalizationFileName, bool a_inverseDataFileOrderFlag)
This class is designed to manage the projection part of the reconstruction.
This class holds all the matrices in the image domain that can be used in the algorithm: image...
Mother class for the Event objects.
int InitializeNormalizationFiles()
Initialize the normalization datafiles provided for sensitivity computation.
int CheckParameters()
A public function used to check the parameters settings.
This class is designed to manage all dimensions and quantification related stuff. ...
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
This class is designed to manage the computation of the sensitivity image.
Generic class for scanner objects.