Literature DB >> 32161812

A new method for measuring the size of nematodes using image processing.

David G H Andrews1.   

Abstract

Many studies have been made on nematodes, especially Caenorhabditis Elegans, which are used as a model organism. In many studies, the size of the nematode is important. This article describes a method of measuring the length, volume and surface area of nematodes from photographs. The method uses the imaging software ImageJ, which is in the public domain. Two macros are described. The first converts the images into binary form, and the second uses several built-in functions to measure the length of the worm and its diameter along its length. If it is assumed that the worm has a circular cross-section, then the volume and surface area of the nematode can be calculated. This is a cheap and easy technique.
© The Author(s) 2020. Published by Oxford University Press.

Entities:  

Keywords:  nematode; image processing; size

Year:  2020        PMID: 32161812      PMCID: PMC6994075          DOI: 10.1093/biomethods/bpz020

Source DB:  PubMed          Journal:  Biol Methods Protoc        ISSN: 2396-8923


Introduction

The phylum Nematoda is very diverse, and nematodes are widely studied. The nematode Caenorhabditis elegans has been used as a model for ageing [1] for population studies [2] and for genomics modelling [3, 4]. Caenorhabditis elegans have a quick life cycle (∼2.5 days) and a short life span (∼2 weeks), and they are fairly small (an adult worm has a diameter of about 50 μm and about 1 mm long.) In many studies, the length of the worm has been measured. Since living worms are very seldom straight, this is not always straightforward. This measurement was performed by drawing a series of segmented lines along the worm using image processing software such as ImageJ [5] and adding the lengths [6, 7]. Some studies use the area of the nematode, measured using image processing, as a measure of the size of the worm [8]. Another technique is to measure them when straightened after death [9, 10] or chemically treated [11]. In several studies, it is important to be able to measure the volume of the worms [12, 13]. In the past, this was usually done by measuring the length and diameter of the worm and assuming they were cylindrical [14-16]. This technique will tend to overestimate the volume. Recently, there have been developments using microfluidic chips to measure the size of the worms, for instance, Hu et al. [17] described a microchip for sorting C. elegans by size. There have also been some specialized image processing techniques, such as that described in [18]. In this article, an image processing technique for measuring the volume of C. elegans using open-source image processing software, Fiji [19], which is a version of ImageJ, is described. Photographs of the individual worms were taken using a microscope, and the photographs cropped to show individual worms. Since the processing involved can be written as a macro, large numbers of images can be processed in a short time. The advantage of this system is that it is free.

Material and Methods

As stated in the introduction section, this method only works for one worm per image, so it is necessary to crop each image so that one worm is present, and other objects, such as eggs, are excluded. Also, the images should be spatially calibrated, so the output is in the units of length rather than pixels. The first step is to make the image binary, with the worm black and the background white. How this is done depends on the initial image. Figure 1a shows a C. elegans photographed on agar on a Petri dish through a microscope. Blue light was used to enhance the contrast between the worm and the background. Figure 1b shows the nematodes photographed in a water droplet on a slide. It is important to achieve the greatest contrast in the initial image.
Figure 1:

(a) Caenorhabditis elegans on agar photographed with a Nikon camera through a Leica microscope. (b) Nematodes photographed in water using a Leica microscope with a built-in camera.

(a) Caenorhabditis elegans on agar photographed with a Nikon camera through a Leica microscope. (b) Nematodes photographed in water using a Leica microscope with a built-in camera. After selecting a small area around the worm, the image is split into the red, green and blue components, and the one with the greatest contrast is selected. The ‘enhanced contrast’ tool is then applied, followed by the ‘binarize’ tool. In some photographs, after binarizing, the ‘fill-holes’ tool is needed. If the edges of the image are not sharp, then the image can be dilated then eroded, and if there are other small artefacts in the image, such as eggs, then these can be eliminated by eroding followed by dilating. The binary images for the above two pictures are shown in Fig. 2. The final part of this initial processing is to expand the canvas and rotate the image until its longest dimension is horizontal, and the image saved into a separate folder. If many worms are to be analysed, then this initial processing can be automated using a macro. An example of such a macro (binary.ijm) can be found at https://github.com/Hornerman/nematode, but it will need to be adapted depending on the quality and colours in the original images. After downloading the macro, it should be run from Fiji. This macro makes use of several built-in functions available in Fiji, such as ‘make binary’. You will be asked to select the folder, which should have a subfolder called ‘photos’ where the images of the worms should be placed with no other files. The binary images will be placed in a subfolder called ‘binary’. Some initial changes to the image may be needed, such as contrast, to produce a good binary image.
Figure 2:

Binary images of nematodes are shown in Figure 1.

Binary images of nematodes are shown in Figure 1. Line through the centre of ‘spine’ line. The Fiji macro (worm.ijm which is also at https://github.com/Hornerman/nematode) is designed to find the length, volume and surface area of the worm uses several built-in functions provided in Fiji. The worm is turned into a line using the built-in ‘2 D/3D Skeletonize’ tool which erodes the image to a line one pixel wide. This line will be referred to as the ‘spine line’. A function within the programme called ‘beginning’ then finds the end of the spine line. A vertical profile line is drawn through the centre of the image (Fig. 3) and the intensity profile along it is measured. The maximum on the profile gives a point on the spine line. If the worm is curved, then there may be more than one point, so the first point is chosen. A second vertical profile line is drawn a few pixels to the right of the first line, and a second point on the spine line is found. This allows the position and slope of the spine line to be determined. After this, a short profile line (about 40 pixels long) is drawn perpendicular to the spine line. It is moved along the line, calculating the position and the slope at each point to keep the line segment perpendicular. This is continued to the end of the spine line. This is shown in Fig. 4. A second function called ‘points’ moves the short profile lined through the worm to the other end. This process gives in the coordinates and slope of the spine line along its length, from which the length of the line can be found. A limitation of the method is if part of the spine line gets closer than about 20 pixels or overlaps another part, it will fail.
Figure 3:

Line through the centre of ‘spine’ line.

Figure 4:

‘Spine’ line of the worm, with the line to find its end.

‘Spine’ line of the worm, with the line to find its end. The spine line produced by the 2D/3D Skeletonize tool is slightly shorter than the worm, due to the eroding action of the tool. A function ‘ends’ extends the spine line to the ends of the worm. The original binary image is converted to a one-pixel wide outline using the built-in tool ‘Outline’. The resulting image is called ‘edge.tif’. The slope of the beginning and end of the spine line is measured, and a profile line drawn at this slope from the end of the thin spine line to the outline of the complete worm (Fig. 5). This allows the spine line to be extended to the complete length of the worm. The total length of the worm is given by adding the extra lengths to the original length of the spine line.
Figure 5:

Extending ‘spine’ line to the end of the worm.

Extending ‘spine’ line to the end of the worm. The function ‘radii’ finds the positions of the edge of the outline from the ‘edge.tif’ image. A slightly longer line is moved through the outline of the worm drawn normal to the central line. This is shown in Fig. 6. This gives the diameter of the worm along its length.
Figure 6:

Find the width of the worm.

Find the width of the worm. To find the volume of the worm, assume it is divided up into a series of truncated cone sections, as shown in Fig. 7a. The volume of each section is calculated, assuming it is a circular truncated cone, height and radius at either end and (Fig. 7b) using the following equation:
Figure 7:

(a) Worm divided into truncated cones. (b) Truncated cone.

(a) Worm divided into truncated cones. (b) Truncated cone. The surface area of the worm can be found by summing the lateral surface area of the truncated cones: The outputs from the programme are a text file from for each worm, labelled outputfilename.txt and a text file labelled output.txt for the complete set of worms. outputfilename.txt lists the positions of the edges of the worm, and output.txt lists the length, volume and surface area of each worm. These files can be used in another programme such as Excel (Fig. 8). Also, a straightened silhouette of the worm can be produced (Fig. 9).
Figure 8:

Worms outline are shown in Excel.

Figure 9:

Straightened silhouettes of the worms in Figure 1.

Worms outline are shown in Excel. With minor changes to the programme, the curvature of the worm could be calculated, where is the change in angle for each distance along the worm from the spine line (Fig. 4). This quantity is important in some studies, for example, Padmanabhan et al. [20].

Results

The software has been tested on several sets of worm images. The results are exported as text files. An example of some of the measurements on for a single worm is given in Table 1, showing the position along the worm and width at that point. Table 2 is an example of measurements on a set of worms giving the length, volume and surface area.
Table 1:

Sample of data from a single worm

PositionWidth
233.257347.951
237.658350.324
241.614349.73
245.718350.126
252.002351.974
254.144352.863
258.262354.134
262.457354.407
266.258354.72
270.389354.999
274.816355.262
278.406355.599
283.24354.806
286.984355.132
290.644355.457
294.84354.738
298.9356.071
301.897356.352
305.364357.607
307.613357.61
310.416358.508
Table 2:

Sample of data from a set of worms

FileLength (mm)Volume (mm3)Surface area (mm2)
1.tif1.2470.005940.2918
10.tif1.2940.005980.2939
11.tif1.2620.005920.2934
12.tif1.280.006020.2977
13.tif1.2460.0060.2945
14.tif1.2520.005940.2925
15.tif1.2560.005990.2928
16.tif1.250.005950.2924
17.tif1.270.005960.2947
18.tif1.2860.005960.2951
2.tif1.2540.005950.2934
3.tif1.2480.005930.2908
4.tif1.2520.005990.2931
5.tif1.2150.005840.2827
6.tif1.2510.005930.2919
7.tif1.2590.005980.292
8.tif1.2710.005990.2957
9.tif1.2680.005960.2934
Sample of data from a single worm Sample of data from a set of worms When applied to a set of 18 different images of the same worm, the standard deviation (SD) of the lengths was <2.5% of the average length, the SD of the surface areas was <4% of the average surface area and the SD of the volumes was 2% of the average volume. It is possible to measure the length of the worms manually using an image package such as ImageJ. If the line is drawn along the worm, then the programme gives its length. This is a fairly time-consuming process. In Fig. 10, segmented line through the worm had length 1.24 mm, which was in very good agreement with the length 1.247 mm given by the automated worms.ijm macro. The maximum width of this worm was measured manually to be about 0.1 mm. If the worm was assumed to be cylindrical, then the resulting volume would be 0.0097 mm3. This is significantly greater than the value of 0.00594 mm3 given by the macro since the macro actually measures the shape of the worm.
Figure 10:

Segment line through the worm.

Straightened silhouettes of the worms in Figure 1. Segment line through the worm.

Discussion

The system gives an easy way of comparing the size of worms, though it was not compared to any other measurement system. The quality of the initial photograph is very important. The greater the initial contrast between the worm and its surroundings, the easier it is to produce a binary image. With good quality images, the size of large numbers of nematodes can be measured very easily and quickly. The main limitation of the technique is that it cannot deal with worms overlapping themselves or other worms. The resolution of the measurements is dependent on the number of pixels within each worm. The method counts the number of pixels around the perimeter of the worm, so the greater the number of pixels, the greater the resolution.
  17 in total

1.  A size threshold governs Caenorhabditis elegans developmental progression.

Authors:  Sravanti Uppaluri; Clifford P Brangwynne
Journal:  Proc Biol Sci       Date:  2015-08-22       Impact factor: 5.349

2.  Farming and public goods production in Caenorhabditis elegans populations.

Authors:  Shashi Thutupalli; Sravanti Uppaluri; George W A Constable; Simon A Levin; Howard A Stone; Corina E Tarnita; Clifford P Brangwynne
Journal:  Proc Natl Acad Sci U S A       Date:  2017-02-09       Impact factor: 11.205

3.  Fiji: an open-source platform for biological-image analysis.

Authors:  Johannes Schindelin; Ignacio Arganda-Carreras; Erwin Frise; Verena Kaynig; Mark Longair; Tobias Pietzsch; Stephan Preibisch; Curtis Rueden; Stephan Saalfeld; Benjamin Schmid; Jean-Yves Tinevez; Daniel James White; Volker Hartenstein; Kevin Eliceiri; Pavel Tomancak; Albert Cardona
Journal:  Nat Methods       Date:  2012-06-28       Impact factor: 28.547

4.  Many transcription factors contribute to C. elegans growth and fat storage.

Authors:  Akihiro Mori; Amy D Holdorf; Albertha J M Walhout
Journal:  Genes Cells       Date:  2017-08-08       Impact factor: 1.891

5.  The temporal scaling of Caenorhabditis elegans ageing.

Authors:  Nicholas Stroustrup; Winston E Anthony; Zachary M Nash; Vivek Gowda; Adam Gomez; Isaac F López-Moyado; Javier Apfeld; Walter Fontana
Journal:  Nature       Date:  2016-01-27       Impact factor: 49.962

6.  Locomotion of C. elegans: a piecewise-harmonic curvature representation of nematode behavior.

Authors:  Venkat Padmanabhan; Zeina S Khan; Deepak E Solomon; Andrew Armstrong; Kendra P Rumbaugh; Siva A Vanapalli; Jerzy Blawzdziewicz
Journal:  PLoS One       Date:  2012-07-06       Impact factor: 3.240

7.  C. elegans feeding defective mutants have shorter body lengths and increased autophagy.

Authors:  Catarina Mörck; Marc Pilon
Journal:  BMC Dev Biol       Date:  2006-08-03       Impact factor: 1.978

8.  Coupling of Rigor Mortis and Intestinal Necrosis during C. elegans Organismal Death.

Authors:  Evgeniy R Galimov; Rosina E Pryor; Sarah E Poole; Alexandre Benedetto; Zachary Pincus; David Gems
Journal:  Cell Rep       Date:  2018-03-06       Impact factor: 9.423

9.  TGF-β signaling can act from multiple tissues to regulate C. elegans body size.

Authors:  Aidan Dineen; Jeb Gaudet
Journal:  BMC Dev Biol       Date:  2014-12-06       Impact factor: 1.978

10.  The Coding Regions of Germline mRNAs Confer Sensitivity to Argonaute Regulation in C. elegans.

Authors:  Meetu Seth; Masaki Shirayama; Wen Tang; En-Zhi Shen; Shikui Tu; Heng-Chi Lee; Zhiping Weng; Craig C Mello
Journal:  Cell Rep       Date:  2018-02-15       Impact factor: 9.423

View more

北京卡尤迪生物科技股份有限公司 © 2022-2023.