Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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(const Image* image, unsigned int bins);
37  void InitializeByImageAndMaximum(const Image* image, double maximum, unsigned int bins);
38  void InitializeByImageAndMinimum(const Image* image, double minimum, unsigned int bins);
39  void InitializeByImageRegion(const Image* image, const Image* mask, unsigned int bins);
40  void InitializeByImageRegionAndMinimum(const Image* image, const Image* mask, double minimum, unsigned int bins);
41  void InitializeByImageRegionAndMaximum(const Image* image, const Image* mask, double maximum, unsigned int bins);
42  void InitializeByImageAndBinsize(const Image* image, double binsize);
43  void InitializeByImageAndBinsizeAndMinimum(const Image* image, double minimum, double binsize);
44  void InitializeByImageAndBinsizeAndMaximum(const Image* image, double maximum, double binsize);
45  void InitializeByImageRegionAndBinsize(const Image* image, const Image* mask, double binsize);
46  void InitializeByImageRegionAndBinsizeAndMinimum(const Image* image, const Image* mask, double minimum, double binsize);
47  void InitializeByImageRegionAndBinsizeAndMaximum(const Image* image, const Image* 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
mitk::IntensityQuantifier::VerifyRequestedRegion
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
Definition: mitkIntensityQuantifier.h:66
mitk::TimeGeometry
Definition: mitkTimeGeometry.h:43
mitkImage.h
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
mitk::IntensityQuantifier::IsEmpty
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...
Definition: mitkIntensityQuantifier.h:70
mitk::IntensityQuantifier::SetRequestedRegionToLargestPossibleRegion
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
Definition: mitkIntensityQuantifier.h:64
MITKCLCORE_EXPORT
#define MITKCLCORE_EXPORT
Definition: MitkCLCoreExports.h:15
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::IntensityQuantifier::SetRequestedRegion
void SetRequestedRegion(const itk::DataObject *) override
Set the requested region from this data object to match the requested region of the data object passe...
Definition: mitkIntensityQuantifier.h:67
mitk::IntensityQuantifier::RequestedRegionIsOutsideOfTheBufferedRegion
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
Definition: mitkIntensityQuantifier.h:65
mitk::IntensityQuantifier
Definition: mitkIntensityQuantifier.h:24
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
MitkCLCoreExports.h
mitkBaseData.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36