CASToR  1.0
Tomographic Reconstruction (PET/SPECT)
sAddonManager.hh
Go to the documentation of this file.
00001 
00009 #ifndef SADDONMANAGER_HH
00010 #define SADDONMANAGER_HH 1
00011 
00012 #include "gVariables.hh"
00013 #include "vProjector.hh"
00014 #include "vOptimizer.hh"
00015 #include "vImageConvolver.hh"
00016 #include "vImageProcessingModule.hh"
00017 #include "vPenalty.hh"
00018 #include "vDeformation.hh"
00019 #include "vDynamicModel.hh"
00020 
00021 
00022 
00036 class sAddonManager
00037 {
00038   // -----------------------------------------------------------------------------------------
00039   // Constructor & Destructor
00040   public :
00046     static sAddonManager *GetInstance()
00047     {
00048       if (mp_Instance == NULL) mp_Instance = new sAddonManager;
00049       return mp_Instance;
00050     };
00056     ~sAddonManager() {mp_Instance = NULL;}
00057 
00058 
00059   // -----------------------------------------------------------------------------------------
00060   // Public lists and methods for the different objects based on abstract classes
00061   public:
00062 
00063     // The function's pointer to build the map of all functions dedicated to the creation of vProjector objects
00064     typedef vProjector *(*maker_projector) ();
00065     // The map indexed by the name of the vProjector children, and which points on the corresponding function that
00066     // call the constructor of each child. The corresponding function is created by a macro defined in the vProjector
00067     // header file and used in the children classes. The pointer to this function is automatically added into the map
00068     // by another macro defined in the vProjector header file (describring a static creator class) and used in the
00069     // children classes.
00070     std::map<string,maker_projector> mp_listOfProjectors; 
00076     void ShowHelpProjector();
00077 
00078     // The function's pointer to build the map of all functions dedicated to the creation of vOptimizer objects
00079     typedef vOptimizer *(*maker_optimizer) ();
00080     // The map indexed by the name of the vOptimizer children, and which points on the corresponding function that
00081     // call the constructor of each child. The corresponding function is created by a macro defined in the vOptimizer
00082     // header file and used in the children classes. The pointer to this function is automatically added into the map
00083     // by another macro defined in the vOptimizer header file (describring a static creator class) and used in the
00084     // children classes.
00085     std::map<string,maker_optimizer> mp_listOfOptimizers;
00091     void ShowHelpOptimizer();
00092 
00093     // The function's pointer to build the map of all functions dedicated to the creation of vPenalty objects
00094     typedef vPenalty *(*maker_penalty) ();
00095     // The map indexed by the name of the vPenalty children, and which points on the corresponding function that
00096     // call the constructor of each child. The corresponding function is created by a macro defined in the vPenalty
00097     // header file and used in the children classes. The pointer to this function is automatically added into the map
00098     // by another macro defined in the vPenalty header file (describring a static creator class) and used in the
00099     // children classes.
00100     std::map<string,maker_penalty> mp_listOfPenalties;
00106     void ShowHelpPenalty();
00107 
00108     // The function's pointer to build the map of all functions dedicated to the creation of vImageConvolver objects
00109     typedef vImageConvolver *(*maker_image_convolver) ();
00110     // The map indexed by the name of the vImageConvolver children, and which points on the corresponding function that
00111     // call the constructor of each child. The corresponding function is created by a macro defined in the vImageConvolver
00112     // header file and used in the children classes. The pointer to this function is automatically added into the map
00113     // by another macro defined in the vImageConvolver header file (describring a static creator class) and used in the
00114     // children classes.
00115     std::map<string,maker_image_convolver> mp_listOfImageConvolvers;
00121     void ShowHelpImageConvolver();
00122 
00123     // The function's pointer to build the map of all functions dedicated to the creation of vImageProcessingModule objects
00124     typedef vImageProcessingModule *(*maker_image_processing_module) ();
00125     // The map indexed by the name of the vImageProcessingModule children, and which points on the corresponding function that
00126     // call the constructor of each child. The corresponding function is created by a macro defined in the vImageProcessingModule
00127     // header file and used in the children classes. The pointer to this function is automatically added into the map
00128     // by another macro defined in the vImageProcessingModule header file (describring a static creator class) and used in the
00129     // children classes.
00130     std::map<string,maker_image_processing_module> mp_listOfImageProcessingModules;
00136     void ShowHelpImageProcessingModule();
00137     
00138     // The function's pointer to build the map of all functions dedicated to the creation of vScanner objects
00139     typedef vScanner *(*maker_scanner) ();
00140     // The map indexed by the name of the vScanner children, and which points on the corresponding function that
00141     // call the constructor of each child. The corresponding function is created by a macro defined in the vScanner
00142     // header file and used in the children classes. The pointer to this function is automatically added into the map
00143     // by another macro defined in the vScanner header file (describring a static creator class) and used in the
00144     // children classes.
00145     std::map<string,maker_scanner> mp_listOfScannerTypes;
00151     void ShowHelpScanner();
00152 
00153     // The function's pointer to build the map of all functions dedicated to the creation of vDynamicModel objects
00154     typedef vDynamicModel *(*maker_dynamic_model) ();
00155     // The map indexed by the name of the vDynamicModel children, and which points on the corresponding function that
00156     // call the constructor of each child. The corresponding function is created by a macro defined in the vDynamicModel
00157     // header file and used in the children classes. The pointer to this function is automatically added into the map
00158     // by another macro defined in the vDynamicModel header file (describring a static creator class) and used in the
00159     // children classes.
00160     std::map<string,maker_dynamic_model> mp_listOfDynamicModels;
00166     void ShowHelpDynamicModel();
00167 
00168     // The function's pointer to build the map of all functions dedicated to the creation of vDeformation objects
00169     typedef vDeformation *(*maker_deformation) ();
00170     // The map indexed by the name of the vDeformation children, and which points on the corresponding function that
00171     // call the constructor of each child. The corresponding function is created by a macro defined in the vDeformation
00172     // header file and used in the children classes. The pointer to this function is automatically added into the map
00173     // by another macro defined in the vDeformation header file (describring a static creator class) and used in the
00174     // children classes.
00175     std::map<string,maker_deformation> mp_listOfDeformations;
00181     void ShowHelpDeformation();
00182 
00183 
00184   // -------------------------------------------------------------------
00185   // Private constructor
00186   private:
00192     sAddonManager();
00193 
00194 
00195   // -------------------------------------------------------------------
00196   // Private data members
00197   private:
00198     static sAddonManager *mp_Instance; 
00199 };
00200 
00201 #endif
 All Classes Files Functions Variables Typedefs Defines