CASToR
2.0
Tomographic Reconstruction (PET/SPECT/CT)
|
Singleton class that Instantiate and initialize the scanner object. More...
#include <sScannerManager.hh>
Public Member Functions | |
void | Describe () |
Call the eponym function from the Scanner object (if initialized) More... | |
int | CheckParameters () |
Check if all parameters have been correctly initialized, and call the CheckParameters function of the scanner object. More... | |
int | Initialize () |
Initialization : . More... | |
int | ShowScannersDescription () |
Get the description associated to the different scanners and print all on screen. Walk through the scanner repository and look for the keyword "description" in .geom file and .hscan file. More... | |
int | FindScannerSystem (string a_scannerName) |
Look for a file matching with the scanner name in parameter inside the scanner repository. More... | |
int | InitScannerWithFile (string a_pathScanFile, string a_scannerName, int a_fileTypeFlag) |
Initialize member variables (file path, file type, and scanner name) with the provided arguments. More... | |
int | BuildScannerObject () |
Instantiate the specific scanner object related to the modality, and set verbosity of scanner object. More... | |
int | GetGeometricInfoFromDataFile (string a_pathToDataFilename) |
Call the specialized function of the scanner object in order to get geometric informations from the datafile header. More... | |
int | InstantiateScanner () |
Instantiate scanner using the related function in the scanner classes. More... | |
int | BuildLUT () |
Call the eponym function of the scanner class. More... | |
int | GetModalityFromString (string a_systemStr) |
A simple utility function which returns the integer corresponding to the system string passed in parameter. More... | |
bool | HasUserScannerFile () |
string | GetPathToScannerFile () |
string | GetScannerName () |
int | GetScannerType () |
vScanner * | GetScannerObject () |
int | GetSystemNbElts () |
void | SetVerbose (int a_verboseLevel) |
set verbosity More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ID) |
Set the pointer to the image dimensions and quantification object. More... | |
void | SetSaveLUTFlag (bool a_flag) |
Set to on the flag indicating a LUT generated by a geom file should be written on disk or not. More... | |
bool | SaveLUTFlag () |
Get flag indicating a LUT generated by a geom file should be written on disk or not. More... | |
int64_t | PROJ_GetModalityStopValueMainLoop () |
Get the stop value for the main loop of analytic projection depending on the modality. More... | |
int64_t | PROJ_GetModalityStartValueInnerLoop (int64_t a_elt1) |
Get the start value for the inner loop of analytic projection depending on the modality. More... | |
int64_t | PROJ_GetCurrentProgression (int64_t a_elt1, int64_t a_elt2, int64_t *ap_nbEltsArray, int a_nbRGates, int a_nbCGates, int a_fr, int a_rg, int a_cg) |
Get numerator value according to the modality to compute percent progression during the analytical projection process. More... | |
int64_t | PROJ_GetProgressionFinalValue () |
Get numerator value according to the modality to compute percent progression during the projection process. More... | |
int | GetSPECTSpecificParameters (uint16_t *ap_nbOfProjections, uint16_t *ap_nbHeads, FLTNB *ap_acquisitionZoom, uint16_t *ap_nbOfBins, FLTNB *ap_pixSizeXY, FLTNB *&ap_angles, FLTNB *&ap_CORtoDetectorDistance, int *ap_headRotDirection) |
Transfer geometric information recovered from the datafile to the scanner object. More... | |
int | GetCTSpecificParameters (uint16_t *ap_nbOfProjections, FLTNB *&ap_angles, int *ap_headRotDirection) |
Transfer geometric information recovered from the datafile to the scanner object. More... | |
int | PROJ_GetPETSpecificParameters (FLTNB *ap_maxAxialDiffmm) |
Transfer addresses to each geometric parameter of the PET scanner objets to the corresponding pointer of the datafile passed as argument. More... | |
int | PROJ_SetPETSpecificParameters (FLTNB a_maxAxialDiffmm) |
Deliver to the PET scanner object all informations provided from the datafile header. More... | |
int | PROJ_SetSPECTSpecificParameters (uint16_t *ap_nbOfBins, uint32_t a_nbOfProjections, FLTNB a_firstAngle, FLTNB a_stepAngle, FLTNB *ap_projectionAngles, FLTNB a_CORtoDetectorDistance, string a_rotDirection) |
Deliver to the SPECT scanner object all informations provided from the acquisition parameters. More... | |
Static Public Member Functions | |
static sScannerManager * | GetInstance () |
Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise. More... | |
Private Member Functions | |
sScannerManager () | |
sScannerManager constructor. More... | |
~sScannerManager () | |
sScannerManager destructor. More... | |
sScannerManager (sScannerManager const &) | |
void | operator= (sScannerManager const &) |
int | GetAvailableScanners (vector< string > *ap_scannerNames) |
Gather all the names of the header files (.geom & .hscan) in the repository folder in the vector<string> passed in parameter. More... | |
Private Attributes | |
vScanner * | mp_Scanner |
oImageDimensionsAndQuantification * | mp_ID |
int | m_verbose |
string | m_pathToScannerFile |
string | m_scannerName |
bool | m_hasUserScannerFile |
bool | m_hasGenericScannerFile |
bool | m_allParametersChecked |
bool | m_saveLUTFlag |
Static Private Attributes | |
static sScannerManager * | mp_Instance = NULL |
Singleton class that Instantiate and initialize the scanner object.
This class Instantiate and initialize the scanner object depending on its initilization file (generic .geom file or user LUT).
It holds several informations on the system and can be accessed from every class.
Definition at line 72 of file sScannerManager.hh.
|
private |
sScannerManager constructor.
It is private at this class is singleton.
It should be instanciated using the GetInstance() function
Initialize the member variables to their default values.
Definition at line 47 of file sScannerManager.cc.
|
private |
sScannerManager destructor.
Definition at line 67 of file sScannerManager.cc.
|
inlineprivate |
Definition at line 390 of file sScannerManager.hh.
int sScannerManager::BuildLUT | ( | ) |
Call the eponym function of the scanner class.
Definition at line 491 of file sScannerManager.cc.
int sScannerManager::BuildScannerObject | ( | ) |
Instantiate the specific scanner object related to the modality, and set verbosity of scanner object.
Definition at line 377 of file sScannerManager.cc.
int sScannerManager::CheckParameters | ( | ) |
Check if all parameters have been correctly initialized, and call the CheckParameters function of the scanner object.
Definition at line 81 of file sScannerManager.cc.
void sScannerManager::Describe | ( | ) |
Call the eponym function from the Scanner object (if initialized)
Definition at line 132 of file sScannerManager.cc.
int sScannerManager::FindScannerSystem | ( | string | a_scannerName | ) |
Look for a file matching with the scanner name in parameter inside the scanner repository.
a_scannerName | : string containing name of the required scanner |
Definition at line 249 of file sScannerManager.cc.
|
private |
Gather all the names of the header files (.geom & .hscan) in the repository folder in the vector<string> passed in parameter.
ap_scannerNames | : vector list of string to recover the available scanner names |
Definition at line 391 of file sScannerManager.hh.
int sScannerManager::GetCTSpecificParameters | ( | uint16_t * | ap_nbOfProjections, |
FLTNB *& | ap_angles, | ||
int * | ap_headRotDirection | ||
) |
Transfer geometric information recovered from the datafile to the scanner object.
ap_nbOfProjections | : number of views/projections |
ap_angles | : an array containing angles for each view |
ap_headRotDirection | : head rotation direction |
Definition at line 685 of file sScannerManager.cc.
int sScannerManager::GetGeometricInfoFromDataFile | ( | string | a_pathToDataFilename | ) |
Call the specialized function of the scanner object in order to get geometric informations from the datafile header.
a_path | : string containing the path to datafile header |
Definition at line 429 of file sScannerManager.cc.
|
inlinestatic |
Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise.
Definition at line 83 of file sScannerManager.hh.
int sScannerManager::GetModalityFromString | ( | string | a_systemStr | ) |
A simple utility function which returns the integer
corresponding to the system string passed in parameter.
a_systemStr | : String corresponding to a system (PET, CT, etc..) |
Definition at line 575 of file sScannerManager.cc.
|
inline |
Definition at line 196 of file sScannerManager.hh.
|
inline |
Definition at line 202 of file sScannerManager.hh.
|
inline |
Definition at line 215 of file sScannerManager.hh.
|
inline |
Definition at line 209 of file sScannerManager.hh.
int sScannerManager::GetSPECTSpecificParameters | ( | uint16_t * | ap_nbOfProjections, |
uint16_t * | ap_nbHeads, | ||
FLTNB * | ap_acquisitionZoom, | ||
uint16_t * | ap_nbOfBins, | ||
FLTNB * | ap_pixSizeXY, | ||
FLTNB *& | ap_angles, | ||
FLTNB *& | ap_CORtoDetectorDistance, | ||
int * | ap_headRotDirection | ||
) |
Transfer geometric information recovered from the datafile to the scanner object.
ap_nbOfProjections | : number of views/projections |
ap_nbHeads | : number of heads in the SPECT system |
ap_acquisitionZoom | : zoom during acquisition for monolithic detectors |
ap_nbOfBins | : 2 elements array containing transaxial number of bins |
ap_pixSizeXY | : 2 elements array containing transaxial/axial pixel sizes |
ap_angles | : an array containing angles for each view |
ap_CORtoDetectorDistance | : a distance between the center of rotation and the detector |
ap_headRotDirection | : head rotation direction |
Definition at line 640 of file sScannerManager.cc.
|
inline |
Definition at line 221 of file sScannerManager.hh.
|
inline |
Definition at line 190 of file sScannerManager.hh.
int sScannerManager::Initialize | ( | ) |
Initialization :
.
Definition at line 164 of file sScannerManager.cc.
int sScannerManager::InitScannerWithFile | ( | string | a_pathScanFile, |
string | a_scannerName, | ||
int | a_fileTypeFlag | ||
) |
Initialize member variables (file path, file type, and scanner name) with the provided arguments.
a_pathScanFile | : string containing the path to the scanner file |
a_scannerName | : string containing the name of the required scanner |
a_fileTypeFlag | : string containing the type of the scanner file (0=lut, 1=geom) |
Definition at line 343 of file sScannerManager.cc.
int sScannerManager::InstantiateScanner | ( | ) |
Instantiate scanner using the related function in the scanner classes.
Definition at line 457 of file sScannerManager.cc.
|
inlineprivate |
Definition at line 391 of file sScannerManager.hh.
int64_t sScannerManager::PROJ_GetCurrentProgression | ( | int64_t | a_elt1, |
int64_t | a_elt2, | ||
int64_t * | ap_nbEltsArray, | ||
int | a_nbRGates, | ||
int | a_nbCGates, | ||
int | a_fr, | ||
int | a_rg, | ||
int | a_cg | ||
) |
Get numerator value according to the modality to compute percent progression during the analytical projection process.
a_elt1 | : Current nb of processed #1 crystals (PET), projections (SPECT) |
a_elt2 | : Current nb of processed #2 crystals (PET), crystals (SPECT) |
ap_nbEltsArray | : Total number of elements processed for each #1 crystals (PET/CT systems) |
a_nbRGates | |
a_nbCGates | |
a_fr | |
a_rg | |
a_cg |
Definition at line 826 of file sScannerManager.cc.
int64_t sScannerManager::PROJ_GetModalityStartValueInnerLoop | ( | int64_t | a_elt1 | ) |
Get the start value for the inner loop of analytic projection depending on the modality.
a_elt1 | : Current nb of processed crystals (PET), projections (SPECT) |
Definition at line 771 of file sScannerManager.cc.
int64_t sScannerManager::PROJ_GetModalityStopValueMainLoop | ( | ) |
Get the stop value for the main loop of analytic projection depending on the modality.
Definition at line 723 of file sScannerManager.cc.
int sScannerManager::PROJ_GetPETSpecificParameters | ( | FLTNB * | ap_maxAxialDiffmm | ) |
Transfer addresses to each geometric parameter of the PET scanner objets to the corresponding pointer of the datafile passed as argument.
ap_maxAxialDiffmm | : max axial difference in mm between 2 crystals forming a lor |
Definition at line 952 of file sScannerManager.cc.
int64_t sScannerManager::PROJ_GetProgressionFinalValue | ( | ) |
Get numerator value according to the modality to compute percent progression during the projection process.
Definition at line 877 of file sScannerManager.cc.
int sScannerManager::PROJ_SetPETSpecificParameters | ( | FLTNB | a_maxAxialDiffmm | ) |
Deliver to the PET scanner object all informations provided from the datafile header.
a_maxAxialDiffmm | : max axial difference in mm between 2 crystals forming a lor |
Definition at line 922 of file sScannerManager.cc.
int sScannerManager::PROJ_SetSPECTSpecificParameters | ( | uint16_t * | ap_nbOfBins, |
uint32_t | a_nbOfProjections, | ||
FLTNB | a_firstAngle, | ||
FLTNB | a_stepAngle, | ||
FLTNB * | ap_projectionAngles, | ||
FLTNB | a_CORtoDetectorDistance, | ||
string | a_rotDirection | ||
) |
Deliver to the SPECT scanner object all informations provided from the acquisition parameters.
ap_nbOfBins | : 2 elements array containing transaxial number of bins |
a_nbOfProjections | : number of views/projections |
a_firstAngle | : angle of the first view |
a_lastAngle | : angle of the last view |
ap_projectionAngles | : an array containing angles for each view |
a_CORtoDetectorDistance | : a distance between the center of rotation and the detector |
a_RotDirection | : Rotation direction of the head (clockwise/counter-clockwise) |
For analytical projection, this data is provided from the command-line options
Definition at line 996 of file sScannerManager.cc.
|
inline |
Get flag indicating a LUT generated by a geom file should be written on disk or not.
Definition at line 251 of file sScannerManager.hh.
|
inline |
Set the pointer to the image dimensions and quantification object.
oImageDimensionsAndQuantification* | ap_ID |
Definition at line 235 of file sScannerManager.hh.
|
inline |
Set to on the flag indicating a LUT generated by a geom file should be written on disk or not.
a_flag |
Definition at line 243 of file sScannerManager.hh.
|
inline |
set verbosity
a_verboseLevel |
Definition at line 228 of file sScannerManager.hh.
int sScannerManager::ShowScannersDescription | ( | ) |
Get the description associated to the different scanners and print all on screen.
Walk through the scanner repository and look for the keyword "description" in .geom file and .hscan file.
Definition at line 196 of file sScannerManager.cc.
|
private |
Boolean indicating if all variables of the class have been checked
Definition at line 413 of file sScannerManager.hh.
|
private |
Boolean indicating if the scanner geometry if defined by a generic file
Definition at line 412 of file sScannerManager.hh.
|
private |
Boolean indicating if the scanner geometry if defined by a user LUT
Definition at line 411 of file sScannerManager.hh.
|
private |
String containing the path to the scanner file
Definition at line 409 of file sScannerManager.hh.
|
private |
Flag indicating a LUT generated by a geom file should be written on disk or not.
Definition at line 414 of file sScannerManager.hh.
|
private |
String containing the scanner name
Definition at line 410 of file sScannerManager.hh.
|
private |
Verbosity
Definition at line 408 of file sScannerManager.hh.
|
private |
Pointer to the image dimensions and quantification object
Definition at line 407 of file sScannerManager.hh.
|
staticprivate |
Pointer to the instance of this class
Definition at line 405 of file sScannerManager.hh.
|
private |
Pointer to the Scanner object
Definition at line 406 of file sScannerManager.hh.