CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sAddonManager.hh
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 #ifndef SADDONMANAGER_HH
32 #define SADDONMANAGER_HH 1
33 
34 #include "gVariables.hh"
35 #include "vProjector.hh"
36 #include "vOptimizer.hh"
37 #include "vImageConvolver.hh"
39 #include "vPenalty.hh"
40 #include "vDeformation.hh"
41 #include "vDynamicModel.hh"
42 
57 {
58  // -----------------------------------------------------------------------------------------
59  // Constructor & Destructor
60  public :
67  {
68  if (mp_Instance == NULL) mp_Instance = new sAddonManager;
69  return mp_Instance;
70  };
77 
78 
79  // -----------------------------------------------------------------------------------------
80  // Public lists and methods for the different objects based on abstract classes
81  public:
82 
83  // The function's pointer to build the map of all functions dedicated to the creation of vProjector objects
84  typedef vProjector *(*maker_projector) ();
85  // The map indexed by the name of the vProjector children, and which points on the corresponding function that
86  // call the constructor of each child. The corresponding function is created by a macro defined in the vProjector
87  // header file and used in the children classes. The pointer to this function is automatically added into the map
88  // by another macro defined in the vProjector header file (describring a static creator class) and used in the
89  // children classes.
90  std::map<string,maker_projector> mp_listOfProjectors;
96  void ShowHelpProjector();
97 
98  // The function's pointer to build the map of all functions dedicated to the creation of vOptimizer objects
99  typedef vOptimizer *(*maker_optimizer) ();
100  // The map indexed by the name of the vOptimizer children, and which points on the corresponding function that
101  // call the constructor of each child. The corresponding function is created by a macro defined in the vOptimizer
102  // header file and used in the children classes. The pointer to this function is automatically added into the map
103  // by another macro defined in the vOptimizer header file (describring a static creator class) and used in the
104  // children classes.
105  std::map<string,maker_optimizer> mp_listOfOptimizers;
111  void ShowHelpOptimizer();
112 
113  // The function's pointer to build the map of all functions dedicated to the creation of vPenalty objects
114  typedef vPenalty *(*maker_penalty) ();
115  // The map indexed by the name of the vPenalty children, and which points on the corresponding function that
116  // call the constructor of each child. The corresponding function is created by a macro defined in the vPenalty
117  // header file and used in the children classes. The pointer to this function is automatically added into the map
118  // by another macro defined in the vPenalty header file (describring a static creator class) and used in the
119  // children classes.
120  std::map<string,maker_penalty> mp_listOfPenalties;
126  void ShowHelpPenalty();
127 
128  // The function's pointer to build the map of all functions dedicated to the creation of vImageConvolver objects
129  typedef vImageConvolver *(*maker_image_convolver) ();
130  // The map indexed by the name of the vImageConvolver children, and which points on the corresponding function that
131  // call the constructor of each child. The corresponding function is created by a macro defined in the vImageConvolver
132  // header file and used in the children classes. The pointer to this function is automatically added into the map
133  // by another macro defined in the vImageConvolver header file (describring a static creator class) and used in the
134  // children classes.
135  std::map<string,maker_image_convolver> mp_listOfImageConvolvers;
141  void ShowHelpImageConvolver();
142 
143  // The function's pointer to build the map of all functions dedicated to the creation of vImageProcessingModule objects
144  typedef vImageProcessingModule *(*maker_image_processing_module) ();
145  // The map indexed by the name of the vImageProcessingModule children, and which points on the corresponding function that
146  // call the constructor of each child. The corresponding function is created by a macro defined in the vImageProcessingModule
147  // header file and used in the children classes. The pointer to this function is automatically added into the map
148  // by another macro defined in the vImageProcessingModule header file (describring a static creator class) and used in the
149  // children classes.
150  std::map<string,maker_image_processing_module> mp_listOfImageProcessingModules;
157 
158  // The function's pointer to build the map of all functions dedicated to the creation of vScanner objects
159  typedef vScanner *(*maker_scanner) ();
160  // The map indexed by the name of the vScanner children, and which points on the corresponding function that
161  // call the constructor of each child. The corresponding function is created by a macro defined in the vScanner
162  // header file and used in the children classes. The pointer to this function is automatically added into the map
163  // by another macro defined in the vScanner header file (describring a static creator class) and used in the
164  // children classes.
165  std::map<string,maker_scanner> mp_listOfScannerTypes;
171  void ShowHelpScanner();
172 
173  // The function's pointer to build the map of all functions dedicated to the creation of vDynamicModel objects
174  typedef vDynamicModel *(*maker_dynamic_model) ();
175  // The map indexed by the name of the vDynamicModel children, and which points on the corresponding function that
176  // call the constructor of each child. The corresponding function is created by a macro defined in the vDynamicModel
177  // header file and used in the children classes. The pointer to this function is automatically added into the map
178  // by another macro defined in the vDynamicModel header file (describring a static creator class) and used in the
179  // children classes.
180  std::map<string,maker_dynamic_model> mp_listOfDynamicModels;
186  void ShowHelpDynamicModel();
187 
188  // The function's pointer to build the map of all functions dedicated to the creation of vDeformation objects
189  typedef vDeformation *(*maker_deformation) ();
190  // The map indexed by the name of the vDeformation children, and which points on the corresponding function that
191  // call the constructor of each child. The corresponding function is created by a macro defined in the vDeformation
192  // header file and used in the children classes. The pointer to this function is automatically added into the map
193  // by another macro defined in the vDeformation header file (describring a static creator class) and used in the
194  // children classes.
195  std::map<string,maker_deformation> mp_listOfDeformations;
201  void ShowHelpDeformation();
202 
203 
204  // -------------------------------------------------------------------
205  // Private constructor
206  private:
212  sAddonManager();
213 
214 
215  // -------------------------------------------------------------------
216  // Private data members
217  private:
219 };
220 
221 #endif
This header file is mainly used to declare some macro definitions and all includes needed from the st...
void ShowHelpDynamicModel()
Show help about all implemented dynamic models.
This class is designed to manage the automatic declaration of 'addon' classes.
void ShowHelpDeformation()
Show help about all implemented deformations.
This class is designed to generically described any on-the-fly projector.
Definition: vProjector.hh:76
This is the mother class of dynamic model classes.
void ShowHelpImageProcessingModule()
Show help about all implemented image processing modules.
std::map< string, maker_scanner > mp_listOfScannerTypes
void ShowHelpPenalty()
Show help about all implemented penalties.
static sAddonManager * GetInstance()
std::map< string, maker_optimizer > mp_listOfOptimizers
Declaration of class vProjector.
This abstract class is the generic image processing module class used by the oImageProcessingManager...
sAddonManager()
The constructor of sAddonManager.
Declaration of class vOptimizer.
Declaration of class vPenalty.
This class is designed to generically described any penalty applied to MAP algorithms.
Definition: vPenalty.hh:46
This is the mother class of image-based transformation class.
Definition: vDeformation.hh:65
std::map< string, maker_projector > mp_listOfProjectors
void ShowHelpProjector()
Show help about all implemented projectors.
Declaration of class vDeformation.
This class is designed to generically described any iterative optimizer.
Definition: vOptimizer.hh:59
std::map< string, maker_image_processing_module > mp_listOfImageProcessingModules
~sAddonManager()
The destructor of sAddonManager.
std::map< string, maker_deformation > mp_listOfDeformations
std::map< string, maker_dynamic_model > mp_listOfDynamicModels
std::map< string, maker_image_convolver > mp_listOfImageConvolvers
void ShowHelpScanner()
Show help about all implemented scanners.
std::map< string, maker_penalty > mp_listOfPenalties
Declaration of class vDynamicModel.
Declaration of class vImageConvolver.
void ShowHelpOptimizer()
Show help about all implemented optimizers.
static sAddonManager * mp_Instance
Declaration of class vImageProcessingModule.
Generic class for scanner objects.
Definition: vScanner.hh:62
This abstract class is the generic image convolver class used by the oImageConvolverManager.
void ShowHelpImageConvolver()
Show help about all implemented image convolvers.