IncEntropy.h

Classes

IncEntropy -- Base class for incremental entropies used by incremental MEM algorithm (full description)
IncEntropyI -- Thermodynamic or Information entropy for incremental MEM (full description)
IncEntropyEmptiness -- Emptiness measure for incremental MEM (full description)

class IncEntropy

Types

enum GRADTYPE

H = 0
C
F
J

Interface

Public Members
IncEntropy()
virtual ~IncEntropy()
virtual Float formEntropy() = 0
virtual void formGDG(Matrix<double> & ) = 0
virtual void formGDGStep(Matrix<double> & ) = 0
virtual Double formGDS() = 0
virtual void entropyType(String &) = 0
virtual void entropyName(String &) = 0
void setMemModel(IncCEMemModel& mmm)
virtual void infoBanner() = 0
virtual void infoPerIteration(uInt iteration) = 0
virtual Float relaxMin() = 0
virtual Bool testConvergence() = 0
Protected Members
IncEntropy(const IncEntropy &)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This class is called Entropy because it encapsulates the required functionality of the entropy in the CE MEM algorithm. Inc is from incremental, as the dirty image specifies an increment on a previous major cycle's image, and the entropy is applied to the full image + deltaImage.

Synopsis

Provide the generic interface to entropy functions.

We calculate entropy, gradients, and Hessians (diagonal) of the entropy. For efficiency reasons, we cannot restrict the methods to these calculations, but must also subsume the loops over image pixels in which they are used. In this way, the Entropy classes form a tight partnership with the MemModel classes, taking over more responcibility than strict functional encapsulation requires.

This class heirarchy is used by CEMemModel, which implements the Cornwell-Evans Maximum Entropy algorithm.

In the Entropy constructor, we create a pointer to the CEMemModel for reference to its Mem image, prior image, and default levels. Since each sort of Entropy is a friend of the CEMemModel, it has access to its private data. However, we vow here NOT to touch it, just to look at it. Could have done read-only access, but too lazy.

Example

    EntropyI myEntropyEngine(myCEMemModel&);
    
    Float  theEntropy myEntropyEngine.getEntropy();
    

Motivation

This class is needed to encapsulate the methods of different functional forms of the entropy, used by Maximum Entropy (MEM) deconvolution algorithms.

To Do

virtual base class

Member Description

IncEntropy()

The default constructor is good enough, does nothing. the MemImage and Prior image are stored in the MemModel.

virtual ~IncEntropy()

A virtual destructor may be necessary for use in derived classes.

virtual Float formEntropy() = 0

calculate the entropy for the whole image

virtual void formGDG(Matrix<double> & ) = 0

calculate the Gradient dot Gradient matrix

virtual void formGDGStep(Matrix<double> & ) = 0

calculate the Gradient dot Gradient matrix, calculate Step

virtual Double formGDS() = 0

calculate Gradient dot Step

virtual void entropyType(String &) = 0

report the entropy type for a logging message

virtual void entropyName(String &) = 0

report the entropy name

void setMemModel(IncCEMemModel& mmm)

set the MemModel

virtual void infoBanner() = 0

infoBanner

virtual void infoPerIteration(uInt iteration) = 0

infoPerIteration

virtual Float relaxMin() = 0

are there any constraints on how the Image minimum gets relaxed?

virtual Bool testConvergence() = 0

each entropy type can have its distinct convergence criteria

enum GRADTYPE

IncEntropy(const IncEntropy &)


class IncEntropyI : public IncEntropy

Interface

Public Members
IncEntropyI()
~IncEntropyI()
Float formEntropy()
void formGDG(Matrix<Double>& )
void formGDGStep(Matrix<double> & )
Double formGDS()
void entropyType(String & str)
void entropyName(String & str)
void infoBanner()
void infoPerIteration(uInt iteration)
Float relaxMin()
Bool testConvergence()
Protected Members
IncEntropyI(const IncEntropyI& )
IncEntropyI& operator=(const IncEntropyI& )

Description

Member Description

IncEntropyI()

This default constructor is good enough for me.

~IncEntropyI()

destructor

Float formEntropy()

calculate the entropy for the whole image

void formGDG(Matrix<Double>& )

calculate the Gradient dot Gradient matrix

void formGDGStep(Matrix<double> & )

calculate the Gradient dot Gradient matrix, calculate Step

Double formGDS()

calculate Gradient dot Step

void entropyType(String & str)

report the entropy type for a logging message

void entropyName(String & str)

report the entropy name

void infoBanner()

infoBanner

void infoPerIteration(uInt iteration)

infoIteration

Float relaxMin()

relax image Min

Bool testConvergence()

each entropy type can have its distinct convergence criteria

IncEntropyI(const IncEntropyI& )

IncEntropyI& operator=(const IncEntropyI& )


class IncEntropyEmptiness : public IncEntropy

Interface

Public Members
IncEntropyEmptiness()
~IncEntropyEmptiness()
Float formEntropy()
void formGDG(Matrix<Double>& )
void formGDGStep(Matrix<double> & )
Double formGDS()
void entropyType(String & str)
void entropyName(String & str)
void infoBanner()
void infoPerIteration(uInt iteration)
Float relaxMin()
Bool testConvergence()
Protected Members
IncEntropyEmptiness(const IncEntropyEmptiness& )
IncEntropyEmptiness& operator=(const IncEntropyEmptiness& )

Description

Member Description

IncEntropyEmptiness()

This default constructor is good enough for me.

~IncEntropyEmptiness()

destructor

Float formEntropy()

calculate the entropy for the whole image

void formGDG(Matrix<Double>& )

calculate the Gradient dot Gradient matrix

void formGDGStep(Matrix<double> & )

calculate the Gradient dot Gradient matrix, calculate Step

Double formGDS()

calculate Gradient dot Step

void entropyType(String & str)

report the entropy type for a logging message

void entropyName(String & str)

report the entropy Name

void infoBanner()

infoBanner

void infoPerIteration(uInt iteration)

infoIteration

Float relaxMin()

relax image Min

Bool testConvergence()

each entropy type can have its distinct convergence criteria

IncEntropyEmptiness(const IncEntropyEmptiness& )

IncEntropyEmptiness& operator=(const IncEntropyEmptiness& )