Skip to content

itk::ParticleEntropyGradientFunction

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. More...

#include <itkParticleEntropyGradientFunction.h>

Inherits from itk::ParticleVectorFunction< VDimension >, LightObject

Inherited by itk::ParticleConstrainedModifiedCotangentEntropyGradientFunction< TGradientNumericType, VDimension >, itk::ParticleCurvatureEntropyGradientFunction< TGradientNumericType, VDimension >, itk::ParticleModifiedCotangentEntropyGradientFunction< TGradientNumericType, VDimension >, itk::ParticleOmegaGradientFunction< TGradientNumericType, VDimension >

Public Types

Name
typedef ParticleEntropyGradientFunction Self
typedef SmartPointer< Self > Pointer
typedef SmartPointer< const Self > ConstPointer
typedef ParticleVectorFunction< VDimension > Superclass
typedef TGradientNumericType GradientNumericType
typedef Superclass::ParticleSystemType ParticleSystemType
typedef ParticleContainerArrayAttribute< double, VDimension > SigmaCacheType
typedef Superclass::VectorType VectorType
typedef ParticleSystemType::PointType PointType
typedef vnl_vector_fixed< TGradientNumericType, VDimension > GradientVectorType

Public Functions

Name
itkTypeMacro(ParticleEntropyGradientFunction , ParticleVectorFunction )
itkNewMacro(Self )
itkStaticConstMacro(Dimension , unsigned int , VDimension )
virtual VectorType Evaluate(unsigned int , unsigned int , const ParticleSystemType * , double & ) const
virtual VectorType Evaluate(unsigned int , unsigned int , const ParticleSystemType * , double & , double & ) const
virtual double Energy(unsigned int , unsigned int , const ParticleSystemType * ) const
virtual void ResetBuffers()
virtual double EstimateSigma(unsigned int idx, const typename ParticleSystemType::PointVectorType & neighborhood, const shapeworks::ParticleDomain * domain, const std::vector< double > & weights, const PointType & pos, double initial_sigma, double precision, int & err) const
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 ParticleSystemType::PointVectorType & , const shapeworks::ParticleDomain * , std::vector< double > & ) const
virtual ParticleVectorFunction< VDimension >::Pointer Clone()

Protected Functions

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

Protected Attributes

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

Additional inherited members

Public Functions inherited from itk::ParticleVectorFunction< VDimension >

Name
virtual void AfterIteration()
virtual void BeforeIteration()
virtual void BeforeEvaluate(unsigned int , unsigned int , const ParticleSystemType * )
virtual void SetParticleSystem(ParticleSystemType * p)
virtual ParticleSystemType * GetParticleSystem() const
virtual void SetDomainNumber(unsigned int i)
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 <class TGradientNumericType ,
unsigned int VDimension>
class itk::ParticleEntropyGradientFunction;

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 following description is an excerpt from

J Cates, P T Fletcher, M Styner, M Shenton, R Whitaker. Shape Modeling and Analysis with Entropy-Based Particle Systems. Information Processing in Medical Imaging IPMI 2007, LNCS 4584, pp. 333�345, 2007.

We treat a surface as a subset of \(\Re^d\), where \(d=2\) or \(d=3\) depending whether we are processing curves in the plane or surfaces in a volume, refspectively. The method we describe here deals with smooth, closed manifolds of codimension one, and we will refer to such manifolds as {surfaces}. We sample a surface \({\cal S} \subset \Re^d\) using a discrete set of \(N\) points that are considered random variables \(Z = (X_1, X_2, \ldots, X_N)\) drawn from a probability density function (PDF), \(p(X)\). We denote a realization of this PDF with lower case, and thus we have \(z = (x_1, x_2,\ldots, x_N)\), where \(z \in {\cal S}^N\). The probability of a realization \(x\) is \(p(X = x)\), which we denote simply as \(p(x)\).

The amount of information contained in such a random sampling is, in the limit, the differential entropy of the PDF, which is \(H[X] = -\int_S p(x) \log p(x) dx = -E\{\log p(X)\}\), where \(E\{ \cdot \}\) is the expectation. When we have a sufficient number of points sampled from \(p\), we can approximate the expectation by the sample mean, which gives \(H[X] \approx - (1/N)\sum_{i} \log p(x_i)\). We must also estimate \(p(x_i)\). Density functions on surfaces can be quite complex, and so we use a nonparametric, Parzen windowing estimation of this density using the particles themselves. Thus we have where \(G(x_i - x_j, \sigma_i)\) is a \(d\)-dimensional, isotropic Gaussian with standard deviation \(\sigma_i\). The cost function \(C\), is therefore an approximation of (negative) entropy:

Public Types Documentation

typedef Self

typedef ParticleEntropyGradientFunction itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::Self;

Standard class typedefs.

typedef Pointer

typedef SmartPointer<Self> itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::Pointer;

typedef ConstPointer

typedef SmartPointer<const Self> itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::ConstPointer;

typedef Superclass

typedef ParticleVectorFunction<VDimension> itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::Superclass;

typedef GradientNumericType

typedef TGradientNumericType itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::GradientNumericType;

Data type representing individual gradient components.

typedef ParticleSystemType

typedef Superclass::ParticleSystemType itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::ParticleSystemType;

Type of particle system.

typedef SigmaCacheType

typedef ParticleContainerArrayAttribute<double, VDimension> itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::SigmaCacheType;

Cache type for the sigma values.

typedef VectorType

typedef Superclass::VectorType itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::VectorType;

Vector & Point types.

typedef PointType

typedef ParticleSystemType::PointType itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::PointType;

typedef GradientVectorType

typedef vnl_vector_fixed<TGradientNumericType, VDimension> itk::ParticleEntropyGradientFunction< TGradientNumericType, VDimension >::GradientVectorType;

Public Functions Documentation

function itkTypeMacro

itkTypeMacro(
    ParticleEntropyGradientFunction ,
    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

virtual VectorType Evaluate(
    unsigned int ,
    unsigned int ,
    const ParticleSystemType * ,
    double & 
) const

Reimplements: itk::ParticleVectorFunction::Evaluate

Reimplemented by: itk::ParticleConstrainedModifiedCotangentEntropyGradientFunction::Evaluate, itk::ParticleCurvatureEntropyGradientFunction::Evaluate, itk::ParticleCurvatureEntropyGradientFunction::Evaluate, itk::ParticleModifiedCotangentEntropyGradientFunction::Evaluate, itk::ParticleModifiedCotangentEntropyGradientFunction::Evaluate, itk::ParticleOmegaGradientFunction::Evaluate, itk::ParticleOmegaGradientFunction::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

inline virtual VectorType Evaluate(
    unsigned int ,
    unsigned int ,
    const ParticleSystemType * ,
    double & ,
    double & 
) const

Reimplements: itk::ParticleVectorFunction::Evaluate

Reimplemented by: itk::ParticleConstrainedModifiedCotangentEntropyGradientFunction::Evaluate, itk::ParticleCurvatureEntropyGradientFunction::Evaluate, itk::ParticleCurvatureEntropyGradientFunction::Evaluate, itk::ParticleModifiedCotangentEntropyGradientFunction::Evaluate, itk::ParticleModifiedCotangentEntropyGradientFunction::Evaluate, itk::ParticleOmegaGradientFunction::Evaluate, itk::ParticleOmegaGradientFunction::Evaluate

function Energy

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

Reimplements: itk::ParticleVectorFunction::Energy

Reimplemented by: itk::ParticleConstrainedModifiedCotangentEntropyGradientFunction::Energy, itk::ParticleCurvatureEntropyGradientFunction::Energy, itk::ParticleCurvatureEntropyGradientFunction::Energy, itk::ParticleModifiedCotangentEntropyGradientFunction::Energy, itk::ParticleModifiedCotangentEntropyGradientFunction::Energy, itk::ParticleOmegaGradientFunction::Energy, itk::ParticleOmegaGradientFunction::Energy

function ResetBuffers

inline virtual void ResetBuffers()

Reimplements: itk::ParticleVectorFunction::ResetBuffers

May be called by the solver class.

function EstimateSigma

virtual double EstimateSigma(
    unsigned int idx,
    const typename ParticleSystemType::PointVectorType & neighborhood,
    const shapeworks::ParticleDomain * domain,
    const std::vector< double > & weights,
    const PointType & pos,
    double initial_sigma,
    double precision,
    int & err
) 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 AngleCoefficient

TGradientNumericType AngleCoefficient(
    const GradientVectorType & ,
    const GradientVectorType & 
) const

Returns a weighting coefficient based on the angle between two vectors. Weights smoothly approach zero as the angle between two normals approaches 90 degrees.

function SetMinimumNeighborhoodRadius

inline void SetMinimumNeighborhoodRadius(
    double s
)

Minimum radius of the neighborhood of points that are considered in the calculation. The neighborhood is a spherical radius in 3D space. The actual radius used in a calculation may exceed this value, but will not exceed the MaximumNeighborhoodRadius.

function GetMinimumNeighborhoodRadius

inline double GetMinimumNeighborhoodRadius() const

function SetMaximumNeighborhoodRadius

inline void SetMaximumNeighborhoodRadius(
    double s
)

Maximum radius of the neighborhood of points that are considered in the calculation. The neighborhood is a spherical radius in 3D space.

function GetMaximumNeighborhoodRadius

inline double GetMaximumNeighborhoodRadius() const

function SetFlatCutoff

inline void SetFlatCutoff(
    double s
)

Numerical parameters

function GetFlatCutoff

inline double GetFlatCutoff() const

function SetNeighborhoodToSigmaRatio

inline void SetNeighborhoodToSigmaRatio(
    double s
)

function GetNeighborhoodToSigmaRatio

inline double GetNeighborhoodToSigmaRatio() const

function SetSpatialSigmaCache

inline void SetSpatialSigmaCache(
    SigmaCacheType * s
)

Access the cache of sigma values for each particle position. This cache is populated by registering this object as an observer of the correct particle system (see SetParticleSystem).

function GetSpatialSigmaCache

inline SigmaCacheType * GetSpatialSigmaCache()

function GetSpatialSigmaCache

inline const SigmaCacheType * GetSpatialSigmaCache() const

function ComputeAngularWeights

void ComputeAngularWeights(
    const PointType & ,
    int ,
    const typename ParticleSystemType::PointVectorType & ,
    const shapeworks::ParticleDomain * ,
    std::vector< double > & 
) const

Compute a set of weights based on the difference in the normals of a central point and each of its neighbors. Difference of > 90 degrees results in a weight of 0.

function Clone

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

Reimplements: itk::ParticleVectorFunction::Clone

Reimplemented by: itk::ParticleConstrainedModifiedCotangentEntropyGradientFunction::Clone, itk::ParticleConstrainedModifiedCotangentEntropyGradientFunction::Clone, itk::ParticleCurvatureEntropyGradientFunction::Clone, itk::ParticleCurvatureEntropyGradientFunction::Clone, itk::ParticleModifiedCotangentEntropyGradientFunction::Clone, itk::ParticleModifiedCotangentEntropyGradientFunction::Clone, itk::ParticleOmegaGradientFunction::Clone, itk::ParticleOmegaGradientFunction::Clone

Protected Functions Documentation

function ParticleEntropyGradientFunction

inline ParticleEntropyGradientFunction()

function ~ParticleEntropyGradientFunction

inline virtual ~ParticleEntropyGradientFunction()

function operator=

void operator=(
    const ParticleEntropyGradientFunction & 
)

function ParticleEntropyGradientFunction

ParticleEntropyGradientFunction(
    const ParticleEntropyGradientFunction & 
)

Protected Attributes Documentation

variable m_MinimumNeighborhoodRadius

double m_MinimumNeighborhoodRadius;

variable m_MaximumNeighborhoodRadius

double m_MaximumNeighborhoodRadius;

variable m_FlatCutoff

double m_FlatCutoff;

variable m_NeighborhoodToSigmaRatio

double m_NeighborhoodToSigmaRatio;

variable m_SpatialSigmaCache

SigmaCacheType::Pointer m_SpatialSigmaCache;

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