Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkIgnorePixelMaskGenerator.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 mitkIgnorePixelMaskGenerator_h
14 #define mitkIgnorePixelMaskGenerator_h
15 
16 #include <mitkImage.h>
18 #include <mitkMaskGenerator.h>
19 #include <limits>
20 #include <itkImage.h>
21 
22 
23 namespace mitk
24 {
29 {
30 public:
36  typedef double RealType;
37 
39  itkNewMacro(Self);
41 
45  void SetIgnoredPixelValue(RealType pixelValue);
46 
47  unsigned int GetNumberOfMasks() const override;
48 
49 protected:
51  m_IgnoredPixelValue(std::numeric_limits<RealType>::min()), m_InternalMaskUpdateTime(0)
52  {
53  }
54 
55  ~IgnorePixelMaskGenerator() = default;
56 
57  mitk::Image::ConstPointer DoGetMask(unsigned int maskID) override;
58 
59  template <typename TPixel, unsigned int VImageDimension>
60  void InternalCalculateMask(const itk::Image<TPixel, VImageDimension>* image);
61 
62 private:
63  bool IsUpdateRequired() const;
64 
65  mitk::Image::Pointer m_InternalMask;
66  RealType m_IgnoredPixelValue;
67  unsigned long m_InternalMaskUpdateTime;
68 
69 
70 };
71 
72 }
73 
74 #endif
mitk::IgnorePixelMaskGenerator
The IgnorePixelMaskGenerator class is used to generate a mask that is zero for specific pixel values ...
Definition: mitkIgnorePixelMaskGenerator.h:28
mitk::IgnorePixelMaskGenerator::Superclass
MaskGenerator Superclass
Definition: mitkIgnorePixelMaskGenerator.h:33
mitkImage.h
mitk::IgnorePixelMaskGenerator::RealType
double RealType
Definition: mitkIgnorePixelMaskGenerator.h:36
mitk::IgnorePixelMaskGenerator::IgnorePixelMaskGenerator
IgnorePixelMaskGenerator()
Definition: mitkIgnorePixelMaskGenerator.h:50
itk::SmartPointer< Self >
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkMaskGenerator.h
mitk::IgnorePixelMaskGenerator::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: mitkIgnorePixelMaskGenerator.h:35
MITKIMAGESTATISTICS_EXPORT
#define MITKIMAGESTATISTICS_EXPORT
Definition: MitkImageStatisticsExports.h:15
mitk::IgnorePixelMaskGenerator::Self
IgnorePixelMaskGenerator Self
Definition: mitkIgnorePixelMaskGenerator.h:32
MitkImageStatisticsExports.h
mitk::IgnorePixelMaskGenerator::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkIgnorePixelMaskGenerator.h:34
mitk::MaskGenerator
Base Class for all Mask Generators. Mask generators are classes that provide functionality for the cr...
Definition: mitkMaskGenerator.h:30