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