Tanner

Thank you tanner!
I'm happy of your interest.

1)Interface

For example, when working with wallpaper-sized images, the image preview would constantly "jump" to the foreground.
To me it do not result. it's foreground when mouse over it. When mouse is over "black board", it's background. When mouse is over Control Panel or Preview pic, it's foreground.
There's a strange behavior when moving mouse from "black board" to Preview pic...

Sometimes, clicking on the tool option box (which appears after clicking an effect node) doesn't work
It's happens when (as above) moving mouse from "black board" to PreviewPic(Up).
This is very strange, I must solve it!

Then there are little oddities like every item in the Input drop-down box being highlighted (???).
This is a ComboBox inside a usercontrol (same usercontrols are on black board - with different layout)
Thought was a problem of Style that is set as DropDownList... I tried to change other styles but nothing, always all highlighted.... Don't know why.... :-/


I also can't figure out a way to delete unneeded nodes
Sorry this is still not implemented.... In fact I do not consider finished this project. I was hurry to make/test effects and Flows... so left back this function... that must be done.

It would be very nice to be able to click anywhere on a line to access it, instead of just the ends
woooo!!! Go through points of a "catmull rom spline" .... no way ...
Even because it's drawn by cairo, not as my first mode that was done by drawing little short lines.
Even if I know that it would sure be really nicer. Don't know how to do! (and at the moment maybe there are first other improvements to do.... such as Delete BoxEffect)


Resuming...
...Solve background/foreground PreviewPic
...Create a Delete BoxEffect function
...Hilighted Combobox (this is really strange...)



2) Performance

About performance, first thing I have to say is that Every Channel/Spline is a 2D dimension array of doubles that ranges from 0 to 1 (Obviously existing only when needed)



Bilateral smoothing

In my case, this maybe should be called Trilateral...
If you notice, it's performed in 2 Passes.
First pass do a "FLOW"-filter with a number of smooth iterations equal to 0.618 * Bilateral Radius
Then it's performed a special Bilateral that takes into account the Pixel Angle Differences too.
Spatial Kernel is pre-Computed with a Gaussian function.
The smooth kernel instead of gaussian is Cubic. This is the function

Code:
Public Function CubicPulse2(X As Double, Center As Double, SideWide As Double, INVSideWide As 

Double) As Double
    Dim xx     As Double
    xx = X - Center
    If xx < 0 Then xx = -xx
    '----
    If xx >= SideWide Then CubicPulse2 = 0: Exit Function
    xx = xx * INVSideWide
    CubicPulse2 = 1 - xx * xx * (3 - 2 * xx)

End Function
Where X is the diffrenece from central pixel and kernel pixel in question, Center is 0, and SideWide is the "Smooth Parameter"

I think this is the function that slow down all... But maybe it's better than an EXP()

BILATERAL (+ Angles Diffrenece):

Code:
-For The numbers of iterations:

		-For all X Y Pixels.
                        
                        ValueSum=0
                        Divisor=0
                        ...

			-For all pixels of the Kernel  (Xp Yp for(s)):

			   VV = CubicPulse2(vIN(Xp, Yp) - Center, 0, Smooth, InvSmooth)
			   VV = VV * VV
			   VV = VV * SpaceKRNL(X - Xp, Y - Yp)
			   ddA = AngleDiff01(ANG(Xp, Yp), CenterA)
			   VV = VV * ddA                

			   ValueSum = ValueSum + vIN(Xp, Yp) * VV
			   Divisor = Divisor + VV
		
			-End Kernel


			If Divisor <> 0 Then
	   			Output(X, Y) = ValueSum / Divisor
   			Else
           			Output(X, Y) = vIN(X, Y)
   			End If

		-Next PIXEL

   		vIn=Output

-End Iterations
Maybe I'll remove angles Differences....

Don't Know how to speed up, maybe some LUT (lookup Tables.... )
I want to work with doubles.... not integers or bytes (0-255)




Gaussian Blur

I suppose my is TrueGaussian, ( 1 big Kernel initialized only 1 time ( like Bilateral) )

Code:
Public Type tKern
    V()        As Double  '2D array  (-r to r,-r to r)
End Type


With KERNELs(r)   ' as tKern

        For X = 0 To XT

            pXF = X - r
            If pXF < 0 Then pXF = 0
            pXT = X + r
            if pXT > XT Then pXT = XT
            
            For Y = 0 To YT

                pYF = Y - r
                If pYF < 0 Then pYF = 0
                pYT = Y + r
                If pYT > YT Then pYT = YT

                SUM = 0
                Divisor = 0
                For Xp = pXF To pXT
                    For Yp = pYF To pYT

                        K = .V(Xp - X, Yp - Y)

                        Divisor = Divisor + K

                        SUM = SUM + V1(Xp, Yp) * K

                    Next
                Next
                Output(X, Y) = SUM / Divisor
            Next

        Next

End With

That's all for now