CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
Public Member Functions | Private Member Functions | List of all members
iImageConvolverTemplate Class Reference

This class is a template of an image convolver module to serve as an example. More...

#include <iImageConvolverTemplate.hh>

Inheritance diagram for iImageConvolverTemplate:
Inheritance graph
Collaboration diagram for iImageConvolverTemplate:
Collaboration graph

Public Member Functions

 iImageConvolverTemplate ()
 The constructor of iImageConvolverTemplate. More...
 
 ~iImageConvolverTemplate ()
 The destructor of iImageConvolverTemplate. More...
 
int ReadConfigurationFile (const string &a_fileOptions)
 A function used to read options from a configuration file. More...
 
int ReadOptionsList (const string &a_listOptions)
 A function used to read options from a list of options. More...
 
void ShowHelp ()
 A function used to show help about the child module. More...
 
- Public Member Functions inherited from vImageConvolver
 vImageConvolver ()
 The constructor of vImageConvolver. More...
 
virtual ~vImageConvolver ()
 The destructor of vImageConvolver. More...
 
int CheckParameters ()
 A public function used to check the parameters settings. More...
 
int Initialize ()
 A public function used to initialize the module. More...
 
int ApplyConvolution (FLTNB *ap_image)
 A public function used to apply the convolution module on the provided image. More...
 
int ApplyConvolutionTranspose (FLTNB *ap_image)
 A public function used to apply the transpose convolution module on the provided image. More...
 
void SetVerbose (int a_verbose)
 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...
 

Private Member Functions

int CheckSpecificParameters ()
 A private function used to check the parameters settings specific to the child module. More...
 
int BuildConvolutionKernel ()
 A private function used to build the convolution kernel specific to the child convolver. More...
 

Additional Inherited Members

- Protected Attributes inherited from vImageConvolver
oImageDimensionsAndQuantificationmp_ImageDimensionsAndQuantification
 
int m_verbose
 
bool m_checked
 
bool m_initialized
 
bool m_stationary
 
FLTNBmp_paddedImage
 
INTNB m_offsetX
 
INTNB m_offsetY
 
INTNB m_offsetZ
 
INTNB m_dimPadX
 
INTNB m_dimPadY
 
INTNB m_dimPadZ
 
INTNB m_dimPadXY
 
INTNB m_dimPadXYZ
 
INTNB m_nbKernels
 
INTNBmp_dimKernelX
 
INTNBmp_dimKernelY
 
INTNBmp_dimKernelZ
 
FLTNB ** m2p_kernel
 

Detailed Description

This class is a template of an image convolver module to serve as an example.

This class is a child of vImageConvolver. It is a template of an image convolver module that implements all mandatory parts to be compilable but does not do nothing. It can be used as a starting point to implement ones own image convolver module. Many explanations are provided within the corpus of all functions to guide through the implementation of ones own module. In a few words, one simply has to implement few pure virtual functions inherited from the vImageConvolver abstract class, while observing a few rules.

Definition at line 29 of file iImageConvolverTemplate.hh.

Constructor & Destructor Documentation

iImageConvolverTemplate::iImageConvolverTemplate ( )

The constructor of iImageConvolverTemplate.

This is the default and unique constructor. It does not take any parameter and its role is to affect default values to parameters specific to this module.

Definition at line 28 of file iImageConvolverTemplate.cc.

iImageConvolverTemplate::~iImageConvolverTemplate ( )

The destructor of iImageConvolverTemplate.

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 specifically by this module.

Definition at line 38 of file iImageConvolverTemplate.cc.

Member Function Documentation

int iImageConvolverTemplate::BuildConvolutionKernel ( )
privatevirtual

A private function used to build the convolution kernel specific to the child convolver.

This function is used to build the convolution kernels associated to the child convolver. It is called by the Initialize() function. It is pure virtual so is implemented by children. To be the most generic possible, one can build has many convolution kernels as desired in order to implement spatially variant convolutions. The number of kernels should be specified, the kernels' dimensions allocated and specified, and same for the actual kernels' values.

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

Implements vImageConvolver.

Definition at line 99 of file iImageConvolverTemplate.cc.

int iImageConvolverTemplate::CheckSpecificParameters ( )
privatevirtual

A private function used to check the parameters settings specific to the child module.

This function is used to check that all parameters specific to the module are correctly set within allowed values. It is called by the CheckParameters() function of the mother class. It is the implementation of the pure virtual function inherited from the abstract mother class vImageConvolver.

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

Implements vImageConvolver.

Definition at line 86 of file iImageConvolverTemplate.cc.

int iImageConvolverTemplate::ReadConfigurationFile ( const string &  a_fileOptions)
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 module, from a configuration file. It is the implementation of the pure virtual function inherited from the abstract class vImageConvolver. 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.

Implements vImageConvolver.

Definition at line 48 of file iImageConvolverTemplate.cc.

int iImageConvolverTemplate::ReadOptionsList ( const string &  a_listOptions)
virtual

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

Parameters
conststring& a_configurationFile

This function implements the reading of all options associated to a child module, from a list of options. It is the implementation of the pure virtual function inherited from the abstract class vImageConvolver. 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.

Implements vImageConvolver.

Definition at line 61 of file iImageConvolverTemplate.cc.

void iImageConvolverTemplate::ShowHelp ( )
virtual

A function used to show help about the child module.

This function must describe what the module does and how to use it. It describes in details the different parameters of the module, and how to set them through the use of a configuration file or a list of options. It is the implementation of the pure virtual function inherited from the abstract class vImageConvolverModule.

Implements vImageConvolver.

Definition at line 74 of file iImageConvolverTemplate.cc.


The documentation for this class was generated from the following files: