%ffp //------------------------------------- // FM_TEMPLATE_1 //------------------------------------- Category: "AstroPlugins" Title: "Gaussian Stretch" Copyright: "Copyright ©2005 Author: "James Ryan" Organization: "Astroplugins" Filename: "Gaussian Stretch" Description: "Gaussian Stretch" Version: "v1.0" URL: "www.grekalova.com" About: "AstroPlugins !V\n" "!c\n!A\n!U" Dialog: Text = "Astroplugins Gaussian Stretch !V !c !A" ctl(1):"Linear Addition(0)",range=(0,100), val=0 ctl(2):"Mean(40)",range=(-255,255), val=40 ctl(3):"Scale(50)",range=(0,255), val=50 ctl(4):"Sigma(50)",range=(1,255), val=50 ctl(8):checkbox, "Plot Graph",pos=(250,100),val=1 //------------------------------------- ForEveryTile: { int r,g,b,max,k,i,cv,c; float f,scalem,inv,cpower,mag,inf,ratio,num,den; float xint,yint,e,fx,fX,a,m,n,tau,hmax,fc,fmax,linear,right,sinf,sigma,mean; float fmean,fsigma; bool plotgraph; e=2.71828; fX=(float)X; k=0; cpower = (float)ctl(1)/100; inf = ctl(2); sigma = (float)ctl(4); mean = (float)ctl(2); sinf = (float)ctl(6)/50; a = (float)ctl(1)/50; linear = (float)ctl(3)/50; right = (float)ctl(5)/100; c = src(x,y,z); scalem = 1; if (imageMode == 11) scalem=128; max = 255*scalem; fmean = mean*(float)scalem; fsigma = sigma*(float)scalem; fmax = (float)max; hmax = fmax/2.0; plotgraph=ctl(8); for (z=0;z