Medical Imaging Interaction Toolkit  2023.12.00
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
mitk::OclBinaryThresholdImageFilter::SetUpperThreshold
void SetUpperThreshold(int upperThreshold)
Definition: mitkOclBinaryThresholdImageFilter.h:59
mitk::OclBinaryThresholdImageFilter::SetLowerThreshold
void SetLowerThreshold(int lowerThreshold)
Definition: mitkOclBinaryThresholdImageFilter.h:51
mitkOclImageToImageFilter.h
itk::SmartPointer< Self >
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::OclBinaryThresholdImageFilter::GetOutputType
mitk::PixelType GetOutputType()
(Virtual) method returning the format in which the output image will be returned
Definition: mitkOclBinaryThresholdImageFilter.h:94
us::Module
Definition: usModule.h:78
mitk::PixelType
Class for defining the data type of pixels.
Definition: mitkPixelType.h:51
mitk::OclBinaryThresholdImageFilter::SetOutsideValue
void SetOutsideValue(int outsideValue)
Definition: mitkOclBinaryThresholdImageFilter.h:68
mitk::OclBinaryThresholdImageFilter
The OclBinaryThresholdImageFilter computes a binary segmentation based on given threshold values.
Definition: mitkOclBinaryThresholdImageFilter.h:31
mitk::OclBinaryThresholdImageFilter::GetBytesPerElem
int GetBytesPerElem()
Get the memory size needed for each element.
Definition: mitkOclBinaryThresholdImageFilter.h:99
mitk::OclImageToImageFilter
The OclImageToImageFilter is the base class for all OpenCL image filter generating images.
Definition: mitkOclImageToImageFilter.h:26
mitk::OclBinaryThresholdImageFilter::SetInsideValue
void SetInsideValue(int insideValue)
Definition: mitkOclBinaryThresholdImageFilter.h:76