84 Cerr(
"***** vImageConvolver::CheckParameters() -> The verbose level must be set positive !" << endl);
90 Cerr(
"***** vImageConvolver::CheckParameters() -> The image dimensions must be set through a oImageDimensionsAndQuantification !" << endl);
96 Cerr(
"***** vImageConvolver::CheckParameters() -> A problem occured while checking specific parameters of the child convolver !" << endl);
116 Cerr(
"***** vImageConvolver::Initialize() -> Parameters have not been checked ! Please call CheckParameters() before." << endl);
123 Cerr(
"***** vImageConvolver::Initialize() -> A problem occured while building the convolution kernel !" << endl);
134 Cerr(
"***** vImageConvolver::Initialize() -> The number of kernels is negative or null !" << endl);
140 Cerr(
"***** vImageConvolver::Initialize() -> The kernel dimensions are not allocated !" << endl);
146 Cerr(
"***** vImageConvolver::Initialize() -> The kernel is not allocated !" << endl);
153 INTNB max_kern_size_Z = 0;
154 INTNB max_kern_size_Y = 0;
155 INTNB max_kern_size_X = 0;
163 Cerr(
"***** vImageConvolver::Initialize() -> Dimension of " << k <<
"th convolution kernel along Z (" <<
mp_dimKernelZ[k] <<
" is not odd !" << endl);
169 Cerr(
"***** vImageConvolver::Initialize() -> Dimension of " << k <<
"th convolution kernel along Y (" <<
mp_dimKernelY[k] <<
" is not odd !" << endl);
175 Cerr(
"***** vImageConvolver::Initialize() -> Dimension of " << k <<
"th convolution kernel along X (" <<
mp_dimKernelX[k] <<
" is not odd !" << endl);
196 Cerr(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
197 Cerr(
"!!!!! vImageConvolver::Initialize() -> The maximum half size of the convolution kernels is higher or equal to the number of slices of the image." << endl);
198 Cerr(
"!!!!! This won't affect the results, but a convolution running time factor of " << over_computation_factor <<
" will be lost for nothing." << endl);
199 Cerr(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
232 Cerr(
"***** vImageConvolver::ApplyConvolution() -> Called while not initialized !" << endl);
242 Cerr(
"***** vImageConvolver::ApplyConvolution() -> A problem occured while actually convolving !" << endl);
259 Cerr(
"***** vImageConvolver::ApplyConvolutionTranspose() -> Called while not initialized !" << endl);
269 Cerr(
"***** vImageConvolver::ApplyConvolutionTranspose() -> A problem occured while actually convolving !" << endl);
286 Cerr(
"***** vImageConvolver::CopyToPaddedImage() -> Called while not initialized !" << endl);
293 #pragma omp parallel for private(z) schedule(guided)
313 ap_inputImage[coord_orig] = 0.;
329 Cerr(
"***** vImageConvolver::Convolve() -> Called while not initialized !" << endl);
343 INTNB stationary_kernel = 0;
346 #pragma omp parallel for private(z)
352 FLTNB kernel_integral = 0.;
361 for (
INTNB xyk=0; xyk<
mp_dimKernelX[stationary_kernel]*mp_dimKernelY[stationary_kernel]; xyk++)
362 kernel_integral +=
m2p_kernel[stationary_kernel][kernZ_base+xyk];
373 INTNB index_img = indexZY_base + x;
375 for (
INTNB zk=0, index_kern=0; zk<mp_dimKernelZ[stationary_kernel]; zk++)
386 INTNB index_pad = indexZY_pad + x + xk;
388 ap_outputImage[index_img] +=
mp_paddedImage[index_pad] *
m2p_kernel[stationary_kernel][index_kern] / kernel_integral;
401 Cerr(
"***** vImageConvolver::Convolve() -> To use a non-stationary kernel, you should overload this function to implement your own in your child convolver !" << endl);
416 Cerr(
"***** vImageConvolver::ConvolveTranspose() -> Called while not initialized !" << endl);
430 Cerr(
"***** vImageConvolver::ConvolveTranspose() -> To use a non-stationary kernel, you should overload this function to implement your own in your child convolver !" << endl);
Declaration of class oImageDimensionsAndQuantification.
virtual int ConvolveTranspose(FLTNB *ap_outputImage)
A private function used to apply the transpose convolution on the padded image to the provided output...
int Initialize()
A public function used to initialize the module.
virtual int BuildConvolutionKernel()=0
A private function used to build the convolution kernel specific to the child convolver.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
int CheckParameters()
A public function used to check the parameters settings.
INTNB GetNbVoxXY()
Get the number of voxels in a slice.
int ApplyConvolutionTranspose(FLTNB *ap_image)
A public function used to apply the transpose convolution module on the provided image.
virtual ~vImageConvolver()
The destructor of vImageConvolver.
vImageConvolver()
The constructor of vImageConvolver.
int ApplyConvolution(FLTNB *ap_image)
A public function used to apply the convolution module on the provided image.
Declaration of class oImageSpace.
virtual int CheckSpecificParameters()=0
A private function used to check the parameters settings specific to the child convolver.
virtual int Convolve(FLTNB *ap_outputImage)
A private function used to apply the convolution on the padded image to the provided output image...
INTNB GetNbVoxX()
Get the number of voxels along the X axis.
INTNB GetNbVoxZ()
Get the number of voxels along the Z axis.
Declaration of class vImageConvolver.
void CopyToPaddedImage(FLTNB *ap_inputImage)
A private function used to copy the provided image into the padded buffer.
INTNB GetNbVoxY()
Get the number of voxels along the Y axis.