CASToR
1.1
Tomographic Reconstruction (PET/SPECT)
|
This class is designed to manage the different image convolvers and to apply them. More...
#include <oImageConvolverManager.hh>
Public Member Functions | |
oImageConvolverManager () | |
The constructor of oImageConvolverManager. More... | |
~oImageConvolverManager () | |
The destructor of oImageConvolverManager. More... | |
int | CheckParameters () |
A function used to check the parameters settings. More... | |
int | Initialize () |
A function used to initialize the manager and all image convolvers it manages. More... | |
int | ConvolveForward (oImageSpace *ap_ImageSpace) |
A function used to apply convolvers onto the forward image of the oImageSpace. More... | |
int | ConvolveBackward (oImageSpace *ap_ImageSpace) |
A function used to apply convolvers onto the backward images of the oImageSpace. More... | |
int | ConvolveSensitivity (oImageSpace *ap_ImageSpace) |
A function used to apply convolvers onto the sensitivity image of the oImageSpace. More... | |
int | ConvolveIntra (oImageSpace *ap_ImageSpace) |
A function used to apply convolvers onto the current image of the oImageSpace. More... | |
int | ConvolvePost (oImageSpace *ap_ImageSpace) |
A function used to apply convolvers onto the output image of the oImageSpace. More... | |
void | SetVerbose (int a_verboseLevel) |
Set the member m_verboseLevel to the provided value. More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
Set the member mp_ImageDimensionsAndQuantification to the provided value. More... | |
void | SetOptions (vector< string > a_options) |
Set the member m_options to the provided value. More... | |
Static Public Member Functions | |
static void | ShowCommonHelp () |
This function does not take any parameter and is used to display some help about the syntax of the options describing the image convolvers that should be used. It is static so that it can be called without any object initialization. More... | |
Private Member Functions | |
int | ParseOptionsAndInitializeImageConvolvers () |
A function used to parse options and initialize image convolvers. More... | |
Private Attributes | |
oImageDimensionsAndQuantification * | mp_ImageDimensionsAndQuantification |
vector< string > | m_options |
int | m_nbImageConvolvers |
vImageConvolver ** | m2p_ImageConvolvers |
bool * | mp_applyForward |
bool * | mp_applyBackward |
bool * | mp_applyIntra |
bool * | mp_applyPost |
bool | m_checked |
bool | m_initialized |
int | m_verbose |
This class is designed to manage the different image convolvers and to apply them.
This manager class is supposed to be created and initialized in the main program. To do so, the following steps must be used:
(i) The empty constructor is called which affect all members with default values.
(ii) All parameters are set through the use of SetXXX() functions.
(iii) The CheckParameters() function is called to check that everything mandatory has been set.
(iv) The Initialize() function is called to initialize everything.
(v) Now the action functions of the manager can be called to apply the different image convolvers.
In a few words, based on supplied options, the manager will create children of the abstract vImageConvolver class which are specific image convolver modules. As an example, see the iImageConvolverTemplate child class that illustrates how a specific image convolver module should be implemented.
Definition at line 32 of file oImageConvolverManager.hh.
oImageConvolverManager::oImageConvolverManager | ( | ) |
The constructor of oImageConvolverManager.
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 26 of file oImageConvolverManager.cc.
oImageConvolverManager::~oImageConvolverManager | ( | ) |
The destructor of oImageConvolverManager.
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 build by this class.
Definition at line 51 of file oImageConvolverManager.cc.
int oImageConvolverManager::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 66 of file oImageConvolverManager.cc.
int oImageConvolverManager::ConvolveBackward | ( | oImageSpace * | ap_ImageSpace | ) |
A function used to apply convolvers onto the backward images of the oImageSpace.
oImageSpace* | ap_ImageSpace |
Based on the different mp_applyBackward of all managed convolvers, it will apply them or not onto the backward images of the provided oImageSpace. The convolvers are applied on all dynamic dimensions. This function is typically used when image-based PSF modeling is part of the iterative reconstruction process, so that the convolution is applied onto the correction images after the backward projection. Note that in the case of histogram-based reconstruction, the convolution will also be applied to the sensitivity image that is computed in synchronization with the backward images containing the correction terms.
Definition at line 389 of file oImageConvolverManager.cc.
int oImageConvolverManager::ConvolveForward | ( | oImageSpace * | ap_ImageSpace | ) |
A function used to apply convolvers onto the forward image of the oImageSpace.
oImageSpace* | ap_ImageSpace |
Based on the different mp_applyForward of all managed convolvers, it will apply them or not onto the forward image of the provided oImageSpace. The convolvers are applied on all dynamic dimensions. This function is typically used when image-based PSF modeling is part of the iterative reconstruction process, so that the convolution is applied onto the image to be forward projected.
Definition at line 342 of file oImageConvolverManager.cc.
int oImageConvolverManager::ConvolveIntra | ( | oImageSpace * | ap_ImageSpace | ) |
A function used to apply convolvers onto the current image of the oImageSpace.
oImageSpace* | ap_ImageSpace |
Based on the different mp_applyIntra of all managed convolvers, it will apply them or not onto the current estimated image of the provided oImageSpace. The convolvers are applied on all dynamic dimensions. This function can be used when one wants to apply convolution onto the current estimated image right after it has been updated within the iterative process. The convolved image is thus put back as the current estimate for the next update.
Definition at line 468 of file oImageConvolverManager.cc.
int oImageConvolverManager::ConvolvePost | ( | oImageSpace * | ap_ImageSpace | ) |
A function used to apply convolvers onto the output image of the oImageSpace.
oImageSpace* | ap_ImageSpace |
Based on the different mp_applyPost of all managed convolvers, it will apply them or not onto the output image of the provided oImageSpace. The convolvers are applied on all dynamic dimensions. This function can be used when one wants to apply convolution onto the image as a post-processing step, right before being saved. The convolved image is only used to be saved and is not put back into the iterative process.
Definition at line 563 of file oImageConvolverManager.cc.
int oImageConvolverManager::ConvolveSensitivity | ( | oImageSpace * | ap_ImageSpace | ) |
A function used to apply convolvers onto the sensitivity image of the oImageSpace.
oImageSpace* | ap_ImageSpace |
Based on the different mp_applyBackward of all managed convolvers, it will apply them or not onto the sensitivity image of the provided oImageSpace. The convolvers are applied on all dynamic dimensions. This function is typically used when image-based PSF modeling is part of the iterative listmode-based reconstruction process so that the convolution is applied onto the first-computed sensitivity image.
Definition at line 515 of file oImageConvolverManager.cc.
int oImageConvolverManager::Initialize | ( | ) |
A function used to initialize the manager and all image convolvers 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 all image convolvers based on the provided options.
Definition at line 127 of file oImageConvolverManager.cc.
|
private |
A function used to parse options and initialize image convolvers.
This function first parses the options contained in the member m_options. Each string of the vector describes an image convolver to be used. Based on a specific syntax, the options are parsed to get the name of the convolver module, its associated parameters and the steps of application. Based on this, the image convolvers are initialized. This function is private because it is called by the Initialize() function.
Definition at line 160 of file oImageConvolverManager.cc.
|
inline |
Set the member mp_ImageDimensionsAndQuantification to the provided value.
oImageDimensionsAndQuantification* | ap_ImageDimensionsAndQuantification |
Definition at line 173 of file oImageConvolverManager.hh.
|
inline |
Set the member m_options to the provided value.
vector<string> | a_options |
Definition at line 180 of file oImageConvolverManager.hh.
|
inline |
Set the member m_verboseLevel to the provided value.
int | a_verboseLevel |
Definition at line 166 of file oImageConvolverManager.hh.
|
static |
This function does not take any parameter and is used to display some help about the syntax of the options describing the image convolvers that should be used. It is static so that it can be called without any object initialization.
Definition at line 91 of file oImageConvolverManager.cc.
|
private |
The actual convolvers (as many as m_nbImageConvolvers)
Definition at line 209 of file oImageConvolverManager.hh.
|
private |
A boolean that says if the function CheckParameters() has been called
Definition at line 214 of file oImageConvolverManager.hh.
|
private |
A boolean that says if the function Initialize() has been called
Definition at line 215 of file oImageConvolverManager.hh.
|
private |
The number of convolvers managed by this manager
Definition at line 208 of file oImageConvolverManager.hh.
|
private |
A vector containing strings of options, each string is associated to a convolver
Definition at line 207 of file oImageConvolverManager.hh.
|
private |
The verbose level associated to this class
Definition at line 216 of file oImageConvolverManager.hh.
|
private |
As many booleans as m_nbImageConvolvers specifying if each convolver should be apply within the ConvolveBackward function
Definition at line 211 of file oImageConvolverManager.hh.
|
private |
As many booleans as m_nbImageConvolvers specifying if each convolver should be apply within the ConvolveForward function
Definition at line 210 of file oImageConvolverManager.hh.
|
private |
As many booleans as m_nbImageConvolvers specifying if each convolver should be apply within the ConvolveIntra function
Definition at line 212 of file oImageConvolverManager.hh.
|
private |
As many booleans as m_nbImageConvolvers specifying if each convolver should be apply within the ConvolvePost function
Definition at line 213 of file oImageConvolverManager.hh.
|
private |
The image dimensions
Definition at line 206 of file oImageConvolverManager.hh.