CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
vPenalty.hh
Go to the documentation of this file.
1 
8 #ifndef VPENALTY_HH
9 #define VPENALTY_HH 1
10 
11 #include "gVariables.hh"
13 
23 class vPenalty
24 {
25  // -------------------------------------------------------------------
26  // Constructor & Destructor
27  public:
34  vPenalty();
42  virtual ~vPenalty();
43 
44 
45  // -------------------------------------------------------------------
46  // Public member functions
47  public:
48 
49 
50  // -------------------------------------------------------------------
51  // Public Get & Set functions
52  public:
58  inline void SetVerbose(int a_verbose)
59  {m_verbose = a_verbose;}
65  inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification)
66  {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;}
67  /*
68  inline int GetPenaltyEnergyFunctionDerivativesOrder()
69  {return m_penaltyEnergyFunctionDerivativesOrder;}
70  */
71 
72 
73  // -------------------------------------------------------------------
74  // Private member functions
75  private:
76 
77 
78  // -------------------------------------------------------------------
79  // Data members
80  protected:
81  // Image dimensions
84  // Verbosity
85  int m_verbose;
86  // Order of penalty energy function derivatives
87  //int m_penaltyEnergyFunctionDerivativesOrder; /*!< The derivative order of the penalty function */
88 };
89 
90 
91 // ---------------------------------------------------------------------
92 // Part of code that manages the auto declaration of children classes
93 // ---------------------------------------------------------------------
94 
95 // Macro for the function that creates the object
96 #define FUNCTION_PENALTY(CLASS) \
97  static vPenalty *make_penalty() { return new CLASS(); };
98 
99 // Macro for the class that links the appropriate function to the map of objects
100 #define CLASS_PENALTY(NAME,CLASS) \
101  class NAME##PenaltyCreator \
102  { \
103  public: \
104  NAME##PenaltyCreator() \
105  { sAddonManager::GetInstance()->mp_listOfPenalties[#NAME] = CLASS::make_penalty; } \
106  }; \
107  static NAME##PenaltyCreator PenaltyCreator##NAME;
108 
109 #endif
This header file is mainly used to declare some macro definitions and all includes needed from the st...
Declaration of class oImageDimensionsAndQuantification.
int m_verbose
Definition: vPenalty.hh:85
vPenalty()
The constructor of vPenalty.
Definition: vPenalty.cc:26
virtual ~vPenalty()
The destructor of vPenalty.
Definition: vPenalty.cc:38
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
Definition: vPenalty.hh:83
This class is designed to generically described any penalty applied to MAP algorithms.
Definition: vPenalty.hh:23
void SetVerbose(int a_verbose)
Set the verbose level.
Definition: vPenalty.hh:58
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
Set the pointer to the image dimensions in use.
Definition: vPenalty.hh:65
This class is designed to manage all dimensions and quantification related stuff. ...