Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkPixelBasedDescriptionParameterImageGenerator.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 
13 #ifndef __MITK_PIXEL_BASED_DESCRIPTION_PARAMETER_IMAGE_GENERATOR_H_
14 #define __MITK_PIXEL_BASED_DESCRIPTION_PARAMETER_IMAGE_GENERATOR_H_
15 
16 #include <map>
17 
18 #include <mitkImage.h>
19 
22 
24 
25 namespace mitk
26 {
27 
35  {
36  public:
38 
39  itkNewMacro(Self);
40 
41 
43  typedef std::vector<ParameterImagePixelType> FunctorValueArrayType;
44 
46 
49 
50  itkSetObjectMacro(DynamicImage, Image);
51  itkGetConstObjectMacro(DynamicImage, Image);
52 
53  itkSetObjectMacro(Mask, Image);
54  itkGetConstObjectMacro(Mask, Image);
55 
56  itkSetObjectMacro(Functor, FunctorType);
57  itkGetObjectMacro(Functor, FunctorType);
58 
59  double GetProgress() const override;
60 
61  protected:
63  {
64  m_InternalMask = nullptr;
65  m_Mask = nullptr;
66  m_DynamicImage = nullptr;
67  };
68 
70 
71  template <typename TPixel, unsigned int VDim>
72  void DoParameterCalculation(itk::Image<TPixel, VDim>* image);
73 
74  template <typename TPixel, unsigned int VDim>
75  void DoPrepareMask(itk::Image<TPixel, VDim>* image);
76 
77  void onFitProgressEvent(::itk::Object* caller, const ::itk::EventObject& eventObject);
78 
79  bool HasOutdatedResult() const override;
80  void CheckValidInputs() const override;
81  void DoParameterCalculationAndGetResults(ParameterImageMapType& parameterImages) override;
82 
83  private:
84  Image::Pointer m_DynamicImage;
85  Image::Pointer m_Mask;
86 
87  typedef itk::Image<unsigned char, 3> InternalMaskType;
88  InternalMaskType::Pointer m_InternalMask;
89 
90  FunctorType::Pointer m_Functor;
91 
92 
93  ParameterImageMapType m_TempResultMap;
94 
95  double m_Progress;
96  };
97 
98 }
99 
100 #endif // __MITK_PIXEL_BASED_DESCRIPTION_PARAMETER_IMAGE_GENERATOR_H_
double ScalarType
#define MITKPHARMACOKINETICS_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
DescriptionParameterImageGeneratorBase::ParameterNameType ParameterNameType
DescriptionParameterImageGeneratorBase::ParameterImageMapType ParameterImageMapType
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:72
CurveDescriptionParameterBase::CurveDescriptionParameterNameType ParameterNameType
mitk::Image::Pointer image
std::map< ParameterNameType, Image::Pointer > ParameterImageMapType