CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
iPenaltyQuadratic Class Reference

This class is a Quadratic for penalties. More...

#include <iPenaltyQuadratic.hh>

Inheritance diagram for iPenaltyQuadratic:
Inheritance graph
Collaboration diagram for iPenaltyQuadratic:
Collaboration graph

Public Member Functions

 iPenaltyQuadratic ()
 The constructor of iPenaltyQuadratic. More...
 
 ~iPenaltyQuadratic ()
 The destructor of iPenaltyQuadratic. More...
 
int ReadConfigurationFile (const string &a_configurationFile)
 A function used to read options from a configuration file. More...
 
int ReadOptionsList (const string &a_optionsList)
 A function used to read options from a list of options. More...
 
FLTNB ComputePenaltyValue (FLTNB *ap_image, INTNB a_voxel, int a_th)
 Implementation of the pure virtual vPenalty::ComputePenaltyValue() More...
 
FLTNB ComputeFirstDerivative (FLTNB *ap_image, INTNB a_voxel, int a_th)
 Implementation of the pure virtual vPenalty::ComputeFirstDerivative() More...
 
FLTNB ComputeSecondDerivative (FLTNB *ap_image, INTNB a_voxel, int a_th)
 Implementation of the pure virtual vPenalty::ComputeSecondDerivative() More...
 
- Public Member Functions inherited from vPenalty
 vPenalty ()
 The constructor of vPenalty. More...
 
virtual ~vPenalty ()
 The destructor of vPenalty. More...
 
void ShowHelp ()
 A function used to show help about the penalty. More...
 
int CheckParameters ()
 A public function used to check the parameters settings. More...
 
int Initialize ()
 A public function used to initialize the penalty. More...
 
virtual int GlobalPreProcessingStep ()
 A public function computing a global pre-processing step for the penalty. More...
 
virtual int LocalPreProcessingStep (int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
 
virtual FLTNB ComputePenaltyValue (int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)=0
 
virtual FLTNB ComputeFirstDerivative (int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)=0
 
virtual FLTNB ComputeSecondDerivative (int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)=0
 
void SetVerbose (int a_verbose)
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetImageSpace (oImageSpace *ap_ImageSpace)
 
void SetPenaltyStrength (FLTNB a_penaltyStrength)
 
FLTNB GetPenaltyStrength ()
 Get the penalty strength. More...
 
int GetPenaltyDerivativesOrder ()
 Get the penalty deratives order. More...
 
void SetPenaltyID (const string &a_penaltyID)
 
const string & GetPenaltyID ()
 
 vPenalty ()
 
virtual ~vPenalty ()
 
void ShowHelp ()
 
int CheckParameters ()
 
int Initialize ()
 
virtual int GlobalPreProcessingStep ()
 
virtual int LocalPreProcessingStep (int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
 
void SetVerbose (int a_verbose)
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetImageSpace (oImageSpace *ap_ImageSpace)
 
void SetDataFile (vDataFile *ap_DataFile)
 Set the image space in use. More...
 
void SetPenaltyStrength (FLTNB a_penaltyStrength)
 
FLTNB GetPenaltyStrength ()
 
int GetPenaltyDerivativesOrder ()
 
void SetPenaltyID (const string &a_penaltyID)
 
const string & GetPenaltyID ()
 

Private Member Functions

void ShowHelpSpecific ()
 A function used to show help about the child penalty. More...
 
int CheckSpecificParameters ()
 A private function used to check the parameters settings specific to the child penalty. More...
 
int InitializeSpecific ()
 This function is used to initialize specific stuff to the child penalty. More...
 

Private Attributes

string m_targetImagePath
 
FLTNBmp_targetImage
 

Additional Inherited Members

- Protected Attributes inherited from vPenalty
string m_penaltyID
 
oImageDimensionsAndQuantificationmp_ImageDimensionsAndQuantification
 
oImageSpacemp_ImageSpace
 
int m_verbose
 
int m_penaltyDerivativesOrder
 
FLTNB m_penaltyStrength
 
vDataFilemp_DataFile
 

Detailed Description

This class is a Quadratic for penalties.

This class inherits from vPenalty and provides details on how to implement a penalty.

Definition at line 20 of file iPenaltyQuadratic.hh.

Constructor & Destructor Documentation

◆ iPenaltyQuadratic()

iPenaltyQuadratic::iPenaltyQuadratic ( )

The constructor of iPenaltyQuadratic.

This is the default and unique constructor. It does not take any parameter and its role is only to affect default values to each member of the class.

Definition at line 15 of file iPenaltyQuadratic.cc.

◆ ~iPenaltyQuadratic()

iPenaltyQuadratic::~iPenaltyQuadratic ( )

The destructor of iPenaltyQuadratic.

This is the default and unique destructor. It does not take any parameter and its role is only to free or delete all structures that were built by this class.

Definition at line 31 of file iPenaltyQuadratic.cc.

Member Function Documentation

◆ CheckSpecificParameters()

int iPenaltyQuadratic::CheckSpecificParameters ( )
privatevirtual

A private function used to check the parameters settings specific to the child penalty.

This function is used to check that all parameters specific to the penalty are correctly set within allowed values. It is called by the CheckParameters() function of the mother class. It is the implementation of the pure virtual function inherited from the abstract mother class vPenalty.

Returns
An integer reflecting the check status; 0 if no problem, another value otherwise.

Implements vPenalty.

Definition at line 88 of file iPenaltyQuadratic.cc.

◆ ComputeFirstDerivative()

FLTNB iPenaltyQuadratic::ComputeFirstDerivative ( FLTNB ap_image,
INTNB  a_voxel,
int  a_th 
)
virtual

Implementation of the pure virtual vPenalty::ComputeFirstDerivative()

Parameters
FLTNB*ap_image
INTNBa_voxel
inta_th

This function computes the first derivative of the penalty. It is the implementation of the pure virtual vPenalty::ComputeFirstDerivative().

Returns
The derivative

Implements vPenalty.

Definition at line 161 of file iPenaltyQuadratic.cc.

◆ ComputePenaltyValue()

FLTNB iPenaltyQuadratic::ComputePenaltyValue ( FLTNB ap_image,
INTNB  a_voxel,
int  a_th 
)
virtual

Implementation of the pure virtual vPenalty::ComputePenaltyValue()

Parameters
FLTNB*ap_image,
INTNBa_voxel
inta_th

This function computes the value of the penalty function for a given image. It is the implementation of the pure virtual vPenalty::ComputePenaltyValue().

Returns
The penalty value

Implements vPenalty.

Definition at line 144 of file iPenaltyQuadratic.cc.

◆ ComputeSecondDerivative()

FLTNB iPenaltyQuadratic::ComputeSecondDerivative ( FLTNB ap_image,
INTNB  a_voxel,
int  a_th 
)
virtual

Implementation of the pure virtual vPenalty::ComputeSecondDerivative()

Parameters
FLTNB*ap_image
INTNBa_voxel
inta_th

This function computes the second derivative of the penalty. It is the implementation of the pure virtual vPenalty::ComputeSecondDerivative().

Returns
The derivative

Implements vPenalty.

Definition at line 179 of file iPenaltyQuadratic.cc.

◆ InitializeSpecific()

int iPenaltyQuadratic::InitializeSpecific ( )
privatevirtual

This function is used to initialize specific stuff to the child penalty.

It is called by the public Initialize() function from the mother.

Returns
An integer reflecting the initialization status; 0 if no problem, another value otherwise.

Implements vPenalty.

Definition at line 104 of file iPenaltyQuadratic.cc.

Here is the call graph for this function:

◆ ReadConfigurationFile()

int iPenaltyQuadratic::ReadConfigurationFile ( const string &  a_configurationFile)
virtual

A function used to read options from a configuration file.

Parameters
conststring& a_configurationFile

This function implements the reading of all options associated to the child penalty, from a configuration file. It is the implementation of the pure virtual function inherited from the abstract class vPenalty. It checks the reading status but not the options values that will be checked by the CheckSpecificParameters() function.

Returns
An integer reflecting the reading success; 0 if success, another value otherwise.

Implements vPenalty.

Definition at line 57 of file iPenaltyQuadratic.cc.

Here is the call graph for this function:

◆ ReadOptionsList()

int iPenaltyQuadratic::ReadOptionsList ( const string &  a_optionsList)
virtual

A function used to read options from a list of options.

Parameters
conststring& a_optionsList

This function implements the reading of all options associated to the child penalty, from a list of options. It is the implementation of the pure virtual function inherited from the abstract class vPenalty. It checks the reading status but not the options values that will be checked by the CheckSpecificParameters() function.

Returns
An integer reflecting the reading success; 0 if success, another value otherwise.

Implements vPenalty.

Definition at line 76 of file iPenaltyQuadratic.cc.

◆ ShowHelpSpecific()

void iPenaltyQuadratic::ShowHelpSpecific ( )
privatevirtual

A function used to show help about the child penalty.

This function must describe what the module does and how to use it. It describes in details the different parameters of the penalty, and how to set them through the use of a configuration file or a list of options. It is the implementation of the pure virtual function inherited from the abstract class vPenalty. It is called by the public ShowHelp() function.

Implements vPenalty.

Definition at line 43 of file iPenaltyQuadratic.cc.

Member Data Documentation

◆ m_targetImagePath

string iPenaltyQuadratic::m_targetImagePath
private

Path to target image

Definition at line 136 of file iPenaltyQuadratic.hh.

◆ mp_targetImage

FLTNB* iPenaltyQuadratic::mp_targetImage
private

Target image

Definition at line 137 of file iPenaltyQuadratic.hh.


The documentation for this class was generated from the following files: