CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
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-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 #ifndef SADDONMANAGER_HH
31 #define SADDONMANAGER_HH 1
32 
33 #include "gVariables.hh"
34 #include "vProjector.hh"
35 #include "vOptimizer.hh"
36 #include "vImageConvolver.hh"
38 #include "vPenalty.hh"
39 #include "vDeformation.hh"
40 #include "vDynamicModel.hh"
41 
56 {
57  // -----------------------------------------------------------------------------------------
58  // Constructor & Destructor
59  public :
66  {
67  if (mp_Instance == NULL) mp_Instance = new sAddonManager;
68  return mp_Instance;
69  };
76 
77 
78  // -----------------------------------------------------------------------------------------
79  // Public lists and methods for the different objects based on abstract classes
80  public:
81 
82  // The function's pointer to build the map of all functions dedicated to the creation of vProjector objects
83  typedef vProjector *(*maker_projector) ();
84  // The map indexed by the name of the vProjector children, and which points on the corresponding function that
85  // call the constructor of each child. The corresponding function is created by a macro defined in the vProjector
86  // header file and used in the children classes. The pointer to this function is automatically added into the map
87  // by another macro defined in the vProjector header file (describring a static creator class) and used in the
88  // children classes.
89  std::map<string,maker_projector> mp_listOfProjectors;
95  void ShowHelpProjector();
96 
97  // The function's pointer to build the map of all functions dedicated to the creation of vOptimizer objects
98  typedef vOptimizer *(*maker_optimizer) ();
99  // The map indexed by the name of the vOptimizer children, and which points on the corresponding function that
100  // call the constructor of each child. The corresponding function is created by a macro defined in the vOptimizer
101  // header file and used in the children classes. The pointer to this function is automatically added into the map
102  // by another macro defined in the vOptimizer header file (describring a static creator class) and used in the
103  // children classes.
104  std::map<string,maker_optimizer> mp_listOfOptimizers;
110  void ShowHelpOptimizer();
111 
112  // The function's pointer to build the map of all functions dedicated to the creation of vPenalty objects
113  typedef vPenalty *(*maker_penalty) ();
114  // The map indexed by the name of the vPenalty children, and which points on the corresponding function that
115  // call the constructor of each child. The corresponding function is created by a macro defined in the vPenalty
116  // header file and used in the children classes. The pointer to this function is automatically added into the map
117  // by another macro defined in the vPenalty header file (describring a static creator class) and used in the
118  // children classes.
119  std::map<string,maker_penalty> mp_listOfPenalties;
125  void ShowHelpPenalty();
126 
127  // The function's pointer to build the map of all functions dedicated to the creation of vImageConvolver objects
128  typedef vImageConvolver *(*maker_image_convolver) ();
129  // The map indexed by the name of the vImageConvolver children, and which points on the corresponding function that
130  // call the constructor of each child. The corresponding function is created by a macro defined in the vImageConvolver
131  // header file and used in the children classes. The pointer to this function is automatically added into the map
132  // by another macro defined in the vImageConvolver header file (describring a static creator class) and used in the
133  // children classes.
134  std::map<string,maker_image_convolver> mp_listOfImageConvolvers;
140  void ShowHelpImageConvolver();
141 
142  // The function's pointer to build the map of all functions dedicated to the creation of vImageProcessingModule objects
143  typedef vImageProcessingModule *(*maker_image_processing_module) ();
144  // The map indexed by the name of the vImageProcessingModule children, and which points on the corresponding function that
145  // call the constructor of each child. The corresponding function is created by a macro defined in the vImageProcessingModule
146  // header file and used in the children classes. The pointer to this function is automatically added into the map
147  // by another macro defined in the vImageProcessingModule header file (describring a static creator class) and used in the
148  // children classes.
149  std::map<string,maker_image_processing_module> mp_listOfImageProcessingModules;
156 
157  // The function's pointer to build the map of all functions dedicated to the creation of vScanner objects
158  typedef vScanner *(*maker_scanner) ();
159  // The map indexed by the name of the vScanner children, and which points on the corresponding function that
160  // call the constructor of each child. The corresponding function is created by a macro defined in the vScanner
161  // header file and used in the children classes. The pointer to this function is automatically added into the map
162  // by another macro defined in the vScanner header file (describring a static creator class) and used in the
163  // children classes.
164  std::map<string,maker_scanner> mp_listOfScannerTypes;
170  void ShowHelpScanner();
171 
172  // The function's pointer to build the map of all functions dedicated to the creation of vDynamicModel objects
173  typedef vDynamicModel *(*maker_dynamic_model) ();
174  // The map indexed by the name of the vDynamicModel children, and which points on the corresponding function that
175  // call the constructor of each child. The corresponding function is created by a macro defined in the vDynamicModel
176  // header file and used in the children classes. The pointer to this function is automatically added into the map
177  // by another macro defined in the vDynamicModel header file (describring a static creator class) and used in the
178  // children classes.
179  std::map<string,maker_dynamic_model> mp_listOfDynamicModels;
185  void ShowHelpDynamicModel();
186 
187  // The function's pointer to build the map of all functions dedicated to the creation of vDeformation objects
188  typedef vDeformation *(*maker_deformation) ();
189  // The map indexed by the name of the vDeformation children, and which points on the corresponding function that
190  // call the constructor of each child. The corresponding function is created by a macro defined in the vDeformation
191  // header file and used in the children classes. The pointer to this function is automatically added into the map
192  // by another macro defined in the vDeformation header file (describring a static creator class) and used in the
193  // children classes.
194  std::map<string,maker_deformation> mp_listOfDeformations;
200  void ShowHelpDeformation();
201 
202 
203  // -------------------------------------------------------------------
204  // Private constructor
205  private:
211  sAddonManager();
212 
213 
214  // -------------------------------------------------------------------
215  // Private data members
216  private:
218 };
219 
220 #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 &#39;addon&#39; classes.
void ShowHelpDeformation()
Show help about all implemented deformations.
This class is designed to generically described any on-the-fly projector.
Definition: vProjector.hh:75
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:48
This is the mother class of image-based transformation class.
Definition: vDeformation.hh:64
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:61
This abstract class is the generic image convolver class used by the oImageConvolverManager.
void ShowHelpImageConvolver()
Show help about all implemented image convolvers.