18#ifndef itkGPUBinaryThresholdImageFilter_h
19#define itkGPUBinaryThresholdImageFilter_h
32template <
typename TInput,
typename TOutput>
40 m_OutsideValue = TOutput{};
49 m_LowerThreshold = thresh;
54 m_UpperThreshold = thresh;
59 m_InsideValue = value;
64 m_OutsideValue = value;
72 KernelManager->SetKernelArg(KernelHandle, 0,
sizeof(TInput), &(m_LowerThreshold));
73 KernelManager->SetKernelArg(KernelHandle, 1,
sizeof(TInput), &(m_UpperThreshold));
74 KernelManager->SetKernelArg(KernelHandle, 2,
sizeof(TOutput), &(m_InsideValue));
75 KernelManager->SetKernelArg(KernelHandle, 3,
sizeof(TOutput), &(m_OutsideValue));
81 TInput m_LowerThreshold{};
82 TInput m_UpperThreshold{};
83 TOutput m_InsideValue{};
84 TOutput m_OutsideValue{};
98template <
typename TInputImage,
typename TOutputImage>
103 Functor::GPUBinaryThreshold<typename TInputImage::PixelType, typename TOutputImage::PixelType>,
104 BinaryThresholdImageFilter<TInputImage, TOutputImage>>
175 return "A Factory for GPUBinaryThresholdImageFilter";
195#define OverrideThresholdFilterTypeMacro(ipt, opt, dm) \
197 using InputImageType = itk::Image<ipt, dm>; \
198 using OutputImageType = itk::Image<opt, dm>; \
199 this->RegisterOverride( \
200 typeid(itk::BinaryThresholdImageFilter<InputImageType, OutputImageType>).name(), \
201 typeid(itk::GPUBinaryThresholdImageFilter<InputImageType, OutputImageType>).name(), \
202 "GPU Binary Threshold Image Filter Override", \
204 itk::CreateObjectFunction<GPUBinaryThresholdImageFilter<InputImageType, OutputImageType>>::New()); \
206 ITK_MACROEND_NOOP_STATEMENT
239#ifndef ITK_MANUAL_INSTANTIATION
240# include "itkGPUBinaryThresholdImageFilter.hxx"
Binarize an input image by thresholding.
typename TInputImage::PixelType InputPixelType
typename TOutputImage::PixelType OutputPixelType
void SetLowerThreshold(const TInput &thresh)
~GPUBinaryThreshold() override=default
int SetGPUKernelArguments(GPUKernelManager::Pointer KernelManager, int KernelHandle) override
void SetUpperThreshold(const TInput &thresh)
void SetOutsideValue(const TOutput &value)
void SetInsideValue(const TOutput &value)
Base functor class for GPU functor image filters.
static void RegisterOneFactory()
const char * GetDescription() const override
GPUBinaryThresholdImageFilterFactory()
const char * GetITKSourceVersion() const override
GPU version of binary threshold image filter.
~GPUBinaryThresholdImageFilter() override=default
void GPUGenerateData() override
GPUBinaryThresholdImageFilter()
itkGetOpenCLSourceFromKernelMacro(GPUBinaryThresholdImageFilterKernel)
Implements pixel-wise generic operation on one image using the GPU.
Base class for all process objects that output image data.
Light weight base class for most itk classes.
static constexpr T NonpositiveMin()
static constexpr T max(const T &)
Create instances of classes using an object factory.
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionEnum where=InsertionPositionEnum::INSERT_AT_BACK, vcl_size_t position=0)
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
#define OverrideThresholdFilterTypeMacro(ipt, opt, dm)
#define ITK_SOURCE_VERSION
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
itkGPUKernelClassMacro(GPUImageOpsKernel)