Protocol
Authors
Steven Jansen, Brendan Choat
Overview
This protocol provides details for making measurements of wood anatomical features using imageJ.
Background
ImageJ is a free software package that provides a versatile base for quantifying plant anatomical traits from digital images.
Materials/Equipment
Computer ImageJ software package http://rsbweb.nih.gov/ij/index.html
Procedure
General information
Most basic rule: do measurements using your original picture, but apply any changes, filters, colours, etc. using a copy of the original picture. When closing your image – make sure that you keep the original unchanged (i.e. do not save the changes with the same name).
Do not modify the resolution of the original picture as this would affect your scale and hence the measurements. Also, the measurements performed on .tiff vs .jpg file differ slightly (depending on the compression level of .jpg). Using .tiff file is recommended because it is uncompressed file or uses lossless compression as oppose to .jpg.
Download the ImageJ program from the following website: http://rsbweb.nih.gov/ij/download.html The following are basic steps that could be applied. Much depends on the image analysis program that you use and the features you want to quantify.
- Open picture
- Eventually, auto-stitch various pictures to one picture
- Calibrate image and check if the calibration is correct
- Increase image quality: contrast and brightness; this helps with the segmentation of particular structures
- Create an area of interest (aoi)
- Apply threshold and filter out the structures that you are interested in
- Measure what you want to quantify /select the parameters that you want to measure; exclude or include particles of different size, shape etc. Include or exclude holes. Editing the images can be time consuming, but is important: split, watershed, fill holes, toggle objects on/off, etc.
- Measure
- View measured data
- Copy your data into spreadsheets – make sure you label them so that you can retrace your data to a particular image/slide and specimen.
More detailed instructions
Setting the scale
Method 1
- Start program
- Open picture: File, Open…
- Set scale bar (calibrate image): select the straight line tool from the toolbar – this allows you to draw lines on the image.
- Depending on the size of the scale bar, it might be good to zoom in at a higher magnification before drawing a line that is similar in length as the actual scale bar; to zoom in/out, you can use the combination of “control and +” and “control and -“, respectively.
- Draw a straight line that is as long as the scale bar.
- Select Analyze, Set Scale and fill in the known distance (e.g. 100 μm) and the unit of length; it is also important that you activate “global” by ticking this box – this will “save” the scale bar when modifying the picture.
- Click OK.
- Check if the calibration is correct – this can be done by drawing a line of the scale bar of the image.
Method 2
This method is applicable in case your microphotographs do not have an embedded scale bar.
You can calculate a scale using a stage micrometer which is a slide with inprinted scale.
- Take a photograph of the scale bar on the stage micrometer.
- Follow all the steps in Method1 of the ‘Setting the scale’ section of this PROTOCOL.
- For each lenses (magnification of 4x, 10x, 20x etc) you need to do it separately. It is enough to do it once for each magnification. In the future, you would only need to fill up the fields in a Set Scale box (Analyze, Set Scale) depending on which magnification was used to take your photograph.
Example
Your stage micrometer has a scale 1mm (=1000micron) long and you take the picture under 4x lenses. You open this picture in ImageJ and draw a line 1mm long over the scale bar. In a Set Scale box (Analyze, Set Scale) you put ‘1000’ into ‘Known Distance’ and ‘micron’ into ‘Unit of Length’. At the bottom of the ‘Set Scale’ box you will see e.g. ‘Scale: 0.656 pixels/micron’. This is your scale for all the images taken with the magnification 4x (with use of the same microscope and camera you took a photo of a scale bar with). For higher magnifications the number of pixels per micron will be larger.
Example 1- Measure the double wall thickness of cells (e.g. imperforate tracheary elements)
- Measurements can be done with the line tool: draw a line covering the length that equals the double wall thickness of neighbouring imperforate tracheary cells; both radial and tangential walls can be measured.
- To take the measurement: click at the same time “control and the letter m” or click Analyze and then Measure.
- The length will appear in a separate results box (ignore the angle value in the first column).
- Take 50 measurements; when measuring secondary xylem, make sure you distinguish earlywood from latewood.
- Copy all data from the results box into an excel spreadsheet: click Edit, Select all, Edit Copy.
- Calculate the average, standard deviation, min and max values.
Example 2 – Measure the cell lumen surface area
The lumen surface area can be more interesting than measuring the diameter as the lumen area gives more information. Measurements based on a minimum of 100 cells (perhaps more) are recommended. Usually, it is OK not to worry about cross sections through the tip of cells (e.g. imperforate tracheary elements) as long as measurements are based on a sufficiently high number of cells (> 100). It is also important that you apply the same method consistently across the species studied.
Method 1
- Make sure that you have an Image Type 8 bit (if not, change Image, Type, 8-bit).
- Select a small part of the image with that looks nice and clean, where the lumina show a good contrast from the walls: select the rectangular tool from the tool box; select an area in the image and click Image, Crop
- Improve contrast and brightness (Image, Adjust, Brightness/Contrast) – this helps with the segmentation of fibre walls and lumina; it is good to exaggerate with the brightness and contrast. You can click several times on the “Auto” function to have a very high contrast between dark lumina and white cell walls (or bright lumina and dark cell walls); then click apply.
- Apply threshold: Image, Adjust, Threshold: in the threshold toolbox you have 2 ways of modifying the threshold by moving the upper and lower bar. I usually work with red (choose it from the drop down menu under the bars); then click apply. The red area will be quantified.
- Click once again Image, Adjust, Threshold: now you have an image with black (or white) and red.
- Select the Flood Fill tool (in Photoshop also called the Paint Bucket tool) from the tool bar.
- Select a colour from the Colour Picker (click Image, Color, Color Picker) – grey is preferable (not too dark or too white).
- Fill the cells that you want to measure with the grey colour.
- Apply threshold and move the 2 bars so that you filter out the cells that you coloured.
- Click Analyze and Set Measurements ticking Area, Perimeter and Feret’s diameter; decimal places 2 is OK; click OK.
- Analyze the cells: Analyze, Analyze particles, for the show box: select outlines – this will allow you to see the areas that you measure, click OK. You can also save these images for future use, which will allow you to check the areas that you measured.
- Copy the data into a spreadsheet.
Method 2
- Make sure that you have an Image Type 8 bit (if not, change Image, Type, 8-bit)
- Select a small part of the image that looks nice and clean, where the lumina show a good contrast from the walls: select the rectangular tool from the tool box; select an area in the image and click Image, Crop.
- Improve contrast and brightness (Image, Adjust, Brightness/Contrast) – this helps with the segmentation of fibre walls and lumina; it is good to exaggerate with the brightness and contrast. Click several times on the “Auto” function too achieve a very high contrast between dark lumina and white cell walls (or bright lumina and dark cell walls); then click apply.
- Apply threshold: Image, Adjust, Threshold: in the threshold toolbox you have 2 ways of modifying the threshold by moving the upper and lower bar; I usually work with red (choose it from the drop down menu under the bars); then click apply. The red area will be quantified.
- You can also use the paintbrush or pencil tool to change the colour of particular lumina in order to include or exclude these from the areas that you want to measure – therefore, you need to modify the threshold bars.
- Click once again Image, Adjust, Threshold: now you have an image with black (or white) and red.
- Click Analyze and Set Measurements ticking Area, Perimeter and Feret’s diameter; decimal places 2 is OK; click OK.
- Analyse particles: click Analyze, Analyze particles, then it is important to filter out the actual “red areas” that you want to measure. I would tick the boxes Display results, Clear results, Summarize, Exclude on edges, Include holes, and record starts.
- For the show box: select outlines – this will allow you to see the areas that you measure (this image can also be saved). It is difficult to set a threshold for the circularity, because the lumina vary in shape. They also vary in size. If required, you can use a minimum limit for the size of the area that will be measured, for instance 5 μm2– type 5 in the box and keep the upper limit set at infinity. Alternatively, you can change the upper limit, or both the minimum and upper limit.
- Click OK
- Copy your data into a spreadsheet – make sure you label them so that you can retrace your data to a particular image/slide and specimen.
Method 3
1. Make sure that you have an Image Type 8 bit (if not, change Image, Type, 8-bit).
2. Select a small part of the image with that looks nice and clean, where the lumina show a good contrast from the walls: select the rectangular tool from the tool box; select an area in the image and click Image, Crop
3. Improve contrast and brightness (Image, Adjust, Brightness/Contrast) – this helps with the segmentation of fibre walls and lumina; it is good to exaggerate with the brightness and contrast. You can click several times on the “Auto” function to have a very high contrast between dark lumina and white cell walls (or bright lumina and dark cell walls); then click apply.
4. Apply threshold: Image, Adjust, Threshold: in the threshold toolbox you have 2 ways of modifying the threshold by moving the an upper and lower bar.
5. Click once again Image, Adjust, Threshold: now you have an image with black and red – only the red area of the image can be quantified.
6. Choose a Wand tool and click on the area you want to measure.
7. To take the measurement: click at the same time “control and the letter m” (or only ‘m’) or click Analyze and then Measure.
8. Repeat steps 6-7 as many times as many measurements you would like to take.
9. Copy all data from the results box into an excel spreadsheet: click Edit, Select all, Edit Copy.
Finishing measurements
When closing your image – make sure that you keep the original unchanged (i.e. do not save the changes with the same name).
Notes and troubleshooting tips
Related wiki pages
Measuring leaf perimeter and leaf area
Quantifying fine root and leaf morphology (and seeds) from desktop scans