CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
include/image/vImageProcessingModule.hh
Go to the documentation of this file.
1 
8 #ifndef VIMAGEPROCESSINGMODULE_HH
9 #define VIMAGEPROCESSINGMODULE_HH 1
10 
11 #include "gVariables.hh"
13 #include "oImageSpace.hh"
14 
31 {
32  // -----------------------------------------------------------------------------------------
33  // Constructor & Destructor
34  public:
49  virtual ~vImageProcessingModule();
50 
51  // -----------------------------------------------------------------------------------------
52  // Public member functions
53  public:
62  int CheckParameters();
72  int Initialize();
73 
74 
75  // -----------------------------------------------------------------------------------------
76  // Pure virtual public member functions that need to be implemented by children
77  public:
88  virtual int ReadConfigurationFile(const string& a_configurationFile) = 0;
99  virtual int ReadOptionsList(const string& a_optionsList) = 0;
108  virtual void ShowHelp() = 0;
120  virtual int Process(FLTNB**** a4p_image) = 0;
121 
122 
123  // -----------------------------------------------------------------------------------------
124  // Pure virtual private member functions that need to be implemented by children
125  private:
134  virtual int CheckSpecificParameters() = 0;
144  virtual int InitializeSpecific() = 0;
145 
146 
147  // -----------------------------------------------------------------------------------------
148  // Public Get & Set functions
149  public:
155  inline void SetVerbose(int a_verbose)
156  {m_verbose = a_verbose;}
162  inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification)
163  {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;}
170  {return m_affectTimeDimensionFlag;}
177  {return m_affectRespDimensionFlag;}
184  {return m_affectCardDimensionFlag;}
185 
186 
187  // -----------------------------------------------------------------------------------------
188  // Data members
189  protected:
195  bool m_checked;
196  bool m_initialized;
197  int m_verbose;
198 };
199 
200 
201 // ----------------------------------------------------------------------
202 // Part of code that manages the auto declaration of children classes
203 // ----------------------------------------------------------------------
204 
205 // Macro for the function that creates the object
206 #define FUNCTION_IMAGE_PROCESSING_MODULE(CLASS) \
207  static vImageProcessingModule *make_image_processing_module() { return new CLASS(); };
208 
209 // Macro for the class that links the appropriate function to the map of objects
210 #define CLASS_IMAGE_PROCESSING_MODULE(NAME,CLASS) \
211  class NAME##ImageProcessingModuleCreator \
212  { \
213  public: \
214  NAME##ImageProcessingModuleCreator() \
215  { sAddonManager::GetInstance()->mp_listOfImageProcessingModules[#NAME] = CLASS::make_image_processing_module; } \
216  }; \
217  static NAME##ImageProcessingModuleCreator ImageProcessingModuleCreator##NAME;
218 
219 #endif
virtual int ReadConfigurationFile(const string &a_configurationFile)=0
Declaration of class oImageSpace.
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
virtual ~vImageProcessingModule()
The destructor of vImageProcessingModule.
virtual int InitializeSpecific()=0
A private function used to initialize everything specific to the child module.
virtual void ShowHelp()=0
A function used to show help about the child module.
int Initialize()
A public function used to initialize the module.
This abstract class is the generic image processing module class used by the oImageProcessingManager...
virtual int CheckSpecificParameters()=0
A private function used to check the parameters settings specific to the child module.
virtual int ReadOptionsList(const string &a_optionsList)=0
virtual int Process(FLTNB ****a4p_image)=0
This class is designed to manage all dimensions and quantification related stuff. ...
vImageProcessingModule()
The constructor of vImageProcessingModule.
int CheckParameters()
A public function used to check the parameters settings.
Declaration of class oImageDimensionsAndQuantification.