shapeworks::LegacyCorrespondenceFunction
Inherits from shapeworks::VectorFunction
Public Types
| Name | |
|---|---|
| typedef LegacyShapeMatrix | ShapeMatrixType |
| typedef ShapeMatrixType::DataType | DataType |
| typedef VectorFunction::VectorType | VectorType |
| typedef ParticleSystem::PointType | PointType |
| typedef vnl_vector< DataType > | vnl_vector_type |
| typedef vnl_matrix< DataType > | vnl_matrix_type |
Public Functions
| Name | |
|---|---|
| std::shared_ptr< LegacyCorrespondenceFunction > | New() Factory method for creating instances. |
| virtual VectorType | evaluate(unsigned int , unsigned int , const ParticleSystem * , double & , double & ) const |
| virtual VectorType | evaluate(unsigned int , unsigned int , const ParticleSystem * , double & maxtimestep) const |
| virtual double | energy(unsigned int a, unsigned int b, const ParticleSystem * c) const |
| void | WriteModes(const std::string & , int ) const |
| void | SetShapeMatrix(ShapeMatrixType * s) |
| ShapeMatrixType * | GetShapeMatrix() |
| const ShapeMatrixType * | GetShapeMatrix() const |
| virtual void | before_iteration() |
| virtual void | after_iteration() override |
| void | SetMinimumVariance(double d) |
| double | GetMinimumVariance() const |
| void | SetMinimumVarianceDecay(double initial_value, double final_value, double time_period) |
| bool | GetMinimumVarianceDecayConstant() const |
| void | PrintShapeMatrix() |
| void | UseMeanenergy() |
| void | UseEntropy() |
| bool | GetHoldMinimumVariance() const |
| void | SetHoldMinimumVariance(bool b) |
| void | SetRecomputeCovarianceInterval(int i) |
| int | GetRecomputeCovarianceInterval() const |
| void | PrecomputeForFixedDomains(const ParticleSystem * ps) Precompute data for fixed shape space optimization. When most shapes are fixed (e.g., adding 1 new shape to 200 existing), we can precompute the covariance structure from fixed shapes and only update for the new shape, avoiding expensive SVD recomputation. |
| bool | HasPrecomputedFixedDomains() const Check if precomputed fixed domain data is available. |
| void | ClearPrecomputedFixedDomains() Clear precomputed fixed domain data. |
| void | RequestPrecomputeForFixedDomains() Request lazy precomputation on first iteration. The actual precomputation will happen on the first call to ComputeCovarianceMatrix() when the shape matrix is guaranteed to be populated. |
| virtual std::shared_ptr< VectorFunction > | clone() override |
| LegacyCorrespondenceFunction() | |
| ~LegacyCorrespondenceFunction() override =default |
Protected Functions
| Name | |
|---|---|
| LegacyCorrespondenceFunction(const LegacyCorrespondenceFunction & ) =delete | |
| LegacyCorrespondenceFunction & | operator=(const LegacyCorrespondenceFunction & ) =delete |
| virtual void | ComputeCovarianceMatrix() |
Public Attributes
| Name | |
|---|---|
| constexpr static unsigned int | VDimension |
| constexpr static unsigned int | Dimension |
Protected Attributes
| Name | |
|---|---|
| ShapeMatrixType::Pointer | m_ShapeMatrix |
| std::shared_ptr< vnl_matrix_type > | m_PointsUpdate |
| double | m_MinimumVariance |
| double | m_MinimumEigenValue |
| double | m_CurrentEnergy |
| bool | m_HoldMinimumVariance |
| double | m_MinimumVarianceDecayConstant |
| int | m_RecomputeCovarianceInterval |
| int | m_Counter |
| bool | m_UseMeanEnergy |
| std::shared_ptr< vnl_matrix_type > | m_points_mean |
| bool | m_NeedsPrecomputation |
| bool | m_HasPrecomputedFixedDomains |
| int | m_PrecomputedNumFixedSamples |
| int | m_PrecomputedNumDims |
| std::shared_ptr< vnl_matrix_type > | m_FixedY |
| std::shared_ptr< vnl_matrix_type > | m_FixedMean |
| std::shared_ptr< vnl_matrix_type > | m_FixedPinvMat |
| std::shared_ptr< vnl_matrix_type > | m_FixedGradientBasis |
| std::shared_ptr< vnl_diag_matrix< double > > | m_FixedW |
| std::vector< int > | m_FixedDomainIndices |
Additional inherited members
Public Functions inherited from shapeworks::VectorFunction
| Name | |
|---|---|
| virtual void | reset_buffers() May be called by the solver class. |
| virtual void | before_evaluate(unsigned int , unsigned int , const ParticleSystem * ) |
| virtual void | set_particle_system(ParticleSystem * p) Some subclasses may require a pointer to the particle system and its domain number. |
| virtual ParticleSystem * | get_particle_system() const |
| virtual void | set_domain_number(unsigned int i) |
| virtual int | get_domain_number() const |
| virtual double | get_relative_energy_scaling() const |
| virtual void | set_relative_energy_scaling(double r) |
| virtual | ~VectorFunction() =default Virtual destructor for proper cleanup of derived classes. |
Protected Functions inherited from shapeworks::VectorFunction
| Name | |
|---|---|
| VectorFunction() | |
| VectorFunction(const VectorFunction & ) =delete |
Protected Attributes inherited from shapeworks::VectorFunction
| Name | |
|---|---|
| ParticleSystem * | particle_system_ |
| unsigned int | domain_number_ |
Public Types Documentation
typedef ShapeMatrixType
cpp
typedef LegacyShapeMatrix shapeworks::LegacyCorrespondenceFunction::ShapeMatrixType;
typedef DataType
cpp
typedef ShapeMatrixType::DataType shapeworks::LegacyCorrespondenceFunction::DataType;
typedef VectorType
cpp
typedef VectorFunction::VectorType shapeworks::LegacyCorrespondenceFunction::VectorType;
Vector & Point types.
typedef PointType
cpp
typedef ParticleSystem::PointType shapeworks::LegacyCorrespondenceFunction::PointType;
typedef vnl_vector_type
cpp
typedef vnl_vector<DataType> shapeworks::LegacyCorrespondenceFunction::vnl_vector_type;
typedef vnl_matrix_type
cpp
typedef vnl_matrix<DataType> shapeworks::LegacyCorrespondenceFunction::vnl_matrix_type;
Public Functions Documentation
function New
cpp
static inline std::shared_ptr< LegacyCorrespondenceFunction > New()
Factory method for creating instances.
function evaluate
cpp
virtual VectorType evaluate(
unsigned int ,
unsigned int ,
const ParticleSystem * ,
double & ,
double &
) const
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
cpp
inline virtual VectorType evaluate(
unsigned int ,
unsigned int ,
const ParticleSystem * ,
double & maxtimestep
) const
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 energy
cpp
inline virtual double energy(
unsigned int a,
unsigned int b,
const ParticleSystem * c
) const
Reimplements: shapeworks::VectorFunction::energy
function WriteModes
cpp
void WriteModes(
const std::string & ,
int
) const
Write the first n modes to +- 3 std dev and the mean of the model described by the covariance matrix. The string argument is a prefix to the file names.
function SetShapeMatrix
cpp
inline void SetShapeMatrix(
ShapeMatrixType * s
)
Access the shape matrix.
function GetShapeMatrix
cpp
inline ShapeMatrixType * GetShapeMatrix()
function GetShapeMatrix
cpp
inline const ShapeMatrixType * GetShapeMatrix() const
function before_iteration
cpp
inline virtual void before_iteration()
Reimplements: shapeworks::VectorFunction::before_iteration
Called before each iteration of a solver.
function after_iteration
cpp
inline virtual void after_iteration() override
Reimplements: shapeworks::VectorFunction::after_iteration
Called after each iteration of the solver.
function SetMinimumVariance
cpp
inline void SetMinimumVariance(
double d
)
function GetMinimumVariance
cpp
inline double GetMinimumVariance() const
function SetMinimumVarianceDecay
cpp
inline void SetMinimumVarianceDecay(
double initial_value,
double final_value,
double time_period
)
function GetMinimumVarianceDecayConstant
cpp
inline bool GetMinimumVarianceDecayConstant() const
function PrintShapeMatrix
cpp
inline void PrintShapeMatrix()
function UseMeanenergy
cpp
inline void UseMeanenergy()
function UseEntropy
cpp
inline void UseEntropy()
function GetHoldMinimumVariance
cpp
inline bool GetHoldMinimumVariance() const
function SetHoldMinimumVariance
cpp
inline void SetHoldMinimumVariance(
bool b
)
function SetRecomputeCovarianceInterval
cpp
inline void SetRecomputeCovarianceInterval(
int i
)
function GetRecomputeCovarianceInterval
cpp
inline int GetRecomputeCovarianceInterval() const
function PrecomputeForFixedDomains
cpp
void PrecomputeForFixedDomains(
const ParticleSystem * ps
)
Precompute data for fixed shape space optimization. When most shapes are fixed (e.g., adding 1 new shape to 200 existing), we can precompute the covariance structure from fixed shapes and only update for the new shape, avoiding expensive SVD recomputation.
function HasPrecomputedFixedDomains
cpp
inline bool HasPrecomputedFixedDomains() const
Check if precomputed fixed domain data is available.
function ClearPrecomputedFixedDomains
cpp
void ClearPrecomputedFixedDomains()
Clear precomputed fixed domain data.
function RequestPrecomputeForFixedDomains
cpp
inline void RequestPrecomputeForFixedDomains()
Request lazy precomputation on first iteration. The actual precomputation will happen on the first call to ComputeCovarianceMatrix() when the shape matrix is guaranteed to be populated.
function clone
cpp
inline virtual std::shared_ptr< VectorFunction > clone() override
Reimplements: shapeworks::VectorFunction::clone
function LegacyCorrespondenceFunction
cpp
inline LegacyCorrespondenceFunction()
function ~LegacyCorrespondenceFunction
cpp
~LegacyCorrespondenceFunction() override =default
Protected Functions Documentation
function LegacyCorrespondenceFunction
cpp
LegacyCorrespondenceFunction(
const LegacyCorrespondenceFunction &
) =delete
function operator=
cpp
LegacyCorrespondenceFunction & operator=(
const LegacyCorrespondenceFunction &
) =delete
function ComputeCovarianceMatrix
cpp
virtual void ComputeCovarianceMatrix()
Public Attributes Documentation
variable VDimension
cpp
static constexpr static unsigned int VDimension = 3;
variable Dimension
cpp
static constexpr static unsigned int Dimension = VDimension;
Protected Attributes Documentation
variable m_ShapeMatrix
cpp
ShapeMatrixType::Pointer m_ShapeMatrix;
variable m_PointsUpdate
cpp
std::shared_ptr< vnl_matrix_type > m_PointsUpdate;
variable m_MinimumVariance
cpp
double m_MinimumVariance;
variable m_MinimumEigenValue
cpp
double m_MinimumEigenValue;
variable m_CurrentEnergy
cpp
double m_CurrentEnergy;
variable m_HoldMinimumVariance
cpp
bool m_HoldMinimumVariance;
variable m_MinimumVarianceDecayConstant
cpp
double m_MinimumVarianceDecayConstant;
variable m_RecomputeCovarianceInterval
cpp
int m_RecomputeCovarianceInterval;
variable m_Counter
cpp
int m_Counter;
variable m_UseMeanEnergy
cpp
bool m_UseMeanEnergy;
variable m_points_mean
cpp
std::shared_ptr< vnl_matrix_type > m_points_mean;
variable m_NeedsPrecomputation
cpp
bool m_NeedsPrecomputation = false;
variable m_HasPrecomputedFixedDomains
cpp
bool m_HasPrecomputedFixedDomains = false;
variable m_PrecomputedNumFixedSamples
cpp
int m_PrecomputedNumFixedSamples = 0;
variable m_PrecomputedNumDims
cpp
int m_PrecomputedNumDims = 0;
variable m_FixedY
cpp
std::shared_ptr< vnl_matrix_type > m_FixedY;
variable m_FixedMean
cpp
std::shared_ptr< vnl_matrix_type > m_FixedMean;
variable m_FixedPinvMat
cpp
std::shared_ptr< vnl_matrix_type > m_FixedPinvMat;
variable m_FixedGradientBasis
cpp
std::shared_ptr< vnl_matrix_type > m_FixedGradientBasis;
variable m_FixedW
cpp
std::shared_ptr< vnl_diag_matrix< double > > m_FixedW;
variable m_FixedDomainIndices
cpp
std::vector< int > m_FixedDomainIndices;
Updated on 2026-03-31 at 16:02:10 +0000