ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | List of all members

#include <itkCumulativeGaussianOptimizer.h>

+ Inheritance diagram for itk::CumulativeGaussianOptimizer:
+ Collaboration diagram for itk::CumulativeGaussianOptimizer:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using CostFunctionType = CumulativeGaussianCostFunction
 
using MeasureType = CostFunctionType::MeasureType
 
using Pointer = SmartPointer< Self >
 
using Self = CumulativeGaussianOptimizer
 
using Superclass = MultipleValuedNonLinearOptimizer
 
- Public Types inherited from itk::MultipleValuedNonLinearOptimizer
using ConstPointer = SmartPointer< const Self >
 
using CostFunctionPointer = CostFunctionType::Pointer
 
using CostFunctionType = MultipleValuedCostFunction
 
using DerivativeType = Array2D< double >
 
using MeasureType = Array< double >
 
using ParametersType = Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using Self = MultipleValuedNonLinearOptimizer
 
using Superclass = NonLinearOptimizer
 
- Public Types inherited from itk::NonLinearOptimizer
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using ScalesType = Superclass::ScalesType
 
using Self = NonLinearOptimizer
 
using Superclass = Optimizer
 
- Public Types inherited from itk::Optimizer
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = OptimizerParameters< double >
 
using Pointer = SmartPointer< Self >
 
using ScalesType = Array< double >
 
using Self = Optimizer
 
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

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from itk::MultipleValuedNonLinearOptimizer
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual void SetCostFunction (CostFunctionType *costFunction)
 
- Public Member Functions inherited from itk::NonLinearOptimizer
virtual ::itk::LightObject::Pointer CreateAnother () const
 
- Public Member Functions inherited from itk::Optimizer
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const ParametersTypeGetInitialPosition () const
 
virtual void SetInitialPosition (const ParametersType &param)
 
void SetScales (const ScalesType &scales)
 
virtual const ScalesTypeGetScales () const
 
virtual const ScalesTypeGetInverseScales () const
 
virtual const ParametersTypeGetCurrentPosition () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
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)
 
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
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::MultipleValuedNonLinearOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::NonLinearOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Optimizer
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 flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
double m_DifferenceTolerance
 
double m_ComputedMean
 
double m_ComputedStandardDeviation
 
double m_ComputedAmplitude
 
double m_ComputedTransitionHeight
 
double m_UpperAsymptote
 
double m_LowerAsymptote
 
double m_OffsetForMean
 
bool m_Verbose
 
double m_FitError
 
MeasureTypem_FinalSampledArray
 
MeasureTypem_CumulativeGaussianArray
 
std::ostringstream m_StopConditionDescription
 
virtual void SetDifferenceTolerance (double _arg)
 
virtual double GetDifferenceTolerance ()
 
virtual void SetVerbose (bool _arg)
 
virtual bool GetVerbose ()
 
virtual double GetComputedMean ()
 
virtual double GetComputedStandardDeviation ()
 
virtual double GetUpperAsymptote ()
 
virtual double GetLowerAsymptote ()
 
virtual MeasureTypeGetFinalSampledArray ()
 
virtual double GetFitError ()
 
void SetDataArray (MeasureType *dataArray)
 
void StartOptimization () override
 
void PrintArray (MeasureType *array)
 
const std::string GetStopConditionDescription () const override
 
 CumulativeGaussianOptimizer ()
 
 ~CumulativeGaussianOptimizer () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
MeasureTypeExtendGaussian (MeasureType *originalArray, MeasureType *extendedArray, int startingPointForInsertion)
 
MeasureTypeRecalculateExtendedArrayFromGaussianParameters (MeasureType *originalArray, MeasureType *extendedArray, int startingPointForInsertion) const
 
double FindAverageSumOfSquaredDifferences (MeasureType *array1, MeasureType *array2)
 
void FindParametersOfGaussian (MeasureType *sampledGaussianArray)
 
void MeasureGaussianParameters (MeasureType *array)
 
void PrintComputedParameterHeader ()
 
void PrintComputedParameters () const
 
double VerticalBestShift (MeasureType *originalArray, MeasureType *newArray)
 

Additional Inherited Members

- Protected Member Functions inherited from itk::MultipleValuedNonLinearOptimizer
 MultipleValuedNonLinearOptimizer ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~MultipleValuedNonLinearOptimizer () override=default
 
- Protected Member Functions inherited from itk::NonLinearOptimizer
 NonLinearOptimizer ()=default
 
 ~NonLinearOptimizer () override
 
- Protected Member Functions inherited from itk::Optimizer
 Optimizer ()
 
 ~Optimizer () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetCurrentPosition (const ParametersType &param)
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::MultipleValuedNonLinearOptimizer
CostFunctionPointer m_CostFunction
 
- Protected Attributes inherited from itk::Optimizer
bool m_ScalesInitialized { false }
 
ParametersType m_CurrentPosition
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

This is an optimizer specific to estimating the parameters of Cumulative Gaussian sampled data.

This optimizer will only work if the data array is sampled from a Cumulative Gaussian curve. It's more of a curve fitter than an optimizer, with the advantage of being fast and specific. It works by taking the derivative of the Cumulative Gaussian sample then repeatedly extending the tails of the Gaussian and recalculating the Gaussian parameters until the change in iterations is within tolerance or very small. The Gaussian is then integrated to reproduce the Cumulative Gaussian and the asymptotes are estimated by using least squares fit to estimate the constant from integration.

Definition at line 48 of file itkCumulativeGaussianOptimizer.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 55 of file itkCumulativeGaussianOptimizer.h.

◆ CostFunctionType

Cost function type alias. NOTE: This optimizer is specific to fitting a Cumulative Gaussian.

Definition at line 59 of file itkCumulativeGaussianOptimizer.h.

◆ MeasureType

Data array type alias.

Definition at line 62 of file itkCumulativeGaussianOptimizer.h.

◆ Pointer

Definition at line 54 of file itkCumulativeGaussianOptimizer.h.

◆ Self

Standard type alias.

Definition at line 52 of file itkCumulativeGaussianOptimizer.h.

◆ Superclass

Definition at line 53 of file itkCumulativeGaussianOptimizer.h.

Constructor & Destructor Documentation

◆ CumulativeGaussianOptimizer()

itk::CumulativeGaussianOptimizer::CumulativeGaussianOptimizer ( )
protected

When to stop the iteration for the Gaussian extension loop.

◆ ~CumulativeGaussianOptimizer()

itk::CumulativeGaussianOptimizer::~CumulativeGaussianOptimizer ( )
overrideprotected

When to stop the iteration for the Gaussian extension loop.

Member Function Documentation

◆ CreateAnother()

virtual::itk::LightObject::Pointer itk::CumulativeGaussianOptimizer::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ ExtendGaussian()

MeasureType* itk::CumulativeGaussianOptimizer::ExtendGaussian ( MeasureType originalArray,
MeasureType extendedArray,
int  startingPointForInsertion 
)
private

Extend the tails of the Gaussian.

◆ FindAverageSumOfSquaredDifferences()

double itk::CumulativeGaussianOptimizer::FindAverageSumOfSquaredDifferences ( MeasureType array1,
MeasureType array2 
)
private

Calculates the squared difference error between each Gaussian iteration loop.

◆ FindParametersOfGaussian()

void itk::CumulativeGaussianOptimizer::FindParametersOfGaussian ( MeasureType sampledGaussianArray)
private

Given an array sampled from a Gaussin, compute the final parameters.

◆ GetComputedMean()

virtual double itk::CumulativeGaussianOptimizer::GetComputedMean ( )
virtual

When to stop the iteration for the Gaussian extension loop.

◆ GetComputedStandardDeviation()

virtual double itk::CumulativeGaussianOptimizer::GetComputedStandardDeviation ( )
virtual

When to stop the iteration for the Gaussian extension loop.

◆ GetDifferenceTolerance()

virtual double itk::CumulativeGaussianOptimizer::GetDifferenceTolerance ( )
virtual

When to stop the iteration for the Gaussian extension loop.

◆ GetFinalSampledArray()

virtual MeasureType* itk::CumulativeGaussianOptimizer::GetFinalSampledArray ( )
virtual

When to stop the iteration for the Gaussian extension loop.

◆ GetFitError()

virtual double itk::CumulativeGaussianOptimizer::GetFitError ( )
virtual

When to stop the iteration for the Gaussian extension loop.

◆ GetLowerAsymptote()

virtual double itk::CumulativeGaussianOptimizer::GetLowerAsymptote ( )
virtual

When to stop the iteration for the Gaussian extension loop.

◆ GetNameOfClass()

virtual const char* itk::CumulativeGaussianOptimizer::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::MultipleValuedNonLinearOptimizer.

◆ GetStopConditionDescription()

const std::string itk::CumulativeGaussianOptimizer::GetStopConditionDescription ( ) const
overridevirtual

Report the reason for stopping.

Reimplemented from itk::Optimizer.

◆ GetUpperAsymptote()

virtual double itk::CumulativeGaussianOptimizer::GetUpperAsymptote ( )
virtual

When to stop the iteration for the Gaussian extension loop.

◆ GetVerbose()

virtual bool itk::CumulativeGaussianOptimizer::GetVerbose ( )
virtual

When to stop the iteration for the Gaussian extension loop.

◆ MeasureGaussianParameters()

void itk::CumulativeGaussianOptimizer::MeasureGaussianParameters ( MeasureType array)
private

Measure the parameters of a Gaussian sampled array.

◆ New()

static Pointer itk::CumulativeGaussianOptimizer::New ( )
static

Method for creation through the object factory.

◆ PrintArray()

void itk::CumulativeGaussianOptimizer::PrintArray ( MeasureType array)

Print an array.

◆ PrintComputedParameterHeader()

void itk::CumulativeGaussianOptimizer::PrintComputedParameterHeader ( )
private

Print the header for output table.

◆ PrintComputedParameters()

void itk::CumulativeGaussianOptimizer::PrintComputedParameters ( ) const
private

Print the computed parameters.

◆ PrintSelf()

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

When to stop the iteration for the Gaussian extension loop.

Reimplemented from itk::Object.

◆ RecalculateExtendedArrayFromGaussianParameters()

MeasureType* itk::CumulativeGaussianOptimizer::RecalculateExtendedArrayFromGaussianParameters ( MeasureType originalArray,
MeasureType extendedArray,
int  startingPointForInsertion 
) const
private

Recalulate the parameters of the extended Gaussian array.

◆ SetDataArray()

void itk::CumulativeGaussianOptimizer::SetDataArray ( MeasureType dataArray)

When to stop the iteration for the Gaussian extension loop.

◆ SetDifferenceTolerance()

virtual void itk::CumulativeGaussianOptimizer::SetDifferenceTolerance ( double  _arg)
virtual

Set and get macros.

◆ SetVerbose()

virtual void itk::CumulativeGaussianOptimizer::SetVerbose ( bool  _arg)
virtual

When to stop the iteration for the Gaussian extension loop.

◆ StartOptimization()

void itk::CumulativeGaussianOptimizer::StartOptimization ( )
overridevirtual

Start the optimizer.

Reimplemented from itk::Optimizer.

◆ VerticalBestShift()

double itk::CumulativeGaussianOptimizer::VerticalBestShift ( MeasureType originalArray,
MeasureType newArray 
)
private

Find the constant of the integrated sample.

Member Data Documentation

◆ m_ComputedAmplitude

double itk::CumulativeGaussianOptimizer::m_ComputedAmplitude
private

The final amplitude of the Gaussian.

Definition at line 115 of file itkCumulativeGaussianOptimizer.h.

◆ m_ComputedMean

double itk::CumulativeGaussianOptimizer::m_ComputedMean
private

The final mean of the Cumulative Gaussian.

Definition at line 109 of file itkCumulativeGaussianOptimizer.h.

◆ m_ComputedStandardDeviation

double itk::CumulativeGaussianOptimizer::m_ComputedStandardDeviation
private

The final standard deviation of the Cumulative Gaussian.

Definition at line 112 of file itkCumulativeGaussianOptimizer.h.

◆ m_ComputedTransitionHeight

double itk::CumulativeGaussianOptimizer::m_ComputedTransitionHeight
private

The transition height (distance between upper and lower asymptotes) of the Cumulative Gaussian.

Definition at line 119 of file itkCumulativeGaussianOptimizer.h.

◆ m_CumulativeGaussianArray

MeasureType* itk::CumulativeGaussianOptimizer::m_CumulativeGaussianArray
private

Original data array.

Definition at line 141 of file itkCumulativeGaussianOptimizer.h.

◆ m_DifferenceTolerance

double itk::CumulativeGaussianOptimizer::m_DifferenceTolerance
private

When to stop the iteration for the Gaussian extension loop.

Definition at line 106 of file itkCumulativeGaussianOptimizer.h.

◆ m_FinalSampledArray

MeasureType* itk::CumulativeGaussianOptimizer::m_FinalSampledArray
private

Array of values computed from the final parameters of the Cumulative Gaussian.

Definition at line 138 of file itkCumulativeGaussianOptimizer.h.

◆ m_FitError

double itk::CumulativeGaussianOptimizer::m_FitError
private

Least squares fit error as a measure of goodness.

Definition at line 134 of file itkCumulativeGaussianOptimizer.h.

◆ m_LowerAsymptote

double itk::CumulativeGaussianOptimizer::m_LowerAsymptote
private

The final lower asymptote of the Cumulative Gaussian.

Definition at line 125 of file itkCumulativeGaussianOptimizer.h.

◆ m_OffsetForMean

double itk::CumulativeGaussianOptimizer::m_OffsetForMean
private

Offset for the mean calculation.

Definition at line 128 of file itkCumulativeGaussianOptimizer.h.

◆ m_StopConditionDescription

std::ostringstream itk::CumulativeGaussianOptimizer::m_StopConditionDescription
private

Describe the stop condition

Definition at line 179 of file itkCumulativeGaussianOptimizer.h.

◆ m_UpperAsymptote

double itk::CumulativeGaussianOptimizer::m_UpperAsymptote
private

The final upper asymptote of the Cumulative Gaussian.

Definition at line 122 of file itkCumulativeGaussianOptimizer.h.

◆ m_Verbose

bool itk::CumulativeGaussianOptimizer::m_Verbose
private

Flag to print iteration results.

Definition at line 131 of file itkCumulativeGaussianOptimizer.h.


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