{ Cell counting example. Uses the compiled peak finding routine in User.p. The "Count Cells" macro is optimized for the included "Sample Image" example. The macro will probably need to be customized for other images. Parameters that may need to be changed include 'radius', 'BallRadius', 'threshold', and 'BallRadius'. } var {Global variable, initially zero} Threshold:integer; {range: 10-150} 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 (i255 then threshold:=255; CountCells(false); end; macro 'Show Threshold'; begin PutMessage('Thresold=',Threshold:1); end;