Skip to content

shapeworks::VectorFunction

More...

#include <VectorFunction.h>

Inherits from itk::LightObject

Inherited by shapeworks::CorrespondenceFunction, shapeworks::DisentangledCorrespondenceFunction, shapeworks::DualVectorFunction, shapeworks::LegacyCorrespondenceFunction, shapeworks::SamplingFunction

Public Types

Name
typedef VectorFunction Self
typedef itk::SmartPointer< Self > Pointer
typedef itk::SmartPointer< const Self > ConstPointer
typedef itk::LightObject Superclass
typedef vnl_vector_fixed< double, VDimension > VectorType

Public Functions

Name
itkTypeMacro(VectorFunction , LightObject )
itkStaticConstMacro(Dimension , unsigned int , VDimension )
virtual VectorType Evaluate(unsigned int , unsigned int , const ParticleSystem * , double & maxtimestep) const =0
virtual VectorType Evaluate(unsigned int , unsigned int , const ParticleSystem * , double & maxtimestep, double & energy) const =0
virtual double Energy(unsigned int , unsigned int , const ParticleSystem * ) const =0
virtual void ResetBuffers()
virtual void AfterIteration()
virtual void BeforeIteration()
virtual void BeforeEvaluate(unsigned int , unsigned int , const ParticleSystem * )
virtual void SetParticleSystem(ParticleSystem * p)
virtual ParticleSystem * GetParticleSystem() const
virtual void SetDomainNumber(unsigned int i)
virtual int GetDomainNumber() const
virtual VectorFunction::Pointer Clone()
virtual double GetRelativeEnergyScaling() const
virtual void SetRelativeEnergyScaling(double r)

Protected Functions

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

Public Attributes

Name
constexpr static unsigned int VDimension

Protected Attributes

Name
ParticleSystem * m_ParticleSystem
unsigned int m_DomainNumber

Detailed Description

class shapeworks::VectorFunction;

This is the base class defining the API for a function that takes a particle system, domain, and location index as arguments and returns a vector-valued result.

Public Types Documentation

typedef Self

typedef VectorFunction shapeworks::VectorFunction::Self;

Standard class typedefs.

typedef Pointer

typedef itk::SmartPointer<Self> shapeworks::VectorFunction::Pointer;

typedef ConstPointer

typedef itk::SmartPointer<const Self> shapeworks::VectorFunction::ConstPointer;

typedef Superclass

typedef itk::LightObject shapeworks::VectorFunction::Superclass;

typedef VectorType

typedef vnl_vector_fixed<double, VDimension> shapeworks::VectorFunction::VectorType;

Type of vectors.

Public Functions Documentation

function itkTypeMacro

itkTypeMacro(
    VectorFunction ,
    LightObject 
)

function itkStaticConstMacro

itkStaticConstMacro(
    Dimension ,
    unsigned int ,
    VDimension 
)

Method for object allocation through the factory. Dimensionality of the domain of the particle system.

function Evaluate

virtual VectorType Evaluate(
    unsigned int ,
    unsigned int ,
    const ParticleSystem * ,
    double & maxtimestep
) const =0

Reimplemented by: shapeworks::CorrespondenceFunction::Evaluate, shapeworks::CurvatureSamplingFunction::Evaluate, shapeworks::DisentangledCorrespondenceFunction::Evaluate, shapeworks::LegacyCorrespondenceFunction::Evaluate, shapeworks::SamplingFunction::Evaluate, shapeworks::DualVectorFunction::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 Evaluate

virtual VectorType Evaluate(
    unsigned int ,
    unsigned int ,
    const ParticleSystem * ,
    double & maxtimestep,
    double & energy
) const =0

Reimplemented by: shapeworks::SamplingFunction::Evaluate, shapeworks::DualVectorFunction::Evaluate, shapeworks::CorrespondenceFunction::Evaluate, shapeworks::CurvatureSamplingFunction::Evaluate, shapeworks::DisentangledCorrespondenceFunction::Evaluate, shapeworks::LegacyCorrespondenceFunction::Evaluate

function Energy

virtual double Energy(
    unsigned int ,
    unsigned int ,
    const ParticleSystem * 
) const =0

Reimplemented by: shapeworks::CorrespondenceFunction::Energy, shapeworks::CurvatureSamplingFunction::Energy, shapeworks::DisentangledCorrespondenceFunction::Energy, shapeworks::LegacyCorrespondenceFunction::Energy, shapeworks::DualVectorFunction::Energy, shapeworks::SamplingFunction::Energy

function ResetBuffers

inline virtual void ResetBuffers()

Reimplemented by: shapeworks::SamplingFunction::ResetBuffers

May be called by the solver class.

function AfterIteration

inline virtual void AfterIteration()

Reimplemented by: shapeworks::CorrespondenceFunction::AfterIteration, shapeworks::CurvatureSamplingFunction::AfterIteration, shapeworks::DisentangledCorrespondenceFunction::AfterIteration, shapeworks::DualVectorFunction::AfterIteration, shapeworks::LegacyCorrespondenceFunction::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()

Reimplemented by: shapeworks::CorrespondenceFunction::BeforeIteration, shapeworks::CurvatureSamplingFunction::BeforeIteration, shapeworks::DisentangledCorrespondenceFunction::BeforeIteration, shapeworks::DualVectorFunction::BeforeIteration, shapeworks::LegacyCorrespondenceFunction::BeforeIteration

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

function BeforeEvaluate

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

Reimplemented by: shapeworks::DualVectorFunction::BeforeEvaluate, shapeworks::CurvatureSamplingFunction::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 SetParticleSystem

inline virtual void SetParticleSystem(
    ParticleSystem * p
)

Reimplemented by: shapeworks::DualVectorFunction::SetParticleSystem

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

function GetParticleSystem

inline virtual ParticleSystem * GetParticleSystem() const

function SetDomainNumber

inline virtual void SetDomainNumber(
    unsigned int i
)

Reimplemented by: shapeworks::DualVectorFunction::SetDomainNumber

function GetDomainNumber

inline virtual int GetDomainNumber() const

function Clone

inline virtual VectorFunction::Pointer Clone()

Reimplemented by: shapeworks::CorrespondenceFunction::Clone, shapeworks::CurvatureSamplingFunction::Clone, shapeworks::DisentangledCorrespondenceFunction::Clone, shapeworks::DualVectorFunction::Clone, shapeworks::LegacyCorrespondenceFunction::Clone, shapeworks::SamplingFunction::Clone

function GetRelativeEnergyScaling

inline virtual double GetRelativeEnergyScaling() const

Reimplemented by: shapeworks::DualVectorFunction::GetRelativeEnergyScaling

function SetRelativeEnergyScaling

inline virtual void SetRelativeEnergyScaling(
    double r
)

Reimplemented by: shapeworks::DualVectorFunction::SetRelativeEnergyScaling

Protected Functions Documentation

function VectorFunction

inline VectorFunction()

function ~VectorFunction

inline virtual ~VectorFunction()

function operator=

void operator=(
    const VectorFunction & 
)

function VectorFunction

VectorFunction(
    const VectorFunction & 
)

Public Attributes Documentation

variable VDimension

static constexpr static unsigned int VDimension = 3;

Protected Attributes Documentation

variable m_ParticleSystem

ParticleSystem * m_ParticleSystem;

variable m_DomainNumber

unsigned int m_DomainNumber;

Updated on 2024-07-12 at 20:10:35 +0000