As one of the elements that comprises root system architecture (RSA) [1, 2], root distribution in the soil determines uptake availability of water and nutrients in the soil. This is because plants could take up water and nutrients within the reach of their roots [3, 4]. Thus, root distribution greatly affects crop productivity [5]. For example, shallow-rooted plants perform better by utilizing fertilization close to the ground surface, whereas deep-rooted plants perform better by utilizing fertilization in the deep soil area [6]. In deep-rooted plants, water defects caused by drought are avoidable because their roots elongate into deeper soil zone containing more water [4, 7, 8].

Since RSA phenotyping processes are complex and laborious [9], RSA traits are not so widely measured compared to above-ground traits that are obviously related to the yield [10]. Another issue of RSA phenotyping is that most previously conducted RSA studies applied two-dimensional (2D) information to date [10, 11]. The 2D information would be insufficient to represent the three-dimensional (3D) root structure and deployment in the soil. Recently, 3D RSA phenotyping has been available using 3D imaging machines, such as X-ray computed tomography (CT), magnetic resonance imaging (MRI), and multicamera systems [11,12,13,14]. Particularly, X-ray CT and MRI could observe the roots in the soil in situ, and they have been extensively utilized for conducting RSA studies [15].

By utilizing software to quantify RSA traits, root segments in the X-ray CT and MRI images are isolated. In the case of X-ray CT, RooTrak [16, 17], RootViz3D® [18], Rootine [19], and RSAvis3D [20] were developed as software to segment roots in the soil. Based on the structure information such as root shape and branching, RooTrak and RootViz3D® isolate root segments by tracking the root segments from the point where an operator indicated [16,17,18]. In addition, Rootine and RSAvis3D isolate root segments without manual operation; Rootine segments roots using feature detection of the tubular shape of roots, while RSAvis3D segments roots using an edge detection algorithm [19, 20]. In the case of MRI, NMRooting software was developed [21]. NMRooting simply isolates root segments by a thresholding method [21]. Furthermore, RSA traits are measured based on the isolated root segments. For example, the root volume is calculated by the voxel counting of the root segments [16,17,18], while the root length is approximated by the voxel counting of the skeletonized root segments [19, 22].

RSA vectorization (connecting the adjacent root voxels to enable path to represent RSA shape) is a method of RSA phenotyping, allowing for topological analysis and root-growing angle calculation [21, 23]. In the case of NMRooting [21] that has a 3D vectorization function, RSA is vectorized by tracing the shortest path from each root voxel to the root–shoot junction, followed by pruning the short paths that are not on the root segments. However, this vectorization algorithm is sensitive to the noise in 3D volumes. Generally, there is a tradeoff among scanning time, scanning area size, and image quality in image acquisition [24,25,26,27]. Therefore, rapid scanning of a large-sized pot tends to make noisy image data. Additionally, minerals, air, and water inside soils also become noise [26]. For example, the root-segmented images in a study conducted on RSAvis3D have much noise [20]. This is because RSAvis3D was conditioned to be applicable to high-throughput RSA visualization, thereby deprioritizing the image quality; it scanned the relatively large pots using the calcined clay [28] (having large voids between particles) for a short time. Moreover, X-ray CT images of undisturbed soil samples collected from the fields [29] also contain non-root segments as noise. In such cases, a vectorization software with a robust algorithm that is not affected by noise is needed.

In this study, based on the root-segmented images using RSAvis3D [20], we developed a robust vectorization software RSAtrace3D for measuring monocot RSA. By indicating some base points that represent where the roots are located, RSAtrace3D vectorizes monocot RSA comprising radicle and crown roots even in noisy images. Further, we vectorize rice (*Oryza sativa*) RSA and measure RSA-related traits, such as root length, root growth angle, and root distribution parameters in the soil. We demonstrate that these measurements are equal to or more accurate than those performed using hand or a 2D vectorization.

### Implementation

RSAtrace3D is a graphical user interface (GUI) software implemented in Python3 [30] (Fig. 1(a)). It has a main window, including three subviewers (the slice, tree, and projection viewers)—to show the operators processed images and data, and it enables one to operate CT image analysis visually and intuitively. It shows a volume slice image, which is selected in any position by an operator. Further, RSAtrace3D requires base points to make the vectorization in the slice image, and the operator places them as “nodes” in the slice viewer. Thus, RSAtrace3D vectorizes the roots using the given nodes and calculates single root-related traits. The results are shown in the tree viewer. The projection viewer helps us to observe the overall progress of the vectorization. Additionally, the vectorized RSA is saved as a JavaScript Object Notation, (JSON) [31] formatted file as “root information (rinfo).” RSA-related traits calculated from the rinfo files are presented in the summary viewer (Fig. 1(b)).

#### Overview of RSAtrace3D

Process and data flow in RSAtrace3D are demonstrated in Fig. 2, which is divided into three processes: segmentation, vectorization, and calculation processes. In the segmentation process, root segments are isolated from raw CT images. This function is not handled by RSAtrace3D and should be performed using root segmentation software, such as RSAvis3D [20]. In the vectorization process, root segments are vectorized by applying GUI operations. Operators register base points (nodes), such as both ends of the root segments, which are vectorized by the interpolation between the nodes. Vectorization is performed on individual roots. In addition, vectorized data are stored as a rinfo file. In the calculation process, single root- and RSA-related traits are calculated using the vectorized data, and they are exportable as comma-separated value (CSV) files.

#### Segmentation process

Volumetric data, which should be 8-bit grayscale image and stored in a single directory, are imported as a 3D NumPy array [32]. It is recommended to volumetric data in which root fragments are enhanced by utilizing root vectorization software, such as RSAvis3D [20].

#### Vectorization process

### RSA data formatting

RSA vectorized data are managed using a tree structure object (Fig. 3). In this case, the depth of the tree is 2. Location of roots in the soil is represented in Euclidean coordinates. The root node (depth 0) contains the information of all single roots comprising RSA. The root node contains the coordinate of the place where seeds are sown. The inner node (depth 1) contains the single root-related information, comprising several leaf nodes (depth 2) containing the coordinate that indicates the location of root fragments. For example, an RSA having 1 radicle and 2 crown roots is represented by 1 root node containing 3 inner nodes. In this study, root, inner, and leaf nodes are henceforth written as the base, root, and relay nodes, respectively.

### Line making and interpolation between nodes

RSAtrace3D vectorized a single root according to coordinates of the base and relay nodes, making line-connecting nodes to represent the single root shape. Three options are available to make lines: “Straight,” “Spline,” and “COG tracking” (Fig. 4). “Straight” connects the adjacent nodes to make a straight polyline. To represent a complex curve of a root, many relay nodes need to be registered. By automatically adding nodes (interpolated nodes) using a function “splprep” in a module “interpolate” of SciPy, “Spline” makes a spline curve through all base and relay nodes [33]. It gives a smooth line, but a line shape is forced to be a spline curve. “COG tracking” makes a curve by automatically tracking a single root from the node farthest from the base node to the base node through the remaining nodes. Every 4 voxels in the direction of travel is corrected by utilizing the COG of the root segment, and an interpolated node is added. Additionally, “COG tracking” also gives a smooth line and is likely to fit the original root curve. This interpolation process (algorithm) can be customizable and extendable for user’s demands.

#### Calculation processes

### Single root- and RSA-related trait calculation processes

Single root-related traits: Single root-related traits are measured by employing node and volume information. RSAtrace3D makes the vectorized root data from the nodes. Thus, it is rapid and easy to calculate root shape and size measuring. For example, the root growth angle (the angle between the horizontal line and line connecting both end nodes) and length were calculated in this study. The root growth angle is an angle calculated by applying a trigonometric function, and the root length is the cumulative distance between adjacent nodes. Given that *n* denotes the number of interpolated nodes of single root and Euclidean coordinates of *i*-th node is denoted by *P*_{i}(*x*_{i}, *y*_{i}, *z*_{i}), the root growth angle *θ* (radian) is calculated by utilizing the following equation:

$$\theta ={\mathit{\tan}}^{-1}\left\{\frac{\left|{z}_n-{z}_1\right|}{\sqrt{{\left({x}_n-{x}_1\right)}^2+{\left({y}_n-{y}_1\right)}^2}}\right\}$$

(1)

Given that voxel resolution is denoted by *r* (mm/voxel), root length *L* (cm) is calculated using the following equation:

$$L=\frac{r}{10}\sum \limits_{i=1}^{n-1}\sqrt{{\left({x}_{i+1}-{x}_i\right)}^2+{\left({y}_{i+1}-{y}_i\right)}^2+{\left({z}_{i-1}-{z}_i\right)}^2}$$

(2)

RSA-related traits: Given that *N* denotes the number of single roots and *I*-th root growth angle is denoted by *θ*_{I}, the average root growth angle \(\overline{\theta}\) is calculated by utilizing the following equation:

$$\overline{\theta}=\frac{1}{N}\sum \limits_{I=1}^N{\theta}_I$$

(3)

Given that *I*-th root length is denoted by *L*_{I}, the total root length *TL* (cm) is calculated by employing the following equation:

$$TL=\sum \limits_{I=1}^N{L}_I$$

(4)

Root distribution index (RDI) is a parameter representing how deep a plant proliferates its root [34,35,36]. It is the centroid of vertical root distribution, and it is calculated by measuring the root length in the soil by depth averaging them weighted with the depth [34, 35]. Before RDI calculation, between nodes is interpolated at a voxel resolution. Given that the number of interpolated nodes in *I*-th root is \(\overset{\acute{\mkern6mu}}{n_I}\), vertical Euclidean coordinate of *i*-th node in *I*-th root is denoted by *z*_{(I, i)}, and vertical Euclidean coordinate of the base node is denoted by *z*_{b}, RDI (cm) is calculated by utilizing the following equation:

$$\mathrm{RDI}=\frac{r}{10}\left[\frac{1}{N}\sum \limits_{I=1}^N\left\{\frac{1}{\overset{\acute{\mkern6mu}}{n_I}}\sum \limits_{i=1}^{\overset{\acute{\mkern6mu}}{n_I}}{z}_{\left(I,i\right)}\right\}-{z}_b\right]$$

(5)