Login  Register

Re: Fractal Dilation Macro

Posted by Herbie on Dec 07, 2015; 9:16am
URL: http://imagej.273.s1.nabble.com/Fractal-Dilation-Macro-tp5015153p5015156.html

Dini,

NIH Image was written in Pascal and its macro language is quite
different from that used with ImageJ that is written in Java. I fear you
have to re-write your macro in ImageJ macro language which should not be
too difficult, especially when using the macro recorder of ImageJ.

For details please study the docs that are available from:
<http://rsb.info.nih.gov/ij/docs/index.html>

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::::::
Am 07.12.15 um 03:44 schrieb SUBSCRIBE IMAGEJ Dini:

> Hello All,
>
> I am working on fractal dimension using Dilation method. I found a
> macro for Dilation method but the macro runs under NIH Image. When I
> run the macro on ImageJ, it did not work. How to change the command
> so that be able to be run on ImageJ? Please find the macro below.
>
> Regards, Dini
>
> ============================================================= FRACTAL
> DILATION MACRO
>
> The FRACTAL DILATION 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 equivalent length.
>
>
> 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;
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html