ANIMA  4.0
animaGaussianMCMVariableProjectionSingleValuedCostFunction.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <itkSingleValuedCostFunction.h>
5 #include <AnimaMCMExport.h>
6 
7 namespace anima
8 {
9 
10 class ANIMAMCM_EXPORT GaussianMCMVariableProjectionSingleValuedCostFunction : public itk::SingleValuedCostFunction
11 {
12 public:
15  typedef itk::SingleValuedCostFunction Superclass;
16  typedef itk::SmartPointer<Self> Pointer;
17  typedef itk::SmartPointer<const Self> ConstPointer;
18 
19  itkNewMacro(Self)
20 
21 
22  itkTypeMacro(GaussianMCMVariableProjectionSingleValuedCostFunction, itk::SingleValuedCostFunction)
23 
24  typedef Superclass::MeasureType MeasureType;
25  typedef Superclass::DerivativeType DerivativeType;
26  typedef Superclass::ParametersType ParametersType;
27 
29  typedef InternalCostType::Pointer InternalCostPointer;
30 
31  itkSetMacro(InternalCost, InternalCostPointer)
32 
33  virtual MeasureType GetValue(const ParametersType &parameters) const ITK_OVERRIDE;
34  virtual void GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const ITK_OVERRIDE;
35 
36  double GetSigmaSquare();
37  std::vector <double> &GetOptimalWeights();
38 
39  unsigned int GetNumberOfParameters() const ITK_OVERRIDE;
40 
41 protected:
43  {
44  m_InternalCost = ITK_NULLPTR;
45  }
46 
48 
49 private:
50  GaussianMCMVariableProjectionSingleValuedCostFunction(const Self&); //purposely not implemented
51  void operator=(const Self&); //purposely not implemented
52 
53  mutable InternalCostPointer m_InternalCost;
54 };
55 
56 } // end namespace anima
Class for computing variable projection costs and derivatives. Right now, it is only available for Ga...
STL namespace.