/** * @brief FilterMax * @param kernelSize */ FilterGLMax(int kernelSize) : FilterGLNPasses() { filter = new FilterGLNonLinear1D(kernelSize, "max", GL_TEXTURE_2D); insertFilter(filter); insertFilter(filter); }
PIC_INLINE FilterGLBilateral2DSP::FilterGLBilateral2DSP(): FilterGLNPasses() { target = GL_TEXTURE_2D; filter = new FilterGLBilateral1D(1.0f, 0.01f, 0, GL_TEXTURE_2D); insertFilter(filter); insertFilter(filter); }
/** * @brief FilterDCT2D * @param nCoeff * @param bForward */ FilterDCT2D(int nCoeff, bool bForward) { //DCT 1D filter fltDCT1D = new FilterDCT1D(nCoeff, bForward); insertFilter(fltDCT1D); insertFilter(fltDCT1D); }
PIC_INLINE FilterGLBilateral2DSP::FilterGLBilateral2DSP(float sigma_s, float sigma_r): FilterGLNPasses() { target = GL_TEXTURE_2D; filter = new FilterGLBilateral1D(sigma_s, sigma_r, 0, GL_TEXTURE_2D); insertFilter(filter); insertFilter(filter); }
PIC_INLINE FilterGLBilateral3DSP::FilterGLBilateral3DSP(float sigma_s, float sigma_r, float sigma_t): FilterGLNPasses() { target = GL_TEXTURE_2D_ARRAY; filterS = new FilterGLBilateral1D(sigma_s, sigma_r, 0, target); filterT = new FilterGLBilateral1D(sigma_t, sigma_r, 0, target); insertFilter(filterS); insertFilter(filterS); insertFilter(filterT); }
/** * @brief FilterMean * @param size */ FilterMean(int size) : FilterNPasses() { data = NULL; this->size = -1; update(size); filter = new FilterConv1D(data, size); insertFilter(filter); insertFilter(filter); }
int FilterManager::insertFilter(Filter* filter, std::string targetID) { if (fmMode != 1) { return 4; } else { std::string generatedID = StringTools::intToStr(autoID++) + " " + filter->getID(); int event = insertFilter(generatedID, filter, targetID); return event; } }
int FilterManager::replaceFilter(std::string filterID, Filter* filter, std::string targetID) { int event = 0; if (targetID == "FRONT") { targetID = filterChain->getFront()->nodeID; } else if (targetID == "REAR") { targetID = filterChain->getRear()->nodeID; } event = insertFilter(filterID, filter, targetID); if (event != 0) { return event; } event = deleteFilter(targetID); return event; }
int FilterManager::insertFilter(std::string filterID, Filter* filter) { int event; std::string targetID = "REAR"; event = insertFilter(filterID, filter, targetID); return event; }