CASToR
1.1
Tomographic Reconstruction (PET/SPECT)
|
This class is designed to manage the projection part of the reconstruction. More...
#include <oProjectorManager.hh>
Public Member Functions | |
oProjectorManager () | |
The constructor of oProjectorManager. More... | |
~oProjectorManager () | |
The destructor of oProjectorManager. More... | |
int | CheckParameters () |
A function used to check the parameters settings. More... | |
int | CheckSPECTAttenuationCompatibility (const string &a_pathToAttenuationImage) |
A function used to check specific compatibility with SPECT and attenuation correction. More... | |
int | Initialize () |
A function used to initialize the manager and the projectors or system matrices it manages. More... | |
void | ApplyBedOffset (int a_bed) |
Compute the bed offset from the provided bed index and apply it to all projection lines. More... | |
oProjectionLine * | ComputeProjectionLine (vEvent *ap_Event, int a_th) |
This function is used to compute system matrix elements from the associated projector or pre-computed system matrix given a vEvent, a bed position and a thread index. As this function returns a pointer to a oProjectionLine (filled from its own oProjectionLine buffers), if a problem occurs, it returns the NULL pointer. More... | |
void | SetVerbose (int a_verboseLevel) |
Set the verbose level. More... | |
void | SetScanner (vScanner *ap_Scanner) |
Set the scanner in use. More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
Set the image dimensions in use. More... | |
void | SetDataFile (vDataFile *ap_DataFile) |
Set a data file in use to later recover some information from it. More... | |
void | SetComputationStrategy (int a_computationStrategy) |
Set the computation strategy for the system matrix elements storage. More... | |
void | SetOptionsForward (const string &a_optionsForward) |
Set the forward projection options contained in the provided string. More... | |
void | SetOptionsBackward (const string &a_optionsBackward) |
Set the backward projection options contained in the provided string. More... | |
void | SetOptionsCommon (const string &a_optionsCommon) |
Set the common projection options contained in the provided string. More... | |
int | GetNbTOFBins () |
Get the number of TOF bins associated to the projector. More... | |
int | GetComputationStrategy () |
Get the computation strategy for the storage in the projection line. More... | |
bool | IsForwardOperatorCompatibleWithSPECTAttenuationCorrection () |
bool | IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection () |
Private Member Functions | |
int | ParseOptionsAndInitializeProjectors () |
Parse forward and backward projection options contained in the previously provided strings. This function is called inside the Initialize() function. More... | |
Private Attributes | |
vScanner * | mp_Scanner |
oImageDimensionsAndQuantification * | mp_ImageDimensionsAndQuantification |
vDataFile * | mp_DataFile |
bool | m_applyTOF |
bool | m_applyPOI |
int | m_nbTOFBins |
int | m_computationStrategy |
string | m_optionsForward |
string | m_optionsBackward |
string | m_optionsCommon |
oSystemMatrix * | mp_SystemMatrixForward |
oSystemMatrix * | mp_SystemMatrixBackward |
vProjector * | mp_ProjectorForward |
vProjector * | mp_ProjectorBackward |
bool | m_UseSystemMatrixForward |
bool | m_UseSystemMatrixBackward |
bool | m_UseProjectorForward |
bool | m_UseProjectorBackward |
bool | m_UseMatchedProjectors |
oProjectionLine ** | m2p_ProjectionLines |
int | m_verbose |
bool | m_checked |
bool | m_initialized |
This class is designed to manage the projection part of the reconstruction.
As each manager class, it is created in the main program, all parameters are then set, checked, and the manager is initialized. The manager is then used by the algorithm itself, where the function ComputeProjectionLine() is called to compute the system matrix elements for the provided event, which are stored in a oProjectionLine. For multi-threading implementation, each thread have its own oProjectionLine. The manager will make use of a vProjector or a oSystemMatrix to compute the system matrix elements for forward and backward projections.
Definition at line 32 of file oProjectorManager.hh.
oProjectorManager::oProjectorManager | ( | ) |
The constructor of oProjectorManager.
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 28 of file oProjectorManager.cc.
oProjectorManager::~oProjectorManager | ( | ) |
The destructor of oProjectorManager.
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 72 of file oProjectorManager.cc.
void oProjectorManager::ApplyBedOffset | ( | int | a_bed | ) |
Compute the bed offset from the provided bed index and apply it to all projection lines.
int | a_bed |
Definition at line 587 of file oProjectorManager.cc.
int oProjectorManager::CheckParameters | ( | ) |
A 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 123 of file oProjectorManager.cc.
int oProjectorManager::CheckSPECTAttenuationCompatibility | ( | const string & | a_pathToAttenuationImage | ) |
A function used to check specific compatibility with SPECT and attenuation correction.
const | string& a_pathToAttenuationImage |
This function checks that the projector is compatible with SPECT and attenuation correction and that the computation strategy is not image-based; in case the provided path to an attenuation image is not empty.
Definition at line 179 of file oProjectorManager.cc.
oProjectionLine * oProjectorManager::ComputeProjectionLine | ( | vEvent * | ap_Event, |
int | a_th | ||
) |
This function is used to compute system matrix elements from the associated projector or pre-computed system matrix given a vEvent, a bed position and a thread index. As this function returns a pointer to a oProjectionLine (filled from its own oProjectionLine buffers), if a problem occurs, it returns the NULL pointer.
vEvent* | ap_Event |
int | a_th |
Definition at line 615 of file oProjectorManager.cc.
|
inline |
Get the computation strategy for the storage in the projection line.
Definition at line 173 of file oProjectorManager.hh.
|
inline |
Get the number of TOF bins associated to the projector.
Definition at line 166 of file oProjectorManager.hh.
int oProjectorManager::Initialize | ( | ) |
A function used to initialize the manager and the projectors or system matrices it manages.
This function does not take any parameter and is used to initialize everything that should be initialized. In a few words, it parses the options, then creates and initializes the projectors or system matrices based on the provided options.
Definition at line 214 of file oProjectorManager.cc.
bool oProjectorManager::IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection | ( | ) |
Definition at line 110 of file oProjectorManager.cc.
bool oProjectorManager::IsForwardOperatorCompatibleWithSPECTAttenuationCorrection | ( | ) |
Definition at line 97 of file oProjectorManager.cc.
|
private |
Parse forward and backward projection options contained in the previously provided strings. This function is called inside the Initialize() function.
Parse forward and backward projection options contained in the m_optionsForward and m_optionsBackward strings. Specific pure virtual functions of the vProjector are used to read parameters and initialize them. If a oSystemMatrix is used, specific functions are also called to read and initialize it. This function is called inside the Initialize() function. The syntax for the declaration of the projector and associated options is described inside the main program.
Definition at line 318 of file oProjectorManager.cc.
|
inline |
Set the computation strategy for the system matrix elements storage.
int | a_computationStrategy |
Definition at line 138 of file oProjectorManager.hh.
|
inline |
Set a data file in use to later recover some information from it.
vDataFile* | ap_DataFile |
Definition at line 131 of file oProjectorManager.hh.
|
inline |
Set the image dimensions in use.
oImageDimensionsAndQuantification* | ap_ImageDimensionsAndQuantification |
Definition at line 124 of file oProjectorManager.hh.
|
inline |
Set the backward projection options contained in the provided string.
const | string& a_optionsBackward |
Definition at line 152 of file oProjectorManager.hh.
|
inline |
Set the common projection options contained in the provided string.
const | string& a_optionsCommon |
Definition at line 159 of file oProjectorManager.hh.
|
inline |
Set the forward projection options contained in the provided string.
const | string& a_optionsForward |
Definition at line 145 of file oProjectorManager.hh.
|
inline |
Set the scanner in use.
vScanner* | ap_Scanner |
Definition at line 117 of file oProjectorManager.hh.
|
inline |
Set the verbose level.
int | a_verboseLevel |
Definition at line 110 of file oProjectorManager.hh.
|
private |
The table of pointers to the oProjectionLines, one per thread
Definition at line 235 of file oProjectorManager.hh.
|
private |
Boolean that says if we apply POI or not
Definition at line 215 of file oProjectorManager.hh.
|
private |
Boolean that says if we apply TOF or not
Definition at line 214 of file oProjectorManager.hh.
|
private |
Boolean that says if the parameters were checked or not
Definition at line 239 of file oProjectorManager.hh.
|
private |
The integer describing the computation strategy for system matrix elements storage
Definition at line 218 of file oProjectorManager.hh.
|
private |
Boolean that says if the manager was initialized or not
Definition at line 241 of file oProjectorManager.hh.
|
private |
The number of TOF bins in use
Definition at line 216 of file oProjectorManager.hh.
|
private |
The string containing options for the backward projections
Definition at line 221 of file oProjectorManager.hh.
|
private |
The string containing common options for the projectors
Definition at line 223 of file oProjectorManager.hh.
|
private |
The string containing options for the forward projections
Definition at line 220 of file oProjectorManager.hh.
|
private |
Boolean that says if matched projectors are used
Definition at line 233 of file oProjectorManager.hh.
|
private |
Boolean that says if a vProjector is used for backward projections
Definition at line 232 of file oProjectorManager.hh.
|
private |
Boolean that says if a vProjector is used for forward projections
Definition at line 231 of file oProjectorManager.hh.
|
private |
Boolean that says if a oSystemMatrix is used for backward projections
Definition at line 230 of file oProjectorManager.hh.
|
private |
Boolean that says if a oSystemMatrix is used for forward projections
Definition at line 229 of file oProjectorManager.hh.
|
private |
The verbose level
Definition at line 237 of file oProjectorManager.hh.
|
private |
Pointer to a vDataFile object in use
Definition at line 212 of file oProjectorManager.hh.
|
private |
Pointer to the oImageDimensionsAndQuantification object in use
Definition at line 210 of file oProjectorManager.hh.
|
private |
The pointer to the vProjector used for backward projections
Definition at line 228 of file oProjectorManager.hh.
|
private |
The pointer to the vProjector used for forward projections
Definition at line 227 of file oProjectorManager.hh.
|
private |
Pointer to the vScanner object in use
Definition at line 208 of file oProjectorManager.hh.
|
private |
The pointer to the oSystemMatrix used for backward projections
Definition at line 226 of file oProjectorManager.hh.
|
private |
The pointer to the oSystemMatrix used for forward projections
Definition at line 225 of file oProjectorManager.hh.