CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
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 
15 
32 {
33  // -----------------------------------------------------------------------------------------
34  // Constructor & Destructor
35  public:
50  virtual ~vImageProcessingModule();
51 
52  // -----------------------------------------------------------------------------------------
53  // Public member functions
54  public:
63  int CheckParameters();
73  int Initialize();
74 
75 
76  // -----------------------------------------------------------------------------------------
77  // Pure virtual public member functions that need to be implemented by children
78  public:
89  virtual int ReadConfigurationFile(const string& a_configurationFile) = 0;
100  virtual int ReadOptionsList(const string& a_optionsList) = 0;
109  virtual void ShowHelp() = 0;
121  virtual int Process(FLTNB**** a4p_image) = 0;
122 
123 
124  // -----------------------------------------------------------------------------------------
125  // Pure virtual private member functions that need to be implemented by children
126  private:
135  virtual int CheckSpecificParameters() = 0;
145  virtual int InitializeSpecific() = 0;
146 
147 
148  // -----------------------------------------------------------------------------------------
149  // Public Get & Set functions
150  public:
156  inline void SetVerbose(int a_verbose)
157  {m_verbose = a_verbose;}
163  inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification)
164  {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;}
171  {return m_affectTimeDimensionFlag;}
178  {return m_affectRespDimensionFlag;}
185  {return m_affectCardDimensionFlag;}
186 
187 
188  // -----------------------------------------------------------------------------------------
189  // Data members
190  protected:
196  bool m_checked;
198  int m_verbose;
199 };
200 
201 
202 // ----------------------------------------------------------------------
203 // Part of code that manages the auto declaration of children classes
204 // ----------------------------------------------------------------------
205 
206 // Macro for the function that creates the object
207 #define FUNCTION_IMAGE_PROCESSING_MODULE(CLASS) \
208  static vImageProcessingModule *make_image_processing_module() { return new CLASS(); };
209 
210 // Macro for the class that links the appropriate function to the map of objects
211 #define CLASS_IMAGE_PROCESSING_MODULE(NAME,CLASS) \
212  class NAME##ImageProcessingModuleCreator \
213  { \
214  public: \
215  NAME##ImageProcessingModuleCreator() \
216  { sAddonManager::GetInstance()->mp_listOfImageProcessingModules[#NAME] = CLASS::make_image_processing_module; } \
217  }; \
218  static NAME##ImageProcessingModuleCreator ImageProcessingModuleCreator##NAME;
219 
220 #endif
This header file is mainly used to declare some macro definitions and all includes needed from the st...
Declaration of class oImageDimensionsAndQuantification.
#define FLTNB
Definition: gVariables.hh:55
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
Set the member mp_ImageDimensionsAndQuantification to the provided value.
bool GetAffectCardDimensionFlag()
Return the boolean value of m_affectCardDimensionFlag member.
bool GetAffectTimeDimensionFlag()
Return the boolean value of m_affectTimeDimensionFlag member.
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.
bool GetAffectRespDimensionFlag()
Return the boolean value of m_affectRespDimensionFlag member.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
Declaration of class oImageSpace.
virtual int ReadOptionsList(const string &a_optionsList)=0
A function used to read options from a list of options.
virtual int ReadConfigurationFile(const string &a_configurationFile)=0
A function used to read options from a configuration file.
void SetVerbose(int a_verbose)
Set the member m_verboseLevel to the provided value.
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.
virtual int Process(FLTNB ****a4p_image)=0
A function used to actually perform the processing.