151 Cerr(
"***** oProjectorManager::CheckParameters() -> No scanner provided !" << endl);
157 Cerr(
"***** oProjectorManager::CheckParameters() -> No image dimensions provided !" << endl);
163 Cerr(
"***** oProjectorManager::CheckParameters() -> No data file provided !" << endl);
171 Cerr(
"***** oProjectorManager::CheckParameters() -> Unknown computation strategy provided !" << endl);
177 Cerr(
"***** oProjectorManager::CheckParameters() -> No forward projector options provided !" << endl);
183 Cerr(
"***** oProjectorManager::CheckParameters() -> No backward projector options provided !" << endl);
189 Cerr(
"***** oProjectorManager::CheckParameters() -> Wrong verbosity level provided !" << endl);
212 Cerr(
"***** oProjectorManager::CheckSPECTAttenuationCompatibility() -> The image-computation strategy of the oProjectionLine is not compatible with SPECT attenuation correction !");
218 Cerr(
"***** oProjectorManager::CheckSPECTAttenuationCompatibility() -> The forward projector is not compatible with SPECT attenuation correction !" << endl);
224 Cerr(
"***** oProjectorManager::CheckSPECTAttenuationCompatibility() -> The backward projector is not compatible with SPECT attenuation correction !" << endl);
242 Cerr(
"***** oProjectorManager::Initialize() -> Must call CheckParameters() before Initialize() !" << endl);
247 if (
m_verbose>=1)
Cout(
"oProjectorManager::Initialize() -> Initialize projectors and projection lines" << endl);
325 Cerr(
"***** oProjectorManager::Initialize() -> POI information has no sense with histogram data !" << endl);
347 Cerr(
"***** oProjectorManager::Initialize() -> A problem occurred while parsing projector options and initializing it !" << endl);
359 if ( (dynamic_cast<iDataFilePET*>(
mp_DataFile))->GetMaxNumberOfLinesPerEvent() > 1 )
364 Cerr(
"***** oProjectorManager::Initialize() -> Cannot use a loaded forward system matrix with compression in the datafile !" << endl);
370 Cerr(
"***** oProjectorManager::Initialize() -> Selected forward projector '" <<
m_forwardProjectorName <<
"' is not compatible with compression in the datafile !" << endl);
376 Cerr(
"***** oProjectorManager::Initialize() -> Cannot use a loaded backward system matrix with compression in the datafile !" << endl);
382 Cerr(
"***** oProjectorManager::Initialize() -> Selected backward projector '" <<
m_backwardProjectorName <<
"' is not compatible with compression in the datafile !" << endl);
419 Cerr(
"***** oProjectorManager::Initialize() -> An error occurred while checking parameters of an oProjectionLine !" << endl);
424 Cerr(
"***** oProjectorManager::Initialize() -> An error occurred while initializing an oProjectionLine !" << endl);
441 string list_options =
"";
442 string file_options =
"";
459 if (colon!=string::npos)
469 else if (comma!=string::npos)
500 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> Loading of custom system matrices is not yet implemented !" << endl);
518 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> Projector '" << m_forwardProjectorName <<
"' does not exist !" << endl);
525 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while setting the image dimensions of the forward projector !" << endl);
538 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while parsing and reading forward projector's common options !" << endl);
544 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while parsing and reading forward projector's configuration file !" << endl);
550 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while parsing and reading forward projector's options !" << endl);
556 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while checking forward projector parameters !" << endl);
562 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while initializing the forward projector !" << endl);
591 if (colon!=string::npos)
601 else if (comma!=string::npos)
632 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> Loading of custom system matrices is not yet implemented !" << endl);
650 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> Projector '" << m_backwardProjectorName <<
"' does not exist !" << endl);
657 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while setting the image dimensions of the backward projector !" << endl);
669 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while parsing and reading backward projector's common options !" << endl);
675 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while parsing and reading backward projector's configuration file !" << endl);
681 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while parsing and reading backward projector's options !" << endl);
687 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while checking backward projector parameters !" << endl);
693 Cerr(
"***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while initializing backward projector !" << endl);
767 Cerr(
"***** oProjectorManager::ComputeProjectionLine() -> Called while not initialized !" << endl);
816 int return_value = 0;
823 Cerr(
"***** oProjectorManager::ComputeProjectionLine() -> A problem occurred while forward projecting an event !" << endl);
837 Cerr(
"***** oProjectorManager::ComputeProjectionLine() -> A problem occurred while backward projecting an event !" << endl);
855 Cerr(
"***** oProjectorManager::ProcessAndSetMask() -> Mask already initialized !" << endl);
oProjectionLine ** m2p_ProjectionLines
int m_computationStrategy
#define VERBOSE_DEBUG_EVENT
FLTNB GetTOFMeasurementRangeInPs()
#define IMAGE_COMPUTATION_STRATEGY
void SetMask(bool *ap_mask)
Set a mask for voxels.
void SetThreadNumber(int a_threadNumber)
This function is used to set the thread number of this particular line.
#define SPEED_OF_LIGHT_IN_MM_PER_PS
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...
FLTNB GetBedPosition(int a_bedIndex)
Get the bed position associated to a bed index.
string m_forwardProjectorName
This class is designed to generically described any on-the-fly projector.
bool GetCompatibilityWithSPECTAttenuationCorrection()
int Initialize()
A public function used to initialize the projector.
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.
void SetTOFMeasurementInPs(FLTNB a_TOFMeasurementInPs)
This function is used to set the TOF measurement associated to the line.
bool m_useSystemMatrixBackward
oProjectorManager()
The constructor of oProjectorManager.
void SetSensitivityModeOff()
Say that the projector will no longer be used to compute the global sensitivity.
#define ADAPTATIVE_LIST_COMPUTATION_STRATEGY
bool m_useSystemMatrixForward
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()
void SetTOFBinSizeInMm(FLTNB a_TOFBinSizeInMm)
This function is used to set the size of a TOF bin in mm.
void SetApplyTOF(int a_applyTOF)
Set the TOF mode.
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.
void SetSensitivityMode(bool a_sensitivityMode)
Set the sensitivity mode on or off.
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.
FLTNB GetTOFQuantizationBinSizeInPs()
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.
void SetTOFMeasurementRangeInMm(FLTNB a_TOFMeasurementRangeInMm)
This function is used to set the TOF measurement range in mm.
bool m_useProjectorForward
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 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_verbose)
This function is used to set the verbose level.
std::map< string, maker_projector > mp_listOfProjectors
void SetTOFResolutionInMm(FLTNB a_TOFResolutionInMm)
This function is used to set the TOF resolution in use.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
bool GetCompatibilityWithCompression()
void SetBackwardProjector(vProjector *ap_Projector)
This function is used to set the pointer to the backward projector.
bool m_useMatchedProjectors
#define SYSTEM_MATRIX_KEYWORD
FLTNB m_TOFResolutionInMm
int ProcessAndSetMask(FLTNB *ap_maskImage)
Process and set the provided mask image for projector masking.
bool m_useProjectorBackward
bool IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection()
void SetPOI1(FLTNB *ap_POI1)
This function is used to set the POI of point 1.
FLTNB GetTOFBinSizeInPs()
FLTNB GetTOFResolutionInPs()
string m_backwardProjectorName
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.
INTNB GetNbVoxXYZ()
Get the total number of voxels.
int GetNbThreadsForProjection()
Get the number of threads used for projections.
#define DEBUG_VERBOSE(IGNORED1, IGNORED2)
int Project(int a_direction, oProjectionLine *ap_ProjectionLine, uint32_t *ap_index1, uint32_t *ap_index2, int a_nbIndices)
void SetApplyPOI(bool a_applyPOI)
Set the POI mode.
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.
FLTNB m_TOFMeasurementRangeInMm
bool IsForwardOperatorCompatibleWithSPECTAttenuationCorrection()