![]() |
CASToR
3.2
Tomographic Reconstruction (PET/SPECT/CT)
|
This abstract class is the generic image convolver class used by the oImageConvolverManager. More...
#include <vImageConvolver.hh>
Public Member Functions | |
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) |
int | ApplyConvolutionTranspose (FLTNB *ap_image) |
virtual int | ReadConfigurationFile (const string &a_fileOptions)=0 |
virtual int | ReadOptionsList (const string &a_listOptions)=0 |
virtual void | ShowHelp ()=0 |
A function used to show help about the child module. More... | |
void | SetVerbose (int a_verbose) |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
vImageConvolver () | |
virtual | ~vImageConvolver () |
int | CheckParameters () |
int | Initialize () |
int | ApplyConvolution (FLTNB *ap_image) |
int | ApplyConvolutionTranspose (FLTNB *ap_image) |
virtual int | ReadConfigurationFile (const string &a_fileOptions)=0 |
virtual int | ReadOptionsList (const string &a_listOptions)=0 |
virtual void | ShowHelp ()=0 |
void | SetVerbose (int a_verbose) |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
Protected Member Functions | |
void | CopyToPaddedImage (FLTNB *ap_inputImage) |
void | CopyToPaddedImage (FLTNB *ap_inputImage) |
Protected Attributes | |
oImageDimensionsAndQuantification * | mp_ImageDimensionsAndQuantification |
int | m_verbose |
bool | m_checked |
bool | m_initialized |
bool | m_stationary |
FLTNB * | mp_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 |
INTNB * | mp_dimKernelX |
INTNB * | mp_dimKernelY |
INTNB * | mp_dimKernelZ |
FLTNB ** | m2p_kernel |
Private Member Functions | |
virtual int | Convolve (FLTNB *ap_outputImage) |
virtual int | ConvolveTranspose (FLTNB *ap_outputImage) |
virtual int | CheckSpecificParameters ()=0 |
A private function used to check the parameters settings specific to the child convolver. More... | |
virtual int | BuildConvolutionKernel ()=0 |
A private function used to build the convolution kernel specific to the child convolver. More... | |
virtual int | Convolve (FLTNB *ap_outputImage) |
virtual int | ConvolveTranspose (FLTNB *ap_outputImage) |
virtual int | CheckSpecificParameters ()=0 |
virtual int | BuildConvolutionKernel ()=0 |
This abstract class is the generic image convolver class used by the oImageConvolverManager.
This abstract class is the base of all implemented image convolvers inheriting from it. It is used by the oImageConvolverManager that instantiate a collection of children objects based on the provided options. It implements four main public functions:
(i) CheckParameters() which checks the mandatory common parameters and calls the pure virtual CheckSpecificParameters() function implemented by each child;
(ii) Initialize() which initializes some common stuff and calls the pure virtual BuildConvolutionKernel() function implemented by each child;
(iii) ApplyConvolution() which actually applies the convolution onto the provided image;
(iv) ApplyConvolutionTranspose() which applies the transpose of the convolution.
It also specifies other pure virtual functions dedicated to the reading of options and help associated to each child, and the Convolve() and ConvolveTranspose() functions which actually implement the specific convolving of each child module. As an example of a child module, see the iImageProcessingTemplate child class that illustrates how a specific image processing module should be implemented.
Definition at line 35 of file code/include/image/vImageConvolver.hh.
vImageConvolver::vImageConvolver | ( | ) |
The constructor of vImageConvolver.
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 17 of file code/src/image/vImageConvolver.cc.
|
virtual |
The destructor of vImageConvolver.
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. It is virtual, so that it is automatically called when a child object is deleted.
Definition at line 49 of file code/src/image/vImageConvolver.cc.
vImageConvolver::vImageConvolver | ( | ) |
|
virtual |
int vImageConvolver::ApplyConvolution | ( | FLTNB * | ap_image | ) |
Definition at line 217 of file code/src/image/vImageConvolver.cc.
int vImageConvolver::ApplyConvolution | ( | FLTNB * | ap_image | ) |
int vImageConvolver::ApplyConvolutionTranspose | ( | FLTNB * | ap_image | ) |
Definition at line 244 of file code/src/image/vImageConvolver.cc.
int vImageConvolver::ApplyConvolutionTranspose | ( | FLTNB * | ap_image | ) |
|
privatepure virtual |
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.
Implemented in iImageConvolverTemplate, iImageConvolverTemplate, iImageConvolverStationaryIsotropicGaussian, iImageConvolverStationaryIsotropicGaussian, iImageConvolverStationaryGaussian, and iImageConvolverStationaryGaussian.
|
privatepure virtual |
int vImageConvolver::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 69 of file code/src/image/vImageConvolver.cc.
int vImageConvolver::CheckParameters | ( | ) |
|
privatepure virtual |
A private function used to check the parameters settings specific to the child convolver.
This function is used to check that all parameters specific to the convolver are correctly set within allowed values. It is called by the CheckParameters() function. It is pure virtual so is implemented by children.
Implemented in iImageConvolverStationaryIsotropicGaussian, iImageConvolverTemplate, iImageConvolverStationaryIsotropicGaussian, iImageConvolverTemplate, iImageConvolverStationaryGaussian, and iImageConvolverStationaryGaussian.
|
privatepure virtual |
|
privatevirtual |
Reimplemented in iImageConvolverStationaryIsotropicGaussian, and iImageConvolverStationaryIsotropicGaussian.
|
privatevirtual |
Reimplemented in iImageConvolverStationaryIsotropicGaussian, and iImageConvolverStationaryIsotropicGaussian.
Definition at line 314 of file code/src/image/vImageConvolver.cc.
|
privatevirtual |
|
privatevirtual |
Definition at line 403 of file code/src/image/vImageConvolver.cc.
|
protected |
|
protected |
Definition at line 271 of file code/src/image/vImageConvolver.cc.
int vImageConvolver::Initialize | ( | ) |
int vImageConvolver::Initialize | ( | ) |
A public function used to initialize the module.
This function does not take any parameter and is used to initialize everything that should be initialized. At the beginning, it calls the pure virtual BuildConvolutionKernel() function implemented by children.
Definition at line 101 of file code/src/image/vImageConvolver.cc.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 218 of file code/include/image/vImageConvolver.hh.
|
inline |
Definition at line 218 of file include/image/vImageConvolver.hh.
|
inline |
Definition at line 211 of file code/include/image/vImageConvolver.hh.
|
inline |
Definition at line 211 of file include/image/vImageConvolver.hh.
|
pure 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 pure virtual so is implemented by children.
Implemented in iImageConvolverStationaryIsotropicGaussian, iImageConvolverTemplate, iImageConvolverStationaryIsotropicGaussian, iImageConvolverTemplate, iImageConvolverStationaryGaussian, and iImageConvolverStationaryGaussian.
|
pure virtual |
|
protected |
The actual kernels, first pointer for the number of kernels, second pointer for the kernel values
Definition at line 247 of file code/include/image/vImageConvolver.hh.
|
protected |
Boolean that says if the parameters were checked or not
Definition at line 229 of file code/include/image/vImageConvolver.hh.
|
protected |
The number of voxels of the padded image along X
Definition at line 237 of file code/include/image/vImageConvolver.hh.
|
protected |
The number of voxels of the padded image in a slice
Definition at line 240 of file code/include/image/vImageConvolver.hh.
|
protected |
The total number of voxels of the padded image
Definition at line 241 of file code/include/image/vImageConvolver.hh.
|
protected |
The number of voxels of the padded image along Y
Definition at line 238 of file code/include/image/vImageConvolver.hh.
|
protected |
The number of voxels of the padded image along Z
Definition at line 239 of file code/include/image/vImageConvolver.hh.
|
protected |
Boolean that says if the convolver was initialized or not
Definition at line 230 of file code/include/image/vImageConvolver.hh.
|
protected |
The number of kernels (1 if stationary, more otherwise
Definition at line 243 of file code/include/image/vImageConvolver.hh.
|
protected |
The offset of the padded image along X
Definition at line 234 of file code/include/image/vImageConvolver.hh.
|
protected |
The offset of the padded image along Y
Definition at line 235 of file code/include/image/vImageConvolver.hh.
|
protected |
The offset of the padded image along Z
Definition at line 236 of file code/include/image/vImageConvolver.hh.
|
protected |
Boolean that says if the kernel is stationary or not
Definition at line 231 of file code/include/image/vImageConvolver.hh.
|
protected |
The verbose level
Definition at line 227 of file code/include/image/vImageConvolver.hh.
|
protected |
The dimension of each kernel along X
Definition at line 244 of file code/include/image/vImageConvolver.hh.
|
protected |
The dimension of each kernel along Y
Definition at line 245 of file code/include/image/vImageConvolver.hh.
|
protected |
The dimension of each kernel along Z
Definition at line 246 of file code/include/image/vImageConvolver.hh.
|
protected |
Pointer to the oImageDimensionsAndQuantification object in use
Definition at line 226 of file code/include/image/vImageConvolver.hh.
|
protected |
The actual padded buffer image
Definition at line 233 of file code/include/image/vImageConvolver.hh.