18 #ifndef itkGPUBinaryThresholdImageFilter_h
19 #define itkGPUBinaryThresholdImageFilter_h
32 template<
typename TInput,
typename TOutput >
49 m_LowerThreshold = thresh;
53 m_UpperThreshold = thresh;
57 m_InsideValue = value;
61 m_OutsideValue = value;
68 KernelManager->SetKernelArg(KernelHandle, 0,
sizeof(TInput), &(m_LowerThreshold) );
69 KernelManager->SetKernelArg(KernelHandle, 1,
sizeof(TInput), &(m_UpperThreshold) );
70 KernelManager->SetKernelArg(KernelHandle, 2,
sizeof(TOutput), &(m_InsideValue) );
71 KernelManager->SetKernelArg(KernelHandle, 3,
sizeof(TOutput), &(m_OutsideValue) );
94 template<
typename TInputImage,
typename TOutputImage >
98 Functor::GPUBinaryThreshold<
99 typename TInputImage::PixelType,
100 typename TOutputImage::PixelType >,
101 BinaryThresholdImageFilter<TInputImage, TOutputImage> >
110 typename TInputImage::PixelType,
111 typename TOutputImage::PixelType >,
131 itkGetOpenCLSourceFromKernelMacro(GPUBinaryThresholdImageFilterKernel);
143 void GPUGenerateData()
override;
169 return "A Factory for GPUBinaryThresholdImageFilter";
174 itkFactorylessNewMacro(
Self);
188 #define OverrideThresholdFilterTypeMacro(ipt,opt,dm) \
190 using InputImageType = itk::Image<ipt,dm>; \
191 using OutputImageType = itk::Image<opt,dm>; \
192 this->RegisterOverride( \
193 typeid(itk::BinaryThresholdImageFilter<InputImageType,OutputImageType>).name(), \
194 typeid(itk::GPUBinaryThresholdImageFilter<InputImageType,OutputImageType>).name(), \
195 "GPU Binary Threshold Image Filter Override", \
197 itk::CreateObjectFunction<GPUBinaryThresholdImageFilter<InputImageType,OutputImageType> >::New() ); \
232 #ifndef ITK_MANUAL_INSTANTIATION
233 #include "itkGPUBinaryThresholdImageFilter.hxx"
void SetOutsideValue(const TOutput &value)
Light weight base class for most itk classes.
#define ITK_SOURCE_VERSION
Define numeric traits for std::vector.
const char * GetITKSourceVersion() const override
int SetGPUKernelArguments(GPUKernelManager::Pointer KernelManager, int KernelHandle)
Base class for all process objects that output image data.
Create instances of classes using an object factory.
void SetInsideValue(const TOutput &value)
itkGPUKernelClassMacro(GPUImageOpsKernel)
void SetLowerThreshold(const TInput &thresh)
GPU version of binary threshold image filter.
Binarize an input image by thresholding.
Base functor class for GPU functor image filters.
static void RegisterOneFactory()
GPUBinaryThresholdImageFilterFactory Self
Decorates any "simple" data type (data types without smart pointers) with a DataObject API...
typename TInputImage::PixelType InputPixelType
const char * GetDescription() const override
#define OverrideThresholdFilterTypeMacro(ipt, opt, dm)
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionType where=INSERT_AT_BACK, vcl_size_t position=0)
~GPUBinaryThresholdImageFilter() override
Implements pixel-wise generic operation on one image using the GPU.
typename TOutputImage::PixelType OutputPixelType
void SetUpperThreshold(const TInput &thresh)
GPUBinaryThresholdImageFilterFactory()