rain fra tal analysis user’s guide
TRANSCRIPT
BRAIN FRACTAL ANALYSIS USER’S GUIDE AUTHOR: KURT ZIMMER CONTRIBUTERS: JOSHUA GAO, ALEX POPLAWSKY, SAM DONOVAN
INTRODUCTION
Brain size and structure are highly variable across species. Common measures used to characterize gross
anatomy include body size to brain mass ratio, relative sizes of different brain structures, and quantification of
surface area and folding. We created a series of repeatable image analysis steps to streamline and standardize the
determination of these measurements from 2-D images of brain sections. We used data from brainmaps.org, a
publically accessible database with over 10,000 brain images. Analyses were done using ImageJ, an open-source
scientific image analysis software. Initial processing includes several steps using existing ImageJ functions to
process the images and remove noise. Then we apply two custom plug-ins that we wrote to find the curve that
defines the brain perimeter and calculate the fractal dimension value for the surface folding. The fractal dimension
is a mathematical concept that can be used to characterize folding of the surface of the brain, the brain’s
perimeter and area. One important application of our analysis procedures is to make this rich data resource more
accessible to students learning brain anatomy, comparative anatomy, and image processing.
SETUP
• Download
– http://rsbweb.nih.gov/ij/download.html
• Download a brain slice image
– http://brainmaps.org
– Good image to start with: Rattus Norvegicus -> Nissl (coronal, histo, whole-brain) -> R21
• Download external plugins
– http://krayzk9s.com/index.php/programming-projects/18-imagej-plugins
– Save to <ImageJFolder>/plugins (Normally contained in C:\Program Files on a PC)
• Launch ImageJ application and File -> Open your image!
IMAGE PROCESSING
INTRODUCTION:
To begin we have a few problems with this original image that will prevent us from finding a curve
immediately. One is that we have a low amount of contrast, which is another way of saying that the edges aren’t
well defined at the perimeter of the brain. This means that we can’t determine where the edge is exactly. The
other problem is that we have a lot of artifacts. This means that we have a lot of problems with the way that the
image might have been scanned. Some images have random lines and other issues involved. The last issue is that
there is a lot of noise in the image. This means that we have a lot of extraneous data that gets in the way of finding
the perimeter. For example, the inner folds of the brain and the perimeters of the individual cells and parts of the
brain.
PART 1: GAUSSIAN BLUR
Gaussian blur (www.wikipedia.org/wiki/Gaussian_Blur) reduces the amount of noise in an image, which
makes it easier to find the correct curve as described above. Since we are not concerned with small features in the
image, a Gaussian blur will remove much of the image noise without affecting the information we want. This blur is
determined by a formula for each pixel and takes only a radius value as input. Choice of radius depends on the
image size. It should be around the size of half of the distance from one side of a fold to the other, to prevent the
loss of too much detail near each fold.
DIRECTIONS:
• Process>Filters>Gaussian Blur in ImageJ
• Sigma (Radius) chosen for this demonstration is 4.00
– Higher Sigma blurs more, as it samples across more pixels
IMAGES:
PART 2: TRINSINATION
Trinarisation is a plugin that converts each pixel to black, grey or white based on its RGB value. RGB is a
way of describing pixel colors that monitors, TVs and printers use. Every pixel has a red, blue and green value that
when used together creates a specific color like magenta. These values also when averaged together tell you how
bright an object is, for example if red is 120, blue is 50 and green is 109, the brightness value is 279/3 or 93. This
brightness value is what we use as our input values in this plugin. Any pixel with a value below the min value is
output as white, any in the middle is grey, and any above the max value is black.
DIRECTIONS:
For this image a value of 75 for the minimum and 210 for the maximum should do nicely, other values
may be better for other images
Delete the hysteresis output and original image, we don’t need that here (Will be removed in final version
automatically)
PART 3: EDGE FINDER
An edge finder plugin is an algorithm that does just as its name implies, but is actually more complicated
than you would expect. It involves a little bit of calculus manipulation on each pixel in the image. Basically what the
goal of an edge detection algorithm is to find the points on an image in which the difference between pixel
brightness values as explained above, are most significant. This makes a lot of intuitive sense, since we perceive
edges of objects in an image as a sharp change from one color, or brightness, to another. The calculus equation
allows us to find these sharp changes by computing the gradient of each pixel, or the measure of the difference
between the pixel and the others surrounding them. In our image, there should only be 3 colors (black, white and
grey), so this calculation is straightforward and should give us clearly defined edges.
DIRECTIONS
• Process -> Find Edges in ImageJ
IMAGES:
PART 5: CURVE FINDER
The perimeter finder is a custom plug‐in that we wrote that finds every curve in the image, and then selects the
perimeter from among them. A curve is defined by the collection of all points that are connected together. The
way our algorithm works is to connect all pixels to their neighbors which then should define a complete curve,
since ImageJ’s edge finder connects all the curves it finds. Once we have this perimeter, we’ll be able to 6ind the
perimeter length, area of the brain slice inside the perimeter and the fractal dimension of the brain.
DIRECTIONS:
• This plugin finds the longest curve in an image
– In these brain scans, the longest curve is almost guaranteed to be the perimeter
– May need user adjustments before this step to correct errors in previous steps, but no
adjustments are needed here