18#ifndef __itkStatisticalShapePointPenalty_h
19#define __itkStatisticalShapePointPenalty_h
24#include "itkPointSet.h"
27#include <itkVariableSizeMatrix.h>
29#include <vnl/vnl_matrix.h>
30#include <vnl/vnl_math.h>
31#include <vnl/vnl_vector.h>
32#include <vnl/algo/vnl_real_eigensystem.h>
33#include <vnl/algo/vnl_symmetric_eigensystem.h>
35#include <vnl/algo/vnl_svd_economy.h>
55template<
class TFixedPo
intSet,
class TMovingPo
intSet >
122 itkSetMacro( ShrinkageIntensityNeedsUpdate,
bool );
123 itkBooleanMacro( ShrinkageIntensityNeedsUpdate );
127 -1.0, NumericTraits< MeasureType >::max() );
130 itkSetMacro( BaseVarianceNeedsUpdate,
bool );
131 itkBooleanMacro( BaseVarianceNeedsUpdate );
134 -1.0, NumericTraits< MeasureType >::max() );
138 -1.0, NumericTraits< MeasureType >::max() );
142 -1.0, NumericTraits< MeasureType >::max() );
146 -1.0, NumericTraits< MeasureType >::max() );
149 itkSetMacro( VariancesNeedsUpdate,
bool );
150 itkBooleanMacro( VariancesNeedsUpdate );
153 0.0, NumericTraits< MeasureType >::max() );
157 NumericTraits< MeasureType >::NonpositiveMin(), NumericTraits< MeasureType >::max() );
160 itkSetMacro( ShapeModelCalculation,
int );
161 itkGetConstReferenceMacro( ShapeModelCalculation,
int );
163 itkSetMacro( NormalizedShapeModel,
bool );
164 itkGetConstReferenceMacro( NormalizedShapeModel,
bool );
165 itkBooleanMacro( NormalizedShapeModel );
179 void PrintSelf( std::ostream & os, Indent indent )
const override;
187 const unsigned int vertexindex )
const;
190 const unsigned int vertexindex )
const;
193 const unsigned int shapeLength )
const;
196 const unsigned int shapeLength )
const;
198 void UpdateL2(
const unsigned int shapeLength )
const;
209 const VnlVectorType & eigrot,
const unsigned int shapeLength )
const;
214 typename DerivativeType::element_type & derivativeElement,
256#ifndef ITK_MANUAL_INSTANTIATION
257#include "itkStatisticalShapePointPenalty.hxx"
Computes similarity between two point sets.
TransformType::InputPointType InputPointType
Superclass::DerivativeType DerivativeType
TransformType::OutputPointType OutputPointType
TMovingPointSet MovingPointSetType
FixedPointSetType::PointDataContainer::ConstIterator PointDataIterator
DerivativeType::ValueType DerivativeValueType
TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass::MeasureType MeasureType
TFixedPointSet FixedPointSetType
AdvancedTransform< CoordinateRepresentationType, itkGetStaticConstMacro(FixedPointSetDimension), itkGetStaticConstMacro(MovingPointSetDimension) > TransformType
FixedPointSetType::PointsContainer::ConstIterator PointIterator
TransformType::ParametersType TransformParametersType
TransformType::JacobianType TransformJacobianType
MovingPointSetType::ConstPointer MovingPointSetConstPointer
TransformType::Pointer TransformPointer
FixedPointSetType::ConstPointer FixedPointSetConstPointer
Computes the Mahalanobis distance between the transformed shape and a mean shape. A model mean and co...
void UpdateCentroidAndAlignProposalVector(const unsigned int shapeLength) const
SmartPointer< const Self > ConstPointer
SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
Superclass::PointDataIterator PointDataIterator
OutputPointType::CoordRepType CoordRepType
Superclass::TransformPointer TransformPointer
unsigned int m_ProposalLength
void NormalizeProposalVector(const unsigned int shapeLength) const
Superclass::DerivativeValueType DerivativeValueType
Superclass::PointIterator PointIterator
const VnlVectorType * m_MeanVector
Superclass::MovingPointSetConstPointer MovingPointSetConstPointer
void UpdateCentroidAndAlignProposalDerivative(const unsigned int shapeLength) const
vnl_svd_economy< CoordRepType > PCACovarianceType
StatisticalShapePointPenalty()
Superclass::TransformType TransformType
VnlVectorType m_ProposalVector
double m_CentroidYVariance
void UpdateL2AndNormalizeProposalDerivative(const unsigned int shapeLength) const
Superclass::InputPointType InputPointType
SmartPointer< Self > Pointer
double m_ShrinkageIntensity
int m_ShapeModelCalculation
bool m_NormalizedShapeModel
double m_CentroidXVariance
void CalculateCutOffDerivative(typename DerivativeType::element_type &derivativeElement, const MeasureType &value) const
Superclass::FixedPointSetType FixedPointSetType
Superclass::TransformParametersType TransformParametersType
StatisticalShapePointPenalty(const Self &)
Superclass::MeasureType MeasureType
Superclass::DerivativeType DerivativeType
vnl_vector< CoordRepType > VnlVectorType
bool m_VariancesNeedsUpdate
void GetValueAndDerivative(const TransformParametersType ¶meters, MeasureType &Value, DerivativeType &Derivative) const override
bool m_BaseVarianceNeedsUpdate
const VnlMatrixType * m_EigenVectors
StatisticalShapePointPenalty Self
std::vector< VnlVectorType * > ProposalDerivativeType
double m_CentroidZVariance
void Initialize(void) override
VnlMatrixType * m_InverseCovarianceMatrix
VnlVectorType * m_EigenValuesRegularized
const VnlVectorType * m_EigenValues
Superclass::TransformJacobianType TransformJacobianType
bool m_ShrinkageIntensityNeedsUpdate
void CalculateDerivative(DerivativeType &derivative, const MeasureType &value, const VnlVectorType &differenceVector, const VnlVectorType ¢errotated, const VnlVectorType &eigrot, const unsigned int shapeLength) const
void FillProposalVector(const OutputPointType &fixedPoint, const unsigned int vertexindex) const
void CalculateValue(MeasureType &value, VnlVectorType &differenceVector, VnlVectorType ¢errotated, VnlVectorType &eigrot) const
void PrintSelf(std::ostream &os, Indent indent) const override
ProposalDerivativeType * m_ProposalDerivative
~StatisticalShapePointPenalty() override
const VnlMatrixType * m_CovarianceMatrix
MeasureType GetValue(const TransformParametersType ¶meters) const override
void CalculateCutOffValue(MeasureType &value) const
vnl_matrix< CoordRepType > VnlMatrixType
Superclass::OutputPointType OutputPointType
Superclass::MovingPointSetType MovingPointSetType
void GetDerivative(const TransformParametersType ¶meters, DerivativeType &Derivative) const override
void FillProposalDerivative(const OutputPointType &fixedPoint, const unsigned int vertexindex) const
void operator=(const Self &)
Superclass::FixedPointSetConstPointer FixedPointSetConstPointer
void UpdateL2(const unsigned int shapeLength) const
VnlVectorType m_MeanValues
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType