ANIMA  4.0
animaMCMMultipleValuedCostFunction.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 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 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 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 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 } // end namespace anima
virtual void GetDerivative(const ParametersType &parameters, DerivativeType &derivative) const ITK_OVERRIDE
virtual MeasureType GetValue(const ParametersType &parameters) const ITK_OVERRIDE
unsigned int GetNumberOfParameters() const ITK_OVERRIDE