CASToR
3.0
Tomographic Reconstruction (PET/SPECT/CT)
|
This class is designed to generically described any on-the-fly projector. More...
#include <vProjector.hh>
Public Member Functions | |
vProjector () | |
The constructor of vProjector. More... | |
virtual | ~vProjector () |
The destructor of vProjector. More... | |
void | ShowHelp () |
A function used to show help about the projector. More... | |
int | ReadCommonOptionsList (const string &a_optionsList) |
This function is used to read options common to all projectors given as a string. More... | |
int | CheckParameters () |
A public function used to check the parameters settings. More... | |
int | Initialize () |
A public function used to initialize the projector. More... | |
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. More... | |
virtual INTNB | EstimateMaxNumberOfVoxelsPerLine () |
This function is used to compute and provide an estimate of the maximum number of voxels that could contribute to a projected line. More... | |
virtual int | ReadConfigurationFile (const string &a_configurationFile)=0 |
A function used to read options from a configuration file. More... | |
virtual int | ReadOptionsList (const string &a_optionsList)=0 |
A function used to read options from a list of options. More... | |
void | SetVerbose (int a_verbose) |
Set the verbose level. More... | |
void | SetScanner (vScanner *ap_Scanner) |
Set the pointer to the scanner in use. More... | |
void | SetSensitivityMode (bool a_sensitivityMode) |
Set the sensitivity mode on or off. More... | |
void | SetApplyTOF (int a_applyTOF) |
Set the TOF mode. More... | |
void | SetApplyPOI (bool a_applyPOI) |
Set the POI mode. More... | |
int | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
Set the pointer to the image dimensions in use and copy locally some often use variables. More... | |
bool | GetCompatibilityWithSPECTAttenuationCorrection () |
bool | GetCompatibilityWithCompression () |
void | SetMask (bool *ap_mask) |
Set a mask for voxels. More... | |
FLTNB | GetTOFResolutionInMm () |
This function is used to get the TOF resolution in mm. More... | |
void | SetTOFResolutionInMm (FLTNB a_TOFResolutionInMm) |
This function is used to set the TOF resolution in use. More... | |
FLTNB | GetTOFMeasurementRangeInMm () |
This function is used to get the TOF measurement range in mm. More... | |
void | SetTOFMeasurementRangeInMm (FLTNB a_TOFMeasurementRangeInMm) |
This function is used to set the TOF measurement range in mm. More... | |
FLTNB | GetTOFBinSizeInMm () |
This function is used to get the size in mm of a TOF bin. More... | |
void | SetTOFBinSizeInMm (FLTNB a_TOFBinSizeInMm) |
This function is used to set the size of a TOF bin in mm. More... | |
Static Public Member Functions | |
static void | ShowCommonHelp () |
This function is used to print out some help about the use of options common to all projectors. It is static because it is called in main without instantiating an object. More... | |
Private Member Functions | |
virtual void | ShowHelpSpecific ()=0 |
A function used to show help about the child module. More... | |
virtual int | CheckSpecificParameters ()=0 |
A private function used to check the parameters settings specific to the child projector. More... | |
virtual int | InitializeSpecific ()=0 |
A private function used to initialize everything specific to the child projector. More... | |
virtual int | ProjectWithoutTOF (int a_direction, oProjectionLine *ap_ProjectionLine)=0 |
A function to project without TOF. More... | |
virtual int | ProjectTOFListmode (int a_direction, oProjectionLine *ap_ProjectionLine)=0 |
A function to project with TOF continuous information. More... | |
virtual int | ProjectTOFHistogram (int a_direction, oProjectionLine *ap_ProjectionLine)=0 |
A function to project with TOF binned information. More... | |
This class is designed to generically described any on-the-fly projector.
This class is an abstract one, in the sense that it cannot be used on its own because several pure virtual functions belong to it. Its children are implementations of actual on-the-fly projectors. Everywhere in the code, this parent class should be used instead of any of its children. It can be used during the projection/reconstruction process by the oProjectorManager through the use of the Project() function that cannot be overloaded. This function is called from the Project() function of the oProjectionManager to get a oProjectionLine associated to an vEvent.
All children must implement the following pure virtual functions:
Definition at line 75 of file vProjector.hh.
vProjector::vProjector | ( | ) |
The constructor of vProjector.
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 39 of file vProjector.cc.
|
virtual |
The destructor of vProjector.
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. It is virtual, so that it is automatically called when a child object is deleted.
Definition at line 80 of file vProjector.cc.
int vProjector::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. At the end, it calls the pure virtual CheckSpecificParameters() function implemented by children.
Definition at line 184 of file vProjector.cc.
|
privatepure virtual |
A private function used to check the parameters settings specific to the child projector.
This function is used to check that all parameters specific to the projector are correctly set within allowed values. It is called by the CheckParameters() function. It is pure virtual so is implemented by children.
Implemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorJoseph, iProjectorIncrementalSiddon, iProjectorTemplate, and iProjectorIncrementalSiddonMulti.
|
virtual |
This function is used to compute and provide an estimate of the maximum number of voxels that could contribute to a projected line.
The vProjector implementation simply returns the total image's number of voxels, but it can be overloaded by children to provide a better estimate in order to optimize and reduce memory requirements of the oProjectionLine buffers when using the FIXED_LIST_STRATEGY.
Reimplemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorJoseph, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.
Definition at line 414 of file vProjector.cc.
|
inline |
Definition at line 324 of file vProjector.hh.
|
inline |
Definition at line 318 of file vProjector.hh.
|
inline |
This function is used to get the size in mm of a TOF bin.
Definition at line 365 of file vProjector.hh.
|
inline |
This function is used to get the TOF measurement range in mm.
Definition at line 351 of file vProjector.hh.
|
inline |
This function is used to get the TOF resolution in mm.
Definition at line 337 of file vProjector.hh.
int vProjector::Initialize | ( | ) |
A public function used to initialize the projector.
This function does not take any parameter and is used to initialize everything that should be initialized. At the end, it calls the pure virtual InitializeSpecific() function implemented by children.
Definition at line 251 of file vProjector.cc.
|
privatepure virtual |
A private function used to initialize everything specific to the child projector.
This function is used to initialize everything specific to the projector that should be initialized. It is called by the Initialize() function. It is pure virtual so is implemented by children.
Implemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorJoseph, iProjectorIncrementalSiddon, iProjectorTemplate, and iProjectorIncrementalSiddonMulti.
int vProjector::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.
int | a_direction |
oProjectionLine* | ap_ProjectionLine |
int* | ap_index1 |
int* | ap_index2 |
int | a_nbIndices |
This function is used to fill the provided oProjectionLine with the system matrix elements associated to the provided indices. The filling is done by calling one of the three projection functions (w/o TOF) implemented by its children. This function cannot be overloaded. From a collection of scanner elements indices associated to a oProjectionLine and to a projection direction (FORWARD or BACKWARD), it first uses the scanner to get associated cartesian coordinates taking compression, mean depth of interaction or POI into account, it then applies offsets (general one from oImageDimensionsAndQuantification), LOR displacement (associated to each event). The computed coordinates are embedded into the oProjectionLine which are passed to the different pure virtual projection functions (w/o TOF). If the number of provided indices is one (no compression), then the provided indices are also passed to the oProjectionLine if needed by a highly specified projector. In the case of compression, the indices are set to -1 in the oProjectionLine, while the positions and orientations are averaged.
Definition at line 424 of file vProjector.cc.
|
privatepure virtual |
A function to project with TOF binned information.
int | a_direction |
oProjectionLine* | ap_ProjectionLine |
Projects the provided line following the provided direction, with TOF information describe as a histogram bin. It fills the provided oProjectionLine. This is a pure virtual function that must be implemented by children.
Implemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorJoseph, iProjectorIncrementalSiddon, iProjectorTemplate, and iProjectorIncrementalSiddonMulti.
|
privatepure virtual |
A function to project with TOF continuous information.
int | a_direction |
oProjectionLine* | ap_ProjectionLine |
Projects the provided line following the provided direction, with TOF described as a continuous measurement. It fills the provided oProjectionLine. This is a pure virtual function that must be implemented by children.
Implemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorJoseph, iProjectorIncrementalSiddon, iProjectorTemplate, and iProjectorIncrementalSiddonMulti.
|
privatepure virtual |
A function to project without TOF.
int | a_direction |
oProjectionLine* | ap_ProjectionLine |
Projects the provided line following the provided direction, without TOF. It fills the provided oProjectionLine. This is a pure virtual function that must be implemented by children.
Implemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorJoseph, iProjectorIncrementalSiddon, iProjectorTemplate, and iProjectorIncrementalSiddonMulti.
int vProjector::ReadCommonOptionsList | ( | const string & | a_optionsList | ) |
This function is used to read options common to all projectors given as a string.
Definition at line 160 of file vProjector.cc.
|
pure virtual |
A function used to read options from a configuration file.
const | string& a_configurationFile |
This function implements the reading of all options associated to a child projector, from a configuration file. It is pure virtual so is implemented by children. It checks the reading status but not the options values that will be checked by the CheckSpecificParameters() function.
Implemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorJoseph, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.
|
pure virtual |
A function used to read options from a list of options.
const | string& a_optionsList |
This function implements the reading of all options associated to a child projector, from a list of options. It is pure virtual so is implemented by children. It checks the reading status but not the options values that will be checked by the CheckSpecificParameters() function.
Implemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorJoseph, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.
|
inline |
Set the POI mode.
bool | a_applyPOI |
Definition at line 305 of file vProjector.hh.
|
inline |
Set the TOF mode.
int | a_applyTOF |
Definition at line 298 of file vProjector.hh.
int vProjector::SetImageDimensionsAndQuantification | ( | oImageDimensionsAndQuantification * | ap_ImageDimensionsAndQuantification | ) |
Set the pointer to the image dimensions in use and copy locally some often use variables.
oImageDimensionsAndQuantification* | ap_ImageDimensionsAndQuantification |
Definition at line 89 of file vProjector.cc.
|
inline |
Set a mask for voxels.
bool* | ap_mask |
Definition at line 331 of file vProjector.hh.
|
inline |
Set the pointer to the scanner in use.
vScanner* | ap_Scanner |
Definition at line 284 of file vProjector.hh.
|
inline |
Set the sensitivity mode on or off.
bool | a_sensitivityMode |
Definition at line 291 of file vProjector.hh.
|
inline |
This function is used to set the size of a TOF bin in mm.
FLTNB | a_TOFBinSizeInMm |
Definition at line 372 of file vProjector.hh.
|
inline |
This function is used to set the TOF measurement range in mm.
FLTNB | a_TOFMeasurementRangeInMm |
Definition at line 358 of file vProjector.hh.
|
inline |
This function is used to set the TOF resolution in use.
FLTNB | a_TOFResolutionInMm |
Definition at line 344 of file vProjector.hh.
|
inline |
Set the verbose level.
int | a_verboseLevel |
Definition at line 277 of file vProjector.hh.
|
static |
This function is used to print out some help about the use of options common to all projectors. It is static because it is called in main without instantiating an object.
Definition at line 118 of file vProjector.cc.
void vProjector::ShowHelp | ( | ) |
A function used to show help about the projector.
This function simply calls the ShowHelpSpecific() function implemented by children.
Definition at line 146 of file vProjector.cc.
|
privatepure virtual |
A function used to show help about the child module.
This function must describe what the projector does and how to use it. It describes in details the different parameters of the projector, and how to set them through the use of a configuration file or a list of options. It is pure virtual so is implemented by children. It is private because called by the public ShowHelp() function.
Implemented in iProjectorDistanceDriven, iProjectorClassicSiddon, iProjectorJoseph, iProjectorIncrementalSiddon, iProjectorTemplate, and iProjectorIncrementalSiddonMulti.
|
protected |
Boolean that says if we apply POI info or not
Definition at line 403 of file vProjector.hh.
|
protected |
Boolean that says if the parameters were checked or not
Definition at line 414 of file vProjector.hh.
|
protected |
Boolean that says if the projector is compatible with compression
Definition at line 410 of file vProjector.hh.
|
protected |
Boolean that says if the projector is compatible with SPECT attenuation correction
Definition at line 407 of file vProjector.hh.
|
protected |
Is there a mask for voxels
Definition at line 401 of file vProjector.hh.
|
protected |
Boolean that says if the projector was initialized or not
Definition at line 416 of file vProjector.hh.
|
protected |
Local copy of the number of voxels per slice
Definition at line 380 of file vProjector.hh.
|
protected |
Boolean that says if we are computing the global sensitivity or not
Definition at line 405 of file vProjector.hh.
|
protected |
Take properly into account the TOF bin (the TOF Gaussian distribution is either convolved with or integrated over the TOF bin
Definition at line 392 of file vProjector.hh.
|
protected |
The size in mm of a single TOF bin (either cumulative bin for histogrammed data or quantization bin for list-mode data)
Definition at line 394 of file vProjector.hh.
|
protected |
The normalization coefficient for the TOF Gaussian distribution (to ensure integral=1)
Definition at line 397 of file vProjector.hh.
|
protected |
Total span of TOF measurements (in mm)
Definition at line 395 of file vProjector.hh.
|
protected |
Integer tagging the type of TOF use
Definition at line 388 of file vProjector.hh.
|
protected |
The TOF distribution truncation factor (number of standard deviations)
Definition at line 389 of file vProjector.hh.
|
protected |
Sampling factor for oversampling the precomputed TOF weighting function
Definition at line 398 of file vProjector.hh.
|
protected |
Resolution (FWHM) of the time-of-flight Gaussian distribution (in mm)
Definition at line 396 of file vProjector.hh.
|
protected |
Length of the precomputed TOF weighting function
Definition at line 390 of file vProjector.hh.
|
protected |
Choice of precomputed vs on the fly TOF weighting function
Definition at line 391 of file vProjector.hh.
|
protected |
The verbose level
Definition at line 412 of file vProjector.hh.
|
protected |
Local copy of the FOV half dimensions
Definition at line 381 of file vProjector.hh.
|
protected |
Pointer to the oImageDimensionsAndQuantification object in use
Definition at line 384 of file vProjector.hh.
|
protected |
Mask for voxels: only true voxels will be taken into account for projector coefficients computation (currently 3D - XYZ)
Definition at line 400 of file vProjector.hh.
|
protected |
Local copy of the number of voxels
Definition at line 379 of file vProjector.hh.
|
protected |
Pointer to the vScanner object in use
Definition at line 386 of file vProjector.hh.
|
protected |
Local copy of the voxels' size
Definition at line 378 of file vProjector.hh.
|
protected |
Precomputed TOF weighting function
Definition at line 393 of file vProjector.hh.