![]() |
CASToR
3.2
Tomographic Reconstruction (PET/SPECT/CT)
|
This class is designed to manage the computation of the sensitivity image. More...
#include <oSensitivityGenerator.hh>
Public Member Functions | |
oSensitivityGenerator () | |
The constructor of oSensitivityGenerator. More... | |
~oSensitivityGenerator () | |
The destructor of oSensitivityGenerator. More... | |
int | CheckParameters () |
A public function used to check the parameters settings. More... | |
int | Initialize () |
A public function used to initialize the sensitivity generator. More... | |
int | Launch () |
A public function used to launch the sensitivity generator (compute the sensitivity image) More... | |
string | GetPathToSensitivityImage () |
This function return the path to the sensitivity image. More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
void | SetImageSpace (oImageSpace *ap_ImageSpace) |
void | SetScanner (vScanner *ap_Scanner) |
void | SetProjectorManager (oProjectorManager *ap_ProjectorManager) |
void | SetImageConvolverManager (oImageConvolverManager *ap_ImageConvolverManager) |
void | SetDeformationManager (oDeformationManager *ap_DeformationManager) |
void | SetDataFile (vDataFile **a2p_DataFile) |
void | SetComputeFromHistogramFlag (bool a_computeFromHistogramFlag) |
void | SetPathToNormalizationFileName (vector< string > ap_pathToNormalizationFileName, bool a_inverseDataFileOrderFlag) |
void | SetPathToAttenuationImage (string a_pathToAttenuationImage) |
void | SetNumberOfAtnGateImages (int a_nbAtnRespGateImages, int a_nbAtnCardGateImages) |
void | SetGPUflag (bool a_flagGPU) |
void | SetVerbose (int a_verboseLevel) |
oSensitivityGenerator () | |
~oSensitivityGenerator () | |
int | CheckParameters () |
int | Initialize () |
int | Launch () |
string | GetPathToSensitivityImage () |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
void | SetImageSpace (oImageSpace *ap_ImageSpace) |
void | SetScanner (vScanner *ap_Scanner) |
void | SetProjectorManager (oProjectorManager *ap_ProjectorManager) |
void | SetImageConvolverManager (oImageConvolverManager *ap_ImageConvolverManager) |
void | SetDeformationManager (oDeformationManager *ap_DeformationManager) |
void | SetDataFile (vDataFile **a2p_DataFile) |
void | SetComputeFromHistogramFlag (bool a_computeFromHistogramFlag) |
void | SetPathToNormalizationFileName (vector< string > ap_pathToNormalizationFileName, bool a_inverseDataFileOrderFlag) |
void | SetPathToAttenuationImage (string a_pathToAttenuationImage) |
void | SetNumberOfAtnGateImages (int a_nbAtnRespGateImages, int a_nbAtnCardGateImages) |
void | SetGPUflag (bool a_flagGPU) |
void | SetVerbose (int a_verboseLevel) |
Private Member Functions | |
int | InitializeAttenuationFiles () |
Initialize the attenuation images provided for sensitivity computation. More... | |
int | InitializeNormalizationFiles () |
Initialize the normalization datafiles provided for sensitivity computation. More... | |
int | LaunchCPU () |
Launch the computation of the sensitivity image (CPU version) More... | |
int | ComputeSensitivityFromHistogramDataFile (int a_bed) |
int | ComputeSensitivityFromNormalizationFile (int a_bed) |
int | ComputeSensitivityFromScanner (int a_bed) |
int | ProcessThisLine (oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_frame, int a_respGate, int a_cardGate, int a_thread) |
int | InitializeAttenuationFiles () |
int | InitializeNormalizationFiles () |
int | LaunchCPU () |
int | ComputeSensitivityFromHistogramDataFile (int a_bed) |
int | ComputeSensitivityFromNormalizationFile (int a_bed) |
int | ComputeSensitivityFromScanner (int a_bed) |
int | ProcessThisLine (oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_frame, int a_respGate, int a_cardGate, int a_thread) |
Private Attributes | |
string | m_pathToSensitivityImage |
oImageDimensionsAndQuantification * | mp_ImageDimensionsAndQuantification |
oImageSpace * | mp_ImageSpace |
vScanner * | mp_Scanner |
oProjectorManager * | mp_ProjectorManager |
oImageConvolverManager * | mp_ImageConvolverManager |
oDeformationManager * | mp_DeformationManager |
vDataFile ** | m2p_DataFile |
bool | m_computeFromHistogramFlag |
vector< string > | mp_pathToNormalizationFileName |
bool | m_inverseDataFileOrderFlag |
vDataFile *** | m3p_NormalizationDataFile |
bool | m_oneNormalizationFileForAllBeds |
bool | m_oneNormalizationFileForAllFrames |
string | m_pathToAttenuationImage |
bool | m_mumapAttenuationFlag |
bool | m_forwardProjectAttenuation |
int | m_nbAtnRespGateImages |
int | m_nbAtnCardGateImages |
uint64_t * | mp_lineCounter |
bool | m_flagGPU |
int | m_verbose |
bool | m_checked |
bool | m_initialized |
This class is designed to manage the computation of the sensitivity image.
The sensitivity computation can be done in two ways:
(i) using a normalization data file if provided, where the loop for computation will be done on all events included in the datafile, with included normalization factors;
(ii) if no normalization file is provided, using a loop on all scanner elements.
A mumap in cm-1 can also be provided in order to include the attenuation correction in the sensitivity image.
Definition at line 33 of file code/include/algorithm/oSensitivityGenerator.hh.
oSensitivityGenerator::oSensitivityGenerator | ( | ) |
The constructor of oSensitivityGenerator.
This is the default and unique constructor. It does not take any parameter and its role is only to affect default values to each member of the class.
Definition at line 17 of file code/src/algorithm/oSensitivityGenerator.cc.
oSensitivityGenerator::~oSensitivityGenerator | ( | ) |
The destructor of oSensitivityGenerator.
This is the default and unique destructor. It does not take any parameter and its role is only to free or delete all structures that were built by this class.
Definition at line 51 of file code/src/algorithm/oSensitivityGenerator.cc.
oSensitivityGenerator::oSensitivityGenerator | ( | ) |
oSensitivityGenerator::~oSensitivityGenerator | ( | ) |
int oSensitivityGenerator::CheckParameters | ( | ) |
A public function used to check the parameters settings.
This function does not take any parameter and is used to check that all mandatory members were correctly parameterized.
Definition at line 79 of file code/src/algorithm/oSensitivityGenerator.cc.
int oSensitivityGenerator::CheckParameters | ( | ) |
|
private |
Definition at line 592 of file code/src/algorithm/oSensitivityGenerator.cc.
|
private |
|
private |
Definition at line 717 of file code/src/algorithm/oSensitivityGenerator.cc.
|
private |
|
private |
Definition at line 891 of file code/src/algorithm/oSensitivityGenerator.cc.
|
private |
string oSensitivityGenerator::GetPathToSensitivityImage | ( | ) |
string oSensitivityGenerator::GetPathToSensitivityImage | ( | ) |
This function return the path to the sensitivity image.
Definition at line 1300 of file code/src/algorithm/oSensitivityGenerator.cc.
int oSensitivityGenerator::Initialize | ( | ) |
A public function used to initialize the sensitivity generator.
This function does not take any parameter and is used to initialize everything that should be initialized.
Definition at line 155 of file code/src/algorithm/oSensitivityGenerator.cc.
int oSensitivityGenerator::Initialize | ( | ) |
|
private |
Initialize the attenuation images provided for sensitivity computation.
This function is called by the Initialize() function. It checks and reads the provided attenuation images to be taken into account for sensitivity computation.
Definition at line 408 of file code/src/algorithm/oSensitivityGenerator.cc.
|
private |
|
private |
Initialize the normalization datafiles provided for sensitivity computation.
This function is called by the Initialize() function. It checks and reads the provided normalization datafiles to be taken into account for sensitivity computation.
Definition at line 223 of file code/src/algorithm/oSensitivityGenerator.cc.
|
private |
int oSensitivityGenerator::Launch | ( | ) |
int oSensitivityGenerator::Launch | ( | ) |
A public function used to launch the sensitivity generator (compute the sensitivity image)
This function does not take any parameter and is used to launch the computation of the sensitivity image. In fact, it simply switches between the CPU and GPU versions of the function (which are private).
Definition at line 477 of file code/src/algorithm/oSensitivityGenerator.cc.
|
private |
Launch the computation of the sensitivity image (CPU version)
This function calls either the ComputeSensitivityFromNormalizationFile() or the ComputeSensitivityFromScanner() function based on normalization data files provided or not.
It does the loop over all bed positions.
Definition at line 495 of file code/src/algorithm/oSensitivityGenerator.cc.
|
private |
|
private |
|
private |
Definition at line 1232 of file code/src/algorithm/oSensitivityGenerator.cc.
|
inline |
Definition at line 228 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 228 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 221 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 221 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 214 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 214 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 259 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 259 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 207 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 207 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 179 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 179 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 186 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 186 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 252 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 252 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 244 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 244 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 236 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 236 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 200 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 200 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 193 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 193 of file code/include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 266 of file include/algorithm/oSensitivityGenerator.hh.
|
inline |
Definition at line 266 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Pointer to the array of vDataFile objects
Definition at line 280 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Pointer to the double array of vDataFile objects for normalization
Definition at line 284 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Boolean that says if the parameters were checked or not
Definition at line 295 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
A boolean to specify if the datafile is histogram and that the sensitivity must be computed from it
Definition at line 281 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Do we use GPU or not (default=false)
Definition at line 293 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Flag to say that we need to forward project the provided attenuation map (many conditions for that)
Definition at line 289 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Boolean that says if the projector was initialized or not
Definition at line 296 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Flag to say that the provided normalization data file names order must be reversed
Definition at line 283 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Flag to say if an attenuation image has to been provided
Definition at line 288 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Number of attenuation images corresponding to the cardiac gates
Definition at line 291 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Number of attenuation images corresponding to the respiratory gates
Definition at line 290 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
A boolean to specify if only one normalization file has been provided for all beds
Definition at line 285 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
A boolean to specify if only one normalization file has been provided for all frames
Definition at line 286 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
String of the path to the attenuation images
Definition at line 287 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
The actual path to the created sensitivity image
Definition at line 267 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Verbosity (default=-1)
Definition at line 294 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Pointer to the Deformation Manager object
Definition at line 279 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Pointer to the Image Convolver Manager object
Definition at line 278 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Pointer to the oImageDimensionsAndQuantification object
Definition at line 274 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Pointer to the Image Space object
Definition at line 275 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Counters of the number of effectively projected lines, 1 per thread
Definition at line 292 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Vector of normalization file names
Definition at line 282 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Pointer to the Projector Manager object
Definition at line 277 of file code/include/algorithm/oSensitivityGenerator.hh.
|
private |
Pointer to the Scanner object
Definition at line 276 of file code/include/algorithm/oSensitivityGenerator.hh.