Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
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 MITKIGNOREPIXELMASKGEN_
14 #define MITKIGNOREPIXELMASKGEN_
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
The IgnorePixelMaskGenerator class is used to generate a mask that is zero for specific pixel values ...
itk::SmartPointer< const Self > ConstPointer
Base Class for all Mask Generators. Mask generators are classes that provide functionality for the cr...
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKIMAGESTATISTICS_EXPORT
static Pointer New()