Skip to main content
Browse Subject Areas

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

GPU-accelerated ray-casting for 3D fiber orientation analysis

  • Roman Shkarin ,

    Roles Conceptualization, Formal analysis, Investigation, Software, Validation, Visualization, Writing – original draft, Writing – review & editing

    Affiliations Laboratory for Applications of Synchrotron Radiation, Karlsruhe Institute of Technology, Karlsruhe, Germany, Institute for Automation and Applied Computer Science, Karlsruhe Institute of Technology, Karlsruhe, Germany

  • Svetlana Shkarina,

    Roles Conceptualization, Investigation, Methodology, Visualization, Writing – original draft, Writing – review & editing

    Affiliations Physical Materials Science and Composite Materials Centre, Research School of Chemistry & Applied Biomedical Sciences, National Research Tomsk Polytechnic University, Tomsk, Russia, Institute for Photon Science and Synchrotron Radiation, Karlsruhe Institute of Technology, Eggenstein-Leopoldshafen, Germany

  • Venera Weinhardt,

    Roles Conceptualization, Investigation, Methodology, Supervision, Writing – original draft, Writing – review & editing

    Affiliations Laboratory for Applications of Synchrotron Radiation, Karlsruhe Institute of Technology, Karlsruhe, Germany, Institute for Photon Science and Synchrotron Radiation, Karlsruhe Institute of Technology, Eggenstein-Leopoldshafen, Germany, Centre for Organismal Studies, COS, Heidelberg University, Heidelberg, Germany

  • Roman A. Surmenev,

    Roles Conceptualization, Formal analysis, Resources, Writing – original draft, Writing – review & editing

    Affiliation Physical Materials Science and Composite Materials Centre, Research School of Chemistry & Applied Biomedical Sciences, National Research Tomsk Polytechnic University, Tomsk, Russia

  • Maria A. Surmeneva,

    Roles Conceptualization, Formal analysis, Resources, Writing – original draft, Writing – review & editing

    Affiliation Physical Materials Science and Composite Materials Centre, Research School of Chemistry & Applied Biomedical Sciences, National Research Tomsk Polytechnic University, Tomsk, Russia

  • Andrei Shkarin,

    Roles Conceptualization, Formal analysis, Software, Visualization, Writing – original draft, Writing – review & editing

    Affiliation Laboratory for Applications of Synchrotron Radiation, Karlsruhe Institute of Technology, Karlsruhe, Germany

  • Tilo Baumbach,

    Roles Conceptualization, Funding acquisition, Project administration, Resources, Supervision, Writing – original draft, Writing – review & editing

    Affiliations Laboratory for Applications of Synchrotron Radiation, Karlsruhe Institute of Technology, Karlsruhe, Germany, Institute for Photon Science and Synchrotron Radiation, Karlsruhe Institute of Technology, Eggenstein-Leopoldshafen, Germany

  • Ralf Mikut

    Roles Conceptualization, Formal analysis, Funding acquisition, Project administration, Resources, Supervision, Validation, Writing – original draft, Writing – review & editing

    Affiliation Institute for Automation and Applied Computer Science, Karlsruhe Institute of Technology, Karlsruhe, Germany


Orientation analysis of fibers is widely applied in the fields of medical, material and life sciences. The orientation information allows predicting properties and behavior of materials to validate and guide a fabrication process of materials with controlled fiber orientation. Meanwhile, development of detector systems for high-resolution non-invasive 3D imaging techniques led to a significant increase in the amount of generated data per a sample up to dozens of gigabytes. Though plenty of 3D orientation estimation algorithms were developed in recent years, neither of them can process large datasets in a reasonable amount of time. This fact complicates the further analysis and makes impossible fast feedback to adjust fabrication parameters. In this work, we present a new method for quantifying the 3D orientation of fibers. The GPU implementation of the proposed method surpasses another popular method for 3D orientation analysis regarding accuracy and speed. The validation of both methods was performed on a synthetic dataset with varying parameters of fibers. Moreover, the proposed method was applied to perform orientation analysis of scaffolds with different fibrous micro-architecture studied with the synchrotron μCT imaging setup. Each acquired dataset of size 600x600x450 voxels was analyzed in less 2 minutes using standard PC equipped with a single GPU.


Quantification analysis of fiber orientation is frequently required in the fields of medical, material and life sciences. The orientation allows to predict properties of materials reinforced with fibers and regeneration speed of tissues with integrated scaffolds, validate and guide a fabrication process of scaffolds with controlled fiber orientation.

There is a vast number of approaches for quantification of fiber orientation. The application of each approach greatly depends on an imaging method and hardware that dictates data dimensionality, dynamic range, and spatial resolution expressing a minimal resolvable size of structures.

Over the last decades, several approaches for two-dimensional (2D) data analysis emerged. The Hough transform was utilized for analysis of collagen fibers [1], electrospun polyacrylonitrile fibers [2], and alignment quantification of structures in textile composites [3]. The approach using intensity gradient and its magnitudes allowed to determine the orientation at every pixel of images acquired from cytoskeletal fibers [4], myofiber disarray [5], fibers in human ligament fibroblast [6], unidirectional fiber reinforced polymers [7], and collagen fibers [8]. The methods involving the analysis of spatial frequency components of the 2D Fourier spectrum enabled to reveal a global orientation of presented structures. They were applied to quantify direction of nanofibrous and nonwovens layers of textile materials [9,10], amorphous cast iron fibers [11], actin fibers and myofibroblasts [12], scleral fibers in normal rat eyes [13], fibers in electrospun materials [1416], collagen fibers [17,18], and fibroblast proliferation [19]. Another way to utilize the 2D Fourier spectrum is to fit a line into the thresholded spectrum to infer orientation from a line slope [20] to estimate the direction of α-actin fibers [21]. Also, the Radon transform was employed for quantification of fiber alignment [22].

Recent advances in the development of micro-computed tomography (μCT) and confocal laser scanning microscopy (CLSM) enable to reveal a three-dimensional (3D) microstructural information of a sample. Acquisition of X-ray projections of the sample from a range of angles allows reconstructing the stack of cross-sections of the sample with the help of tomographic reconstruction algorithms [23,24]. CLSM allows obtaining successive sample optical sections at different depth levels which provide a 3D representation of the sample. These 3D imaging methods in conjunction with subsequent processing techniques produce 3D datasets represented as stacks of 2D images. To quantify the orientation of fiber structures in a 3D space, various approaches analyzing data in a neighborhood of each voxel were proposed.

Estimation of the second-order structure tensor at a voxel neighborhood allows computing eigenvalues and eigenvectors of the region. The smallest eigenvalue corresponds to the eigenvector pointing towards a direction of a primary orientation of the structures within this region. The approach is based on a computation of a structure tensor at every point of a medial axis of segmented fibers in reinforced composite, nonwoven fabrics, and fibrous porous networks, produced by a morphological thinning or trajectory tracing algorithm [2532]. A similar approach was suggested for investigation of scaffold organization of the engineered heart valve tissue for post- and pre-implants [33]. For the quantification of electrospun fiber mats organization, a tensor calculation at every voxel of segmented fibers with maintaining a neighborhood radius larger than maximal fiber diameter was proposed in [34]. Another approach measures orientation of fibers in planar sections of reinforced composite materials by detecting elliptical and non-elliptical footprints to derive a 3D structure tensor [3538]. Calculation of 3D inertia moments of boundary points of the segmented fiber was proposed to estimate the orientation of the collagen fibers [39,40]. The analysis of the 3D Fourier spectrum allowed to determine orientation in collagen-based tissues within local 3D windows by performing correlation with 3D orientation fiber banks [41]. The approach based on parameter-tuning of an anisotropic 3D Gaussian filter generates a filter of a prolate spheroid shape to find its maximum response at every voxel, that corresponds to a primary orientation when a filter direction coincides with the direction of a structure in that voxel [42]. The algorithm based on a weighted sum of vectors pointing towards each element in a neighborhood from the central element was proposed and used for investigation of an organization of fiber structures in biological tissues [4345].

Development of modern detectors has led to an increase in the amount of generated data per sample and required computation time. In a case of 2D orientation analysis approaches, it did not make an issue, since modern central processing units (CPUs) can easily handle 2D problems in a reasonable amount of time. On the other hand, it increased required computation resources for 3D approaches to be executed in reasonable time frames. Mentioned approaches provide high-quality analysis, but unfortunately, current 3D approaches are not rapid enough for processing of large data. Moreover, up to the author's knowledge, there is no reported progress on the implementation of these approaches for modern graphics processing units (GPUs).

The conventional workflow for orientation analysis of μCT datasets is composed of several stages: pre-processing, segmentation, a medial axis extraction, and orientation quantification. Diverse points of views to this workflow were presented in a range of works devoted to the analysis of fibrous structures in life and material sciences [8,29,46,47].

The quality of the acquired μCT data varies and depends on parameters of an imaging method, an acquisition device, a sample preparation protocol and nature of a sample. Therefore, the pre-processing stage can partially correct weak noise with non-linear filters like median, bilateral or other edge preserving filters. On the other hand, the low contrast data, or contaminated with beam hardening, streak or ring artifacts [48,49] are very challenging and required specifically tailored procedures to correct them.

The pre-processed data should be segmented to proceed with the further analysis. Despite the diversity of segmentation techniques, their applicability depends on the nature of the data. When fibers are made of homogeneous material and the data possess high contrast, then simple histogram-based methods might be applied. Otherwise, more sophisticated approaches involving texture analysis and machine learning are better suited.

A medial axis or a skeleton is a centerline extracted from isolated binary regions of the segmented data. There are many algorithms for deriving the medial axis, some of them consider crossing or touching regions [5053].

Based on the above, here we propose a novel 3D approach for quantification of fiber orientation based on the ray-casting idea. We have compared the proposed method with the method based on the second-order structure tensor in terms of accuracy and throughput. The accuracy was verified on a synthetic dataset with varying fiber density, alignment, and diameter. The throughput was measured for several implementations tailored to computational environments consisting of CPUs and GPU. Finally, the proposed approach was successfully applied for the analysis of real-world datasets acquired with the synchrotron μCT imaging setup.

Materials and methods

Ray-casting algorithm

The fiber can be modeled with a cylinder of length ρ with the center of mass placed at the origin of the spherical coordinate system and oriented along the Z-axis (Fig 1). The orientation of the fiber is defined by θ and φ angles determining tilts in different projection planes. The φ angle is the elevation, which represents an inclination relatively the Z-axis and the θ angle is the azimuth, specifying orientation in the XY-plane. We assume that angles vary from 0° to 90° for elevation and from -90° to 90° for azimuth, and both orientation components are 0° when the fiber is co-aligned with the Z-axis.

The proposed method for orientation estimation is based on the concept of emitting a ray in a direction represented by θ and φ angles at a point of a 3D volume and calculating a ray-sum denoted as: (1) where, V is a 3D volume, (x,y,z) is a point within this volume subjected to orientation estimation, θ and φ are angles describing a direction of an emitted ray, L is a length of a ray transmission path in a spherical coordinate system centered at the point that is being estimated. The orientation at this point can be determined using its neighborhood by emitting rays in directions specified by the angular scanning ranges and computing ray-sums. The fiber direction (θ,φ) at the point (x,y,z) is found by the ray having a maximal ray-sum: (2) where, R′(x,y,z) is the primary orientation, which can be solved numerically by searching through the angular scanning ranges of θ and φ. Carrying out such operation at every point of V creates a huge computational burden and cannot be done in a reasonable amount of time using standard multi-CPU implementations when the size of V exceeds several gigabytes. The propagation distance of the rays is limited by a sphere with a radius of L/2, centered at the point (x,y,z). The tradeoff between the accuracy and the computation time can be achieved by adjusting of the radius of restricting sphere, the limits and the step of the angular scanning ranges.

Fig 1. The representation of a fiber in the spherical coordinate system with the rays casted from the origin.

The proposed approach allows for more accurate orientation estimation of straight fibers since it accumulates values at points along a ray transmission path. The primary orientation is determined by a ray with the highest accumulated sum of values at points constituting the medial axis of the structure. Whereas, the tensor-based approach estimates mean orientation by taking into account all structures within the 3D local window.

Implementation in pseudo-code

The GPU has hundreds of times more cores than CPU, which enables it to perform massively parallel computations. In comparison to sophisticated CPU cores, GPU ones are much more straightforward. They have tiny memory cache levels and aimed at tasks involving as less as possible branching operations. The pseudo-code of the proposed method presented in Alg 1 (Fig 2) was implemented for GPU using the CUDA toolkit provided by NVIDIA. This allowed us to run the method at a vast number of data points at the same time, distributing computation over all the GPU cores, which significantly reduces the total execution time. Moreover, since the proposed approach is based solely on control flow operators, such as loops and conditions, we employed the open-source Numba package [54] for Python language to implement the CPU version. This package enables dynamic hardware-specific vectorization and optimization of code, thereby maximizing the efficiency of using a specific CPU. The algorithm is split into two procedures: the estimation of the structure orientation in the volume restricted by the 3D local window and casting of a ray through the volume at the specified azimuth and elevation angle. It returns the azimuth and elevation angle of the ray, which accumulated the maximum sum of intensities by passing through the volume.

Fig 2. Alg 1—The pseudo-code of the ray-casting method.

The tensor-based approach [29] is presented in Alg 2 (Fig 3), and it consists of the procedure for calculating the second-order structure tensor and the extraction of eigenvalues and eigenvectors from the obtained covariance matrix. This approach was successfully implemented and parallelized for CPU and GPU, thanks to the open-source TensorFlow package [55] providing computation routines for deriving the eigenvalues and eigenvectors for both hardware platforms. We have implemented our own version because the software package providing this approach does not allow measure the execution time of subroutines and smooth integration into an analysis workflow.

Fig 3. Alg 2—The pseudo-code of the tensor-based approach.

The implementations of these approaches for CPU and GPU platforms are presented in the Quanfima package [56].

Synthetic data generation

We have generated a synthetic dataset of size 512x512x512 voxels using the algorithm presented in [56] to validate the proposed method and compare it to the tensor-based approach. This dataset is composed of 70 fibers of radius from 3 to 20 pixels with a gap between them from 3 to 10 pixels, oriented in a range from -90° to 90° of azimuth and from 0° to 90° of elevation angle components. Afterward, it was contaminated with the additive Gaussian noise with different the standard deviation (σagn) of 0.5, 1.0, and 1.5, and subsequently smeared with the Gaussian filter of 1.0 and 2.0 sigma (σsmooth) values.

Experimental dataset

The biodegradable polycaprolactone (PCL) 3D scaffolds of a randomly oriented and a well-aligned structure were fabricated using the electrospinning technique [57], which requires a lot of time to find proper fabrication parameters and materials to produce a scaffold with desirable properties [58]. The internal composition of the fabricated scaffolds was measured with the help of a high-resolution μCT setup built on a base of the micro-imaging station placed at a bending magnet source at the Institute for Photon Science and Synchrotron Radiation of the Karlsruhe Institute of Technology (KIT, Karlsruhe, Germany) [59]. The imaging setup employed for the experiment used a monochromatic beam with energy of 12 keV, a 200-μm-thick Lu3Al5O12 scintillator, a 5.5 megapixels sCMOS Camera (6.5 μm physical pixel size), and a BAM macroscope providing magnification of 3.6 times, which results in a spatial resolution of 1.8 μm with a field of view of 4.6x3.9 mm2. During data acquisition, the sample mounted at the stage was rotated around the vertical axis for 360° with a step of 0.24° and exposed for 1 sec with X-rays. After that, the acquired data were reconstructed into 3D volumes of size 2016x2016x2016 voxels using the filtered back-projection algorithm [60].

Analysis workflow

The workflow was implemented in the following stages: the pre-processing stage uses the 3D median filter of size 3x3x3 voxels, the segmentation stage employs the Otsu thresholding algorithm [61] to obtain the binary data, the middle axis extraction was performed with the algorithm from [51], and at the analysis stage both methods were estimated in the specified 3D local window. The whole workflow was implemented and performed on CPUs, except the orientation analysis methods, which were implemented and executed on both CPUs and GPU.

Benchmarking setup

The performance evaluation was done at a computer operating under 64-bit Ubuntu 16.04 and equipped with Intel Xeon E5-4660 v4 processor, NVIDIA Tesla T4 16GB graphical adapter and 60 GB of random-access memory. The data were located at a corporate storage and were accessed via a high-speed network of 320 MB/s.

Performance analysis

The proposed method and the tensor-based approach were integrated into the described workflow to quantify the orientation of the generated dataset (Fig 4A). The validation procedure is composed of several phases. At the first phase, the noiseless dataset is estimated by each method with varying a window size from 4 to 44 pixels. Then, the window size providing the best accuracy is selected for further calculations. In the next phase, the fixed window size is used in the processing of the generated dataset to observe the behavior and limitations of each method in specific conditions. After that, the throughput of each method was estimated at different scales of the same dataset.

Fig 4.

The synthetic dataset (a) with noised slices extracted from the central XY-plane of the contaminated dataset (b-g) (marked with the blue dashed line).

Accuracy evaluation

The methods have a similar behavior of elevation component errors (Fig 5A and 5B), which rapidly fall from 4 to 20 pixels of window size and then do not change much. The results presented in Fig 5A for the tensor-based method show that the sum of absolute angular errors of the azimuth component rapidly falls from 4 to 28 and starts slowly decreasing from 32 pixels of window size. While the azimuthal error of the proposed method in Fig 5B quickly falls from 4 to 24 and then slightly varies. Since the sums of absolute errors of both methods start slowly decreasing from a certain window size, we chose the optimal window size is 34 pixels for the tensor-based approach and 32 pixels in a case of the proposed method. The optimal window sizes were then averaged to unify the parameters of both methods for the further analysis, which results in 33 pixels of window size. Given that the synthetic dataset has radii of fibers in a range from 3 to 20 pixels, with the average fiber radius of approximately 9.5 pixels, then 33/9.5×2 yields the 1.73 factor explaining the relationship between the optimal window size and the fiber radius. The absolute errors produced by the tensor-based approach and the proposed method using the optimal window size are (5.6°±24.29°, 1.03°±0.67°) and (3.75°±8.97°, 0.93°±1.25°) correspondingly, where the values in the parentheses are azimuth and elevation components.

Fig 5.

The comparative accuracy analysis of the tensor-based approach (left) and the proposed method (right): a,b) the absolute error of orientation quantification of the noiseless dataset to determine the optimal window size; c,d) the evaluation of the sum of absolute errors to spot error-prone regions on the noiseless dataset; e,f) the behavior of the absolute error while increasing σagn for the dataset and keeping a window size of 33 pixels.

Then, we analyzed which angular ranges are the most error-prone for each method while keeping the optimal value of the window size. The polar heatmaps depicted in Fig 5C and 5D use a logarithmic scale to present the errors calculated as the sum of the averaged azimuth and elevation errors within angular ranges from -90° to 90° and from 0° to 90° for azimuth and elevation correspondingly, with a step of 5° for both. It can be seen from the Fig 5C that most errors of the tensor-based approach are uniformly distributed over the heatmap, except the strong error peaks around (88°, 25°), (-88°, 18°) locations of azimuth and elevation components correspondingly. The proposed method has a comparable distribution of errors (Fig 5D) to its competitor and has weak error peaks around (-60°, 85°), (-50°, 26°), (25°, 16°) and (70°, 26°) locations of azimuth and elevation components correspondingly. The angular error increases towards angles 0°, 90°, and -90° because at these orientation angles tend to be incorrectly determined due to the limited spatial resolution governed by the window size, which in turn is restricted by the proximity of fibers. Thus, the optimal window size should maximize the spatial resolution and minimize capturing neighbor fibers in the window. In a case of tightly packed fibers, the optimal window size will be equal to the diameter of fibers, which is not sufficient to resolve a complete angular range.

Afterward, we run the methods over the synthetic dataset contaminated with σagn of 0.0, 0.5, 1.0, 1.5, 2.0 and σsmooth of 1.0 to estimate the robustness (Fig 4B–4G). The results presented in Table 1 have shown that the proposed ray-casting approach is more accurate for both azimuth and elevation components for every configuration of noise (Fig 5E and 5F). The angular error almost linearly changes for the proposed method from 0.5 to 2.0 of σagn. However, it non-linearly varies in the same range for the tensor-based approach. This is due to the fact that the segmentation stage produces the over-segmented binary data because of the imposed noise, and subsequently, the extracted skeleton will be significantly distorted, and many wrong locations of orientation estimation are produced.

Table 1. The absolute error of methods and the absolute error differences between the tensor-based and the ray-casting approach estimated for the synthetic dataset contaminated with varying σagn.

Throughput evaluation

We analytically estimated the complexity of each method in terms of the required number of arithmetical operations, where Nθ and Nφ denote the number of azimuth and elevation angles, correspondingly, NW indicates the side length of a 3D local window in voxels, and Nd is the size of the square matrix (in our case 3x3 covariance matrix calculated from a 3D local window). It showed that the proposed method requires approximately (Nθ×Nφ) × (NW2+NW2)1/2 arithmetic operations if we assume that each ray has a fixed length of (NW2+NW2)1/2 and we emit (Nθ×Nφ) rays in all possible directions in the 3D local window, thus the computational burden highly depends on the number of emitted rays. Whereas, the tensor-based approach requires NW2×(10/3×Nd3+Nd2)+(6×Nd2+Nd) arithmetic operations. The number of required operations was numerically estimated by substituting the variables with corresponding values used in the study, where NW = 33, Nd = 3, Nφ = 90 and Nθ = 180. This showed that the proposed method requires approximately 30×106 arithmetic operations, while the tensor-based method roughly 105. Therefore, the throughput of the sequential computation of the proposed method theoretically is more than an order of magnitude less than for the tensor-based approach. However, this issue can be overcome with help of CPU-specific code vectorizing optimizations and GPUs which are aimed at massive parallelization of fine-grained tasks.

The performance of the proposed and the tensor-based approach was experimentally evaluated over the synthetic dataset at different scales. We implemented versions of the algorithms for CPU and GPU to compare their throughput in conditions of varying the computational environment and the sizes of the dataset. The results of the evaluation are presented in Fig 6 and Table 2.

Fig 6. The throughput evaluation of the proposed method and the tensor-based approach over different data sizes for various computation environments.

Table 2. The results of throughput evaluation of the proposed method and the tensor-based approach for various data sizes and computation environments.

The CPU version of the proposed method is 12–20 times faster than the tensor-based approach in the same conditions, and this tendency is preserved for all cases of computations involving CPUs. The throughput of the proposed method on CPUs is always higher than the tensor-based method because it is based on control flow operators and trivial memory access patterns allowing for hardware-specific optimizations, whereas the method competitor is locked to the specific implementation of the eigen-decomposition algorithm. In the case of the GPU version, the proposed method outruns in 17–30 times the tensor-based approach, because the latter cannot be easily parallelized due to the eigen-decomposition algorithm. Thus, the undertaken experiment showed the high suitability of the proposed method for implementation on both CPU and GPU and its superiority over the tensor-based approach in all considered evaluation scenarios.


We have performed a 3D orientation analysis of microfibrous scaffolds made from biodegradable PCL polymer with aligned and randomly oriented fiber structure using the presented method. Such scaffolds are widely applied in regeneration medicine as they serve as constructions which imitate an extracellular matrix of native bone tissue [62].

The experimental datasets were cropped to 600x600x450 voxels, corresponding to 1080x1080x810 μm3, and then subjected to the previously described workflow to pre-process each dataset before the analysis. At first, each slice of the reconstructed 3D volumes was filtered with a median filter of radius 1.8 μm. Then, each filtered slice was segmented with the Otsu thresholding algorithm [61] to provide slices where only fibers have non-zero values. Next, the medial axis was extracted from the segmented data using the axis thinning algorithm [51]. The optimal window size was selected based on the averaged expected fiber diameter of 33 μm corresponding to 18.3 pixels given the spatial resolution of 1.8 μm and taking into account the previously calculated factor of 1.73, it yields the optimal window size of 32 pixels. Then, the orientation analysis was performed over the extracted central axis by estimating the proposed algorithm in the neighborhood 32x32x32 voxels of every voxel belonging to the central axis. Even though we estimated the optimal window size, the diameter fluctuations of the fibers will not significantly affect the orientation analysis results, since the orientation is estimated over the extracted medial axis of the fibers, thus only the spatial proximity of fibers may have an impact.

The 3D orientation analysis presented in Fig 7 has shown that in the azimuthal direction, the samples with a well-aligned structure (Fig 7C) demonstrate prevalent fiber orientation in the range from 70° to 100°. Whereas, the scaffolds with a randomly oriented structure (Fig 7D) have directionality of fibers distributed in the range from 80° to 160° due to the type of rotating collector. However, all samples demonstrate similar results in the elevation direction (Fig 7E and 7F)), which concentrated in the range from 50° to 90° because fibers were deposited layer-by-layer during the electrospinning process.

Fig 7.

The 3D orientation analysis results produced by the proposed algorithm for estimating orientation on the datasets of PCL scaffolds acquired at the synchrotron-based μCT imaging setup: a,b) the 3D visualization of the color-coded fiber orientation datasets of the scaffolds with well-aligned and randomly oriented structure; c,d) the azimuthal orientation histograms; e,f) the elevation orientation histograms of fibers for well-aligned and randomly oriented cases.

The results of 3D orientation analysis allow immediately distinguish between randomly oriented (Fig 7B) and well-aligned (Fig 7A) fibers by a color coding, where the color of the same shade represents a similar direction. As it may be observed, fibers of the sample with a well-aligned structure change their preferred orientation depending on the height level of the sample. It could be due to a difference in the layer deposition during electrospinning, where each layer is deposited individually. While in the sample with a randomly oriented structure, fibers are chaotically distributed in the sample volume, and some of them are linked in depth to other layers. Such a detailed 3D orientation analysis allows for the controlled fabrication process to produce scaffolds with desirable fiber properties [58].


In recent years a vast number of methods aimed at orientation analysis of structures in datasets of diverse modalities were presented. Initially, every method was developed to answer a specific question about a particular dataset. However, late due to the inherent generality, some of them were successfully applied to other problems, such methods as analysis of the Fourier spectrum or the tensor-based approach. The latter has been compared to the proposed method in this study. The proposed method outperformed the tensor-based approach in terms of accuracy, and due to inherent parallelizability, it can be efficiently implemented for GPU to improve the execution time drastically. Moreover, the processing speed can even be further improved by shrinking the scanning angular ranges. The coarse-to-fine approach can be used to create the multi-level pyramid of the dataset. Then, starting from the top level, the orientation angles are calculated at each point and propagated to the next level. The orientation is recalculated for the new level at each point, taking into account the angular values at the previous level and some confidence intervals to mitigate the accuracy errors. The process repeats until it reaches the latest level, where the initially large scanning ranges are significantly shrunk. The described changes will be introduced in the further revisions. Despite the proposed method outperformed the tensor-based approach, it cannot completely replace it. Our method is mainly oriented to the analysis of the datasets with straight and clearly separable structures because it relies on intensity accumulation along a ray path. While the method competitor is more suitable to analyze stuck together or bent structures by quantifying average orientations in the regions-of-interests.


We presented a new method based on the ray-casting concept aimed at quantification of structures orientation in datasets from various sources. The method was validated on a synthetic ground-truth dataset. It provides higher accuracy than the popular tensor-based approach, and it has an inherent potential for the efficient implementation for GPUs. It was successfully applied for the orientation analysis of microfibrous scaffolds with aligned and randomly oriented fiber structure. In future work, the method will be improved regarding speed by introducing the coarse-to-fine strategy to reduce the scanning angular ranges.


The authors would like to thank Thorsten Müller for the assistance during the beamtime. We thank the synchrotron light source of KIT for the provided beamtime. The scaffolds fabrication was done with facilities provided by the Tomsk Polytechnic University.


  1. 1. Bayan C, Levitt JM, Miller E, Kaplan D, Georgakoudi I. Fully automated, quantitative, noninvasive assessment of collagen fiber content and organization in thick collagen gels. J Appl Phys. 2009 May 15;105(10):102042. pmid:24803683
  2. 2. Zhang L, Yu W. Orientation image analysis of electrospun submicro-fibers based on Hough transform and Regionprops function. Text Res J. 2017 Nov 14;87(18):2263–74.
  3. 3. Johnson W, Masters J, Wilson D, Gowayed Y, Schreibman D, Roberts M. Surface inspection of textile composite materials using image analysis techniques. J Compos Technol Res. 1996;18(1):3.
  4. 4. Karlon WJ, Hsu PP, Li S, Chien S, McCulloch AD, Omens JH. Measurement of orientation and distribution of cellular alignment and cytoskeletal organization. Ann Biomed Eng. 1999 Nov;27(6):712–20. pmid:10625144
  5. 5. Karlon WJ, Covell JW, McCulloch AD, Hunter JJ, Omens JH. Automated measurement of myofiber disarray in transgenic mice with ventricular expression of ras. Anat Rec. 1998 Dec;252(4):612–25. pmid:9845212
  6. 6. Lee CH, Shin HJ, Cho IH, Kang Y-M, Kim IA, Park K-D, et al. Nanofiber alignment and direction of mechanical strain affect the ECM production of human ACL fibroblast. Biomaterials. 2005 Apr;26(11):1261–70. pmid:15475056
  7. 7. Emerson MJ, Jespersen KM, Dahl AB, Conradsen K, Mikkelsen LP. Individual fibre segmentation from 3D X-ray computed tomography for characterising the fibre orientation in unidirectional composite materials. Compos Part A Appl Sci Manuf. 2017 Jun;97:83–92.
  8. 8. D’Amore A, Stella JA, Wagner WR, Sacks MS. Characterization of the complete fiber network topology of planar fibrous tissues and scaffolds. Biomaterials. 2010 Jul;31(20):5345–54. pmid:20398930
  9. 9. Pourdeyhimi B, Dent R, Davis H. Measuring fiber orientation in nonwovens part III: Fourier transform. Text Res J. 1997 Feb;67(2):143–51.
  10. 10. Tunák M, Antoch J, Kula J, Chvojka J. Estimation of fiber system orientation for nonwoven and nanofibrous layers: Local approach based on image analysis. Text Res J. 2014 Jun;84(9):989–1006.
  11. 11. Redon C, Chermant L, Chermant JL, Coster M. Assessment of fibre orientation in reinforced concrete using Fourier image transform. J Microsc. 1998 Sep;191(3):258–65. pmid:9767490
  12. 12. Marquez JP. Fourier analysis and automated measurement of cell and fiber angular orientation distributions. Int J Solids Struct. 2006;43(21):6413–23.
  13. 13. Girard MJA, Dahlmann-Noor A, Rayapureddi S, Bechara JA, Bertin BME, Jones H, et al. Quantitative mapping of scleral fiber orientation in normal rat eyes. Investig Ophthalmol Vis Sci. 2011 Dec 24;52(13):9684–93.
  14. 14. Ayres CE, Jha BS, Meredith H, Bowman JR, Bowlin GL, Henderson SC, et al. Measuring fiber alignment in electrospun scaffolds: a user’s guide to the 2D fast Fourier transform approach. J Biomater Sci Polym Ed. 2008 Jan;19(5):603–21. pmid:18419940
  15. 15. Lins LC, Wianny F, Livi S, Dehay C, Duchet-Rumeau J, Gérard JF. Effect of polyvinylidene fluoride electrospun fiber orientation on neural stem cell differentiation. J Biomed Mater Res—Part B Appl Biomater. 2017 Nov;105(8):2376–93. pmid:27571576
  16. 16. Putti M, Simonet M, Solberg R, Peters GWM. Electrospinning poly(ε-caprolactone) under controlled environmental conditions: Influence on fiber morphology and orientation. Polym (United Kingdom). 2015 Apr;63:189–95.
  17. 17. Paten JA, Tilburey GE, Molloy EA, Zareian R, Trainor C V., Ruberti JW. Utility of an optically-based, micromechanical system for printing collagen fibers. Biomaterials. 2013 Apr;34(11):2577–87. pmid:23352045
  18. 18. Van Zuijlen PPM, De Vries HJC, Lamme EN, Coppens JE, Van Marle J, Kreis RW, et al. Morphometry of dermal collagen orientation by Fourier analysis is superior to multi-observer assessment. J Pathol. 2002 Nov;198(3):284–91. pmid:12375260
  19. 19. Ng CP. Interstitial fluid flow induces myofibroblast differentiation and collagen alignment in vitro. J Cell Sci. 2005 Oct 15;118(20):4731–9.
  20. 20. Fung DT, Sereysky JB, Basta-Pljakic J, Laudier DM, Huq R, Jepsen KJ, et al. Second harmonic generation imaging and Fourier transform spectral analysis reveal damage in fatigue-loaded tendons. Ann Biomed Eng. 2010 May 16;38(5):1741–51. pmid:20232150
  21. 21. Orlova Y, Magome N, Liu L, Chen Y, Agladze K. Electrospun nanofibers as a tool for architecture control in engineered cardiac tissue. Biomaterials. 2011 Aug;32(24):5615–24. pmid:21600646
  22. 22. Schaub NJ, Kirkpatrick SJ, Gilbert RJ. Automated methods to determine electrospun fiber alignment and diameter using the Radon transform. Bionanoscience. 2013 Sep 16;3(3):329–42.
  23. 23. Shi H, Luo S. A novel scheme to design the filter for CT reconstruction using FBP algorithm. Biomed Eng Online. 2013 Jun 1;12:50. pmid:23724942
  24. 24. Kak AC. 7. Algebraic reconstruction algorithms. In: Principles of Computerized Tomographic Imaging. Society for Industrial and Applied Mathematics; 2001. p. 275–96.
  25. 25. Abdin Y, Lomov S V., Jain A, Van Lenthe GH, Verpoest I. Geometrical characterization and micro-structural modeling of short steel fiber composites. Compos Part A Appl Sci Manuf. 2014 Dec;67:171–80.
  26. 26. Teßmann M, Mohr S, Gayetskyy S, Haßler U, Hanke R, Greiner G. Automatic determination of fiber-length distribution in composite material using 3D CT data. EURASIP J Adv Signal Process. 2010;2010(1):545030.
  27. 27. Miettinen A, Ojala A, Wikström L, Joffe R, Madsen B, Nättinen K, et al. Non-destructive automatic determination of aspect ratio and cross-sectional properties of fibres. Compos Part A Appl Sci Manuf. 2015 Oct;77:188–94.
  28. 28. Soltani P, Johari MS, Zarrebini M. Effect of 3D fiber orientation on permeability of realistic fibrous porous networks. Powder Technol. 2014 Mar;254:44–56.
  29. 29. Soltani P, Johari MS, Zarrebini M. 3D fiber orientation characterization of nonwoven fabrics using X-ray micro-computed tomography. World J Text Eng Technol. 2015;1(0):41–7.
  30. 30. Tseng H-C, Chang R-Y, Hsu C-H. Phenomenological improvements to predictive models of fiber orientation in concentrated suspensions. J Rheol (N Y N Y). 2013 Nov;57(6):1597–631.
  31. 31. Régnier G, Dray D, Jourdain E, Le Roux S, Schmidt FM. A simplified method to determine the 3D orientation of an injection molded fiber-filled polymer. Polym Eng Sci. 2008 Nov;48(11):2159–68.
  32. 32. Lee YH, Lee SW, Youn JR, Chung K, Kang TJ. Characterization of fiber orientation in short fiber reinforced composites with an image processing technique. Mater Res Innov. 2002 Sep 13;6(2):65–72.
  33. 33. Eckert CE, Mikulis BT, Gottlieb D, Gerneke D, Legrice I, Padera RF, et al. Three-dimensional quantitative micromorphology of pre- and post-implanted engineered heart valve tissues. Ann Biomed Eng. 2011 Jan 18;39(1):205–22. pmid:20853027
  34. 34. Choong LT, Yi P, Rutledge GC. Three-dimensional imaging of electrospun fiber mats using confocal laser scanning microscopy and digital image analysis. J Mater Sci. 2015 Apr;50(8):3014–30.
  35. 35. Blanc R, Germain C, Da Costa JP, Baylou P, Cataldi M. Fiber orientation measurements in composite materials. Compos Part A Appl Sci Manuf. 2006;37(2):197–206.
  36. 36. Zhu YT, Blumenthal WR, Lowe TC. Determination of non-symmetric 3-D fiber-orientation distribution and average fiber length in short-fiber composites. J Compos Mater. 1997 Jul 27;31(13):1287–301.
  37. 37. Eberhardt C, Clarke A. Fibre-orientation measurements in short-glass-fibre composites. Part I: Automated, high-angular-resolution measurement by confocal microscopy. Compos Sci Technol. 2001 Aug;61(10):1389–400.
  38. 38. Vélez-García GM, Wapperom P, Baird DG, Aning AO, Kunc V. Unambiguous orientation in short fiber composites over small sampling area in a center-gated disk. Compos Part A Appl Sci Manuf. 2012;43(1):104–13.
  39. 39. Altendorf H, Decencière E, Jeulin D, De sa Peixoto P, Deniset-Besseau A, Angelini E, et al. Imaging and 3D morphological analysis of collagen fibrils. J Microsc. 2012 Aug;247(2):161–75. pmid:22670759
  40. 40. Altendorf H, Jeulin D. 3D directional mathematical morphology for analysis of fiber orientations. Image Anal Stereol. 2009 Nov 1;28(3):143–53.
  41. 41. Lau TY, Ambekar R, Toussaint KC. Quantification of collagen fiber organization using three-dimensional Fourier transform-second-harmonic generation imaging. Opt Express. 2012;20(19):21821. pmid:23037302
  42. 42. Wirjadi O, Schladitz K, Rack A, Breuel T. Applications of anisotropic image filters for computing 2D and 3D-fiber orientations. Proc 10th Eur Congr ISS. 2009;
  43. 43. Liu Z, Pouli D, Sood D, Sundarakrishnan A, Hui Mingalone CK, Arendt LM, et al. Automated quantification of three-dimensional organization of fiber-like structures in biological tissues. Biomaterials. 2017 Feb;116:34–47. pmid:27914265
  44. 44. Quinn KP, Georgakoudi I. Rapid quantification of pixel-wise fiber orientation data in micrographs. J Biomed Opt. 2013 Apr 1;18(4):046003. pmid:23552635
  45. 45. Quinn KP, Golberg A, Broelsch GF, Khan S, Villiger M, Bouma B, et al. An automated image processing method to quantify collagen fibre organization within cutaneous scar tissue. Exp Dermatol. 2015 Jan;24(1):78–80. pmid:25256009
  46. 46. Persson NE, McBride MA, Grover MA, Reichmanis E. Automated analysis of orientational order in images of fibrillar materials. Chem Mater. 2017 Jan 10;29(1):3–14.
  47. 47. Kastner J, Heinzl C. X-ray computed tomography for non-destructive testing and materials characterization. In: Integrated Imaging and Vision Techniques for Industrial Inspection: Advances and Applications. London: Springer London; 2015. p. 227–50.
  48. 48. Abu Anas EM, Lee SY, Hasan MK. Removal of ring artifacts in CT imaging through detection and correction of stripes in the sinogram. Phys Med Biol. 2010 Nov 21;55(22):6911–30. pmid:21048294
  49. 49. Münch B, Trtik P, Marone F, Stampanoni M. Stripe and ring artifact removal with combined wavelet-Fourier filtering. EMPA Act. 2009 May 11;17(2009–2010 EMPA ACTIVITIES):34–5.
  50. 50. Pudney C. Distance-ordered homotopic thinning: A skeletonization algorithm for 3D digital images. Comput Vis Image Underst. 1998 Dec 1;72(3):404–13.
  51. 51. Lee TC, Kashyap RL, Chu CN. Building skeleton models via 3-D medial surface axis thinning algorithms. CVGIP Graph Model Image Process. 1994 Nov;56(6):462–78.
  52. 52. Palágyi K, Kuba A. A 3D 6-subiteration thinning algorithm for extracting medial lines. Pattern Recognit Lett. 1998 May 1;19(7):613–27.
  53. 53. Zandt BJ, Losnegård A, Hodneland E, Veruki ML, Lundervold A, Hartveit E. Semi-automatic 3D morphological reconstruction of neurons with densely branching morphology: Application to retinal AII amacrine cells imaged with multi-photon excitation microscopy. J Neurosci Methods. 2017 Mar 1;279:101–18. pmid:28115187
  54. 54. Lam SK, Pitrou A, Seibert S. Numba. In: Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC—LLVM ‘15. New York, USA: ACM Press; 2015. p. 1–6.
  55. 55. Abadi M, Barham P, Chen J, Chen Z, Davis A, Dean J, et al. TensorFlow: A system for large-scale machine learning. In: Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2016. 2016.
  56. 56. Shkarin R, Shkarin A, Shkarina S, Cecilia A, Surmenev RA, Surmeneva MA, et al. Quanfima: An open source Python package for automated fiber analysis of biomaterials. PLoS One. 2019;
  57. 57. Zeleny J. Instability of electrified liquid surfaces. Phys Rev. 1917;10(1):1–6.
  58. 58. Shkarina S, Shkarin R, Weinhardt V, Melnik E, Vacun G, Kluger P, et al. 3D biodegradable scaffolds of polycaprolactone with silicate-containing hydroxyapatite microparticles for bone tissue engineering: High-resolution tomography and in vitro study. Sci Rep. 2018;8(1).
  59. 59. dos Santos Rolo T, Ershov A, van de Kamp T, Baumbach T. In vivo X-ray cine-tomography for tracking morphological dynamics. Proc Natl Acad Sci. 2014;111(11):3921–6. pmid:24594600
  60. 60. Cabral B, Cam N, Foran J. Accelerated volume rendering and tomographic reconstruction using texture mapping hardware. In: Proceedings of the 1994 symposium on Volume visualization—VVS ‘94. 1994. p. 91–8.
  61. 61. Zhu N, Wang G, Yang G, Dai W. A fast 2D Otsu thresholding algorithm based on improved histogram. In: Proceedings of the 2009 Chinese Conference on Pattern Recognition, CCPR 2009, and the 1st CJK Joint Workshop on Pattern Recognition, CJKPR. 2009. p. 319–23.
  62. 62. Gorodzha SN, Surmeneva MA, Surmenev RA. Fabrication and characterization of polycaprolactone cross- linked and highly-aligned 3-D artificial scaffolds for bone tissue regeneration via electrospinning technology. In: IOP Conference Series: Materials Science and Engineering. IOP Publishing; 2015. p. 012024.