Medical Imaging Interaction Toolkit  2023.04.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 
50  mitk::Image::ConstPointer GetMask() override;
51 
56  void SetTimeStep(unsigned int timeStep) override;
57 
58 protected:
60  m_IgnoredPixelValue(std::numeric_limits<RealType>::min())
61  {
62  m_TimeStep = 0;
63  m_InternalMaskUpdateTime = 0;
64  m_InternalMask = mitk::Image::New();
65  }
66 
68 
69  template <typename TPixel, unsigned int VImageDimension>
70  void InternalCalculateMask(typename itk::Image<TPixel, VImageDimension>* image);
71 
72 private:
73  bool IsUpdateRequired() const;
74 
75  mitk::Image::Pointer m_InternalMask;
76  RealType m_IgnoredPixelValue;
77  unsigned long m_InternalMaskUpdateTime;
78 
79 
80 };
81 
82 }
83 
84 #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::Image::New
static Pointer New()
mitk::IgnorePixelMaskGenerator::RealType
double RealType
Definition: mitkIgnorePixelMaskGenerator.h:36
mitk::IgnorePixelMaskGenerator::IgnorePixelMaskGenerator
IgnorePixelMaskGenerator()
Definition: mitkIgnorePixelMaskGenerator.h:59
itk::SmartPointer< Self >
mitk::IgnorePixelMaskGenerator::~IgnorePixelMaskGenerator
~IgnorePixelMaskGenerator() override
Definition: mitkIgnorePixelMaskGenerator.h:67
mitk
DataCollection - Class to facilitate loading/accessing structured data.
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