CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
include/optimizer/iPenaltyMedianRootPrior.hh
Go to the documentation of this file.
1 
8 #ifndef IPENALTYMEDIANROOTPRIOR_HH
9 #define IPENALTYMEDIANROOTPRIOR_HH 1
10 
11 #include "vPenalty.hh"
12 #include "sAddonManager.hh"
13 #include "sOutputManager.hh"
14 
15 #define MRF_NEIGHBORHOOD_SPHERE 0
16 #define MRF_NEIGHBORHOOD_BOX 1
17 #define MRF_NEIGHBORHOOD_6_NEAREST 2
18 
19 #define MRF_NOT_DEFINED -1
20 
21 #define MRF_NEIGHBOR_X 0
22 #define MRF_NEIGHBOR_Y 1
23 #define MRF_NEIGHBOR_Z 2
24 
30 class iPenaltyMedianRootPrior : public vPenalty
31 {
32  // -------------------------------------------------------------------
33  // Constructor & Destructor
34  public:
35 
50 
51  // -------------------------------------------------------------------
52  // Public member functions
53  public:
54  // Function for automatic insertion (put the class name as the parameter and do not add semi-column at the end of the line)
66  int ReadConfigurationFile(const string& a_configurationFile);
77  int ReadOptionsList(const string& a_optionsList);
90  int LocalPreProcessingStep(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th);
101  FLTNB ComputePenaltyValue(FLTNB* ap_image, INTNB a_voxel, int a_th);
112  FLTNB ComputeFirstDerivative(FLTNB* ap_image, INTNB a_voxel, int a_th);
123  FLTNB ComputeSecondDerivative(FLTNB* ap_image, INTNB a_voxel, int a_th);
124 
125  // -------------------------------------------------------------------
126  // Private member functions
127  private:
137  void ShowHelpSpecific();
154  int InitializeSpecific();
175  int BuildSpecificNeighborhood(INTNB a_voxel, int a_th);
187  int ComputeMedianInNeighborhood(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th);
188 
189  // -------------------------------------------------------------------
190  // Data members
191  private:
192  // Neighborhood
193  int m_neighborhoodShape;
201  // Specific
203 };
204 
205 // Class for automatic insertion (set here the visible optimizer's name as the first parameter,
206 // put the class name as the second parameter and do NOT add semi-colon at the end of the line)
208 
209 #endif
210 
int BuildSpecificNeighborhood(INTNB a_voxel, int a_th)
FLTNB ComputePenaltyValue(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
int ReadOptionsList(const string &a_optionsList)
void ShowHelpSpecific()
A function used to show help about the child penalty.
~iPenaltyMedianRootPrior()
The destructor of iPenaltyMedianRootPrior.
int InitializeSpecific()
This function is used to initialize specific stuff to the child penalty.
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child penalty.
int LocalPreProcessingStep(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
#define CLASS_PENALTY(NAME, CLASS)
FLTNB ComputeFirstDerivative(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
#define FUNCTION_PENALTY(CLASS)
int ReadConfigurationFile(const string &a_configurationFile)
FLTNB ComputeSecondDerivative(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
This class is designed to generically described any penalty applied to MAP algorithms.
Declaration of class vPenalty.
int ComputeMedianInNeighborhood(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
iPenaltyMedianRootPrior()
The constructor of iPenaltyMedianRootPrior.
This class implements the "median root prior".
int BuildNeighborhoodKernel()
A function used to build the neighborhood kernel.