Medical Imaging Interaction Toolkit  2024.06.00
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 mitkMaskedDynamicImageStatisticsGenerator_h
14 #define mitkMaskedDynamicImageStatisticsGenerator_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
mitk::MaskedDynamicImageStatisticsGenerator::ResultType
itk::Array< double > ResultType
Definition: mitkMaskedDynamicImageStatisticsGenerator.h:35
mitkImage.h
MitkModelFitExports.h
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< const Self >
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
MITKMODELFIT_EXPORT
#define MITKMODELFIT_EXPORT
Definition: MitkModelFitExports.h:15
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::MaskedDynamicImageStatisticsGenerator::m_GenerationTimeStamp
itk::TimeStamp m_GenerationTimeStamp
Definition: mitkMaskedDynamicImageStatisticsGenerator.h:65
mitk::MaskedDynamicImageStatisticsGenerator
Definition: mitkMaskedDynamicImageStatisticsGenerator.h:30