CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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-2018 all CASToR contributors listed below:
18 
19  --> current contributors: Thibaut MERLIN, Simon STUTE, Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Mael MILLARDET
20  --> past contributors: Valentin VIELZEUF
21 
22 This is CASToR version 2.0.
23 */
24 
31 #include "vImageConvolver.hh"
33 #include "oImageSpace.hh"
35 
36 // =====================================================================
37 // ---------------------------------------------------------------------
38 // ---------------------------------------------------------------------
39 // =====================================================================
40 
42 {
43  // Affect default values to the parameters specific to this convolver
44 }
45 
46 // =====================================================================
47 // ---------------------------------------------------------------------
48 // ---------------------------------------------------------------------
49 // =====================================================================
50 
52 {
53  // Delete or free all structures specific to this convolver that were allocated by this convolver
54 }
55 
56 // =====================================================================
57 // ---------------------------------------------------------------------
58 // ---------------------------------------------------------------------
59 // =====================================================================
60 
61 int iImageConvolverTemplate::ReadConfigurationFile(const string& a_configurationFile)
62 {
63  // Implement here the reading of any options specific to this image convolver, through a configuration file
64 
65  // Normal end
66  return 0;
67 }
68 
69 // =====================================================================
70 // ---------------------------------------------------------------------
71 // ---------------------------------------------------------------------
72 // =====================================================================
73 
74 int iImageConvolverTemplate::ReadOptionsList(const string& a_optionsList)
75 {
76  // Implement here the reading of any options specific to this image convolver, through a list of options separated by commas
77 
78  // Normal end
79  return 0;
80 }
81 
82 // =====================================================================
83 // ---------------------------------------------------------------------
84 // ---------------------------------------------------------------------
85 // =====================================================================
86 
88 {
89  // Here, display some help and guidance to how to use this image convolver module and what it does.
90  // Also describes the form of the configuration file or the list of options that parameterize your module.
91  cout << "This image convolver is a template class dedicated to add your own custom image convolver." << endl;
92 }
93 
94 // =====================================================================
95 // ---------------------------------------------------------------------
96 // ---------------------------------------------------------------------
97 // =====================================================================
98 
100 {
101  // Implement here all mandatory checks specific to this image convolver needed for a nice use
102 
103  // Normal end
104  return 0;
105 }
106 
107 // =====================================================================
108 // ---------------------------------------------------------------------
109 // ---------------------------------------------------------------------
110 // =====================================================================
111 
113 {
114  // Here you must build the convolution kernels. This means first specifying the number of kernels: m_nbKernels.
115  // If it is stationary (i.e. m_nbKernels=1), then the m_stationary boolean should be set to true, as the Convolve
116  // function implemented by the mother vImageConvolver will be used. Otherwise, this function Convolve(), as well
117  // as ConvolveTranspose() must be overloaded by this class in order to properly use the convolution kernels.
118  // Second, the dimensions of the kernels mp_dimKernelX, mp_dimKernelY and mp_dimKernelZ must first be allocated
119  // with respect to the number of kernels, and then be specified. Finally, the kernels values m2p_kernel must also be
120  // allocated with respect to the number of kernels and their dimensions, and then be specified. It is assumed that
121  // the normalization of the kernels is made in this function.
122 
123  // Normal end
124  return 0;
125 }
126 
127 // =====================================================================
128 // ---------------------------------------------------------------------
129 // ---------------------------------------------------------------------
130 // =====================================================================
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.