Medical Imaging Interaction Toolkit  2018.4.99-6ca56567
Medical Imaging Interaction Toolkit
mitkIntensityQuantifier.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 
14 #ifndef mitkIntensityQuantifier_h
15 #define mitkIntensityQuantifier_h
16 
17 #include <MitkCLCoreExports.h>
18 
19 #include <mitkBaseData.h>
20 #include <mitkImage.h>
21 
22 namespace mitk
23 {
25 {
26 public:
28  itkFactorylessNewMacro(Self);
29  itkCloneMacro(Self);
30 
32 
33  void InitializeByMinimumMaximum(double minimum, double maximum, unsigned int bins);
34  void InitializeByBinsizeAndBins(double minimum, unsigned int bins, double binsize);
35  void InitializeByBinsizeAndMaximum(double minimum, double maximum, double binsize);
36  void InitializeByImage(mitk::Image::Pointer image, unsigned int bins);
37  void InitializeByImageAndMaximum(mitk::Image::Pointer image, double maximum, unsigned int bins);
38  void InitializeByImageAndMinimum(mitk::Image::Pointer image, double minimum, unsigned int bins);
39  void InitializeByImageRegion(mitk::Image::Pointer image, mitk::Image::Pointer mask, unsigned int bins);
40  void InitializeByImageRegionAndMinimum(mitk::Image::Pointer image, mitk::Image::Pointer mask, double minimum, unsigned int bins);
41  void InitializeByImageRegionAndMaximum(mitk::Image::Pointer image, mitk::Image::Pointer mask, double maximum, unsigned int bins);
42  void InitializeByImageAndBinsize(mitk::Image::Pointer image, double binsize);
43  void InitializeByImageAndBinsizeAndMinimum(mitk::Image::Pointer image, double minimum, double binsize);
44  void InitializeByImageAndBinsizeAndMaximum(mitk::Image::Pointer image, double maximum, double binsize);
45  void InitializeByImageRegionAndBinsize(mitk::Image::Pointer image, mitk::Image::Pointer mask, double binsize);
46  void InitializeByImageRegionAndBinsizeAndMinimum(mitk::Image::Pointer image, mitk::Image::Pointer mask, double minimum, double binsize);
47  void InitializeByImageRegionAndBinsizeAndMaximum(mitk::Image::Pointer image, mitk::Image::Pointer mask, double maximum, double binsize);
48 
49  unsigned int IntensityToIndex(double intensity);
50  double IndexToMinimumIntensity(unsigned int index);
51  double IndexToMeanIntensity(unsigned int index);
52  double IndexToMaximumIntensity(unsigned int index);
53 
54  itkGetConstMacro(Initialized, bool);
55  itkGetConstMacro(Bins, unsigned int);
56  itkGetConstMacro(Binsize, double);
57  itkGetConstMacro(Minimum, double);
58  itkGetConstMacro(Maximum, double);
59 
60 public:
61 
62 //#ifndef DOXYGEN_SKIP
63 
65  bool RequestedRegionIsOutsideOfTheBufferedRegion() override { return true; };
66  bool VerifyRequestedRegion() override { return false; };
67  void SetRequestedRegion (const itk::DataObject * /*data*/) override {};
68 
69  // Override
70  bool IsEmpty() const override
71  {
72  if(IsInitialized() == false)
73  return true;
74  const TimeGeometry* timeGeometry = const_cast<IntensityQuantifier*>(this)->GetUpdatedTimeGeometry();
75  if(timeGeometry == nullptr)
76  return true;
77  return false;
78  }
79 
80 
81 private:
82  bool m_Initialized;
83  unsigned int m_Bins;
84  double m_Binsize;
85  double m_Minimum;
86  double m_Maximum;
87 
88 };
89 }
90 
91 #endif //mitkIntensityQuantifier_h
void SetRequestedRegion(const itk::DataObject *) override
Set the requested region from this data object to match the requested region of the data object passe...
Base of all data objects.
Definition: mitkBaseData.h:42
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKCLCORE_EXPORT
bool IsEmpty() const override
Check whether object contains data (at least at one point in time), e.g., a set of points may be empt...
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
mitk::Image::Pointer image
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
mitk::Image::Pointer mask