Nick Sparks`s ImageJ cheat sheet

advertisement
ImageJ Cheat Sheet
This is a cheat sheet designed for the easy analysis of microscope images
using the image analysis program, ImageJ. Currently, this cheat sheet has
two parts: Particle Counting/Analysis and Determining the Percentage of
Fibrosis of a Sample. More parts will be added, as they are needed.
Disclaimer: This cheat sheet is not perfect, but it will either help you
complete your goal from beginning to end, or it will at least get you started
in the right direction. As with most projects, patience is a necessity. Good
luck!
The following parts require the ImageJ plug-in: Segmentation
Particle Counting/Analysis:
Loading an image into the ImageJ program:
1. Open the ImageJ program.
2. Go to File -> Open. Select the picture that you would like to analyze. Note: It may
be the case that you need to convert the image to a JPEG or analogous format. To
do this, simply open the picture with Preview and save the picture as a JPEG
using Save As, then use the toggle to select the format to JPEG.
3. You should now be able to see the image that you want to analyze.
Optional: If you would like to know the actual areas of objects on the screen, say the
areas of a collection of cells, then knowing units is a must. ImageJ does this with ease:
1. On the ImageJ Tool Bar, select the straight-line icon. (This is on the same tool bar
as a square, an oval, etc. It’s the same tool bar that opens up with ImageJ.)
2. Using the straight-line tool, use the cursor to mark the length of any object on the
picture that you know the length of.
3. On the top tool bar, select Analyze.
4. Scroll down to Set Scale.
5. Fill in Known Distance to the length of the object that you are measuring. This
allows ImageJ to set up a pixel to distance ratio that allows area to be expressed in
the appropriate units.
6. Fill in the units of measurement. Any units of distance should work: cm, mm,
microns, etc.
7. Click Global.
8. Click Okay.
9. To check that you have indeed set the scale, use the line tool again and measure
another object. Select Analyze, then select Measure. A window should pop up
that displays the length of the object you just measured.
Analysis:
1.
2.
3.
4.
Click on the image in the ImageJ window.
On the top tool bar select Image.
Select Type.
Select 8-bit. This converts the image into a format that makes analysis possible.
You should now see that your image is no longer in color.
5. On the top tool bar select Image.
6. Select Adjust, the select Threshold.
7. This step should have turned all of the objects of interest Red.
8. On the top tool bar, select Analyze.
9. Select Analyze Particles.
10. A window will pop up. Under Size (in the units you specified), give the area that
you want to analyze a lower bound. So if you wanted a minimum of say 50
mm^2, you would write 50-Infinity in the box. Click Display Results and don’t
click any of the other boxes. All other boxes should be clear of check marks.
11. In the Toggle Menu, select Outlines.
12. Click Okay.
13. Two windows should have popped up. One with the areas of the objects listed in
the units you specified and another window with the objects outlined with
numbers inside their outlines. Each number with an area corresponds to the area
of the object with that number in it.
Statistics:
1. If you would like a distribution of the areas, click on your image again. The
objects of interest should still be in red.
2. On the top tool bar, select Analyze.
3. Select Distribution.
4. Unselect Automatic Binning.
5. Write in the number of bins that you want and what area range to consider.
6. Click Okay.
7. A window should come up that gives you all necessary statistics for the areas of
the objects in your picture and their distribution in a bar format.
Determining the Percentage of Fibrosis of a Sample
Loading an image into the ImageJ program:
1. Open the ImageJ program.
2. Go to File -> Open. Select the picture that you would like to analyze. Note: It may
be the case that you need to convert the image to a JPEG or analogous format. To
do this, simply open the picture with Preview and save the picture as a JPEG
using Save As, then use the toggle to select the format to JPEG.
3. You should now be able to see the image that you want to analyze.
Optional: If you would like to know the actual areas of objects on the screen, say the
areas of a collection of cells, then knowing units is a must. ImageJ does this with ease:
1. On the ImageJ Tool Bar, select the straight-line icon. (This is on the same tool bar
as a square, an oval, etc. It’s the same tool bar that opens up with ImageJ.)
2. Using the straight-line tool, use the cursor to mark the length of any object on the
picture that you know the length of.
3. On the top tool bar, select Analyze.
4. Scroll down to Set Scale.
5. Fill in Known Distance to the length of the object that you are measuring. This
allows ImageJ to set up a pixel to distance ratio that allows area to be expressed in
the appropriate units.
6. Fill in the units of measurement. Any units of distance should work: cm, mm,
microns, etc.
7. Click Global.
8. Click Okay.
9. To check that you have indeed set the scale, use the line tool again and measure
another object. Select Analyze, then select Measure. A window should pop up
that displays the length of the object you just measured.
Analysis:
1. On the ImageJ task bar, make sure that the ‘square’ icon is selected. This will
allow us to compute area later on.
2. On the top tool bar, select Plugins.
3. Select Segmentation.
4. Select Colour based Thresholding.
5. This should open a window that gives sections called Hue, Saturation, and
Brightness. We will only be working with Hue.
6. Use the slide bars to filter out the color that you would like to analyze. In the case
of fibrosis, usually a stain of blue is used, so we would want to place the slide
bars as boundaries for the blue color. You should immediately see that the color
that you are selecting would be filtered out, so that only it remains.
7. Select Image from the top tool bar.
8. Select Type.
9. Select 8-bit. This should turn a color picture into a grayscale picture.
10. Select Image once again from the top tool bar.
11. Select Adjust.
12. Select Threshold. This should have turned your selected color RED. If it didn’t,
don’t worry! On the bottom slide bar in Threshold simply move the bottom scroll
bar more to the left. Take some time to play with this and adjust your image
accordingly. At this point, you should have you area of interest highlighted in
RED.
13. Select Analyze from the top tool bar.
14. Select Measure. If nothing happened, it is the case that the Results window is
hidden under your picture! So find the Results window.
15. The Results window should display a percentage. The number next to this is only
important if you followed the Optional section, since this number would
correspond to the area of the object that you color filtered.
16. Select Image from the top tool bar.
17. Select Type.
18. Select RGB Color. This transforms your image back to a color image, even if you
don’t notice it yet.
19. If the Threshold Colour window is still open, under Hue, reset the scroll bars back
to their original settings. The top scroll bar should be all the way to the left and
the bottom scroll bar should be all the way to the right. This will recreate your
color image.
20. Repeat steps 7-15.
21. Take note of this final number. It corresponds to the total non-white area of your
image, the part that corresponds to the sample and not to any free space.
Statistics:
1. Take the percentage that you calculated for the fibrosis and divide this by the
last percentage that you calculated. Multiply the result by 100. This is the
percent of fibrosis in your sample.
Nick Sparks
April 28, 2008
Download