CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
include/management/sAddonManager.hh
Go to the documentation of this file.
1 
8 #ifndef SADDONMANAGER_HH
9 #define SADDONMANAGER_HH 1
10 
11 #include "gVariables.hh"
12 #include "vProjector.hh"
13 #include "vOptimizer.hh"
14 #include "vImageConvolver.hh"
15 #include "vImageProcessingModule.hh"
16 #include "vPenalty.hh"
17 #include "vDeformation.hh"
18 #include "vDynamicModel.hh"
19 
33 class sAddonManager
34 {
35  // -----------------------------------------------------------------------------------------
36  // Constructor & Destructor
37  public :
44  {
45  if (mp_Instance == NULL) mp_Instance = new sAddonManager;
46  return mp_Instance;
47  };
54 
55 
56  // -----------------------------------------------------------------------------------------
57  // Public lists and methods for the different objects based on abstract classes
58  public:
59 
60  // The function's pointer to build the map of all functions dedicated to the creation of vProjector objects
61  typedef vProjector *(*maker_projector) ();
62  // The map indexed by the name of the vProjector children, and which points on the corresponding function that
63  // call the constructor of each child. The corresponding function is created by a macro defined in the vProjector
64  // header file and used in the children classes. The pointer to this function is automatically added into the map
65  // by another macro defined in the vProjector header file (describring a static creator class) and used in the
66  // children classes.
67  std::map<string,maker_projector> mp_listOfProjectors;
73  void ShowHelpProjector();
74 
75  // The function's pointer to build the map of all functions dedicated to the creation of vOptimizer objects
76  typedef vOptimizer *(*maker_optimizer) ();
77  // The map indexed by the name of the vOptimizer children, and which points on the corresponding function that
78  // call the constructor of each child. The corresponding function is created by a macro defined in the vOptimizer
79  // header file and used in the children classes. The pointer to this function is automatically added into the map
80  // by another macro defined in the vOptimizer header file (describring a static creator class) and used in the
81  // children classes.
82  std::map<string,maker_optimizer> mp_listOfOptimizers;
88  void ShowHelpOptimizer();
89 
90  // The function's pointer to build the map of all functions dedicated to the creation of vPenalty objects
91  typedef vPenalty *(*maker_penalty) ();
92  // The map indexed by the name of the vPenalty children, and which points on the corresponding function that
93  // call the constructor of each child. The corresponding function is created by a macro defined in the vPenalty
94  // header file and used in the children classes. The pointer to this function is automatically added into the map
95  // by another macro defined in the vPenalty header file (describring a static creator class) and used in the
96  // children classes.
97  std::map<string,maker_penalty> mp_listOfPenalties;
103  void ShowHelpPenalty();
104 
105  // The function's pointer to build the map of all functions dedicated to the creation of vImageConvolver objects
106  typedef vImageConvolver *(*maker_image_convolver) ();
107  // The map indexed by the name of the vImageConvolver children, and which points on the corresponding function that
108  // call the constructor of each child. The corresponding function is created by a macro defined in the vImageConvolver
109  // header file and used in the children classes. The pointer to this function is automatically added into the map
110  // by another macro defined in the vImageConvolver header file (describring a static creator class) and used in the
111  // children classes.
112  std::map<string,maker_image_convolver> mp_listOfImageConvolvers;
118  void ShowHelpImageConvolver();
119 
120  // The function's pointer to build the map of all functions dedicated to the creation of vImageProcessingModule objects
121  typedef vImageProcessingModule *(*maker_image_processing_module) ();
122  // The map indexed by the name of the vImageProcessingModule children, and which points on the corresponding function that
123  // call the constructor of each child. The corresponding function is created by a macro defined in the vImageProcessingModule
124  // header file and used in the children classes. The pointer to this function is automatically added into the map
125  // by another macro defined in the vImageProcessingModule header file (describring a static creator class) and used in the
126  // children classes.
127  std::map<string,maker_image_processing_module> mp_listOfImageProcessingModules;
134 
135  // The function's pointer to build the map of all functions dedicated to the creation of vScanner objects
136  typedef vScanner *(*maker_scanner) ();
137  // The map indexed by the name of the vScanner children, and which points on the corresponding function that
138  // call the constructor of each child. The corresponding function is created by a macro defined in the vScanner
139  // header file and used in the children classes. The pointer to this function is automatically added into the map
140  // by another macro defined in the vScanner header file (describring a static creator class) and used in the
141  // children classes.
142  std::map<string,maker_scanner> mp_listOfScannerTypes;
148  void ShowHelpScanner();
149 
150  // The function's pointer to build the map of all functions dedicated to the creation of vDynamicModel objects
151  typedef vDynamicModel *(*maker_dynamic_model) ();
152  // The map indexed by the name of the vDynamicModel children, and which points on the corresponding function that
153  // call the constructor of each child. The corresponding function is created by a macro defined in the vDynamicModel
154  // header file and used in the children classes. The pointer to this function is automatically added into the map
155  // by another macro defined in the vDynamicModel header file (describring a static creator class) and used in the
156  // children classes.
157  std::map<string,maker_dynamic_model> mp_listOfDynamicModels;
163  void ShowHelpDynamicModel();
164 
165  // The function's pointer to build the map of all functions dedicated to the creation of vDeformation objects
166  typedef vDeformation *(*maker_deformation) ();
167  // The map indexed by the name of the vDeformation children, and which points on the corresponding function that
168  // call the constructor of each child. The corresponding function is created by a macro defined in the vDeformation
169  // header file and used in the children classes. The pointer to this function is automatically added into the map
170  // by another macro defined in the vDeformation header file (describring a static creator class) and used in the
171  // children classes.
172  std::map<string,maker_deformation> mp_listOfDeformations;
178  void ShowHelpDeformation();
179 
180 
181  // -------------------------------------------------------------------
182  // Private constructor
183  private:
189  sAddonManager();
190 
191 
192  // -------------------------------------------------------------------
193  // Private data members
194  private:
195  static sAddonManager *mp_Instance;
196 };
197 
198 #endif
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.
std::map< string, maker_scanner > mp_listOfScannerTypes
std::map< string, maker_dynamic_model > mp_listOfDynamicModels
This is the mother class of dynamic model classes.
void ShowHelpImageProcessingModule()
Show help about all implemented image processing modules.
void ShowHelpPenalty()
Show help about all implemented penalties.
std::map< string, maker_deformation > mp_listOfDeformations
static sAddonManager * GetInstance()
std::map< string, maker_optimizer > mp_listOfOptimizers
This abstract class is the generic image processing module class used by the oImageProcessingManager...
std::map< string, maker_penalty > mp_listOfPenalties
sAddonManager()
The constructor of sAddonManager.
std::map< string, maker_image_convolver > mp_listOfImageConvolvers
This class is designed to generically described any penalty applied to MAP algorithms.
std::map< string, maker_projector > mp_listOfProjectors
This is the mother class of image-based transformation class.
void ShowHelpProjector()
Show help about all implemented projectors.
This class is designed to generically described any iterative optimizer.
void ShowHelpScanner()
Show help about all implemented scanners.
This header file is mainly used to declare some macro definitions and all includes needed from the st...
void ShowHelpOptimizer()
Show help about all implemented optimizers.
Generic class for scanner objects.
This abstract class is the generic image convolver class used by the oImageConvolverManager.
void ShowHelpImageConvolver()
Show help about all implemented image convolvers.
std::map< string, maker_image_processing_module > mp_listOfImageProcessingModules