CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
oSensitivityGenerator.hh
Go to the documentation of this file.
1 
9 #ifndef OSENSITIVITYGENERATOR_HH
10 #define OSENSITIVITYGENERATOR_HH 1
11 
12 #include "gVariables.hh"
14 #include "oProjectorManager.hh"
16 #include "oDeformationManager.hh"
17 #include "oDynamicModelManager.hh"
18 #include "oImageSpace.hh"
19 #include "vDataFile.hh"
20 #include "vDeformation.hh"
21 #include "sOutputManager.hh"
22 #include "vScanner.hh"
23 
24 
25 
35 {
36  // -------------------------------------------------------------------
37  // Constructor & Destructor
38  public:
53 
54 
55  // -------------------------------------------------------------------
56  // Public member functions
57  public:
65  int CheckParameters();
73  int Initialize();
82  int Launch();
83 
84 
85  // -------------------------------------------------------------------
86  // Private member functions
87  private:
112  int LaunchCPU();
113  #ifdef CASTOR_GPU
114 
120  int LaunchGPU();
121  #endif
122 
147  int ComputeSensitivityFromScanner(int a_bed);
163  int ProcessThisLine(oProjectionLine* ap_Line, vEvent* ap_Event, int a_bed, int a_frame, int a_respGate, int a_cardGate, int a_thread);
164 
165 
166  // -------------------------------------------------------------------
167  // Public Get & Set functions
168  public:
174  string GetPathToSensitivityImage();
180  inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification)
181  {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;};
187  inline void SetImageSpace(oImageSpace* ap_ImageSpace)
188  {mp_ImageSpace = ap_ImageSpace;};
194  inline void SetScanner(vScanner* ap_Scanner)
195  {mp_Scanner = ap_Scanner;}
201  inline void SetProjectorManager(oProjectorManager* ap_ProjectorManager)
202  {mp_ProjectorManager = ap_ProjectorManager;};
208  inline void SetImageConvolverManager(oImageConvolverManager* ap_ImageConvolverManager)
209  {mp_ImageConvolverManager = ap_ImageConvolverManager;}
215  inline void SetDeformationManager(oDeformationManager* ap_DeformationManager)
216  {mp_DeformationManager = ap_DeformationManager;};
222  inline void SetDataFile(vDataFile** a2p_DataFile)
223  {m2p_DataFile = a2p_DataFile;};
229  inline void SetComputeFromHistogramFlag(bool a_computeFromHistogramFlag)
230  {m_computeFromHistogramFlag = a_computeFromHistogramFlag;}
237  inline void SetPathToNormalizationFileName(vector<string> ap_pathToNormalizationFileName, bool a_inverseDataFileOrderFlag)
238  { mp_pathToNormalizationFileName = ap_pathToNormalizationFileName;
239  m_inverseDataFileOrderFlag = a_inverseDataFileOrderFlag; }
245  inline void SetPathToAttenuationImage(string a_pathToAttenuationImage)
246  {m_pathToAttenuationImage = a_pathToAttenuationImage;};
253  inline void SetNumberOfAtnGateImages(int a_nbAtnRespGateImages, int a_nbAtnCardGateImages)
254  {m_nbAtnRespGateImages = a_nbAtnRespGateImages; m_nbAtnCardGateImages = a_nbAtnCardGateImages;};
260  inline void SetGPUflag(bool a_flagGPU)
261  {m_flagGPU = a_flagGPU;};
267  inline void SetVerbose(int a_verboseLevel)
268  {m_verbose = a_verboseLevel;};
269 
270 
271  // -------------------------------------------------------------------
272  // Data members
273  private:
274  string m_pathToSensitivityImage;
294  uint64_t* mp_lineCounter;
295  bool m_flagGPU;
296  int m_verbose;
297  bool m_checked;
299 };
300 
301 #endif
302 
303 
304 
305 
306 
307 
308 
309 
310 
311 
312 
313 
314 
oImageConvolverManager * mp_ImageConvolverManager
This class is designed to be a mother virtual class for Datafile.
Definition: vDataFile.hh:67
This header file is mainly used to declare some macro definitions and all includes needed from the st...
Declaration of class oDynamicModelManager.
oProjectorManager * mp_ProjectorManager
Declaration of class oImageDimensionsAndQuantification.
void SetPathToAttenuationImage(string a_pathToAttenuationImage)
This function is used to set the path to the attenuation image.
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)
This function manages the computation of the sensitivity contribution of the projection line provided...
oSensitivityGenerator()
The constructor of oSensitivityGenerator.
int Initialize()
A public function used to initialize the sensitivity generator.
vDataFile *** m3p_NormalizationDataFile
oDeformationManager * mp_DeformationManager
Declaration of class oDeformationManager.
string GetPathToSensitivityImage()
This function return the path to the sensitivity image.
void SetDeformationManager(oDeformationManager *ap_DeformationManager)
This function is used to set the pointer to the oDeformationManager in use.
~oSensitivityGenerator()
The destructor of oSensitivityGenerator.
int Launch()
A public function used to launch the sensitivity generator (compute the sensitivity image) ...
void SetVerbose(int a_verboseLevel)
void SetImageConvolverManager(oImageConvolverManager *ap_ImageConvolverManager)
This function is used to set the pointer to the oImageConvolverManager in use.
void SetPathToNormalizationFileName(vector< string > ap_pathToNormalizationFileName, bool a_inverseDataFileOrderFlag)
This function is used to set the path to the normalization file names, and the flag saying if their o...
Declaration of class oImageConvolverManager.
void SetComputeFromHistogramFlag(bool a_computeFromHistogramFlag)
This function is used to set the m_computeFromHistogramFlag.
Declaration of class vScanner.
int ComputeSensitivityFromNormalizationFile(int a_bed)
Launch the computation of the sensitivity image for this bed, based on normalization data files...
Declaration of class vDataFile.
This class is designed to manage the different image convolvers and to apply them.
int InitializeAttenuationFiles()
Initialize the attenuation images provided for sensitivity computation.
void SetDataFile(vDataFile **a2p_DataFile)
This function is used to set the pointer to the vDataFile array in use.
int LaunchCPU()
Launch the computation of the sensitivity image (CPU version)
void SetImageSpace(oImageSpace *ap_ImageSpace)
This function is used to set the pointer to the oImageSpace in use.
Declaration of class vDeformation.
void SetScanner(vScanner *ap_Scanner)
This function is used to set the pointer to the vScanner in use.
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.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
Declaration of class oImageSpace.
This class is designed to manage the projection part of the reconstruction.
Declaration of class sOutputManager.
This class holds all the matrices in the image domain that can be used in the algorithm: image...
Definition: oImageSpace.hh:41
Mother class for the Event objects.
Definition: vEvent.hh:23
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. ...
vector< string > mp_pathToNormalizationFileName
void SetProjectorManager(oProjectorManager *ap_ProjectorManager)
This function is used to set the pointer to the oProjectorManager in use.
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
This function is used to set the pointer to the oImageDimensionsAndQuantification in use...
void SetGPUflag(bool a_flagGPU)
This function is used to set the GPU flag; do we use GPU or not.
int ComputeSensitivityFromHistogramDataFile(int a_bed)
Launch the computation of the sensitivity image for this bed, based on the input histogram data files...
Declaration of class oProjectorManager.
int ComputeSensitivityFromScanner(int a_bed)
Launch the computation of the sensitivity image for this bed, based on a loop over all scanner elemen...
This class is designed to manage the computation of the sensitivity image.
Generic class for scanner objects.
Definition: vScanner.hh:48