Medical Imaging Interaction Toolkit  2021.02.99-9e0e53e2
Medical Imaging Interaction Toolkit
mitkOclBinaryThresholdImageFilter.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 _MITKOCLBINARYTHRESHOLDIMAGEFILTER_H_
14 #define _MITKOCLBINARYTHRESHOLDIMAGEFILTER_H_
15 
17 #include <itkObject.h>
18 
19 namespace mitk
20 {
21 class OclImageToImageFilter;
22 
31 class MITKOPENCL_EXPORT OclBinaryThresholdImageFilter : public OclImageToImageFilter, public itk::Object
32 {
33 
34 public:
36  itkNewMacro(Self);
37 
43  void SetInput(Image::Pointer image);
44 
46  void Update();
47 
51  void SetLowerThreshold( int lowerThreshold )
52  {
53  this->m_LowerThreshold = lowerThreshold;
54  }
55 
59  void SetUpperThreshold( int upperThreshold )
60  {
61  this->m_UpperThreshold = upperThreshold;
62  }
63 
68  void SetOutsideValue( int outsideValue )
69  {
70  this->m_OutsideValue = outsideValue;
71  }
72 
76  void SetInsideValue( int insideValue )
77  {
78  this->m_InsideValue = insideValue;
79  }
80 
81 protected:
82 
85 
88 
90  bool Initialize();
91 
92  void Execute();
93 
95  {
96  return mitk::MakeScalarPixelType<unsigned char>();
97  }
98 
100  {
101  return sizeof(unsigned char);
102  }
103 
104  virtual us::Module* GetModule();
105 
106 private:
108  cl_kernel m_ckBinaryThreshold;
109 
110  int m_LowerThreshold;
111 
112  int m_UpperThreshold;
113 
114  int m_InsideValue;
115 
116  int m_OutsideValue;
117 };
118 }
119 
120 
121 #endif
DataCollection - Class to facilitate loading/accessing structured data.
int GetBytesPerElem()
Get the memory size needed for each element.
The OclImageToImageFilter is the base class for all OpenCL image filter generating images...
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
The OclBinaryThresholdImageFilter computes a binary segmentation based on given threshold values...
mitk::PixelType GetOutputType()
(Virtual) method returning the format in which the output image will be returned
Class for defining the data type of pixels.
Definition: mitkPixelType.h:51