// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // ! This script is provided "as is" by Applied Maths. ! // ! You are free to use and modify this script for your own needs. ! // ! Redistribution or reproduction of the script is prohibited. ! // ! DISCLAIMER: ! // ! Improper use of scripts may corrupt your database. ! // ! Running this script is entirely at your own responsibility. ! // ! Applied Maths accepts no lialibility for any consequences ! // ! resulting from its use. ! // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! integer i,counter; string experlist,expername,st,st2,st3; DIALOG dlg; float tol,tolincr,curtol; float mt1,mt2,mt,proc,proc1,proc2,mt_min,mt_max,xp,yp,x0,y0,xl,yl; for i=1 to DbGetExperCount do if DbGetExperClass(i)="FPR" then { if expername="" then expername=DbGetExperName(i); experlist=experlist+DbGetExperName(i)+" "; } if expername="" then { message("There are no fingerprint type experiments present!"); stop; } DlgAddText(dlg,"Select the fingerprint type",15,15,150,15); DlgAddList(dlg,experlist,expername,15,35,150,150,"LIST"); if not(DlgShow(dlg,"Show tolerance as metrics values",290,220)) then stop; st=CmpGetSett(expername); while st<>"" do { st2=splitstring(st," "); st3=splitstring(st2,"="); if st3="Tolerance" then tol=val(st2); if st3="ToleranceIncr" then tolincr=val(st2); } PrnStartScreen(14,12); mt_min=10000000.0;mt_max=-10000000.0; x0=3;y0=1; xl=10;yl=10; PrnPolygonPoint(x0-0.3,y0-0.3);PrnPolygonPoint(x0+xl+0.3,y0-0.3); PrnPolygonPoint(x0+xl+0.3,y0+yl+0.3);PrnPolygonPoint(x0-0.3,y0+yl+0.3); PrnPolygonDraw(100,100,100); for counter=1 to 2 do { for i=0 to 500 do { proc=i/5;curtol=tol+tolincr*(proc/100); proc1=proc-curtol/2; if proc1<0 then proc1=0; proc2=proc+curtol/2; if proc2>100 then proc2=100; mt1=FprGetMetric(expername,proc1); mt2=FprGetMetric(expername,proc2); mt=abs((mt2-mt1)/(proc2-proc1))*curtol; if counter=1 then { if mt>mt_max then mt_max=mt; if mt"" do { xp=x0+val(splitstring(st,";"))*xl; st2=splitstring(st," "); if st2="" then { PrnMoveto(xp,y0+yl+0.3);PrnLineto(xp,y0+yl+0.2); PrnMoveto(xp,y0-0.3);PrnLineto(xp,y0-0.2); } else { PrnMoveto(xp,y0+yl+0.3);PrnLineto(xp,y0+yl+0.1); PrnMoveto(xp,y0-0.3);PrnLineto(xp,y0-0.1); PrnText(xp-PrnTextSizeX(st2)/2,y0+yl+0.7,st2); } } st=PrnScaleDiv(mt_min,mt_max); while st<>"" do { yp=y0+yl-val(splitstring(st,";"))*yl; st2=splitstring(st," "); if st2="" then { PrnMoveto(x0-0.3,yp);PrnLineto(x0-0.2,yp); PrnMoveto(x0+xl+0.3,yp);PrnLineto(x0+xl+0.2,yp); } else { PrnMoveto(x0-0.3,yp);PrnLineto(x0-0.1,yp); PrnMoveto(x0+xl+0.3,yp);PrnLineto(x0+xl+0.1,yp); PrnTextRight(x0-0.4,yp+0.1,st2); } } } } PrnEnd;