#include "model/processor/strategies/Rejection.h" #include "model/processor/BIP.h" #include #include Rejection::Rejection(const Context context, const QString kernelPath) : IProcessStrategy(context, kernelPath, "Rejection", Q_NULLPTR), _kernelFunctor(KernelFunctor(_kernel)) { } void Rejection::cpuProcess(ScenGenOutput_t parameters) { //_rejectionThr = parameters.rejectThreshold.value; } void Rejection::finalize() { } Image* Rejection::processKernel(Image *frames, Buffer* scratchPad) { Context context = _openCLHelper.getContext(); auto format = frames->getImageInfo(); auto width = frames->getImageInfo(); auto height = frames->getImageInfo(); auto imageOutput = new Image2D(context, CL_MEM_READ_WRITE, ImageFormat(format.image_channel_order, format.image_channel_data_type), width, height); cl::EnqueueArgs eargs(BIP::getInstance()->CLQueue, cl::NDRange(width, height)); _openCLHelper.runKernelFunctor(_kernelFunctor, eargs, *static_cast(frames), *imageOutput, _kernelParameters); delete frames; return imageOutput; }