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;
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> >
109 typename TInputImage::PixelType,
110 typename TOutputImage::PixelType >,
130 itkGetOpenCLSourceFromKernelMacro(GPUBinaryThresholdImageFilterKernel);
142 virtual void GPUGenerateData() ITK_OVERRIDE;
170 return "A Factory for GPUBinaryThresholdImageFilter";
175 itkFactorylessNewMacro(Self);
191 #define OverrideThresholdFilterTypeMacro(ipt,opt,dm) \
193 typedef itk::Image<ipt,dm> InputImageType; \
194 typedef itk::Image<opt,dm> OutputImageType; \
195 this->RegisterOverride( \
196 typeid(itk::BinaryThresholdImageFilter<InputImageType,OutputImageType>).name(), \
197 typeid(itk::GPUBinaryThresholdImageFilter<InputImageType,OutputImageType>).name(), \
198 "GPU Binary Threshold Image Filter Override", \
200 itk::CreateObjectFunction<GPUBinaryThresholdImageFilter<InputImageType,OutputImageType> >::New() ); \
235 #ifndef ITK_MANUAL_INSTANTIATION
236 #include "itkGPUBinaryThresholdImageFilter.hxx"
void SetOutsideValue(const TOutput &value)
#define ITK_SOURCE_VERSION
virtual ~GPUBinaryThresholdImageFilter() override
SimpleDataObjectDecorator< InputPixelType > InputPixelObjectType
SmartPointer< Self > Pointer
TInputImage::PixelType InputPixelType
TOutputImage::PixelType OutputPixelType
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)
SmartPointer< const Self > ConstPointer
void SetLowerThreshold(const TInput &thresh)
GPU version of binary threshold image filter.
virtual const char * GetITKSourceVersion() const override
Binarize an input image by thresholding.
static ITK_CONSTEXPR_FUNC T max(const T &)
GPUUnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::GPUBinaryThreshold< typename TInputImage::PixelType, typename TOutputImage::PixelType >, BinaryThresholdImageFilter< TInputImage, TOutputImage > > GPUSuperclass
Base functor class for GPU functor image filters.
Decorates any "simple" data type (data types without smart pointers) with a DataObject API...
GPUBinaryThresholdImageFilter Self
SmartPointer< const Self > ConstPointer
GPUBinaryThresholdImageFilterFactory Self
ObjectFactoryBase Superclass
SmartPointer< Self > Pointer
const char * GetDescription() const override
static ITK_CONSTEXPR_FUNC T NonpositiveMin()
static void RegisterOneFactory(void)
#define OverrideThresholdFilterTypeMacro(ipt, opt, dm)
BinaryThresholdImageFilter< TInputImage, TOutputImage > CPUSuperclass
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionType where=INSERT_AT_BACK, vcl_size_t position=0)
Implements pixel-wise generic operation on one image using the GPU.
void SetUpperThreshold(const TInput &thresh)
GPUBinaryThresholdImageFilterFactory()