Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _MITKOCLBINARYTHRESHOLDIMAGEFILTER_H_
18 #define _MITKOCLBINARYTHRESHOLDIMAGEFILTER_H_
19 
21 #include <itkObject.h>
22 
23 namespace mitk
24 {
25 class OclImageToImageFilter;
26 
35 class MITKOPENCL_EXPORT OclBinaryThresholdImageFilter : public OclImageToImageFilter, public itk::Object
36 {
37 
38 public:
40  itkNewMacro(Self);
41 
47  void SetInput(Image::Pointer image);
48 
50  void Update();
51 
55  void SetLowerThreshold( int lowerThreshold )
56  {
57  this->m_LowerThreshold = lowerThreshold;
58  }
59 
63  void SetUpperThreshold( int upperThreshold )
64  {
65  this->m_UpperThreshold = upperThreshold;
66  }
67 
72  void SetOutsideValue( int outsideValue )
73  {
74  this->m_OutsideValue = outsideValue;
75  }
76 
80  void SetInsideValue( int insideValue )
81  {
82  this->m_InsideValue = insideValue;
83  }
84 
85 protected:
86 
89 
92 
94  bool Initialize();
95 
96  void Execute();
97 
99  {
100  return mitk::MakeScalarPixelType<unsigned char>();
101  }
102 
104  {
105  return sizeof(unsigned char);
106  }
107 
108  virtual us::Module* GetModule();
109 
110 private:
112  cl_kernel m_ckBinaryThreshold;
113 
114  int m_LowerThreshold;
115 
116  int m_UpperThreshold;
117 
118  int m_InsideValue;
119 
120  int m_OutsideValue;
121 };
122 }
123 
124 
125 #endif
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:35
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:53
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:55