Skip to content

itk::ParticleDualVectorFunction

More...

#include <itkParticleDualVectorFunction.h>

Inherits from itk::ParticleVectorFunction< VDimension >, LightObject

Public Types

Name
typedef ParticleDualVectorFunction Self
typedef SmartPointer< Self > Pointer
typedef SmartPointer< const Self > ConstPointer
typedef ParticleVectorFunction< VDimension > Superclass
typedef Superclass::ParticleSystemType ParticleSystemType
typedef Superclass::VectorType VectorType

Public Functions

Name
itkTypeMacro(ParticleDualVectorFunction , ParticleVectorFunction )
itkNewMacro(Self )
itkStaticConstMacro(Dimension , unsigned int , VDimension )
virtual VectorType Evaluate(unsigned int idx, unsigned int d, const ParticleSystemType * system, double & maxmove) const
virtual double EnergyA(unsigned int idx, unsigned int d, const ParticleSystemType * system) const
virtual double EnergyB(unsigned int idx, unsigned int d, const ParticleSystemType * system) const
virtual double Energy(unsigned int idx, unsigned int d, const ParticleSystemType * system) const
virtual VectorType Evaluate(unsigned int idx, unsigned int d, const ParticleSystemType * system, double & maxmove, double & energy) const
virtual void BeforeEvaluate(unsigned int , unsigned int , const ParticleSystemType * )
virtual void AfterIteration()
virtual void BeforeIteration()
virtual void SetParticleSystem(ParticleSystemType * p)
virtual void SetDomainNumber(unsigned int i)
void SetFunctionA(ParticleVectorFunction< VDimension > * o)
ParticleVectorFunction< VDimension > * GetFunctionA()
ParticleVectorFunction< VDimension > * GetFunctionB()
void SetFunctionB(ParticleVectorFunction< VDimension > * o)
void SetAOn()
void SetAOff()
void SetAOn(bool s)
bool GetAOn() const
void SetBOn()
void SetBOff()
void SetBOn(bool s)
bool GetBOn() const
void SetRelativeEnergyScaling(double r)
double GetRelativeEnergyScaling() const
void SetRelativeGradientScaling(double r)
double GetRelativeGradientScaling() const
double GetAverageGradMagA() const
double GetAverageGradMagB() const
double GetAverageEnergyA() const
double GetAverageEnergyB() const
virtual ParticleVectorFunction< VDimension >::Pointer Clone()

Protected Functions

Name
ParticleDualVectorFunction()
virtual ~ParticleDualVectorFunction()
void operator=(const ParticleDualVectorFunction & )
ParticleDualVectorFunction(const ParticleDualVectorFunction & )

Protected Attributes

Name
bool m_AOn
bool m_BOn
double m_RelativeGradientScaling
double m_RelativeEnergyScaling
double m_AverageGradMagA
double m_AverageGradMagB
double m_AverageEnergyA
double m_AverageEnergyB
double m_Counter
ParticleVectorFunction< VDimension >::Pointer m_FunctionA
ParticleVectorFunction< VDimension >::Pointer m_FunctionB

Additional inherited members

Public Functions inherited from itk::ParticleVectorFunction< VDimension >

Name
virtual void ResetBuffers()
virtual ParticleSystemType * GetParticleSystem() const
virtual int GetDomainNumber() const

Protected Functions inherited from itk::ParticleVectorFunction< VDimension >

Name
ParticleVectorFunction()
virtual ~ParticleVectorFunction()
ParticleVectorFunction(const ParticleVectorFunction & )

Protected Attributes inherited from itk::ParticleVectorFunction< VDimension >

Name
ParticleSystemType * m_ParticleSystem
unsigned int m_DomainNumber

Detailed Description

template <unsigned int VDimension>
class itk::ParticleDualVectorFunction;

This class combines the results of evaluating 2 ParticleVector functions and presents the interface of a single function evaluation. Optionally, only the first function can be used by calling SetLinkOff().

Public Types Documentation

typedef Self

typedef ParticleDualVectorFunction itk::ParticleDualVectorFunction< VDimension >::Self;

Standard class typedefs.

typedef Pointer

typedef SmartPointer<Self> itk::ParticleDualVectorFunction< VDimension >::Pointer;

typedef ConstPointer

typedef SmartPointer<const Self> itk::ParticleDualVectorFunction< VDimension >::ConstPointer;

typedef Superclass

typedef ParticleVectorFunction<VDimension> itk::ParticleDualVectorFunction< VDimension >::Superclass;

typedef ParticleSystemType

typedef Superclass::ParticleSystemType itk::ParticleDualVectorFunction< VDimension >::ParticleSystemType;

Type of particle system.

typedef VectorType

typedef Superclass::VectorType itk::ParticleDualVectorFunction< VDimension >::VectorType;

Vector type.

Public Functions Documentation

function itkTypeMacro

itkTypeMacro(
    ParticleDualVectorFunction ,
    ParticleVectorFunction 
)

function itkNewMacro

itkNewMacro(
    Self 
)

Method for creation through the object factory.

function itkStaticConstMacro

itkStaticConstMacro(
    Dimension ,
    unsigned int ,
    VDimension 
)

Dimensionality of the domain of the particle system.

function Evaluate

inline virtual VectorType Evaluate(
    unsigned int idx,
    unsigned int d,
    const ParticleSystemType * system,
    double & maxmove
) const

Reimplements: itk::ParticleVectorFunction::Evaluate

The first argument is a pointer to the particle system. The second argument is the index of the domain within that particle system. The third argument is the index of the particle location within the given domain.

function EnergyA

inline virtual double EnergyA(
    unsigned int idx,
    unsigned int d,
    const ParticleSystemType * system
) const

function EnergyB

inline virtual double EnergyB(
    unsigned int idx,
    unsigned int d,
    const ParticleSystemType * system
) const

function Energy

inline virtual double Energy(
    unsigned int idx,
    unsigned int d,
    const ParticleSystemType * system
) const

Reimplements: itk::ParticleVectorFunction::Energy

function Evaluate

inline virtual VectorType Evaluate(
    unsigned int idx,
    unsigned int d,
    const ParticleSystemType * system,
    double & maxmove,
    double & energy
) const

Reimplements: itk::ParticleVectorFunction::Evaluate

function BeforeEvaluate

inline virtual void BeforeEvaluate(
    unsigned int ,
    unsigned int ,
    const ParticleSystemType * 
)

Reimplements: itk::ParticleVectorFunction::BeforeEvaluate

This method may be called to set up the state of the function object before a call to Evaluate. It is necessary in order to initialize certain constants and variables that may be used for calculating the Energy as well as the Gradients. Typically this is only necessary for the adaptive gradient descent algorithm.

function AfterIteration

inline virtual void AfterIteration()

Reimplements: itk::ParticleVectorFunction::AfterIteration

This method is called by a solver after each iteration. Subclasses may or may not implement this method.

function BeforeIteration

inline virtual void BeforeIteration()

Reimplements: itk::ParticleVectorFunction::BeforeIteration

This method is called by a solver before each iteration. Subclasses may or may not implement this method.

function SetParticleSystem

inline virtual void SetParticleSystem(
    ParticleSystemType * p
)

Reimplements: itk::ParticleVectorFunction::SetParticleSystem

Some subclasses may require a pointer to the particle system and its domain number. These methods set/get those values.

function SetDomainNumber

inline virtual void SetDomainNumber(
    unsigned int i
)

Reimplements: itk::ParticleVectorFunction::SetDomainNumber

function SetFunctionA

inline void SetFunctionA(
    ParticleVectorFunction< VDimension > * o
)

function GetFunctionA

inline ParticleVectorFunction< VDimension > * GetFunctionA()

function GetFunctionB

inline ParticleVectorFunction< VDimension > * GetFunctionB()

function SetFunctionB

inline void SetFunctionB(
    ParticleVectorFunction< VDimension > * o
)

function SetAOn

inline void SetAOn()

Turn each term on and off.

function SetAOff

inline void SetAOff()

function SetAOn

inline void SetAOn(
    bool s
)

function GetAOn

inline bool GetAOn() const

function SetBOn

inline void SetBOn()

function SetBOff

inline void SetBOff()

function SetBOn

inline void SetBOn(
    bool s
)

function GetBOn

inline bool GetBOn() const

function SetRelativeEnergyScaling

inline void SetRelativeEnergyScaling(
    double r
)

The relative scaling scales the gradient B relative to A. By default this value is 1.0.

function GetRelativeEnergyScaling

inline double GetRelativeEnergyScaling() const

function SetRelativeGradientScaling

inline void SetRelativeGradientScaling(
    double r
)

function GetRelativeGradientScaling

inline double GetRelativeGradientScaling() const

function GetAverageGradMagA

inline double GetAverageGradMagA() const

function GetAverageGradMagB

inline double GetAverageGradMagB() const

function GetAverageEnergyA

inline double GetAverageEnergyA() const

function GetAverageEnergyB

inline double GetAverageEnergyB() const

function Clone

inline virtual ParticleVectorFunction< VDimension >::Pointer Clone()

Reimplements: itk::ParticleVectorFunction::Clone

Protected Functions Documentation

function ParticleDualVectorFunction

inline ParticleDualVectorFunction()

function ~ParticleDualVectorFunction

inline virtual ~ParticleDualVectorFunction()

function operator=

void operator=(
    const ParticleDualVectorFunction & 
)

function ParticleDualVectorFunction

ParticleDualVectorFunction(
    const ParticleDualVectorFunction & 
)

Protected Attributes Documentation

variable m_AOn

bool m_AOn;

variable m_BOn

bool m_BOn;

variable m_RelativeGradientScaling

double m_RelativeGradientScaling;

variable m_RelativeEnergyScaling

double m_RelativeEnergyScaling;

variable m_AverageGradMagA

double m_AverageGradMagA;

variable m_AverageGradMagB

double m_AverageGradMagB;

variable m_AverageEnergyA

double m_AverageEnergyA;

variable m_AverageEnergyB

double m_AverageEnergyB;

variable m_Counter

double m_Counter;

variable m_FunctionA

ParticleVectorFunction< VDimension >::Pointer m_FunctionA;

variable m_FunctionB

ParticleVectorFunction< VDimension >::Pointer m_FunctionB;

Updated on 2022-07-23 at 17:50:02 -0600