ANIMA  4.0
animaGaussianMCMCost.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vnl/vnl_matrix.h>
4 #include <vnl/vnl_diag_matrix.h>
5 
6 #include <animaBaseMCMCost.h>
7 
9 #include <AnimaMCMExport.h>
10 
11 namespace anima
12 {
13 
18 class ANIMAMCM_EXPORT GaussianMCMCost : public anima::BaseMCMCost
19 {
20 public:
24  typedef itk::SmartPointer<Self> Pointer;
25  typedef itk::SmartPointer<const Self> ConstPointer;
26 
27  itkNewMacro(Self)
28 
29 
30  itkTypeMacro(GaussianMCMCost, anima::BaseMCMCost)
31 
32 
33  MeasureType GetValues(const ParametersType &parameters) ITK_OVERRIDE;
34 
36  double GetCurrentCostValue() ITK_OVERRIDE;
37 
39  void GetDerivativeMatrix(const ParametersType &parameters, DerivativeMatrixType &derivative) ITK_OVERRIDE;
40 
42  void GetCurrentDerivative(DerivativeMatrixType &derivativeMatrix, DerivativeType &derivative) ITK_OVERRIDE;
43 
44  void SetMarginalEstimation(bool val) {m_MarginalEstimation = val;}
45 
46 protected:
48  {
49  m_MarginalEstimation = false;
50  }
51 
52  virtual ~GaussianMCMCost() {}
53 
54 private:
55  GaussianMCMCost(const Self&); //purposely not implemented
56  void operator=(const Self&); //purposely not implemented
57 
59  bool m_MarginalEstimation;
60 
61  MeasureType m_Residuals;
62 };
63 
64 } // end namespace anima
itk::OptimizerParameters< double > ParametersType
itk::SmartPointer< Self > Pointer
Base cost function class to handle maximum likelihood estimation.
anima::BaseMCMCost Superclass
itk::SmartPointer< const Self > ConstPointer
itk::Array2D< double > DerivativeMatrixType
Class for computing marginal and profile costs and derivatives. This is not thread safe at all so be ...
itk::Array< double > DerivativeType