Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
Medical Imaging Interaction Toolkit
mitkTwoCompartmentExchangeModelFactoryBase.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef MITKTWOCOMPARTMENTEXCHANGEMODELFACTORYBASE_H
13 #define MITKTWOCOMPARTMENTEXCHANGEMODELFACTORYBASE_H
14 
18 
19 namespace mitk
20 {
21  template <class TModelParameterizer>
23  mitk::ConcreteAIFBasedModelFactory< TModelParameterizer >
24  {
25  public:
28  itkFactorylessNewMacro(Self);
29 
30 
31  typedef typename Superclass::ModelType ModelType;
32  typedef typename Superclass::ModelParameterizerType ModelParameterizerType;
33  typedef typename Superclass::ParametersType ParametersType;
34 
36  {
38 
39  constraints->SetLowerBarrier(ModelType::POSITION_PARAMETER_ve, 0.0);
40  constraints->SetUpperBarrier(ModelType::POSITION_PARAMETER_ve, 1.0);
41  constraints->SetLowerBarrier(ModelType::POSITION_PARAMETER_vp, 0.0);
42  constraints->SetUpperBarrier(ModelType::POSITION_PARAMETER_vp, 1.0);
43 
45  indices.push_back(ModelType::POSITION_PARAMETER_ve);
46  indices.push_back(ModelType::POSITION_PARAMETER_vp);
47 
48  constraints->SetUpperSumBarrier(indices, 1.0);
49 
50  return constraints.GetPointer();
51  };
52 
53  ParametersType GetDefaultInitialParameterization() const override
54  {
55  typename ModelParameterizerType::Pointer modelParameterizer =
56  ModelParameterizerType::New();
57 
58  return modelParameterizer->GetDefaultInitialParameterization();
59  };
60 
61  protected:
62 
64  {
65  };
66 
68  {
69  };
70 
71  private:
72 
73  //No copy constructor allowed
74  TwoCompartmentExchangeModelFactoryBase(const Self& source);
75  void operator=(const Self&); //purposely not implemented
76  };
77 
78 }
79 #endif // MITKTWOCOMPARTMENTEXCHANGEMODELFACTORY_H
mitkClassMacro(TwoCompartmentExchangeModelFactoryBase, ConcreteAIFBasedModelFactory< TModelParameterizer >)
DataCollection - Class to facilitate loading/accessing structured data.
std::vector< ParameterIndexType > ParameterIndexVectorType
ConstraintCheckerBase::Pointer CreateDefaultConstraints() const override