ANIMA  4.0
animaGaussianMCMVariableProjectionMultipleValuedCostFunction.cxx
Go to the documentation of this file.
2 
3 namespace anima
4 {
5 
6 unsigned int
9 {
10  if (!m_InternalCost)
11  itkExceptionMacro("Internal variable projection cost required to get number of parameters");
12 
13  return m_InternalCost->GetNumberOfParameters();
14 }
15 
16 unsigned int
19 {
20  if (!m_InternalCost)
21  itkExceptionMacro("Internal variable projection cost required to get number of parameters");
22 
23  return m_InternalCost->GetNumberOfObservations();
24 }
25 
28 ::GetValue(const ParametersType &parameters) const
29 {
30  if (!m_InternalCost)
31  itkExceptionMacro("Internal variable projection cost required to compute cost value");
32 
33  return m_InternalCost->GetValues(parameters);
34 }
35 
36 void
38 ::GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const
39 {
40  if (!m_InternalCost)
41  itkExceptionMacro("Internal variable projection cost required to compute cost derivatives");
42 
43  m_InternalCost->GetDerivativeMatrix(parameters,derivative);
44 }
45 
46 double
49 {
50  return m_InternalCost->GetSigmaSquare();
51 }
52 
53 std::vector <double> &
56 {
57  return m_InternalCost->GetOptimalWeights();
58 }
59 
60 } // end namespace anima
virtual void GetDerivative(const ParametersType &parameters, DerivativeType &derivative) const ITK_OVERRIDE
virtual MeasureType GetValue(const ParametersType &parameters) const ITK_OVERRIDE