![]() |
CASToR
1.0
Tomographic Reconstruction (PET/SPECT)
|
00001 00008 #ifndef VIMAGEPROCESSINGMODULE_HH 00009 #define VIMAGEPROCESSINGMODULE_HH 1 00010 00011 #include "gVariables.hh" 00012 #include "oImageDimensionsAndQuantification.hh" 00013 #include "oImageSpace.hh" 00014 00015 00031 class vImageProcessingModule 00032 { 00033 // ----------------------------------------------------------------------------------------- 00034 // Constructor & Destructor 00035 public: 00042 vImageProcessingModule(); 00050 virtual ~vImageProcessingModule(); 00051 00052 // ----------------------------------------------------------------------------------------- 00053 // Public member functions 00054 public: 00063 int CheckParameters(); 00073 int Initialize(); 00074 00075 00076 // ----------------------------------------------------------------------------------------- 00077 // Pure virtual public member functions that need to be implemented by children 00078 public: 00089 virtual int ReadConfigurationFile(const string& a_configurationFile) = 0; 00100 virtual int ReadOptionsList(const string& a_optionsList) = 0; 00109 virtual void ShowHelp() = 0; 00121 virtual int Process(FLTNB**** a4p_image) = 0; 00122 00123 00124 // ----------------------------------------------------------------------------------------- 00125 // Pure virtual private member functions that need to be implemented by children 00126 private: 00135 virtual int CheckSpecificParameters() = 0; 00145 virtual int InitializeSpecific() = 0; 00146 00147 00148 // ----------------------------------------------------------------------------------------- 00149 // Public Get & Set functions 00150 public: 00156 inline void SetVerbose(int a_verbose) 00157 {m_verbose = a_verbose;} 00163 inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification) 00164 {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;} 00170 inline bool GetAffectTimeDimensionFlag() 00171 {return m_affectTimeDimensionFlag;} 00177 inline bool GetAffectRespDimensionFlag() 00178 {return m_affectRespDimensionFlag;} 00184 inline bool GetAffectCardDimensionFlag() 00185 {return m_affectCardDimensionFlag;} 00186 00187 00188 // ----------------------------------------------------------------------------------------- 00189 // Data members 00190 protected: 00191 oImageDimensionsAndQuantification* 00192 mp_ImageDimensionsAndQuantification; 00193 bool m_affectTimeDimensionFlag; 00194 bool m_affectRespDimensionFlag; 00195 bool m_affectCardDimensionFlag; 00196 bool m_checked; 00197 bool m_initialized; 00198 int m_verbose; 00199 }; 00200 00201 00202 // ---------------------------------------------------------------------- 00203 // Part of code that manages the auto declaration of children classes 00204 // ---------------------------------------------------------------------- 00205 00206 // Macro for the function that creates the object 00207 #define FUNCTION_IMAGE_PROCESSING_MODULE(CLASS) \ 00208 static vImageProcessingModule *make_image_processing_module() { return new CLASS(); }; 00209 00210 // Macro for the class that links the appropriate function to the map of objects 00211 #define CLASS_IMAGE_PROCESSING_MODULE(NAME,CLASS) \ 00212 class NAME##ImageProcessingModuleCreator \ 00213 { \ 00214 public: \ 00215 NAME##ImageProcessingModuleCreator() \ 00216 { sAddonManager::GetInstance()->mp_listOfImageProcessingModules[#NAME] = CLASS::make_image_processing_module; } \ 00217 }; \ 00218 static NAME##ImageProcessingModuleCreator ImageProcessingModuleCreator##NAME; 00219 00220 #endif