ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::CumulativeGaussianCostFunction Class Reference

#include <itkCumulativeGaussianCostFunction.h>

Detailed Description

Cost function for the Cumulative Gaussian Optimizer.

The Cumulative Gaussian is defined as the integral of a normalized Gaussian over the domain \( [-\infty, \infty] \).

Let G(x) be the normalized Gaussian defined as
\( G(x) = \frac{1}{{\sigma \sqrt {2\pi } }}e^{ - \frac{{\left( {x - \mu } \right)^2 }}{{2\sigma ^2 }}} \). The Cumulative Gaussian, is acquired by integrating G(x) then scaling and offsetting it by the lower asymptotes \( I_1 \) and upper \( I_2 \): \( C\left( x \right) = I_1 + \frac{{I_2 - I_1 }}{2}\left( {1 + erf\left( {\frac{{x - \mu }}{{\sigma \sqrt 2 }}} \right)} \right) \), where \( C\left( { - \infty } \right) = I_1 \) and \( C\left( \infty \right) = I_2 \).
C(x) can only be tabulated since it's a variation of the
error function. It is included in this class as the function EvaluateCumulativeGaussian, where the argument of the function is \( {\frac{{x - \mu }}{{\sigma \sqrt 2 }}} \).

Definition at line 51 of file itkCumulativeGaussianCostFunction.h.

+ Inheritance diagram for itk::CumulativeGaussianCostFunction:
+ Collaboration diagram for itk::CumulativeGaussianCostFunction:

Public Types

enum  { SpaceDimension = 4 }
 
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = Superclass::DerivativeType
 
using MeasureType = Superclass::MeasureType
 
using ParametersType = Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using Self = CumulativeGaussianCostFunction
 
using Superclass = MultipleValuedCostFunction
 
- Public Types inherited from itk::MultipleValuedCostFunction
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = Array2D< double >
 
using MeasureType = Array< double >
 
using ParametersType = Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using Self = MultipleValuedCostFunction
 
using Superclass = CostFunction
 
- Public Types inherited from itk::CostFunctionTemplate< double >
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = OptimizerParameters< double >
 
using ParametersValueType = double
 
using Pointer = SmartPointer< Self >
 
using Self = CostFunctionTemplate
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

double CalculateFitError (MeasureType *setTestArray)
 
double EvaluateCumulativeGaussian (double argument) const
 
void GetDerivative (const ParametersType &, DerivativeType &) const override
 
const char * GetNameOfClass () const override
 
unsigned int GetNumberOfParameters () const override
 
unsigned int GetNumberOfValues () const override
 
MeasureType GetValue (const ParametersType &parameters) const override
 
MeasureTypeGetValuePointer (ParametersType &parameters)
 
void Initialize (unsigned int rangeDimension)
 
void SetOriginalDataArray (MeasureType *setOriginalDataArray)
 
- Public Member Functions inherited from itk::MultipleValuedCostFunction
virtual void GetDerivative (const ParametersType &parameters, DerivativeType &derivative) const =0
 
const char * GetNameOfClass () const override
 
virtual unsigned int GetNumberOfValues () const =0
 
virtual MeasureType GetValue (const ParametersType &parameters) const =0
 
- Public Member Functions inherited from itk::CostFunctionTemplate< double >
const char * GetNameOfClass () const override
 
virtual unsigned int GetNumberOfParameters () const=0
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual const char * GetNameOfClass () const
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 CumulativeGaussianCostFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~CumulativeGaussianCostFunction () override
 
- Protected Member Functions inherited from itk::MultipleValuedCostFunction
 MultipleValuedCostFunction ()=default
 
 ~MultipleValuedCostFunction () override
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< double >
 CostFunctionTemplate ()=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~CostFunctionTemplate () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

MeasureType m_Measure {}
 
MeasureType m_MeasurePointer {}
 
MeasureType m_OriginalDataArray {}
 
ParametersType m_Parameters {}
 
unsigned int m_RangeDimension { 0 }
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ ConstPointer

Definition at line 58 of file itkCumulativeGaussianCostFunction.h.

◆ DerivativeType

using itk::CumulativeGaussianCostFunction::DerivativeType = Superclass::DerivativeType

Definition at line 69 of file itkCumulativeGaussianCostFunction.h.

◆ MeasureType

using itk::CumulativeGaussianCostFunction::MeasureType = Superclass::MeasureType

Definition at line 68 of file itkCumulativeGaussianCostFunction.h.

◆ ParametersType

Array Typedefs.

Definition at line 67 of file itkCumulativeGaussianCostFunction.h.

◆ Pointer

Definition at line 57 of file itkCumulativeGaussianCostFunction.h.

◆ Self

Standard type alias.

Definition at line 55 of file itkCumulativeGaussianCostFunction.h.

◆ Superclass

Definition at line 56 of file itkCumulativeGaussianCostFunction.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The dimensions of parameter space; mean, standard deviation, lower and upper asymptotes.

Enumerator
SpaceDimension 

Definition at line 73 of file itkCumulativeGaussianCostFunction.h.

Constructor & Destructor Documentation

◆ CumulativeGaussianCostFunction()

itk::CumulativeGaussianCostFunction::CumulativeGaussianCostFunction ( )
protected

◆ ~CumulativeGaussianCostFunction()

itk::CumulativeGaussianCostFunction::~CumulativeGaussianCostFunction ( )
overrideprotected

Member Function Documentation

◆ CalculateFitError()

double itk::CumulativeGaussianCostFunction::CalculateFitError ( MeasureType setTestArray)

Calculate a fit error between the data and the fit curve.

◆ EvaluateCumulativeGaussian()

double itk::CumulativeGaussianCostFunction::EvaluateCumulativeGaussian ( double  argument) const

Given the argument of a Cumulative Gaussian, return its value.

◆ GetDerivative()

void itk::CumulativeGaussianCostFunction::GetDerivative ( const ParametersType ,
DerivativeType  
) const
inlineoverride

Not necessary for this optimizer.

Definition at line 80 of file itkCumulativeGaussianCostFunction.h.

◆ GetNameOfClass()

const char * itk::CumulativeGaussianCostFunction::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::Object.

◆ GetNumberOfParameters()

unsigned int itk::CumulativeGaussianCostFunction::GetNumberOfParameters ( ) const
overridevirtual

Get the SpaceDimension.

Implements itk::CostFunctionTemplate< double >.

◆ GetNumberOfValues()

unsigned int itk::CumulativeGaussianCostFunction::GetNumberOfValues ( ) const
overridevirtual

Get the number Range Dimension.

Implements itk::MultipleValuedCostFunction.

◆ GetValue()

MeasureType itk::CumulativeGaussianCostFunction::GetValue ( const ParametersType parameters) const
overridevirtual

Return the values evaluated for the given parameters.

Implements itk::MultipleValuedCostFunction.

◆ GetValuePointer()

MeasureType * itk::CumulativeGaussianCostFunction::GetValuePointer ( ParametersType parameters)

Return a pointer of values evaluated for the given parameters.

◆ Initialize()

void itk::CumulativeGaussianCostFunction::Initialize ( unsigned int  rangeDimension)

Initialize the arrays.

◆ New()

static Pointer itk::CumulativeGaussianCostFunction::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

void itk::CumulativeGaussianCostFunction::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

◆ SetOriginalDataArray()

void itk::CumulativeGaussianCostFunction::SetOriginalDataArray ( MeasureType setOriginalDataArray)

Set the original data array.

Member Data Documentation

◆ m_Measure

MeasureType itk::CumulativeGaussianCostFunction::m_Measure {}
mutableprivate

Different arrays.

Definition at line 130 of file itkCumulativeGaussianCostFunction.h.

◆ m_MeasurePointer

MeasureType itk::CumulativeGaussianCostFunction::m_MeasurePointer {}
mutableprivate

Definition at line 131 of file itkCumulativeGaussianCostFunction.h.

◆ m_OriginalDataArray

MeasureType itk::CumulativeGaussianCostFunction::m_OriginalDataArray {}
private

The original data array.

Definition at line 124 of file itkCumulativeGaussianCostFunction.h.

◆ m_Parameters

ParametersType itk::CumulativeGaussianCostFunction::m_Parameters {}
mutableprivate

Definition at line 132 of file itkCumulativeGaussianCostFunction.h.

◆ m_RangeDimension

unsigned int itk::CumulativeGaussianCostFunction::m_RangeDimension { 0 }
private

Number of data samples.

Definition at line 127 of file itkCumulativeGaussianCostFunction.h.


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