shapeworks::SamplingFunction
#include <SamplingFunction.h>
Inherits from shapeworks::VectorFunction, itk::LightObject
Public Types
Name | |
---|---|
typedef SamplingFunction | Self |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
using vnl_vector_fixed< double, 3 > | VectorType |
using ParticleSystem::PointType | PointType |
using vnl_vector_fixed< float, 3 > | GradientVectorType |
using GenericContainerArray< double > | SigmaCacheType |
Public Functions
Name | |
---|---|
itkNewMacro(Self ) | |
virtual VectorType | Evaluate(unsigned int , unsigned int , const ParticleSystem * , double & maxtimestep) const override |
virtual VectorType | Evaluate(unsigned int , unsigned int , const ParticleSystem * , double & , double & ) const override |
virtual void | BeforeEvaluate(unsigned int , unsigned int , const ParticleSystem * ) override |
virtual double | Energy(unsigned int a, unsigned int b, const ParticleSystem * c) const override |
double | EstimateSigma(unsigned int idx, unsigned int dom, const shapeworks::ParticleDomain * domain, const PointType & pos, double initial_sigma, double precision, int & err, double & avg_kappa) const |
void | SetSharedBoundaryWeight(double w) |
double | GetSharedBoundaryWeight() const |
void | SetSharedBoundaryEnabled(bool enabled) |
bool | GetSharedBoundaryEnabled() const |
void | SetSpatialSigmaCache(SigmaCacheType * s) |
SigmaCacheType * | GetSpatialSigmaCache() |
const SigmaCacheType * | GetSpatialSigmaCache() 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 |
virtual void | ResetBuffers() override |
virtual VectorFunction::Pointer | Clone() override |
Public Attributes
Name | |
---|---|
constexpr static int | VDimension |
Additional inherited members
Public Types inherited from shapeworks::VectorFunction
Name | |
---|---|
typedef itk::LightObject | Superclass |
Public Functions inherited from shapeworks::VectorFunction
Name | |
---|---|
itkTypeMacro(VectorFunction , LightObject ) | |
itkStaticConstMacro(Dimension , unsigned int , VDimension ) | |
virtual void | AfterIteration() |
virtual void | BeforeIteration() |
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::SamplingFunction;
This function is responsible for the sampling term of the optimization. E.g. the repulsion force between particles on a single shape
Public Types Documentation
typedef Self
typedef SamplingFunction shapeworks::SamplingFunction::Self;
Standard class typedefs.
typedef Pointer
typedef itk::SmartPointer<Self> shapeworks::SamplingFunction::Pointer;
typedef ConstPointer
typedef itk::SmartPointer<const Self> shapeworks::SamplingFunction::ConstPointer;
using VectorType
using shapeworks::SamplingFunction::VectorType = vnl_vector_fixed<double, 3>;
using PointType
using shapeworks::SamplingFunction::PointType = ParticleSystem::PointType;
using GradientVectorType
using shapeworks::SamplingFunction::GradientVectorType = vnl_vector_fixed<float, 3>;
using SigmaCacheType
using shapeworks::SamplingFunction::SigmaCacheType = GenericContainerArray<double>;
Public Functions Documentation
function itkNewMacro
itkNewMacro(
Self
)
function Evaluate
inline virtual VectorType Evaluate(
unsigned int ,
unsigned int ,
const ParticleSystem * ,
double & maxtimestep
) const override
Reimplements: shapeworks::VectorFunction::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 override
Reimplements: shapeworks::VectorFunction::Evaluate
function BeforeEvaluate
virtual void BeforeEvaluate(
unsigned int ,
unsigned int ,
const ParticleSystem *
) override
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 override
Reimplements: shapeworks::VectorFunction::Energy
function EstimateSigma
double EstimateSigma(
unsigned int idx,
unsigned int dom,
const shapeworks::ParticleDomain * domain,
const PointType & pos,
double initial_sigma,
double precision,
int & err,
double & avg_kappa
) 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 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 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 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 ResetBuffers
inline virtual void ResetBuffers() override
Reimplements: shapeworks::VectorFunction::ResetBuffers
May be called by the solver class.
function Clone
virtual VectorFunction::Pointer Clone() override
Reimplements: shapeworks::VectorFunction::Clone
Public Attributes Documentation
variable VDimension
static constexpr static int VDimension = 3;
Updated on 2024-11-11 at 19:51:46 +0000