45 cout <<
"This penalty is a simple quadratic error penalty, corresponding to a L2 distance between the reconstructed image" << endl;
46 cout <<
"and a target image." << endl;
47 cout <<
"N.B.: The penalty strength is scaled by 0.5." << endl;
48 cout <<
"The following options can be used:" << endl;
49 cout <<
" target image path: to set a target image to fit. By default, it is a uniform image with zero value." << endl;
61 key_word =
"target image path";
64 Cerr(
"***** iPenaltyQuadratic::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
79 Cerr(
"***** iPenaltyQuadratic::ReadOptionsList() -> Options can be specified only using a configuration file !" << endl);
93 Cerr(
"!!!!! iPenaltyQuadratic::CheckSpecificParameters() -> No target image was provided, thus Quadratic penalty will use a full zeros target image !"<< endl);
121 Cerr(
"***** iPenaltyQuadratic::InitializeSpecific() -> Error reading interfile image '" <<
m_targetImagePath <<
"' !" << endl);
128 Cout(
"iPenaltyQuadratic::InitializeSpecific() -> Use the Quadratic optimizer" << endl);
151 if (fpclassify(penalty) != FP_NORMAL) penalty = 0.;
168 if (fpclassify(first_derivative) != FP_NORMAL) first_derivative = 0.;
170 return first_derivative;
182 return second_derivative;
int m_penaltyDerivativesOrder
#define INTF_LERP_ENABLED
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child penalty.
iPenaltyQuadratic()
The constructor of iPenaltyQuadratic.
int InitializeSpecific()
This function is used to initialize specific stuff to the child penalty.
FLTNB ComputePenaltyValue(FLTNB *ap_image, INTNB a_voxel, int a_th)
Implementation of the pure virtual vPenalty::ComputePenaltyValue()
int IntfReadImage(const string &a_pathToHeaderFile, FLTNB *ap_ImgMatrix, oImageDimensionsAndQuantification *ap_ID, int vb, bool a_lerpFlag)
Main function dedicated to Interfile 3D image loading.
int ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
Declaration of class iPenaltyQuadratic.
This class is designed to generically described any penalty applied to MAP algorithms.
#define KEYWORD_MANDATORY
FLTNB ComputeSecondDerivative(FLTNB *ap_image, INTNB a_voxel, int a_th)
Implementation of the pure virtual vPenalty::ComputeSecondDerivative()
INTNB GetNbVoxXYZ()
Get the total number of voxels.
int ReadOptionsList(const string &a_optionsList)
A function used to read options from a list of options.
FLTNB ComputeFirstDerivative(FLTNB *ap_image, INTNB a_voxel, int a_th)
Implementation of the pure virtual vPenalty::ComputeFirstDerivative()
int ReadDataASCIIFile(const string &a_file, const string &a_keyword, T *ap_return, int a_nbElts, bool a_mandatoryFlag)
Look for "a_nbElts" elts in the "a_file" file matching the "a_keyword" string passed as parameter a...
~iPenaltyQuadratic()
The destructor of iPenaltyQuadratic.
oImageSpace * mp_ImageSpace
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
void ShowHelpSpecific()
A function used to show help about the child penalty.