Skip to content

title: shapeworks::CurvatureSamplingFunction summary: Please note: This is the sampling function currently being used.


shapeworks::CurvatureSamplingFunction

Please note: This is the sampling function currently being used. More...

#include <CurvatureSamplingFunction.h>

Inherits from shapeworks::SamplingFunction, shapeworks::VectorFunction, itk::LightObject

Protected Classes

Name
struct CrossDomainNeighborhood

Public Types

Name
typedef float TGradientNumericType
typedef CurvatureSamplingFunction Self
typedef itk::SmartPointer< Self > Pointer
typedef itk::SmartPointer< const Self > ConstPointer
typedef SamplingFunction Superclass
typedef Superclass::GradientNumericType GradientNumericType
typedef Superclass::VectorType VectorType
typedef Superclass::PointType PointType
typedef Superclass::GradientVectorType GradientVectorType
typedef MeanCurvatureContainer< TGradientNumericType, VDimension > MeanCurvatureCacheType
typedef shapeworks::ImageDomainWithCurvature< TGradientNumericType >::VnlMatrixType VnlMatrixType

Public Functions

Name
itkTypeMacro(CurvatureSamplingFunction , SamplingFunction )
itkNewMacro(Self )
itkStaticConstMacro(Dimension , unsigned int , VDimension )
virtual VectorType Evaluate(unsigned int , unsigned int , const ParticleSystem * , double & maxtimestep) const
virtual VectorType Evaluate(unsigned int , unsigned int , const ParticleSystem * , double & , double & ) const
virtual void BeforeEvaluate(unsigned int , unsigned int , const ParticleSystem * )
virtual double Energy(unsigned int a, unsigned int b, const ParticleSystem * c) const
double ComputeKappa(double mc, unsigned int d) const
virtual void AfterIteration()
virtual void BeforeIteration()
virtual double EstimateSigma(unsigned int idx, unsigned int dom, const shapeworks::ParticleDomain * domain, const PointType & pos, double initial_sigma, double precision, int & err, double & avgKappa) const
void SetMeanCurvatureCache(MeanCurvatureCacheType * s)
MeanCurvatureCacheType * GetMeanCurvatureCache()
const MeanCurvatureCacheType * GetMeanCurvatureCache() const
void SetRho(double g)
double GetRho() const
void SetSharedBoundaryWeight(double w)
double GetSharedBoundaryWeight() const
void SetSharedBoundaryEnabled(bool enabled)
bool GetSharedBoundaryEnabled() const
virtual VectorFunction::Pointer Clone()

Protected Functions

Name
CurvatureSamplingFunction()
virtual ~CurvatureSamplingFunction()
void operator=(const CurvatureSamplingFunction & )
CurvatureSamplingFunction(const CurvatureSamplingFunction & )
void UpdateNeighborhood(const PointType & pos, int idx, int d, double radius, const ParticleSystem * system)

Public Attributes

Name
constexpr static int VDimension

Protected Attributes

Name
MeanCurvatureCacheType::Pointer m_MeanCurvatureCache
unsigned int m_Counter
double m_Rho
double m_avgKappa
bool m_IsSharedBoundaryEnabled
double m_SharedBoundaryWeight
double m_CurrentSigma
std::vector< CrossDomainNeighborhood > m_CurrentNeighborhood
float m_MaxMoveFactor

Additional inherited members

Public Types inherited from shapeworks::SamplingFunction

Name
typedef GenericContainerArray< double > SigmaCacheType

Public Functions inherited from shapeworks::SamplingFunction

Name
virtual void ResetBuffers()
TGradientNumericType AngleCoefficient(const GradientVectorType & , const GradientVectorType & ) const
void SetMinimumNeighborhoodRadius(double s)
double GetMinimumNeighborhoodRadius() const
void SetMaximumNeighborhoodRadius(double s)
double GetMaximumNeighborhoodRadius() const
void SetFlatCutoff(double s)
double GetFlatCutoff() const
void SetNeighborhoodToSigmaRatio(double s)
double GetNeighborhoodToSigmaRatio() const
void SetSpatialSigmaCache(SigmaCacheType * s)
SigmaCacheType * GetSpatialSigmaCache()
const SigmaCacheType * GetSpatialSigmaCache() const
void ComputeAngularWeights(const PointType & , int , const typename ParticleSystem::PointVectorType & , const shapeworks::ParticleDomain * , std::vector< double > & ) const

Protected Functions inherited from shapeworks::SamplingFunction

Name
SamplingFunction()
virtual ~SamplingFunction()
SamplingFunction(const SamplingFunction & )

Protected Attributes inherited from shapeworks::SamplingFunction

Name
double m_MinimumNeighborhoodRadius
double m_MaximumNeighborhoodRadius
double m_FlatCutoff
double m_NeighborhoodToSigmaRatio
SigmaCacheType::Pointer m_SpatialSigmaCache

Public Functions inherited from shapeworks::VectorFunction

Name
virtual void ResetBuffers()
virtual void SetParticleSystem(ParticleSystem * p)
virtual ParticleSystem * GetParticleSystem() const
virtual void SetDomainNumber(unsigned int i)
virtual int GetDomainNumber() const
virtual double GetRelativeEnergyScaling() const
virtual void SetRelativeEnergyScaling(double r)

Protected Functions inherited from shapeworks::VectorFunction

Name
VectorFunction()
virtual ~VectorFunction()
VectorFunction(const VectorFunction & )

Protected Attributes inherited from shapeworks::VectorFunction

Name
ParticleSystem * m_ParticleSystem
unsigned int m_DomainNumber

Detailed Description

class shapeworks::CurvatureSamplingFunction;

Please note: This is the sampling function currently being used.

This function returns an estimate of the gradient of the entropy of a particle distribution with respect to change in position of a specific particle in that distribution. The change in normals associated with the position is also taken into account, providing an adaptive sampling of the surface with respect to both position and extrinsic surface curvature.

Public Types Documentation

typedef TGradientNumericType

typedef float shapeworks::CurvatureSamplingFunction::TGradientNumericType;

typedef Self

typedef CurvatureSamplingFunction shapeworks::CurvatureSamplingFunction::Self;

Standard class typedefs.

typedef Pointer

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

typedef ConstPointer

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

typedef Superclass

typedef SamplingFunction shapeworks::CurvatureSamplingFunction::Superclass;

typedef GradientNumericType

typedef Superclass::GradientNumericType shapeworks::CurvatureSamplingFunction::GradientNumericType;

Inherit some parent typedefs.

typedef VectorType

typedef Superclass::VectorType shapeworks::CurvatureSamplingFunction::VectorType;

typedef PointType

typedef Superclass::PointType shapeworks::CurvatureSamplingFunction::PointType;

typedef GradientVectorType

typedef Superclass::GradientVectorType shapeworks::CurvatureSamplingFunction::GradientVectorType;

typedef MeanCurvatureCacheType

typedef MeanCurvatureContainer<TGradientNumericType, VDimension> shapeworks::CurvatureSamplingFunction::MeanCurvatureCacheType;

typedef VnlMatrixType

typedef shapeworks::ImageDomainWithCurvature<TGradientNumericType>::VnlMatrixType shapeworks::CurvatureSamplingFunction::VnlMatrixType;

Public Functions Documentation

function itkTypeMacro

itkTypeMacro(
    CurvatureSamplingFunction ,
    SamplingFunction 
)

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 ,
    unsigned int ,
    const ParticleSystem * ,
    double & maxtimestep
) const

Reimplements: shapeworks::SamplingFunction::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 & ,
    double & 
) const

Reimplements: shapeworks::SamplingFunction::Evaluate

function BeforeEvaluate

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

Reimplements: shapeworks::VectorFunction::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 Energy

inline virtual double Energy(
    unsigned int a,
    unsigned int b,
    const ParticleSystem * c
) const

Reimplements: shapeworks::SamplingFunction::Energy

function ComputeKappa

inline double ComputeKappa(
    double mc,
    unsigned int d
) const

function AfterIteration

inline virtual void AfterIteration()

Reimplements: shapeworks::VectorFunction::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: shapeworks::VectorFunction::BeforeIteration

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

function EstimateSigma

virtual double EstimateSigma(
    unsigned int idx,
    unsigned int dom,
    const shapeworks::ParticleDomain * domain,
    const PointType & pos,
    double initial_sigma,
    double precision,
    int & err,
    double & avgKappa
) const

Estimate the best sigma for Parzen windowing in a given neighborhood. The best sigma is the sigma that maximizes probability at the given point

function SetMeanCurvatureCache

inline void SetMeanCurvatureCache(
    MeanCurvatureCacheType * s
)

function GetMeanCurvatureCache

inline MeanCurvatureCacheType * GetMeanCurvatureCache()

function GetMeanCurvatureCache

inline const MeanCurvatureCacheType * GetMeanCurvatureCache() const

function SetRho

inline void SetRho(
    double g
)

function GetRho

inline double GetRho() const

function SetSharedBoundaryWeight

inline void SetSharedBoundaryWeight(
    double w
)

function GetSharedBoundaryWeight

inline double GetSharedBoundaryWeight() const

function SetSharedBoundaryEnabled

inline void SetSharedBoundaryEnabled(
    bool enabled
)

function GetSharedBoundaryEnabled

inline bool GetSharedBoundaryEnabled() const

function Clone

inline virtual VectorFunction::Pointer Clone()

Reimplements: shapeworks::SamplingFunction::Clone

Protected Functions Documentation

function CurvatureSamplingFunction

inline CurvatureSamplingFunction()

function ~CurvatureSamplingFunction

inline virtual ~CurvatureSamplingFunction()

function operator=

void operator=(
    const CurvatureSamplingFunction & 
)

function CurvatureSamplingFunction

CurvatureSamplingFunction(
    const CurvatureSamplingFunction & 
)

function UpdateNeighborhood

void UpdateNeighborhood(
    const PointType & pos,
    int idx,
    int d,
    double radius,
    const ParticleSystem * system
)

Public Attributes Documentation

variable VDimension

static constexpr static int VDimension = 3;

Protected Attributes Documentation

variable m_MeanCurvatureCache

MeanCurvatureCacheType::Pointer m_MeanCurvatureCache;

variable m_Counter

unsigned int m_Counter;

variable m_Rho

double m_Rho;

variable m_avgKappa

double m_avgKappa;

variable m_IsSharedBoundaryEnabled

bool m_IsSharedBoundaryEnabled {false};

variable m_SharedBoundaryWeight

double m_SharedBoundaryWeight {1.0};

variable m_CurrentSigma

double m_CurrentSigma;

variable m_CurrentNeighborhood

std::vector< CrossDomainNeighborhood > m_CurrentNeighborhood;

variable m_MaxMoveFactor

float m_MaxMoveFactor = 0;

Updated on 2024-03-17 at 12:58:44 -0600