reb
Class REB_EdgeDetectFilter

Object
  extended by common:Generic
      extended by dmj5:DMJ_ConvolutionFilter
          extended by reb:REB_EdgeDetectFilter

class 
DMJ_ConvolutionFilter:REB_EdgeDetectFilter

Basic Edge detection filter.


Ultra Fractal Source

Toggle UF Source Code Display

 class REB_EdgeDetectFilter(dmj5.ulb:DMJ_ConvolutionFilter) {
   ; Basic Edge detection filter. <br>
     
 public:
   import "common.ulb"
   import "dmj5.ulb"
   
   ; contructor
   func REB_EdgeDetectFilter(Generic pparent)
     DMJ_ConvolutionFilter.DMJ_ConvolutionFilter(pparent)
     
     int count = (@p_samples*2+1)
     int elements = sqr(count)
     setLength(m_Offsets, elements)
     setLength(m_Weights, elements)
     m_Bias = @p_bias
     if @p_enhance
       m_bias = m_bias + 1.5
     endif
     m_Multiplier = 0.0
 
     int j = -@p_samples
     int k = 0
     int l = 0
     while (j <= @p_samples)
       k = -@p_samples
       while (k <= @p_samples)
         m_Offsets[l] = (@p_radius*j/@p_samples + flip(@p_radius*k/@p_samples))/100
         m_Weights[l] = -1
         if (j == 0 && k == 0)
           m_weights[l] = -m_multiplier*2 + 1
         endif
         m_Multiplier = m_Multiplier + m_Weights[l]
         l = l + 1
         k = k + 1
       endwhile
       j = j + 1
     endwhile
     if m_Multiplier == 0
       m_multiplier = 1
     endif
     m_Multiplier = 1 / m_Multiplier
   endfunc
   
 default:
   title = "Edge Detect Filter"
 
   int param v_EdgeDetect
     caption = "Version (Edge Detect Filter)"
     default = 100
     hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used."
     visible = @v_EdgeDetect < 100
   endparam
 
   float param p_bias
     caption = "bias"
     default = -1.5
   endparam
   bool param p_enhance
     caption = "Edge Enhance/Sharpen"
     default = false  
   endparam
   heading
     text = "For sharpening, decrease the filter radius for best effects."
     visible = @p_enhance
   endheading
   float param p_radius
     caption = "Filter Radius"
     default = 0.05
   endparam
   int param p_samples
     caption = "Sample Density"
     default = 2
     min = 1
     max = 9
   endparam
 }
 


Constructor Summary
REB_EdgeDetectFilter()
           
REB_EdgeDetectFilter(Generic pparent)
          contructor
 
Method Summary
 
Methods inherited from class dmj5:DMJ_ConvolutionFilter
Init
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

REB_EdgeDetectFilter

public REB_EdgeDetectFilter(Generic pparent)
contructor


REB_EdgeDetectFilter

public REB_EdgeDetectFilter()