{ FRACTAL DIALTION MACRO The FRACTAL DILAATION Macro is a macro that runs under NIHImage, v. 1.58 and later. It performs the measurements that allows one to calculate the so-called "capacity" fractal dimension. The algorithm is called, in fractal parlance, the "dilation" method. It is meant to work on an image that is a one pixel wide, binary (black on white) border. The output is a named file with 3 columns. The first is a list of the disc kernel sizes. Th 2nd is a list of the average counts [area] for all kernal sizes and the 3rd is the area/kernel size to give equivlant length. A full description of the technique can be found in T. G. Smith, Jr., G. D. Lange and W. B. Marks, Fractal Methods and Results in Cellular Morphology, which appeared in J. Neurosci. Methods, 69:123-126, 1996. If you have any questions or problems, you may contact me, Tom Smith, at Bldg. 36 Room 2C02 N.I.H Bethesda, MD 20892 USA or via e-mail at tgs@codon.nih.gov } macro 'Fractal Dilation'; var iterations,i:integer; tab:string; begin SaveState; iterations:=64; tab:=chr(9); SetFont('Monaco'); SetFontSize(9); ResetCounter; SetBinaryCount(1); NewTextWindow(concat(WindowTitle, '-Counts'), 140, 350); MoveWindow(500,50); Measure; writeln(1:3, tab, histogram[255]:7, tab, histogram[255]:5); for i:=1 to iterations do begin Dilate; Measure; writeln(i*2+1:3, tab, histogram[255]:7, tab, histogram[255]/(i*2+1):5); end; RestoreState; end;