CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
iImageConvolverTemplate.cc
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2019 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF
20 
21 This is CASToR version 3.0.
22 */
23 
30 #include "vImageConvolver.hh"
32 #include "oImageSpace.hh"
34 
35 // =====================================================================
36 // ---------------------------------------------------------------------
37 // ---------------------------------------------------------------------
38 // =====================================================================
39 
41 {
42  // Affect default values to the parameters specific to this convolver
43 }
44 
45 // =====================================================================
46 // ---------------------------------------------------------------------
47 // ---------------------------------------------------------------------
48 // =====================================================================
49 
51 {
52  // Delete or free all structures specific to this convolver that were allocated by this convolver
53 }
54 
55 // =====================================================================
56 // ---------------------------------------------------------------------
57 // ---------------------------------------------------------------------
58 // =====================================================================
59 
60 int iImageConvolverTemplate::ReadConfigurationFile(const string& a_configurationFile)
61 {
62  // Implement here the reading of any options specific to this image convolver, through a configuration file
63 
64  // Normal end
65  return 0;
66 }
67 
68 // =====================================================================
69 // ---------------------------------------------------------------------
70 // ---------------------------------------------------------------------
71 // =====================================================================
72 
73 int iImageConvolverTemplate::ReadOptionsList(const string& a_optionsList)
74 {
75  // Implement here the reading of any options specific to this image convolver, through a list of options separated by commas
76 
77  // Normal end
78  return 0;
79 }
80 
81 // =====================================================================
82 // ---------------------------------------------------------------------
83 // ---------------------------------------------------------------------
84 // =====================================================================
85 
87 {
88  // Here, display some help and guidance to how to use this image convolver module and what it does.
89  // Also describes the form of the configuration file or the list of options that parameterize your module.
90  cout << "This image convolver is a template class dedicated to add your own custom image convolver." << endl;
91 }
92 
93 // =====================================================================
94 // ---------------------------------------------------------------------
95 // ---------------------------------------------------------------------
96 // =====================================================================
97 
99 {
100  // Implement here all mandatory checks specific to this image convolver needed for a nice use
101 
102  // Normal end
103  return 0;
104 }
105 
106 // =====================================================================
107 // ---------------------------------------------------------------------
108 // ---------------------------------------------------------------------
109 // =====================================================================
110 
112 {
113  // Here you must build the convolution kernels. This means first specifying the number of kernels: m_nbKernels.
114  // If it is stationary (i.e. m_nbKernels=1), then the m_stationary boolean should be set to true, as the Convolve
115  // function implemented by the mother vImageConvolver will be used. Otherwise, this function Convolve(), as well
116  // as ConvolveTranspose() must be overloaded by this class in order to properly use the convolution kernels.
117  // Second, the dimensions of the kernels mp_dimKernelX, mp_dimKernelY and mp_dimKernelZ must first be allocated
118  // with respect to the number of kernels, and then be specified. Finally, the kernels values m2p_kernel must also be
119  // allocated with respect to the number of kernels and their dimensions, and then be specified. It is assumed that
120  // the normalization of the kernels is made in this function.
121 
122  // Normal end
123  return 0;
124 }
125 
126 // =====================================================================
127 // ---------------------------------------------------------------------
128 // ---------------------------------------------------------------------
129 // =====================================================================
Declaration of class iImageConvolverTemplate.
Declaration of class oImageDimensionsAndQuantification.
int BuildConvolutionKernel()
A private function used to build the convolution kernel specific to the child convolver.
~iImageConvolverTemplate()
The destructor of iImageConvolverTemplate.
int ReadOptionsList(const string &a_listOptions)
A function used to read options from a list of options.
int ReadConfigurationFile(const string &a_fileOptions)
A function used to read options from a configuration file.
Declaration of class oImageSpace.
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child module.
Declaration of class vImageConvolver.
void ShowHelp()
A function used to show help about the child module.
iImageConvolverTemplate()
The constructor of iImageConvolverTemplate.
This abstract class is the generic image convolver class used by the oImageConvolverManager.