// ImageJ macro to calculate the Radially Averaged Autocorrelation Function, // Corrected for finite size effects // The output is normalized to a value of 1 at zero radius // and corrected for effects of the finite image size. // (No need to extend the image size for avoiding edge effects) // // Use with a binary input image. // Needs the "Radial Profile" plugin, http://rsb.info.nih.gov/ij/plugins/radial-profile.html // // Version: 2008-May-14 Michael Schmid // requires("1.42p"); doStack=false; if (nSlices()>1) doStack = getBoolean("Get RDF from full stack?"); setBatchMode(true); firstSlice=getSliceNumber(); lastSlice=getSliceNumber(); if (doStack) { firstSlice=1; lastSlice=nSlices(); } width=getWidth; height=getHeight; getPixelSize(unit, pixelWidth, pixelHeight); run("Select None"); //maxRadius may be modified, should not be larger than 0.3*minOf(width, height); maxRadius=0.3*minOf(width, height); minFFTsize=1.3*maxOf(width, height); title=getTitle(); size=4; while(size