/*============================================================================

The Medical Imaging Interaction Toolkit (MITK)

Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.

Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.

============================================================================*/

#ifndef mitkTwoTissueCompartmentFDGModel_h
#define mitkTwoTissueCompartmentFDGModel_h

#include <mitkAIFBasedModelBase.h>
#include <MitkPharmacokineticsExports.h>


namespace mitk
{
  /**
   * \brief Implementation of the irreversible two-tissue compartment model for FDG PET pharmacokinetics.
   *
   * Models the irreversible uptake of FDG with parameters K1 (plasma-to-tissue influx),
   * k2 (tissue-to-plasma efflux), k3 (phosphorylation rate), and vb (blood volume fraction).
   * Unlike the full two-tissue compartment model, k4 is assumed to be zero (irreversible trapping).
   *
   * \sa TwoTissueCompartmentModel, OneTissueCompartmentModel, AIFBasedModelBase
   */
  class MITKPHARMACOKINETICS_EXPORT TwoTissueCompartmentFDGModel : public AIFBasedModelBase
  {

  public:
    typedef TwoTissueCompartmentFDGModel Self;
    typedef AIFBasedModelBase Superclass;
    typedef itk::SmartPointer< Self >                            Pointer;
    typedef itk::SmartPointer< const Self >                      ConstPointer;

    /** Method for creation through the object factory. */
    itkFactorylessNewMacro(Self);
    itkCloneMacro(Self);

    /** Run-time type information (and related methods). */
    itkTypeMacro(TwoTissueCompartmentFDGModel, ModelBase);

    /** Model Specifications */
    static const std::string MODEL_DISPLAY_NAME;

    static const std::string NAME_PARAMETER_K1;
    static const std::string NAME_PARAMETER_k2;
    static const std::string NAME_PARAMETER_k3;
    static const std::string NAME_PARAMETER_vb;

    static const std::string UNIT_PARAMETER_K1;
    static const std::string UNIT_PARAMETER_k2;
    static const std::string UNIT_PARAMETER_k3;
    static const std::string UNIT_PARAMETER_vb;

    static const unsigned int POSITION_PARAMETER_K1;
    static const unsigned int POSITION_PARAMETER_k2;
    static const unsigned int POSITION_PARAMETER_k3;
    static const unsigned int POSITION_PARAMETER_vb;

    static const unsigned int NUMBER_OF_PARAMETERS;

    static const std::string MODEL_TYPE;

    std::string GetModelDisplayName() const override;

    std::string GetModelType() const override;

    ParameterNamesType GetParameterNames() const override;
    ParametersSizeType  GetNumberOfParameters() const override;

    ParamterUnitMapType GetParameterUnits() const override;


  protected:
    TwoTissueCompartmentFDGModel();
    ~TwoTissueCompartmentFDGModel() override;

    TwoTissueCompartmentFDGModel(const TwoTissueCompartmentFDGModel& source);

    mitkCloneMacro(TwoTissueCompartmentFDGModel);

    ModelResultType ComputeModelfunction(const ParametersType& parameters) const override;

    void PrintSelf(std::ostream& os, ::itk::Indent indent) const override;

  private:

    void operator=(const Self&);  //purposely not implemented

  };
}

#endif
