ANIMA  4.0
animaT1SERelaxometryCostFunction.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <itkSingleValuedCostFunction.h>
4 #include "AnimaRelaxometryExport.h"
5 
6 namespace anima
7 {
8 
9 class ANIMARELAXOMETRY_EXPORT T1SERelaxometryCostFunction :
10 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(T1SERelaxometryCostFunction, Superclass)
23 
24  typedef Superclass::MeasureType MeasureType;
25  typedef Superclass::DerivativeType DerivativeType;
26  typedef Superclass::ParametersType ParametersType;
27  typedef std::vector < std::complex <double> > ComplexVectorType;
28  typedef std::vector <ComplexVectorType> MatrixType;
29 
30  virtual MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE;
31  virtual void GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const ITK_OVERRIDE;
32 
33  void SetRelaxometrySignals(std::vector <double> & relaxoSignals) {m_RelaxometrySignals = relaxoSignals;}
34  void SetTRValues(std::vector <double> & trValues) {m_TRValues = trValues;}
35 
36  unsigned int GetNumberOfParameters() const ITK_OVERRIDE
37  {
38  return 2;
39  }
40 
41 protected:
43  {
44  }
45 
47 
48 private:
49  T1SERelaxometryCostFunction(const Self&); //purposely not implemented
50  void operator=(const Self&); //purposely not implemented
51 
52  std::vector <double> m_RelaxometrySignals;
53  std::vector <double> m_TRValues;
54 };
55 
56 } // end namespace anima
STL namespace.
void SetTRValues(std::vector< double > &trValues)
unsigned int GetNumberOfParameters() const ITK_OVERRIDE
std::vector< std::complex< double > > ComplexVectorType