var {Global variables, initially zero} pid1,pid2:integer; procedure DoGammaTransform(gamma:real); var i,v:integer; n,mode,min,max:integer mean:real; BEGIN measure; GetResults(n,mean,mode,min,max); ShowMessage('min=',min:1,'\max=',max:1); for i:=1 to 254 DO begin if (i>min) and (ipid1 then begin SelectPic(pid1); RestoreRoi; end; GetThresholds(t1,t2); Measure; SelectPic(pid2); RestoreRoi; Measure; SetCounter(rCount-1); rUser1[rCount]:=histogram[254]; UpdateResults; SelectPic(pid1); end;