ITK  4.13.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::CumulativeGaussianOptimizer Class Reference

#include <itkCumulativeGaussianOptimizer.h>

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

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.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef
CumulativeGaussianCostFunction 
CostFunctionType
 
typedef
CostFunctionType::MeasureType 
MeasureType
 
typedef SmartPointer< SelfPointer
 
typedef CumulativeGaussianOptimizer Self
 
typedef
MultipleValuedNonLinearOptimizer 
Superclass
 
- Public Types inherited from itk::MultipleValuedNonLinearOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef CostFunctionType::Pointer CostFunctionPointer
 
typedef MultipleValuedCostFunction CostFunctionType
 
typedef Array2D< double > DerivativeType
 
typedef Array< double > MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef
MultipleValuedNonLinearOptimizer 
Self
 
typedef NonLinearOptimizer Superclass
 
- Public Types inherited from itk::NonLinearOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::ScalesType ScalesType
 
typedef NonLinearOptimizer Self
 
typedef Optimizer Superclass
 
- Public Types inherited from itk::Optimizer
typedef SmartPointer< const SelfConstPointer
 
typedef OptimizerParameters
< double > 
ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Array< double > ScalesType
 
typedef Optimizer Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
virtual const std::string GetStopConditionDescription () const override
 
void PrintArray (MeasureType *array)
 
void SetDataArray (MeasureType *dataArray)
 
virtual void StartOptimization () override
 
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 ()
 
- 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 ParametersTypeGetCurrentPosition () const
 
virtual const ParametersTypeGetInitialPosition () const
 
virtual void SetInitialPosition (const ParametersType &param)
 
void SetScales (const ScalesType &scales)
 
virtual const ScalesTypeGetScales () const
 
virtual const ScalesTypeGetInverseScales () 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
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
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 ()
 

Protected Member Functions

 CumulativeGaussianOptimizer ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual ~CumulativeGaussianOptimizer () override
 
- Protected Member Functions inherited from itk::MultipleValuedNonLinearOptimizer
 MultipleValuedNonLinearOptimizer ()
 
virtual ~MultipleValuedNonLinearOptimizer () override
 
- Protected Member Functions inherited from itk::NonLinearOptimizer
 NonLinearOptimizer ()
 
virtual ~NonLinearOptimizer () override
 
- Protected Member Functions inherited from itk::Optimizer
 Optimizer ()
 
virtual void SetCurrentPosition (const ParametersType &param)
 
virtual ~Optimizer () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~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 PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

MeasureTypeExtendGaussian (MeasureType *originalArray, MeasureType *extendedArray, int startingPointForInsertion)
 
double FindAverageSumOfSquaredDifferences (MeasureType *array1, MeasureType *array2)
 
void FindParametersOfGaussian (MeasureType *sampledGaussianArray)
 
void MeasureGaussianParameters (MeasureType *array)
 
void PrintComputedParameterHeader ()
 
void PrintComputedParameters ()
 
MeasureTypeRecalculateExtendedArrayFromGaussianParameters (MeasureType *originalArray, MeasureType *extendedArray, int startingPointForInsertion)
 
double VerticalBestShift (MeasureType *originalArray, MeasureType *newArray)
 

Private Attributes

double m_ComputedAmplitude
 
double m_ComputedMean
 
double m_ComputedStandardDeviation
 
double m_ComputedTransitionHeight
 
MeasureTypem_CumulativeGaussianArray
 
double m_DifferenceTolerance
 
MeasureTypem_FinalSampledArray
 
double m_FitError
 
double m_LowerAsymptote
 
double m_OffsetForMean
 
std::ostringstream m_StopConditionDescription
 
double m_UpperAsymptote
 
bool m_Verbose
 

Additional Inherited Members

- Protected Attributes inherited from itk::MultipleValuedNonLinearOptimizer
CostFunctionPointer m_CostFunction
 
- Protected Attributes inherited from itk::Optimizer
ParametersType m_CurrentPosition
 
bool m_ScalesInitialized
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

Definition at line 57 of file itkCumulativeGaussianOptimizer.h.

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

Definition at line 61 of file itkCumulativeGaussianOptimizer.h.

Data array typedef.

Definition at line 64 of file itkCumulativeGaussianOptimizer.h.

Definition at line 56 of file itkCumulativeGaussianOptimizer.h.

Standard typedefs.

Definition at line 54 of file itkCumulativeGaussianOptimizer.h.

Definition at line 55 of file itkCumulativeGaussianOptimizer.h.

Constructor & Destructor Documentation

itk::CumulativeGaussianOptimizer::CumulativeGaussianOptimizer ( )
protected
virtual itk::CumulativeGaussianOptimizer::~CumulativeGaussianOptimizer ( )
overrideprotectedvirtual

Member Function Documentation

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.

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

Extend the tails of the Gaussian.

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

Calculates the squared difference error between each Gaussian iteration loop.

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

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

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

Set and get macros.

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

Set and get macros.

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

Set and get macros.

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

Set and get macros.

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

Set and get macros.

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

Set and get macros.

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

Run-time type information (and related methods).

Reimplemented from itk::MultipleValuedNonLinearOptimizer.

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

Report the reason for stopping.

Reimplemented from itk::Optimizer.

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

Set and get macros.

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

Set and get macros.

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

Measure the parameters of a Gaussian sampled array.

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

Method for creation through the object factory.

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

Print an array.

void itk::CumulativeGaussianOptimizer::PrintComputedParameterHeader ( )
private

Print the header for output table.

void itk::CumulativeGaussianOptimizer::PrintComputedParameters ( )
private

Print the computed parameters.

virtual void itk::CumulativeGaussianOptimizer::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::MultipleValuedNonLinearOptimizer.

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

Recalulate the parameters of the extended Gaussian array.

void itk::CumulativeGaussianOptimizer::SetDataArray ( MeasureType dataArray)
virtual void itk::CumulativeGaussianOptimizer::SetDifferenceTolerance ( double  _arg)
virtual

Set and get macros.

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

Set and get macros.

virtual void itk::CumulativeGaussianOptimizer::StartOptimization ( )
overridevirtual

Start the optimizer.

Reimplemented from itk::Optimizer.

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

Find the constant of the integrated sample.

Member Data Documentation

double itk::CumulativeGaussianOptimizer::m_ComputedAmplitude
private

The final amplitude of the Gaussian.

Definition at line 113 of file itkCumulativeGaussianOptimizer.h.

double itk::CumulativeGaussianOptimizer::m_ComputedMean
private

The final mean of the Cumulative Gaussian.

Definition at line 107 of file itkCumulativeGaussianOptimizer.h.

double itk::CumulativeGaussianOptimizer::m_ComputedStandardDeviation
private

The final standard deviation of the Cumulative Gaussian.

Definition at line 110 of file itkCumulativeGaussianOptimizer.h.

double itk::CumulativeGaussianOptimizer::m_ComputedTransitionHeight
private

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

Definition at line 117 of file itkCumulativeGaussianOptimizer.h.

MeasureType* itk::CumulativeGaussianOptimizer::m_CumulativeGaussianArray
private

Original data array.

Definition at line 139 of file itkCumulativeGaussianOptimizer.h.

double itk::CumulativeGaussianOptimizer::m_DifferenceTolerance
private

When to stop the iteration for the Gaussian extension loop.

Definition at line 104 of file itkCumulativeGaussianOptimizer.h.

MeasureType* itk::CumulativeGaussianOptimizer::m_FinalSampledArray
private

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

Definition at line 136 of file itkCumulativeGaussianOptimizer.h.

double itk::CumulativeGaussianOptimizer::m_FitError
private

Least squares fit error as a measure of goodness.

Definition at line 132 of file itkCumulativeGaussianOptimizer.h.

double itk::CumulativeGaussianOptimizer::m_LowerAsymptote
private

The final lower asymptote of the Cumulative Gaussian.

Definition at line 123 of file itkCumulativeGaussianOptimizer.h.

double itk::CumulativeGaussianOptimizer::m_OffsetForMean
private

Offset for the mean calculation.

Definition at line 126 of file itkCumulativeGaussianOptimizer.h.

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

Describe the stop condition

Definition at line 169 of file itkCumulativeGaussianOptimizer.h.

double itk::CumulativeGaussianOptimizer::m_UpperAsymptote
private

The final upper asymptote of the Cumulative Gaussian.

Definition at line 120 of file itkCumulativeGaussianOptimizer.h.

bool itk::CumulativeGaussianOptimizer::m_Verbose
private

Flag to print iteration results.

Definition at line 129 of file itkCumulativeGaussianOptimizer.h.


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