CASToR  1.0
Tomographic Reconstruction (PET/SPECT)
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
vProjector Class Reference

This class is designed to generically described any on-the-fly projector. More...

#include <vProjector.hh>

Inheritance diagram for vProjector:
Inheritance graph
[legend]
Collaboration diagram for vProjector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 vProjector ()
 The constructor of vProjector.
virtual ~vProjector ()
 The destructor of vProjector.
void ShowHelp ()
 A function used to show help about the projector.
int ReadCommonOptionsList (const string &a_optionsList)
 This function is used to read options common to all projectors given as a string.
int CheckParameters ()
 A public function used to check the parameters settings.
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.
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.
virtual int ReadConfigurationFile (const string &a_configurationFile)=0
 A function used to read options from a configuration file.
virtual int ReadOptionsList (const string &a_optionsList)=0
 A function used to read options from a list of options.
void SetVerbose (int a_verbose)
 Set the verbose level.
void SetScanner (vScanner *ap_Scanner)
 Set the pointer to the scanner in use.
int SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 Set the pointer to the image dimensions in use and copy locally some often use variables.
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.
bool GetCompatibilityWithSPECTAttenuationCorrection ()

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.

Protected Attributes

FLTNB mp_sizeVox [3]
INTNB mp_nbVox [3]
INTNB m_nbVoxXY
FLTNB mp_halfFOV [3]
oImageDimensionsAndQuantificationmp_ImageDimensionsAndQuantification
vScannermp_Scanner
int m_applyTOF
bool m_applyPOI
bool m_compatibleWithSPECTAttenuationCorrection
int m_verbose
bool m_checked
bool m_initialized

Private Member Functions

virtual void ShowHelpSpecific ()=0
 A function used to show help about the child module.
virtual int CheckSpecificParameters ()=0
 A private function used to check the parameters settings specific to the child projector.
virtual int InitializeSpecific ()=0
 A private function used to initialize everything specific to the child projector.
virtual int ProjectWithoutTOF (int a_direction, oProjectionLine *ap_ProjectionLine)=0
 A function to project without TOF.
virtual int ProjectWithTOFPos (int a_direction, oProjectionLine *ap_ProjectionLine)=0
 A function to project with TOF continuous information.
virtual int ProjectWithTOFBin (int a_direction, oProjectionLine *ap_ProjectionLine)=0
 A function to project with TOF binned information.

Detailed Description

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 52 of file vProjector.hh.


Constructor & Destructor Documentation

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 27 of file vProjector.cc.

vProjector::~vProjector ( ) [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 55 of file vProjector.cc.


Member Function Documentation

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.

Returns:
An integer reflecting the check status; 0 if no problem, another value otherwise.

Definition at line 171 of file vProjector.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

private virtual int vProjector::CheckSpecificParameters ( ) [private, pure 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.

Returns:
An integer reflecting the check status; 0 if no problem, another value otherwise.

Implemented in iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Here is the caller graph for this function:

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.

Returns:
The estimate of the maximum number of voxels contributing to a line.

Reimplemented in iProjectorIncrementalSiddon, iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Definition at line 247 of file vProjector.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns:
m_compatibleWithSPECTAttenuationCorrection

Definition at line 283 of file vProjector.hh.

Here is the caller graph for this function:

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.

Returns:
An integer reflecting the initialization status; 0 if no problem, another value otherwise.

Definition at line 223 of file vProjector.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

private virtual int vProjector::InitializeSpecific ( ) [private, pure 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.

Returns:
An integer reflecting the initialization status; 0 if no problem, another value otherwise.

Implemented in iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Here is the caller graph for this function:

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.

Parameters:
inta_direction
oProjectionLine*ap_ProjectionLine
int*ap_index1
int*ap_index2
inta_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.

Returns:
An integer reflecting the projection status; 0 if no problem, another value otherwise.

Definition at line 257 of file vProjector.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

private virtual int vProjector::ProjectWithoutTOF ( int  a_direction,
oProjectionLine ap_ProjectionLine 
) [private, pure virtual]

A function to project without TOF.

Parameters:
inta_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.

Returns:
An integer reflecting the projection status; 0 if no problem, another value otherwise.

Implemented in iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Here is the caller graph for this function:

private virtual int vProjector::ProjectWithTOFBin ( int  a_direction,
oProjectionLine ap_ProjectionLine 
) [private, pure virtual]

A function to project with TOF binned information.

Parameters:
inta_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.

Returns:
An integer reflecting the projection status; 0 if no problem, another value otherwise.

Implemented in iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Here is the caller graph for this function:

private virtual int vProjector::ProjectWithTOFPos ( int  a_direction,
oProjectionLine ap_ProjectionLine 
) [private, pure virtual]

A function to project with TOF continuous information.

Parameters:
inta_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.

Returns:
An integer reflecting the projection status; 0 if no problem, another value otherwise.

Implemented in iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Here is the caller graph for this function:

int vProjector::ReadCommonOptionsList ( const string &  a_optionsList)

This function is used to read options common to all projectors given as a string.

Returns:
An integer reflecting the reading success; 0 if success, another value otherwise.

Definition at line 160 of file vProjector.cc.

Here is the caller graph for this function:

public virtual int vProjector::ReadConfigurationFile ( const string &  a_configurationFile) [pure virtual]

A function used to read options from a configuration file.

Parameters:
conststring& 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.

Returns:
An integer reflecting the reading success; 0 if success, another value otherwise.

Implemented in iProjectorIncrementalSiddon, iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Here is the caller graph for this function:

public virtual int vProjector::ReadOptionsList ( const string &  a_optionsList) [pure virtual]

A function used to read options from a list of options.

Parameters:
conststring& 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.

Returns:
An integer reflecting the reading success; 0 if success, another value otherwise.

Implemented in iProjectorIncrementalSiddon, iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Here is the caller graph for this function:

Set the pointer to the image dimensions in use and copy locally some often use variables.

Parameters:
oImageDimensionsAndQuantification*ap_ImageDimensionsAndQuantification
Returns:
0 if success, other value otherwise.

Definition at line 64 of file vProjector.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

public inline void vProjector::SetScanner ( vScanner ap_Scanner) [inline]

Set the pointer to the scanner in use.

Parameters:
vScanner*ap_Scanner

Definition at line 261 of file vProjector.hh.

Here is the caller graph for this function:

int vProjector::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.

Parameters:
inta_dataType
boola_ignoreTOF
boola_ignorePOI
Returns:
0 if success, other value otherwise.

Definition at line 93 of file vProjector.cc.

Here is the caller graph for this function:

public inline void vProjector::SetVerbose ( int  a_verbose) [inline]

Set the verbose level.

Parameters:
inta_verboseLevel

Definition at line 254 of file vProjector.hh.

Here is the caller graph for this function:

void vProjector::ShowCommonHelp ( ) [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 126 of file vProjector.cc.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

private virtual void vProjector::ShowHelpSpecific ( ) [private, pure 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 iProjectorIRIS, iProjectorJoseph, iProjectorClassicSiddon, iProjectorIncrementalSiddon, iProjectorIncrementalSiddonMulti, and iProjectorTemplate.

Here is the caller graph for this function:


Member Data Documentation

bool vProjector::m_applyPOI [protected]

Boolean that says if we apply POI info or not

Definition at line 303 of file vProjector.hh.

int vProjector::m_applyTOF [protected]

Integer tagging the use of type of TOF use

Definition at line 301 of file vProjector.hh.

bool vProjector::m_checked [protected]

Boolean that says if the parameters were checked or not

Definition at line 310 of file vProjector.hh.

Boolean that says if the projector is compatible with SPECT attenuation correction

Definition at line 306 of file vProjector.hh.

bool vProjector::m_initialized [protected]

Boolean that says if the projector was initialized or not

Definition at line 312 of file vProjector.hh.

Local copy of the number of voxels per slice

Definition at line 293 of file vProjector.hh.

int vProjector::m_verbose [protected]

The verbose level

Definition at line 308 of file vProjector.hh.

FLTNB vProjector::mp_halfFOV[3] [protected]

Local copy of the FOV half dimensions

Definition at line 294 of file vProjector.hh.

Pointer to the oImageDimensionsAndQuantification object in use

Definition at line 297 of file vProjector.hh.

INTNB vProjector::mp_nbVox[3] [protected]

Local copy of the number of voxels

Definition at line 292 of file vProjector.hh.

Pointer to the vScanner object in use

Definition at line 299 of file vProjector.hh.

FLTNB vProjector::mp_sizeVox[3] [protected]

Local copy of the voxels' size

Definition at line 291 of file vProjector.hh.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Defines