128 Cerr(
"***** oProjectorManager::CheckParameters() -> No scanner provided !" << endl);
134 Cerr(
"***** oProjectorManager::CheckParameters() -> No image dimensions provided !" << endl);
140 Cerr(
"***** oProjectorManager::CheckParameters() -> No data file provided !" << endl);
148 Cerr(
"***** oProjectorManager::CheckParameters() -> Unknown computation strategy provided !" << endl);
154 Cerr(
"***** oProjectorManager::CheckParameters() -> No forward projector options provided !" << endl);
160 Cerr(
"***** oProjectorManager::CheckParameters() -> No backward projector options provided !" << endl);
166 Cerr(
"***** oProjectorManager::CheckParameters() -> Wrong verbosity level provided !" << endl);
189 Cerr(
"***** oProjectorManager::CheckSPECTAttenuationCompatibility() -> The image-computation strategy of the oProjectionLine is not compatible with SPECT attenuation correction !");
195 Cerr(
"***** oProjectorManager::CheckSPECTAttenuationCompatibility() -> The forward projector is not compatible with SPECT attenuation correction !" << endl);
201 Cerr(
"***** oProjectorManager::CheckSPECTAttenuationCompatibility() -> The backward projector is not compatible with SPECT attenuation correction !" << endl);
219 Cerr(
"***** oProjectorManager::Initialize() -> Must call CheckParameters() before Initialize() !" << endl);
224 if (
m_verbose>=1)
Cout(
"oProjectorManager::Initialize() -> Initialize projectors and projection lines" << endl);
227 FLTNB tof_resolution = -1.;
228 FLTNB tof_bin_size = -1.;
276 Cerr(
"***** oProjectorManager::Initialize() -> A problem occured while parsing projector options and initializing it !" << endl);
298 Cerr(
"***** oProjectorManager::Initialize() -> An error occured while checking parameters of an oProjectionLine !" << endl);
303 Cerr(
"***** oProjectorManager::Initialize() -> An error occured while initializing an oProjectionLine !" << endl);
320 string projector =
"";
321 string list_options =
"";
322 string file_options =
"";
339 if (colon!=string::npos)
349 else if (comma!=string::npos)
380 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> Loading of custom system matrices is not yet implemented !" << endl);
398 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> Projector '" << projector <<
"' does not exist !" << endl);
405 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while setting the image dimensions of the forward projector !" << endl);
410 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while setting the TOF and POI options of the forward projector !" << endl);
417 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while parsing and reading forward projector's common options !" << endl);
423 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while parsing and reading forward projector's configuration file !" << endl);
429 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while parsing and reading forward projector's options !" << endl);
435 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while checking forward projector parameters !" << endl);
441 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while initializing the forward projector !" << endl);
470 if (colon!=string::npos)
480 else if (comma!=string::npos)
511 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> Loading of custom system matrices is not yet implemented !" << endl);
529 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> Projector '" << projector <<
"' does not exist !" << endl);
536 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while setting the image dimensions of the backward projector !" << endl);
541 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while setting the TOF and POI of the backward projector !" << endl);
548 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while parsing and reading backward projector's common options !" << endl);
554 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while parsing and reading backward projector's configuration file !" << endl);
560 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while parsing and reading backward projector's options !" << endl);
566 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while checking backward projector parameters !" << endl);
572 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occured while initializing backward projector !" << endl);
592 if (nb_beds==1)
return;
594 FLTNB bed_offset = 0.;
620 Cerr(
"***** oProjectorManager::ComputeProjectionLine() -> Called while not initialized !" << endl);
669 int return_value = 0;
676 Cerr(
"***** oProjectorManager::ComputeProjectionLine() -> A problem occured while forward projecting an event !" << endl);
690 Cerr(
"***** oProjectorManager::ComputeProjectionLine() -> A problem occured while backward projecting an event !" << endl);
oProjectionLine ** m2p_ProjectionLines
int m_computationStrategy
#define VERBOSE_DEBUG_EVENT
#define IMAGE_COMPUTATION_STRATEGY
void SetThreadNumber(int a_threadNumber)
This function is used to set the thread number of this particular line.
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
This function is used to set the pointer to the oImageDimensionsAndQuantification in use...
void SetScanner(vScanner *ap_Scanner)
Set the pointer to the scanner in use.
void SetMatchedProjectors(bool a_UseMatchedProjectors)
This function is used to set the boolean that says if we use matched projectors.
int Initialize()
A function used to initialize the manager and the projectors or system matrices it manages...
bool m_UseProjectorForward
This class is designed to generically described any on-the-fly projector.
bool GetCompatibilityWithSPECTAttenuationCorrection()
int Initialize()
A public function used to initialize the projector.
bool m_UseProjectorBackward
int Project(int a_direction, oProjectionLine *ap_ProjectionLine, uint32_t *ap_index1, uint32_t *ap_index2, int a_nbIndices)
A function use to computed the projection elements with respect to the provided parameters.
oProjectorManager()
The constructor of oProjectorManager.
int SetTOFAndPOIOptions(int a_dataType, bool a_ignoreTOF, bool a_ignorePOI)
Set the TOF use as well as POI and checks compatibility with current data type.
#define TYPE_TRANSMISSION
#define ADAPTATIVE_LIST_COMPUTATION_STRATEGY
static sOutputManager * GetInstance()
Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise.
Declaration of class iDataFilePET.
bool GetCompatibilityWithSPECTAttenuationCorrection()
bool m_UseMatchedProjectors
static sAddonManager * GetInstance()
int ReadCommonOptionsList(const string &a_optionsList)
This function is used to read options common to all projectors given as a string. ...
oSystemMatrix * mp_SystemMatrixBackward
void SetVerbose(int a_verbose)
Set the verbose level.
#define FIXED_LIST_COMPUTATION_STRATEGY
~oProjectorManager()
The destructor of oProjectorManager.
void SetComputationStrategy(int a_computationStrategy)
This function is used to set the computation strategy in use.
int ParseOptionsAndInitializeProjectors()
Parse forward and backward projection options contained in the previously provided strings...
const string & GetPathToConfigDir()
Return the path to the CASTOR config directory.
int GetNbBeds()
Get the number of bed positions.
int CheckParameters()
A public function used to check the parameters settings.
oSystemMatrix * mp_SystemMatrixForward
virtual int ReadOptionsList(const string &a_optionsList)=0
A function used to read options from a list of options.
void SetNbTOFBins(int a_nbTOFBins)
This function is used to set the number of TOF bins in use.
virtual int ReadConfigurationFile(const string &a_configurationFile)=0
A function used to read options from a configuration file.
bool m_UseSystemMatrixBackward
void SetPOI2(FLTNB *ap_POI2)
This function is used to set the POI of point 2.
oProjectionLine * ComputeProjectionLine(vEvent *ap_Event, int a_th)
This function is used to compute system matrix elements from the associated projector or pre-computed...
FLTNB * GetPOIResolution()
void Reset()
Reset length and all the voxel indices and weights tabs.
int CheckParameters()
A function used to check the parameters settings.
void SetTOFBinSize(FLTNB a_TOFBinSize)
This function is used to set the size of a TOF bin in ps.
void ApplyBedOffset(int a_bed)
Compute the bed offset from the provided bed index and apply it to all projection lines...
void SetVerbose(int a_verbose)
This function is used to set the verbose level.
std::map< string, maker_projector > mp_listOfProjectors
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
void SetBackwardProjector(vProjector *ap_Projector)
This function is used to set the pointer to the backward projector.
#define SYSTEM_MATRIX_KEYWORD
bool IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection()
void SetPOI1(FLTNB *ap_POI1)
This function is used to set the POI of point 1.
FLTNB GetMultiBedDisplacementInMm()
This class is designed to manage and store system matrix elements associated to a vEvent...
vProjector * mp_ProjectorBackward
vProjector * mp_ProjectorForward
void SetPOIResolution(FLTNB *ap_POIResolution)
This function is used to set the POI resolution along the 3 axes.
void SetForwardProjector(vProjector *ap_Projector)
This function is used to set the pointer to the forward projector.
Declaration of class sOutputManager.
Mother class for the Event objects.
void SetTOFResolution(FLTNB a_TOFResolution)
This function is used to set the TOF resolution in use.
int GetNbThreadsForProjection()
Get the number of threads used for projections.
bool m_UseSystemMatrixForward
void SetTOFMeasurement(FLTNB a_TOFMeasurement)
This function is used to set the TOF measurement associated to the line.
#define DEBUG_VERBOSE(IGNORED1, IGNORED2)
int Project(int a_direction, oProjectionLine *ap_ProjectionLine, uint32_t *ap_index1, uint32_t *ap_index2, int a_nbIndices)
int CheckSPECTAttenuationCompatibility(const string &a_pathToAttenuationImage)
A function used to check specific compatibility with SPECT and attenuation correction.
Declaration of class oProjectorManager.
int SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
Set the pointer to the image dimensions in use and copy locally some often use variables.
Inherit from vDataFile. Class that manages the reading of a PET input file (header + data)...
Declaration of class sAddonManager.
bool IsForwardOperatorCompatibleWithSPECTAttenuationCorrection()