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

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

#include <iPenaltyTemplate.hh>

Inheritance diagram for iPenaltyTemplate:
Inheritance graph
Collaboration diagram for iPenaltyTemplate:
Collaboration graph

Public Member Functions

 iPenaltyTemplate ()
 The constructor of iPenaltyTemplate. More...
 
 ~iPenaltyTemplate ()
 The destructor of iPenaltyTemplate. More...
 
int ReadConfigurationFile (const string &a_configurationFile)
 
int ReadOptionsList (const string &a_optionsList)
 
FLTNB ComputePenaltyValue (int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
 
FLTNB ComputeFirstDerivative (int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
 
FLTNB ComputeSecondDerivative (int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
 
 iPenaltyTemplate ()
 
 ~iPenaltyTemplate ()
 
int ReadConfigurationFile (const string &a_configurationFile)
 
int ReadOptionsList (const string &a_optionsList)
 
FLTNB ComputePenaltyValue (FLTNB *ap_image, INTNB a_voxel, int a_th)
 
FLTNB ComputeFirstDerivative (FLTNB *ap_image, INTNB a_voxel, int a_th)
 
FLTNB ComputeSecondDerivative (FLTNB *ap_image, INTNB a_voxel, int a_th)
 
- 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)
 
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...
 
void ShowHelpSpecific ()
 A function used to show help about the child module. More...
 
int CheckSpecificParameters ()
 A private function used to check the parameters settings specific to the child penalty. More...
 
int InitializeSpecific ()
 A private function used to initialize everything specific to the child penalty. More...
 

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 template for penalties.

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

Definition at line 20 of file code/include/optimizer/iPenaltyTemplate.hh.

Constructor & Destructor Documentation

◆ iPenaltyTemplate() [1/2]

iPenaltyTemplate::iPenaltyTemplate ( )

The constructor of iPenaltyTemplate.

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 code/src/optimizer/iPenaltyTemplate.cc.

◆ ~iPenaltyTemplate() [1/2]

iPenaltyTemplate::~iPenaltyTemplate ( )

The destructor of iPenaltyTemplate.

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 40 of file code/src/optimizer/iPenaltyTemplate.cc.

◆ iPenaltyTemplate() [2/2]

iPenaltyTemplate::iPenaltyTemplate ( )

◆ ~iPenaltyTemplate() [2/2]

iPenaltyTemplate::~iPenaltyTemplate ( )

Member Function Documentation

◆ CheckSpecificParameters() [1/2]

int iPenaltyTemplate::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. It is pure virtual so is implemented by children.

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

Implements vPenalty.

◆ CheckSpecificParameters() [2/2]

int iPenaltyTemplate::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 93 of file code/src/optimizer/iPenaltyTemplate.cc.

◆ ComputeFirstDerivative() [1/2]

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

Implements vPenalty.

Definition at line 139 of file src/optimizer/iPenaltyTemplate.cc.

◆ ComputeFirstDerivative() [2/2]

FLTNB iPenaltyTemplate::ComputeFirstDerivative ( int  a_tbf,
int  a_rbf,
int  a_cbf,
INTNB  a_voxel,
int  a_th 
)
virtual

Implements vPenalty.

Definition at line 139 of file code/src/optimizer/iPenaltyTemplate.cc.

◆ ComputePenaltyValue() [1/2]

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

Implements vPenalty.

Definition at line 124 of file src/optimizer/iPenaltyTemplate.cc.

◆ ComputePenaltyValue() [2/2]

FLTNB iPenaltyTemplate::ComputePenaltyValue ( int  a_tbf,
int  a_rbf,
int  a_cbf,
INTNB  a_voxel,
int  a_th 
)
virtual

Implements vPenalty.

Definition at line 124 of file code/src/optimizer/iPenaltyTemplate.cc.

◆ ComputeSecondDerivative() [1/2]

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

Implements vPenalty.

Definition at line 155 of file src/optimizer/iPenaltyTemplate.cc.

◆ ComputeSecondDerivative() [2/2]

FLTNB iPenaltyTemplate::ComputeSecondDerivative ( int  a_tbf,
int  a_rbf,
int  a_cbf,
INTNB  a_voxel,
int  a_th 
)
virtual

Implements vPenalty.

Definition at line 155 of file code/src/optimizer/iPenaltyTemplate.cc.

◆ InitializeSpecific() [1/2]

int iPenaltyTemplate::InitializeSpecific ( )
privatevirtual

A private function used to initialize everything specific to the child penalty.

This function is used to initialize everything specific to the penalty that should be initialized. It is called by the Initialize() function. It is pure virtual so is implemented by children.

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

Implements vPenalty.

◆ InitializeSpecific() [2/2]

int iPenaltyTemplate::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 107 of file code/src/optimizer/iPenaltyTemplate.cc.

◆ ReadConfigurationFile() [1/2]

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

Implements vPenalty.

◆ ReadConfigurationFile() [2/2]

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

Implements vPenalty.

Definition at line 61 of file code/src/optimizer/iPenaltyTemplate.cc.

◆ ReadOptionsList() [1/2]

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

Implements vPenalty.

◆ ReadOptionsList() [2/2]

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

Implements vPenalty.

Definition at line 77 of file code/src/optimizer/iPenaltyTemplate.cc.

◆ ShowHelpSpecific() [1/2]

void iPenaltyTemplate::ShowHelpSpecific ( )
privatevirtual

A function used to show help about the child module.

This function must describe what the penalty 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 pure virtual so is implemented by children. It is private because called by the public ShowHelp() function.

Implements vPenalty.

◆ ShowHelpSpecific() [2/2]

void iPenaltyTemplate::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 50 of file code/src/optimizer/iPenaltyTemplate.cc.


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