Medical Imaging Interaction Toolkit  2018.4.99-b585543d
Medical Imaging Interaction Toolkit
mitkMaskedDynamicImageStatisticsGenerator.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_MASKED_DYMAMIC_IMAGE_STATISTICS_GENERATOR_H
14 #define __MITK_MASKED_DYMAMIC_IMAGE_STATISTICS_GENERATOR_H
15 
16 #include <mitkImage.h>
17 
18 #include "MitkModelFitExports.h"
19 
20 namespace mitk
21 {
31 {
32 public:
34 
35  itkNewMacro(Self);
36 
37  typedef itk::Array<double> ResultType;
38 
39  itkSetConstObjectMacro(DynamicImage,Image);
40  itkGetConstObjectMacro(DynamicImage,Image);
41 
42  itkSetConstObjectMacro(Mask, Image);
43  itkGetConstObjectMacro(Mask, Image);
44 
45  const ResultType& GetMaximum();
46  const ResultType& GetMinimum();
47  const ResultType& GetMean();
48  const ResultType& GetSigma();
49  const ResultType& GetVariance();
50  const ResultType& GetSum();
51 
52  void Generate();
53 
54 protected:
57 
58  template <typename TPixel, unsigned int VDim>
59  void DoCalculateStatistics(const itk::Image<TPixel, VDim>* image);
60 
61  virtual void CheckValidInputs() const;
62 
63  bool HasOutdatedResults() const;
64 
65  itk::TimeStamp m_GenerationTimeStamp;
66 
67 private:
68  Image::ConstPointer m_DynamicImage;
69  Image::ConstPointer m_Mask;
70 
71  typedef itk::Image<unsigned short, 3> InternalMaskType;
72  InternalMaskType::ConstPointer m_InternalMask;
73 
74  ResultType m_Maximum;
75  ResultType m_Minimum;
76  ResultType m_Mean;
77  ResultType m_Sigma;
78  ResultType m_Variance;
79  ResultType m_Sum;
80 };
81 
82 }
83 
84 #endif // ATERIALINPUTFUNCTIONGENERATOR_H
void GetMinimum(itk::Image< TPixel, VImageDimension > *itkImage, double &minimum)
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKMODELFIT_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
Image class for storing images.
Definition: mitkImage.h:72
mitk::Image::Pointer image