Shapeworks Studio
2.1
Shape analysis software suite
|
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 <itkPSMParticleEntropyFunction.h>
Public Types | |
typedef PSMParticleEntropyFunction | Self |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef PSMCostFunction< VDimension > | Superclass |
typedef TGradientNumericType | GradientNumericType |
typedef Superclass::ParticleSystemType | ParticleSystemType |
typedef PSMContainerArrayAttribute< double, VDimension > | SigmaCacheType |
typedef Superclass::VectorType | VectorType |
typedef ParticleSystemType::PointType | PointType |
typedef vnl_vector_fixed< TGradientNumericType, VDimension > | GradientVectorType |
Public Types inherited from itk::PSMCostFunction< VDimension > | |
typedef PSMCostFunction | Self |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef LightObject | Superclass |
typedef PSMParticleSystem< VDimension > | ParticleSystemType |
typedef vnl_vector_fixed< double, VDimension > | VectorType |
Public Member Functions | |
itkTypeMacro (PSMParticleEntropyFunction, PSMCostFunction) | |
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, const typename ParticleSystemType::PointVectorType &, const std::vector< double > &, const PointType &, double, double, 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 &, const typename ParticleSystemType::PointVectorType &, const PSMImageDomainWithGradients< TGradientNumericType, VDimension > *, std::vector< double > &) const |
Public Member Functions inherited from itk::PSMCostFunction< VDimension > | |
itkTypeMacro (PSMCostFunction, LightObject) | |
itkStaticConstMacro (Dimension, unsigned int, VDimension) | |
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 Member Functions | |
void | operator= (const PSMParticleEntropyFunction &) |
PSMParticleEntropyFunction (const PSMParticleEntropyFunction &) | |
Protected Member Functions inherited from itk::PSMCostFunction< VDimension > | |
void | operator= (const PSMCostFunction &) |
PSMCostFunction (const PSMCostFunction &) | |
Protected Attributes | |
double | m_MinimumNeighborhoodRadius |
double | m_MaximumNeighborhoodRadius |
double | m_FlatCutoff |
double | m_NeighborhoodToSigmaRatio |
SigmaCacheType::Pointer | m_SpatialSigmaCache |
Protected Attributes inherited from itk::PSMCostFunction< VDimension > | |
ParticleSystemType * | m_ParticleSystem |
unsigned int | m_DomainNumber |
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 , where or 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 using a discrete set of points that are considered random variables drawn from a probability density function (PDF), . We denote a realization of this PDF with lower case, and thus we have , where . The probability of a realization is , which we denote simply as .
The amount of information contained in such a random sampling is, in the limit, the differential entropy of the PDF, which is , where is the expectation. When we have a sufficient number of points sampled from , we can approximate the expectation by the sample mean, which gives . We must also estimate . 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 is a -dimensional, isotropic Gaussian with standard deviation . The cost function , is therefore an approximation of (negative) entropy:
Definition at line 84 of file itkPSMParticleEntropyFunction.h.
typedef TGradientNumericType itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::GradientNumericType |
Data type representing individual gradient components.
Definition at line 95 of file itkPSMParticleEntropyFunction.h.
typedef Superclass::ParticleSystemType itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::ParticleSystemType |
Type of particle system.
Definition at line 98 of file itkPSMParticleEntropyFunction.h.
typedef PSMParticleEntropyFunction itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::Self |
Standard class typedefs.
Definition at line 88 of file itkPSMParticleEntropyFunction.h.
typedef PSMContainerArrayAttribute<double, VDimension> itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::SigmaCacheType |
Cache type for the sigma values.
Definition at line 101 of file itkPSMParticleEntropyFunction.h.
typedef Superclass::VectorType itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::VectorType |
Vector & Point types.
Definition at line 104 of file itkPSMParticleEntropyFunction.h.
TGradientNumericType itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::AngleCoefficient | ( | const GradientVectorType & | p_i_normal, |
const GradientVectorType & | p_j_normal | ||
) | 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.
Definition at line 27 of file itkPSMParticleEntropyFunction.hxx.
void itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::ComputeAngularWeights | ( | const PointType & | pos, |
const typename ParticleSystemType::PointVectorType & | neighborhood, | ||
const PSMImageDomainWithGradients< TGradientNumericType, VDimension > * | domain, | ||
std::vector< double > & | weights | ||
) | 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.
Definition at line 43 of file itkPSMParticleEntropyFunction.hxx.
|
virtual |
Estimate the best sigma for Parzen windowing in a given neighborhood. The best sigma is the sigma that maximizes probability at the given point
Definition at line 62 of file itkPSMParticleEntropyFunction.hxx.
|
virtual |
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.
Implements itk::PSMCostFunction< VDimension >.
Definition at line 152 of file itkPSMParticleEntropyFunction.hxx.
itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::itkNewMacro | ( | Self | ) |
Method for creation through the object factory.
itk::PSMParticleEntropyFunction< TGradientNumericType, VDimension >::itkStaticConstMacro | ( | Dimension | , |
unsigned | int, | ||
VDimension | |||
) |
Dimensionality of the domain of the particle system.
|
inlinevirtual |
May be called by the solver class.
Reimplemented from itk::PSMCostFunction< VDimension >.
Definition at line 133 of file itkPSMParticleEntropyFunction.h.
|
inline |
The influence of particle neighbors on each other is weighted by the angle between the surface normals at their respective positions. The "flat cutoff" parameter adjusts the degree to which surface normals must differ before the weighting kicks in. Angles below the "flat cutoff" angle, which is specified in radians, are given a weighting of 1.0. Angles above this parameter value result in a lower-weight interaction between particles. Flat cutoff is set to a default value that should work for most applications. It is not necessary to set or tune this parameter unless you would like to tweak performance on a particular dataset.
Definition at line 189 of file itkPSMParticleEntropyFunction.h.
|
inline |
Maximum radius of the neighborhood of points that are considered in the calculation. The neighborhood is a spherical radius in 3D space. MaximumNeighborhoodRadius should be set to a value equal-to or less-than the length of the largest dimension of the image. This parameter should ALWAYS be set by an application, since this class cannot know by default the size of input images. The radius value should be specified in real-world coordinates.
Definition at line 173 of file itkPSMParticleEntropyFunction.h.
|
inline |
The minimum radius of the neighborhood of points that are considered in the entropy 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. This parameter should ALWAYS be set by an application, because it must be scaled according to the spacing in the image. A good value is typically 5x the spacing of the highest-resolution dimension (the dimension with the smallest spacing.
Definition at line 160 of file itkPSMParticleEntropyFunction.h.
|
inline |
NeighborhoodToSigmaRatio defines the extent of a given particle's neighborhood. A particle only interacts with neighbors in this neighborhood. All other particles on the surface are ignored. The neighborhood extent is computed as a multiple of the estimated standard deviation (sigma) of the local particle positions. This parameter has a default value that should work well for most data. It is not necessary to set or tune this parameter unless you would like to tweak performance for a particular dataset.
Definition at line 203 of file itkPSMParticleEntropyFunction.h.
|
inline |
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).
Definition at line 211 of file itkPSMParticleEntropyFunction.h.