Fraclac For Imagej
Fraclac For Imagej
Fr
Lac fo c r a
Fr
Lac fo c r a
t ul ge M , y J- Fractal, Lacunarit
ifr
rp Mo al, t ac
hological -
Digi
tal Ima ge
m m
a a
rp Mo al, t ac
hological -
Digi
tal Ima ge
T able of Contents
INTRODUCTION: HOW TO USE THIS MANUAL 5 SET UP
How do I set up ImageJ and FracLac? What is FracLac for? What does FracLac deliver? What types of scan does FracLac do?
IMAGES
6 6 6 6
What images can I analyze with FracLac? 9 How do I extract patterns to analyze with FracLac? 9 Should I use control images? 10
BOX COUNTING
A N A L Y Z I N G I M A G E S WITH FRACLAC
What is the FracLac Panel for? 7 7 FRACTAL/LACUNARITY/SUBSCAN SLIDING BOX LACUNARITY 7 MULTIFRACTAL ANALYSIS SCAN 7 What are the buttons on the FracLac panel for? 7 What are the blue buttons on the FracLac Panel for? 7 What do the purple buttons on the FracLac Panel do? 7 What is the Scan Current Image or ROI button for? 8 What is the NonRectangular ROI button for? 8 What is the Select and Scan Files button for? 8 What does the Close Windows Button on the FracLac Panel do? 8 What does the Red Text on the FracLac Panel mean? 8 How do I set up a scan once FracLac is loaded? 8 How do I set up a regular box counting scan? 8 How do I scan an image? 8 How do I save the results? 8 How do I save graphics? 8 How do I do a lacunarity scan? 8
What is the Box Counting Dimension or DB? What is a box counting scan? What is the count? What is epsilon () or scale? What is box size or grid calibre? What is a scan? What are global and regular scans? What is a nonoverlapping scan? What is a local scan? What is grid position? What is an average DB? What is a slope-corrected DB? What is a most-efficient cover DB?
11
11 11 11 11 11 12 12 12 12 12 12 12 12
LACUNARITY
What is lacunarity or ? 13 How is lacunarity calculated for a regular scan over 13 one or multiple locations? Prefactor Lacunarity 13 CV for occupied/unoccupied 13 13 Binned Probability Density Lacunarity
13
How is the standard error calculated? 14 How is the slope of the regression line calculated? 14 How is the correlation (r2) for the regression line calculated? 14
14
How is the y-intercept of the regression line calculated? 14 How is the prefactor for the scaling rule calculated? 14 What is a CV? 14 What are the FracLac Options Panels? 15
Autothreshold 15 Quick Scan 15 Global Scan Positions 15 Box Sizes per Scan 15 Smallest Grid 15 Largest Grid 15 Summarize Fractal and Lacunarity Statistics 15 Slip Grid at Each Position 15 Print Mass vs. Frequency 16 Bins 16 DoSubs 16 Graph Regression Line for Each Sample 16 Include Circularity Data 16 Draw Hull and Bounding Circle 16
15
How do I read the data in the results table from a standard box counting analysis? 17 FracLac2004 17 Foreground Pixels 17 Total Pixels 17 Mean Box Counting Fractal 17 Dimension (DB) Correlation (r2) 17 Standard Error 17 Coefficient of Variation (CV) over all locations 17 Mean DB without Horizontal Intervals 17 Minimum Cover DB 18 Minimum Cover DB without Horizontal Intervals 18 Mean Y-intercept of regression line 18 Mean Y-intercept lacunarity 18 CV for Y-intercept 18 Mean Binned Probability Density Lacunarity 18 Mean CV for BPDL 18 Mean CV2 for Pixels Per Box Over All Locations 18 CV for Mean CV2 18
17
Empties Mean CV over all locations 18 Counts CV 18 Mean CV for BPDL 18 C V f o r u n o c c u p i e d / C V o c c u p i e d 18 Hull Area 18 Hull Perimeter 18 Bounding Circle Diameter 18 Hull Circularity 18 Width 18 Height 18 Maximum Radius 18 M a x i m u m R a d i u s / M i n i m u m R a d i u s 18 Centre 19 Number of Box Sizes Used in Total Analysis 19 Adjusted Number of Box Sizes 19 Number of Origins 19 Maximum Box Size 19 Minimum Box Size 19 Max V or H Span 19 Density 19 Span Ratio 19 How do I read the results table for raw data for a standard scan? 19 Box size 19 Scale () 19 Count 19 Empties 19 Mean pixels per box 19 Standard Deviation for pixels per box 19 cv2 for pixels per box 19 Binned Probability Density Lacunarity 19
SUB SCANS
What is a sub scan? How do I do a subscan? How do I set the Sub Scan Options? Type of Subscan Display Dimension Filled Pixels Random Analyzer Analyzer Contour Analyzer Filled Analyzer Diplay Dimension Transparency/Opaqueness Composite type Colour scheme
21
21 21 21 22 22 22 22 22 22 22 22 22 22 22 22
Block size Relative max for sub scans Random samples Minimum Pixel Ratio
23 23 23 23
S L I D I N G B O X L A C U N A R I T Y 25
What is sliding box lacunarity? 25 What is a sliding box lacunarity scan? 25 How do I do sliding box lacunarity analysis? 25 How do I use the sliding box lacunarity options? 25 Autothreshhold 25 QuickScan 25 Number of Different Box Sizes Per Scan 25 Minimum Box Size in Pixels 25 maximum grid as percentage of image size 25 number of pixels to slide boxes (x) 26 number of pixels to slide boxes (y) 26 Sample only within contour 26 show graphs 26 How do I interpret the sliding box lacunarity results table? 26 Box size 26 Epsilon 26 Mean () 26 Standard Deviation () 26 Lacunarity () as 1 + (2/2) 26 What are the results of a sliding box lacunarity scan? 26 How do I interpret the sliding box lacunarity graphics? 26
MULTIFRACTALITY
How do I do a multifractal analysis? 27 How do I do use the multifractal analysis options? 27 Autothreshold 27 Quick Scan 27 N u m b e r o f g l o b a l s c a n p o s i t i o n s 27 Number of Different Box Sizes per Scan 27
27
Minimum (in pixels) 27 Maximum Grid 27 Omit box count data 28 Probability Distributions 28 Slip grid 28 Stay within convex hull 28 Graphs 28 Show location with highest CV 28 P r i n t s l o p e a n d C V f o r D ( Q ) v s Q 28 Number of Bins for Frequency Distribution 28 Maximum Q for Generalized Dimension Spectrum 28 Minimum Q 28 Increment Between Qs 28 Do Random Mass Sample 28 Subarea 28 Maximum Grid 28 Number of Samples 28 Minimum Pixel Ratio 28 Include Circularity 28 What does FracLac do about Multifractality? 29 What is Q and how is it specified in FracLac? 29 What are Multifractal Spectra? 29 What is D(Q)? 29 How do I interpret the graphics from a multifractal analysis? 29 What does the graph of f() vs show? 30 What does the graph of D(Q) vs Q show? 30 What does the graph of (Tau) show? 30 How do I interpret the results table from a multifractal analysis? 31 Optimized location for multifractal analysis 31 CV for D(Q) vs Q 31 Slope for D(Q) vs Q 31 r2 for D(Q) vs Q 31 Q 31 D(Q) 31 Tau () 31 Mean 31 31 f() 31 Probability distributions 31 Box Count Raw Data 31 How do I interpret the results table from a random mass multifractal analysis? 32 T o t a l f o r e g r o u n d p i x e l s s a m p l e d 32 Minimum ratio of foreground to background pixels 32 Mean ratio of foreground to background pixels sampled 32 Size in pixels of each sample 32 Total samples 32 Total pixels sampled 32
Mass Fractal Dimension using Mean Mass at Epsilon Y-intercept Mean CV2 CV for D(Q) Q D(Q) Tau () Mean f() What about sampling for multifractal spectra? More Multifractal Spectra What are the calculations for the multifractal spectra? GENERALIZED DIMENSION AT Q References for the method of calculating the multifractal spectrum:
32 32 32 32 32 32 32 32 32 32 32 33 33 33 34
FRACTALS
What are fractals? 35 What is a Fractal Dimension? 35 How is a fractal dimension calculated? 35 What kind of fractals can be analyzed with FracLac? 35 Where can I find simple fractals and multifractals to analyze? 36 What are monofractals? 36 What are multifractals? 36 What is a Henon Map? 36
35
To use this manual browse the table of contents for questions then click on one to view an entry. ::
Hyperlinks within each entry
connect to additional information. Click a word or phrase in an entry to get more information. use the online pdf document search function.
here for the basic startup FAQ or To learn fundamental information about using FracLac, read in the order the questions are presented starting with the next page.
If you cannot find help, find errors in this document or bugs in FracLac, or would like to request a feature in this document or FracLac, please notify me at [email protected]
Set up
How do I set up ImageJ and FracLac?
ImageJ is freely available image analysis software written in Java by Wayne Rasband of the US National Institutes of Health in Bethesda, Maryland. The website (http://rsb.info.nih.gov/ij/) explains how to acquire, setup, and use ImageJ. To install FracLac, copy FracLac_.jar (or a file with a similar name, depending on the version) to the plugins directory of ImageJ. Restart ImageJ if it was open when the file was placed in the directory or else open ImageJ now and FracLac will appear as an option usually under Plugins: Fractal Analysis.
Click for instructions about how to analyze images.
Use it to measure difficult to describe geometrical forms where the details of design are as important as gross morphology. It is suitable for images of biological cells and other biological structures, including branching structures and textures, as well as known fractals. Patterns can be easily extracted from many types of images and converted to binary digital images that can be analyzed with FracLac.
A MONTAGE OF IMAGES ANALYZED USING ONE TYPE OF ANALYSIS, THE SUB SCAN FEATURE, IN FRACLAC.
FracLac performs different types of analysis to deliver data and graphics for o fractal dimensions, o lacunarity, and o multifractal data, o and the shape and size of patterns in binary images.
What types of scan does FracLac do?
Analyzing Images
e when you se t a h sw This i
with
FracLac
pur
ple
bu tto
n, th
en b
lue ones.
1.
CLICK A PURPLE BUTTON TO SELECT A TYPE OF SCAN AND SET ITS OPTIONS.
FOR A BASIC SCAN, CLICK THE TOP LEFT PURPLE BUTTON TO BRING UP THE OPTIONS PANEL.
2. THEN CLICK ONE OF THE RIGHT BLUE BUTTONS TO SCAN IMAGES. 3. SAVE or view the different types of RESULTS.
What is the FracLac Panel for? The panel is FracLacs user interface. It first appears with three purple buttons for selecting a scan then three blue ones for starting it. SCAN TYPES
FRACTAL/LACUNARITY/SUBSCAN SLIDING BOX LACUNARITY MULTIFRACTAL ANALYSIS SCAN
ACTIONS
Scan Current Image or ROI NonRectangular ROI Select and Scan Files
They appear once options are set and the red text at the bottom of the FracLac button panel shows the type of analysis that is selected.
clicked before the blue buttons to perform an analysis will appear. Once this has been done
the first time, the new buttons will remain on the panel until FracLac is closed.
circularity generated.
images
were
How do I save the results? The results will appear in the Results Table and if any graphics were selected, on the screen (e.g., multifractal spectra, regression graphs, or bounding circle drawings). View or save the results using the File/Save As option on the Results Table.
If copying the results table using its Select and Copy functions to import the results directly into a spreadsheet, ensure that the appropriate column headings are recorded as these are not copied by this method.
Multiple images or rois on an image can be recorded in the same Results Table, but results will be lost if the table is closed or other measurements are made. How do I save graphics? Graphic results of each scan that appear on the screen (e.g., multifractal spectra, regression graphs, or bounding circle drawings) can be saved. Save graphics as jpg or tif files by selecting the graphic and using the File:Save As option on the ImageJ menu. Data from graphs can be saved using the ImageJ List and Save functions that appear on the graph itself. How do I do a lacunarity scan? Lacunarity is calculated automatically in the regular scan (top purple button). A sliding box lacunarity analysis is done separately using the middle purple button.
What does the Close Windows Button on the FracLac Panel do?
Closes all open windows, including images and graphs. This is useful if many graphs or
Images
What images can I analyze with FracLac?
A stained neuron prepared for fractal analysis using Adobe PhotoShop. Original image (left) was grayscaled, thresholded, and outlined to a single pixel wide binary contour (right).
FracLac is suitable for analyzing binary digital images such as contours of biological cells as shown above or fractals. How do I extract patterns to analyze with FracLac?
For standard box counting, sliding box lacunarity, or multifractal analysis with FracLac, a pattern must be extracted and converted to a binary (black and white) image file that ImageJ can open (e.g., jpg, tiff, png, gif). This is because FracLac detects only black pixels on a white background, or white pixels on a black background. Processing images for analysis may be simply a matter of converting to black and white. To analyze simple geometric shapes, such as circles, for instance, little preparation is required beyond thresholding then saving an image as a single pixel wide contour. But pattern extraction may, in other cases, involve considerable preparation, depending on the original image. ImageJ and most image processing software can convert images to black and white. Other functions are often available to make outlines using thresholding, background subtraction, automatic or manual tracing, dilation, etc. The images of stained cells shown here demonstrate the conversion of an original image, acquired using a light microscope with digital camera attached, to a binary outline suitable for fractal analysis with FracLac. FracLac can automatically threshold images to binary. To choose or develop a method of pattern extraction you first need to ImageJ using thresholding, dilation, and outlining. decide what features will be analyzed. Outlining, for example, is often most appropriate for cellular morphology as revealed by a cells contour, but textures, in contrast, are sometimes better extracted using different methods than work for cell contours.
Original image and binary outline created in
The technique used to prepare an image for analysis ultimately depends on what type of image is analyzed and determines the pattern extracted.
Because of how FracLac is written, the final image must be binary to be used with FracLac.
10
Box Counting
What is the Box Counting Dimension or DB?
FracLac delivers a measure of complexity- a fractal dimension- called the box counting fractal dimension or DB. It is measured from the ratio of increasing detail with increasing scale (). The ratio quantifies the increase in detail with increasing magnification or resolution seen in fractals but also in microscopy. The basic technique for calculating the DB used in FracLac is called box counting.
The DB is the slope of the regression line for the log-log plot of box size (or scale) and count from a box counting scan.
FracLac calculates different box counting dimensions: an unadjusted fractal dimension for scans using one grid position, an average fractal dimension over multiple scans, a slope-corrected dimension, and a most efficient covering dimension. It also delivers a mass dimension using overlapping grid samples. In addition, it can do scans over different types of subareas within an image.
The DB is the slope of the regression line for the log-log plot of box size (or scale) and count. (see sliding box scan) What is the count?
The count usually refers to the number of grid boxes that contained pixels in a box counting scan. For lacunarity, the number of pixels per box are counted.
11
What is a scan?
Scanning is applying grids or boxes to an image and counting the number of pixels that fell in each box, as well as the number of boxes required to cover an image. Scans gather data for calculation of the fractal dimension, lacunarity, or the generalized dimension. There are global scans and sub scans, grid scans and sliding box scans. Choose a scan using a purple button; start a scan using a blue button on the FracLac panel.
Grid position refers to where a grid is placed on an image in a box count. As shown in the picture, the number of boxes required to cover an image depends on where the grid is laid. It takes 6 boxes in the left, and 9 in the right. FracLac scans at multiple grid positions if the option to do so is selected. Regular scans assign location randomly within a set area. Multifractal analysis uses a special convention.This grid shown here is nonoverlapping, which means its boxes do not overlap. In a sliding box algorithm, in contrast, the boxes may overlap.
The average DB is the usual box-counting fractal dimension averaged over the number of scans that were done at different grid positions.
The slope-corrected DB is corrected for periods of no change in the regression data. These periods arise spuriously as a limitation of pixels and grids. FracLac uses a linear series of box sizes, in order to maximally capture scaling in an image. Using a linear series, after a point, as box size increases relative to image size, the number of boxes required to cover an image stays the same over a long interval of change in size. This causes plateaus in the log-log plot with box counting, but does not necessarily reflect actual features of complexity in a pattern. FracLac removes data points arising from such plateaus to provide the slope-corrected DB. This value is reported in the results table for a regular scan as the DB without horizontal intervals
12
Lacunarity
What is lacunarity or ?
The lac in FracLac stands for lacunarity, , which is "gappiness" or visual texture. is considered a measure of heterogeneity (inhomogeneity) or translational or rotational invariance in an image. This measure supplements fractal dimensions in characterizing patterns extracted from digital images. FracLac automatically calculates some values of lacunarity in a regular scan. FracLac delivers lacunarity based on pixels in standard box counting sliding box counting FracLac delivers different types of lacunarity including: CV for pixel distribution Prefactor CV for occupied/unoccupied Probability Density Lacunarity
How is lacunarity calculated for a regular scan over one or multiple locations?
In FracLac, lacunarity is calculated as the variation in pixel density at different box sizes, using the CV for pixel distribution. First, the number of pixels in each box that was placed on an image at an is counted during standard nonoverlapping box counting or overlapping box counting. Then, for each , the CV2 is calculated from the standard deviation and mean of pixels per box: = (/) . Lacunarity varies with the size of the sampling unit. Thus, FracLac delivers the mean value of the CV2 over all at a location, or else the data can be looked at directly by plotting and . For global scans
2
using multiple grid positions, the mean lacunarity over all scales is found for each grid position, then the average of this average is found to determine a single value of lacunarity. For sub scans, it is calculated for each subarea.
CV for occupied/unoccupied
FracLac reports the CV for boxes that contained pixels compared to boxes that did not.
Prefactor Lacunarity
Another proposed measure of heterogeneity that is reported in a standard scan with multiple locations uses the prefactor A from the scaling rule y=AXDB.
A 1 1 A N N
where A = the prefactor and N= the number of grid locations.This value is reported in the results table as the mean y-intercept lacunarity.
13
y int =
S=log of scale or size, C=log of count, n=number of sizes, b = y intercept of the regression line, m = slope of the regression line
S=log of scale or size, C=log of count, n=number of sizes, m = slope of the regression line
HOW IS THE PREFACTOR FOR THE SCALING RULE CALCULATED?
C m S n
The slope of the regression line, used for calculating the DB, is: n SC S C m = = DB 2 n S 2 ( S )
S=log of scale or size, C=log of count, n=number of sizes, slope of the regression line
The prefactor A = Eulers ey-int Where for y = AXDB, -DB = slope of the regression line, and y-int = the y-intercept of the regression line.
WHAT IS A CV?
CV stands for coefficient of variation=/. In FracLac, it is used to calculate lacunarity () as a measure of variation in pixel distribution for regular box counting and sliding box lacunarity. It measures variation in a set of data and is calculated as the standard deviation over the mean (/ ) for the data. It can be multiplied by 100 or squared, depending on the usage.
For other regression lines, S=the value along the x-axis, and y = the value along the y-axis.
HOW IS THE CORRELATION (R ) FOR THE REGRESSION LINE CALCULATED?
2
r2 =
(n S
n SC S C
2
( S ) n C 2 ( C )
2
)(
14
Leave autothreshold unselected for binary images. Check autothreshold to automatically threshold images using ImageJs built-in function. It is unselected by default and recommended only when it is certain that only the pixels of interest will be thresholded. The threshold settings cannot be changed within FracLac.
QUICK SCAN
scan, especially for very large images. The default is set to 4 locations for standard and multifractal analyses. In a regular scan, sampling is random. Setting this Note that this setting is for scans over the entire image, not subscans . The number of
positions used is reported in the results table.
value to 4 for a multifractal analysis ensures that sampling is optimum.
The smallest size possible is 1 pixel, but this lower limit should match the resolution of the image.
LARGEST GRID
Select quick scan to scan using a faster but slightly less accurate algorithm. Unselecting this box is slower and it is recommended to leave it selected as the default.
GLOBAL SCAN POSITIONS
Type a number for the largest grid in the series of grids used in box counting. This number is a percentage of image size rather than a number of pixels, because when box size goes beyond about 50% of the image size, errors are introduced.
The default value of 45% is generally optimal for standard box counting scans.
Type a number for the number of scans at different locations. FracLac does multiple scans if this is set to more than one, otherwise the grid is laid at the top left corner of the pixelated part of the image. The box counting dimension depends on grid location, so using multiple locations lets FracLac determine dimensions using average and most-efficient coverings rather than just one fixed location. The higher the number, the more accurate the result, to a point, but also the slower the
Type a number for the number of box sizes or different calibers of grid that will be used in a scan. The series increases in size linearly by a fixed increment from the minimum to the maximum. The increment is set by dividing this range by the number of sizes requested. Set
the number of sizes to 0 for the default optimized value. Or, using the slider, set any number of box sizes to use. Leaving this to 0 is recommended as it sets an optimum value according to the image size. The number of box sizes used is reported in the results table.
Select summarize to print final values for the DB in the Results Table, and not print data for each pixel count. By unselecting this option, raw data are printed, from which the fractal dimension and lacunarity can be determined.
SLIP GRID AT EACH POSITION
SMALLEST GRID
Selecting this option adds a random factor. Grid position is selected randomly within an area then if this option is set further adjusted at scan time.
15
Check this box to print raw data showing the frequency of different numbers of pixels appearing in a box at each box size for calculating lacunarity.
BINS
use for the mass vs. frequency distribution. Actual data are included in addition to a frequency distribution.
DOSUBS
image. This is suitable to see variation within an image or for images that are easily segmented using ImageJs Particle Analyzer (e.g., images with several cells that are separated by the Particle Analyzer).
To see the raw data for box counts graphically, select Graph Regression Line. A graph like the one shown here is generated, plotting the log of box size and the log of pixel count. The graph can be saved using File:Save As on the ImageJ menu. Note that when analyzing many files at once, this will produce a potentially unwieldy number of on screen graphs.
INCLUDE CIRCULARITY DATA
The numbers reported on the graph for the regression lines are explained in Interpreting the Results Table.
Select Include Circularity Data to analyze other features of images. This function is designed for binary contours but will work on other types of patterns. It calculates the convex hull enclosing the pixelated part of an image and various measures based on the hull and the smallest bounding circle enclosing the hull. (See Interpreting Circularity and Morphometrics).
Convex hull of neuron shown earlier.
If circularity is selected, select this option to see the convex hull and bounding circle on a copy of the original image, as shown in the diagram here. The new image can be saved. Note that if you are analyzing many files at once, this will produce a potentially unwieldy number of new images so is most suitable for single analyses.
16
Standard box counting may return a standard results table, a raw data results table, a subscans results table, a convex hull graphic, a regression line graphic, and a subscan graphic. How do I interpret a standard box counting analysis? How do I interpret a sliding lacunarity analysis? How do I interpret a multifractal analysis? How do I interpret a sub scan analysis?
How do I read the data in the results table from a standard box counting analysis? Using the defaults for a basic fractal analysis at 4 origins, the results table lists a row of values for complexity, heterogeneity, size, shape, image features, etc., for each image. Each column in the Results Table is briefly described here. Details of data gathering and analysis are outlined in the JavaDoc and source code.
FRACLAC2004
TOTAL PIXELS
The number of pixels counted that were the foreground colour or the background colour.
MEAN BOX COUNTING FRACTAL DIMENSION (DB)
STANDARD ERROR
FOREGROUND PIXELS
The total pixels counted that were the foreground colour in a scan. Images analyzed with FracLac are assumed to have only white and black pixels. Only pixels that are the colour that is considered foreground are analyzed. The foreground colour is set automatically according to the relative numbers of pixels in an image. The foreground is black and the background is white if there are more white than black pixels; otherwise the foreground colour is white and the background is black. See
autothreshold
The standard error for the regression line. This value appears beside each fractal dimension in the results table. This is a test of the validity of the regression line from which the DB is calculated
COEFFICIENT OF VARIATION (CV) OVER ALL LOCATIONS
The r2 value for the regression line showing the relationship between the log of count and size. This value appears beside each fractal dimension in the results table. This is one test of the regression line. Strictly speaking, a value of 1.0 shows perfect correlation in the data.
The coefficient of variation measures variation in the DB over all locations. This can be used along with lacunarity to measure heterogeneity and dependence of the DB on grid position.
MEAN DB WITHOUT HORIZONTAL INTERVALS
The average DB over all locations, corrected for periods of no change in box count with change in size.
17
MINIMUM COVER DB
The most efficient-covering DB corrected for periods of no change in the regression data.
MEAN Y-INTERCEPT OF REGRESSION LINE
pixelated part of an image. This is a measure of cell size for biological cells. Compare the area of this circle (area=r2) with the area of the convex hull.
The average value for all yintercepts of all regression lines at all locations.
MEAN Y-INTERCEPT LACUNARITY
Convex Hull , Bounding Circle, and Maximum Radius of Hull for Image of Cerebellum
COUNTS CV
This is an alternative measure of lacunarity calculated using the prefactor in the relationship y = AxDB.
CV FOR Y-INTERCEPT
The coefficient of variation for the count of boxes having pixels; A measure of heterogeneity using the number of filled boxes.
MEAN CV FOR BPDL
HULL CIRCULARITY
A measure of shape of the convex hull = (area/perimeter2)*4. Compare this number to a circle, for which the ratio is 1.00.
WIDTH
The coefficient of variation for the y-intercepts is a measure of heterogeneity or lacunarity. The standard deviation for all yintercepts of all regression lines at all locations divided by the mean.
MEAN BINNED PROBABILITY DENSITY LACUNARITY
Heterogeneity in the ratio of empty to non-empty boxes with box size and location.
HULL AREA
The area in pixels of the convex hull enclosing the pixelated part of an image
HULL PERIMETER
The perimeter in pixels of the convex hull enclosing the pixelated part of an image
BOUNDING CIRCLE DIAMETER
The greatest distance from the centre of mass of the convex hull to its boundary. This measure is different from the smallest bounding circle, because the convex hulls centre of mass is not necessarily centred on the bounding circle.
MAXIMUM RADIUS/MINIMUM RADIUS The ratio of the maximum to the minimum distances across the image from the centre of mass to the boundary of the convex hull.
The diameter in pixels of the smallest circle enclosing the convex hull enclosing the
18
CENTRE
x,y coordinate pair for the circles centre and x,y coordinate pair for the convex hulls centre of mass
NUMBER OF BOX SIZES USED IN TOTAL ANALYSIS
the largest grid caliber that was used in the series of box sizes that were tested
MINIMUM BOX SIZE
DENSITY
Usually an image feature. The number of pixels of foreground colour divided by the total number of pixels in the convex hull.
SPAN RATIO
the smallest grid caliber that was used in the series of box sizes that were tested
MAX V OR H SPAN
The number of times a complete scan was done, each at a different randomly generated grid position.
The largest span across the pixelated part of the image based on horizontal and vertical boundaries; This is used in determining . See Bounding Circle Diameter and Maximum Radius
A measure of shape as the ratio of major and minor (orthogonal) axes for the convex hull.; intended for biological cells as a measure of overall shape based on the convex hull.
How do I read the results table for raw data for a standard scan?
If raw data are listed, the results table contains different data than otherwise: First the results for each scan are summarized at each location as in the standard results table Then results summarized over all locations are listed. Then the raw data are listed. There is one row for each box size, and several columns, each listing data from the headings outlined below. If more than one location is used, then each column is repeated consecutively for each location before the next column heading is used. The column headings from left to right are: Box size grid calibre in pixels Scale () 1/image size Count Number of boxes that had any pixels at that size and position Empties Number of boxes with no pixels at that size and position Mean pixels per box -the average number of pixels in a box at that size and position Standard Deviation for pixels per box -the standard deviation for the number of pixels in a box at that size and position cv2 for pixels per box - lacunarity for the distribution of pixels in an image. It is the CV for the number of pixels that were found in a box at that size and position. The CV at each size can be averaged to get a value of lacunarity over the image. These averages can be further averaged over all locations to get the lacunarity using multiple locations. (See Results Table) Binned Probability Density Lacunarity This is an alternative method of calculating lacunarity, which also uses the pixel distribution. The number of pixels per box is binned into categories then the same values are calculated as for the CV described above.
19
What is a bounding circle? The bounding circle is the smallest circle enclosing the foreground pixels of an image, as shown in the figure. This measure describes the size occupied by a pattern. It is supplemented by the convex hull and other measures. The bounding circle is calculated using three points on the convex hull. It is calculated using the circularity option in the options pane; see
bounding circle
20
Sub Scans
What is a sub scan?
A subscan is a regular scan applied to individual areas of an image. It is set up using the subscan option.
How do I do a subscan?
To scan areas of an image separately in a standard analysis: 1. Click the top purple button on the FracLac Panel 2. Select DoSubs from the FracLac Options panel. 3. Set Sub Scan options using the panel that appears after clicking OK on the options panel. 4. View or save the results and graphics. To scan areas of an image separately in a multifractal analysis, select Do Random Mass Sample from the Multifractal Analysis Options Panel.
21
Type of Subscan Subscans find local fractal dimensions over an image. This can show how the dimension depends on the sample size and how its distribution over an image can change. Images can be scanned in systematic or random blocks, or as particles. Graphics are colour coded by pixel, block, or particle.
DISPLAY DIMENSION
Select a scan that says display dimension to display the fractal dimension as a number on each subarea.
FILLED
The areas sampled can be chosen randomly or be part of a systematic sample. For random samples, each position is randomly chosen. For nonrandom (systematic) samples, the entire image is sampled from left to right and top to bottom. In both cases, the same series of grids of decreasing caliber is used at each location.
ANALYZER
Use this option to display filled contours of the Particle Analyzers particles filled with colour according to the fractal dimension of each particle.
ANALYZER DIPLAY DIMENSION
Use this option to display the fractal dimension directly on each particle of the image using the Particle Analyzer.
TRANSPARENCY/OPAQUE NESS
Select a scan that says filled to draw a colour-coded graphic representing the fractal dimension as a filled area covering each subarea with a colour representing the fractal dimension according to the colour code scheme selected.
PIXELS
Select a scan that says pixels to replace each foreground pixel with a colour-coded pixel representing the fractal dimension by a colour
Analyzer options use ImageJs built-in particle analyzer to analyze only areas identified by the Particle Analyzer. Use these scans for images of multiple cells, for instance, or wherever particles are adequately separated using the analyzer. In contrast, rectangular scans scan rectangular areas, and block scans scan squares over the entire image.
ANALYZER CONTOUR
Set the transparency for the colour coded image. Use lower values to reveal the image underneath the colour coding, higher to cover it with colour.
COMPOSITE TYPE
Set the composite type for the image. This function is best left at the default value of 5.
Use this option to display contours of the Particle Analyzers particles coloured
Choose the colour scheme. This is also available through the colour selector tree (left) that appears when FracLac is started. Type a number or select an option on the colour selector to determine how images will be colour coded. A separate scale image appears with each colour coded image. Choose 11 to customize the colours. If 11 is selected on the selection tree or on the option panel, after clicking OK, a new panel appears with seven sliders (right) representing 7 colour groups. Each slider sets the limit for one colour category. Set each slider to the limit of a fractal dimension times 100 for each category of interest. Thus, the lowest value goes at index 7 and the highest at Index 1. Manage the size of each interval to best frame the range of fractal dimensions relevant to your analysis.
COLOUR SCHEME
22
BLOCK SIZE
Set the size of subareas to sample. A new range of box sizes is made for each scan.
RELATIVE MAX FOR SUB SCANS
Set the relative maximum percent of sample size for subscans. This is the same as the maximum grid size for
In the random methods, blocks without pixels are skipped. If the option to check pixels is
set, then if the ratio of pixels to the box size is less than a user set factor, a block is also skipped. This prevents blocks with very few pixels from being analyzed, but if the ratio is too high can slow processing down considerably or limit the number of samples.
Scan areas of an image using the sub-box size setting. A-C were scanned using a rectangular sub scan, but the results are displayed differently. A was made using a pixel replacing strategy. B was made using a block filling strategy. C was made using the display dimension strategy. Each block in C is colour-coded in outline for the DB of that portion of the image, and the DB is printed in the block. A colour-coded legend is also generated with each image for interpreting the results. The legend can be saved separately. It lists the colour with the corresponding fractal dimension beside it.
23
Images are coded as particles rather than arrays. D was analyzed using the Particle Analyzer with The original image showed binary contours
contour pixels replaced. arranged as shown. Each cell within the image was automatically identified and analyzed. The fractal dimension is printed on the colourcoded contour. Selecting a different setting would fill the particle or not print the value and just colour in the pixels of the automatically identified particle.
A colour-coded legend is also generated with each image for interpreting the results. The legend can be saved separately. It lists the colour with the corresponding fractal dimension beside it.
A colour-coded legend is also generated with each image for interpreting the results. The legend can be saved separately. It lists the colour with the corresponding fractal dimension beside it.
24
size in the series as a number of pixel est box s, re gard he larg t s t e S les
s of an y other setting.
AUTOTHRESHHOLD
See autothreshold
QUICKSCAN
The increment is set by dividing this range by the number of sizes requested. Set the number of sizes to 0 for the default optimized value. The number of box sizes used affects processing time significantly with sliding boxes. Small series (e.g., 10 sizes) generally produce good results.
Type a number for the number of box sizes or different calibers of grid that will be used to gather data. The series increases in size linearly by a fixed increment from the minimum to the maximum unless a power series is used.
Type a number in pixels to set the smallest grid size in the series. The smallest size possible is 1 pixel, but this lower limit should match the resolution of the image. Using 1 increases time significantly.
MAXIMUM GRID AS PERCENTAGE OF IMAGE SIZE
Type a number for the distance to move the grid vertically for each sliding box scan.
WRITE BOX MASSES
Select this option to sample only boxes that fall within the convex hull.
SHOW GRAPHS
Type a number for the distance to move the grid horizontally for each sliding box scan.
Select this option to print pixels per box for all box sizes (large data file).
Select this option to show graphs of the data for a sliding box lacunarity analysis.
( )
The standard deviation of the number of pixels that were in a box at that size.
Lac 1:3 is based on the pixel distribution counting only boxes having pixels. Lac 2:4 is based on all boxes tested, so increases more steeply than 1:3.
Multifractal Henon
26
Multifractality
1. 2. 3.
Select multifractal analysis on the purple buttons on the FracLac panel. Set the options on the Multifractal Analysis Options panel that appears. View or save the multifractal graphics and multifractal results table.
. Type a number for the number of grid positions. In a multifractal analysis, the first four grids are oriented to have the last box in each size of each scan fall at the four corners of the image, similar to rotating by 90 each time. Scans after these are randomly chosen based on the top left corner.
27
Select this box to print one row of summarized data for box counting only. Leave it unselected to omit the raw data for box count and size.
PROBABILITY DISTRIBUTIONS
To print only one line of data, select this option and select
WITH
Select this option to sample the image randomly using areas of fixed size. (see Results)
SUBAREA
Select this box to print the raw data for probability distributions. Select this option to randomly move the grid, in addition to the initial random selection of grid locations, at the beginning of each scan.
STAY WITHIN CONVEX HULL SLIP GRID
Unselect this option to print a row of data for each value of Q, including D(Q), f, f(), and .
Type a number to specify the size of the area to sample as a percent of the images size.
MAXIMUM GRID
Type a number for the maximum grid size to use as a percent of the subarea. to of
NUMBER OF SAMPLES
Graphs
There are several graphs for multifractal data. Click on each name to see a sample and notes on interpreting the graph. D(Q) vs Q f() vs Regression Tau
SHOW LOCATION WITH HIGHEST CV
Type a number for the minimum ratio of foreground to background pixels. A lower number makes successful scans less likely; a higher number ensures that areas with very low number of pixels are not included.
INCLUDE CIRCULARITY
See Circularity
Select this option to restrict the shown graphics and printed data to the grid location that is the most multifractal in that is
28
What is D(Q)?
The generalized dimension, DQ, addresses how mass varies with (resolution or box size) in an image. To distill its calculation into a describable form, it is, in essence, a distortion of the mean () of the probability distribution for pixels at some . That is, it is exaggerated by being raised to some arbitrary exponent, Q, then compared again to how the exaggeration varies with .
29
Non-fractal lines
The graph of D(Q) vs Q is decreasing for multifractals, but non-decreasing for mono-- or non-fractals.
30
How do I interpret the results table from a multifractal analysis? The results table for a multifractal analysis lists statistics in the Results Table as for a general analysis followed by multifractal data. The last columns of the list are:
OPTIMIZED LOCATION FOR MULTIFRACTAL ANALYSIS
The grid position that had the lowest slope and best coefficient of variation for D(Q) vs. Q.
The coefficient of variation for the regression line for D(Q) vs. Q.
SLOPE FOR D(Q) VS Q
CV FOR D(Q) VS Q
The slope for the regression line for D(Q) vs. Q..
The correlation coefficient (r2) for the regression line for the D(Q) vs. Q.
R2 FOR D(Q) VS Q
A column of the arbitrary exponent, Q, set in the options panel. Note the values at Q=0 and 1. See multifractal calculations D(Q)=/(1-Q) The value of the generalized dimension at the corresponding value of Q.
See multifractal calculations
I(Q,)=
P(i) , where
Q
D(Q)
P(I, epsilon) = pixels(I, ep)/sum pixels(I,e) P(i)=density for all boxes (i) at this
MEAN
F()
TAU ()
=P(i)Q/P(i)Q
=lim[ln(I(Q,E))/ln(1/)] (Q)=(Q-1)*D(Q)
Probability distributions
for each Q in the row. P(i)Q=the probability of pixels at the ith box, raised to the exponent Q.
= [(i)*ln P(i)]/ln
where =P(i)Q/P(i)Q and P(i)Q=the probability of pixels at the ith box, raised to the exponent Q. The maximum value of f() is listed on the graphic for f() vs. . See multifractal calculations
If print probability distributions is selected, several rows of data appear in the Results Table after the heading Frequencies and Masses.The data under the headings BOX SIZE, EPSILON, and MEAN PROBABILITY can be used to calculate the fractal dimension. Epsilon is 1/box size. MEAN PROBABILITY refers to the mean pixels per box at a box size. The columns for FREQUENCY and MASS should be correlated as rows by matching BOX SIZES. MASS is a number of pixels; FREQUENCY is the frequency of that number of pixels being in a box at the BOX SIZE.The first rows are for binned probabilities that use ranges of frequencies. Unbinned probabilities use actual number of pixels per box and generate many columns.
31
How do I interpret the results table from a random mass multifractal analysis?
The random mass sample analysis lists data in the results table according to the headings below:
TOTAL FOREGROUND PIXELS SAMPLED MASS FRACTAL DIMENSION USING MEAN MASS AT EPSILON TAU ()
The number of foreground pixels sampled, combining all samples. This number may exceed the total number of pixels in the image.
MINIMUM RATIO OF FOREGROUND TO BACKGROUND PIXELS
=lim[ln(I(Q,E))/ln(1/)]
The fractal dimension calculated from the regression line for the log-log plot using the mean number of pixels and each box size.
Y-INTERCEPT
The y-intercept of the regression line for the mass fractal dimension.
MEAN CV2
coefficient
of
= [(i)*lnP(i)]/ln
=P(i)Q/P(i)Q
for each Q in the row. P(i)Q=the probability of pixels at the ith box, raised to the exponent Q. P(i)=density for all boxes (i) at this
See multifractal calculations
F()
D(Q)=/(1-Q) The value of the generalized dimension at the corresponding value of Q in the row. See multifractal calculations
D(Q)
where =P(i)Q/P(i)Q and P(i)Q=the probability of pixels at the ith box, raised to the exponent Q.
See multifractal calculations
What about sampling for multifractal spectra? Multifractal spectra from box counting depend on the extracted pixel distribution, which, in turn, depends on how it is extracted. Thus, multifractal data depend (even more than monofractal analysis data) on the grid's position when the data are gathered. One approach to this problem is to randomly sample a pattern to infer the distribution, an approach possible with FracLac but subject to several limitations in acquiring an adequate sample. Alternatively, FracLac's default behaviour for a multifractal analysis is to scan with the grid anchored at each of the four corners of the rectangle enclosing an image, to provide four different spectra similar to what are obtained by rotating the image 90 and reapplying the same series of s. This strategy can be important when interpreting odd results that sometimes occur with density distributions that attribute too
32
much importance to very small probabilities that appear in the distribution at some, but not all, grid positions.
More Multifractal Spectra
The image shows data from a multifractal analysis of a Henon Map. Data from four scans are shown together in the first two frames and from only the scan with the optimal probability distribution in the last two frames. The humped curves are the f() spectra, and the decreasing curves are the DQ vs Q spectra. (Note that the DQ=0 is the capacity dimension, in this case approximately 1.26).
What are the calculations for the multifractal spectra? GENERALIZED DIMENSION AT Q
DQ =lim[lnIQ/ln-1]/(1-Q) IQ,=[PiQ],
For Q=1, let approach 1, and DQ= -lim[Pi*ln[Pi]/ln] The probability distribution is found from the number of pixels, M, that were contained in Thus, Pi is from the probability distribution of mass for all boxes (i) at this where Pi =1
According to the method of Chhabra and Jensen (Phys. Rev . Lett. 62: 1327, 1989):
i =PiQ/PiQ = [*lnPi]/ln f(Q) = [ i*ln i]/ln Q=(Q-1)*DQ and f(Q)=QQ-Q
each ith element of a size () required to cover an object: Pi, = Mi,/M
33
References for the method of calculating the multifractal spectrum: A. Chhabra and R.V. Jensen, Direct Determination of the f() singularity spectrum, Phys. Rev. Lett. 62: 1327, 1989. A. N. D. Posadas, D. Gimenez, M. Bittelli, C. M. P. Vaz, and M. Flury, Multifractal Characterization of Soil Particle-Size Distributions, Soil Sci. Soc. Am. J. 65:13611367 2001
34
Fractals
What are fractals?
Fractals are, in essence, patterns with nonlinear scaling rules. A simple line, such as a circle, scales to 3 pieces 1/3 its size when scaled by 1/3. That is, it scales as N (number of parts) = scale-1. For a fractal, however, the number of new pieces scales nonlinearly with the scale applied. A Koch fractal, for instance, scales into 4 pieces each 1/3 the size of the original.
Koch Fractal scales as log 4/log 3= 1.26
Using a scaling rule, N=AC-DB, the fractal dimension, DB, is calculated from the ratio of the log of the number of new parts N, to the log of scale, C.
ln C D = lim N 1 c 0 ln C
For a line, the fractal dimension is log N/log N-1 = 1. For this 32-segment quadric fractal contour, it is log 32/log 8 = 1.67.
Using FracLac for digital images, the box counting fractal dimension is found from the slope of the regression line for the log-log plot of box size or scale and count.
These figures show a fractal increasing in complexity through 3 scalings. The basic pattern has 32 line segments. At each iteration, 32 new segments replace each segment, but each is scaled to 1/8 rather than 1/32 the size of the segment they replace.
35
Images not generated as one pixel wide contours can be converted to binary using digital image editing programs such as ImageJ.
Where can I find simple fractals and multifractals to analyze? Download MicroMod or another freely available fractal generator, to generate images of multifractals and monofractals. All images shown
here were generated with MicroMod and can be generated as binary images suitable for analysis. MicroMod generates:
Sierpinski Triangles Menger Sponges/Carpets Quadric Fractals Koch Fractals Diffusion Limited Aggregates Branching Structures Henon Maps And more
36