EBSI and ERSM Reconstruction Algorithms
This chapter documents the two main reconstruction methods used in TomoTree for cell-wise tomogram velocity estimation:
EBSI: Ellipse-Based Spatial Interpolation
ERSM: Extended Ray Segmentation Method
The pseudocode below is implementation-oriented and follows the TomoTree convention where each ray carries measured travel time and speed, and the grid contains cells with a reconstructed velocity value.
Input and Notation
R: set of rays between sensor pairsG: grid with cellsc in G.cellsv_r: measured speed on rayrL_r: length of rayrfix_anisotropy: if enabled, apply angle-based speed correctioninside_ellipse(c, r, e): predicate that at least one of the boundary points of cellclies in ellipse ofrsegments(r): ordered list of segments after ray segmentation
Tomogram convention in TomoTree:
Matrix orientation is receiver-by-source (
rows = receiver,cols = source)Node numbering is 1-based in public APIs
EBSI (Ellipse-Based Spatial Interpolation)
The EBSI method has been proposed by Du, X., Li, S., Li, G., Feng, H., and Chen, S. (2015). “Stress wave tomography of wood internal defects using ellipse-based spatial interpolation and velocity compensation,” BioRes. 10(3), 3948-3962. The modification in TomoTree includes power control for ray weights which allows fine-tuning the interpolation weights.
Method overview:
Build one ellipse of influence per ray.
For each ray get the cells that are inside the ellipse. Store the ray properties in the cell register.
For each cell, evaluate the weighted mean of the rays velocities.
Pseudocode
function EBSI_Reconstruct(R, G, params):
# params include anisotropy options, ellipse-shape settings, and power p
if params.fix_anisotropy:
for each ray r in R:
theta = angle_between_ray_and_radial_direction(r)
r.speed = anisotropy_corrected_speed(r.speed, theta)
# Prepare per-cell accumulators
for each cell c in G.cells:
c.weighted_sum = 0
c.weight_sum = 0
for each ray r in R:
e_r = build_ellipse_of_influence(r, params)
for each cell c in G.cells:
if inside_ellipse(c, r, e_r):
# Default EBSI weight: inverse ray length
w = 1 / L_r
# Optional power control used in TomoTree UI
w = w ^ params.power
c.weighted_sum += w * r.speed
c.weight_sum += w
for each cell c in G.cells:
if c.weight_sum > 0:
c.velocity = c.weighted_sum / c.weight_sum
else:
c.velocity = NaN # or fallback policy
return G
Implementation Notes
The python implementation of EBSI is available in
tomotree.classes._tomo_reconstruction.pyasdo_EBSI_method. Seetomotree.Tomo.do_EBSI_method()for full details and see the source code for full implementation.The cells outside the cross section area are not processed, and their velocity is set to NaN.
ERSM (Extended Ray Segmentation Method)
We use the method as described in Du, X., Li, J., Feng, H., & Chen, S. (2018). Image Reconstruction of Internal Defects in Wood Based on Segmented Propagation Rays of Stress Waves. Applied Sciences, 8(10), 1778. https://doi.org/10.3390/app8101778 with the following modifications:
The segment lengths are more uniform comparing to the original method proposal. This produces more homogeneous tomogram.
For highly irregular stem shapes the segmentation produces to many segments and the algorithm performance is affected. We introduce a threshold for the number of segments and increase the segment length along the long rows if necessary.
Method overview:
Find shortest ray and divide into
nsegments. This also produces the initial estimate for the segment lengthl0.Divide each ray into segments of uniform length close to
l0.If the number of segments would be higher than a threshold, increase the segment length to reduce the number of segments.
Repeat the process 2+3 for all rays. Then continue to the next step.
For each segment, build an ellipse of interest and find the rays that intersect with the ellipse. Define the segment speed as the mean of the speeds of these rays.
For each ray find the ellipse of interest and split this elipse into segments following the ray segmentation. Then store the segment speeds in the cell register of the cells that are inside the segment ellipses.
Finally, for each cell evaluate the mean of the speeds stored in the cell register and assign this value to the final cell speed.
Compared with EBSI, ERSM provides higher spatial localization because operations are done on sub-ray segments instead of whole rays.
Pseudocode
function ERSM_Reconstruct(R, G, params):
# params include target segment length l0 (shortest ray length / n),
# max_segments and ellipse eccentricities (e_segmentation, e_interpolation)
if params.fix_anisotropy:
for each ray r in R:
theta = angle_between_ray_and_radial_direction(r)
r.speed = anisotropy_corrected_speed(r.speed, theta)
all_segments = []
# Step 1: segment rays
for each ray r in R:
n = min(floor(L_r / params.l0) + 1, params.max_segments)
seg_list = split_ray_into_equal_segments(r, n)
append seg_list to all_segments
# Step 2: estimate speed on each segment from neighboring segments
for each segment s in all_segments:
e_s = build_segment_ellipse(s, params)
neighbors = []
for each segment t in all_segments:
if intersects(t, e_s):
neighbors.append(t)
if neighbors is not empty:
s.speed = mean(parent_ray_speed(t) for t in neighbors)
# Step 3: map segment speeds to cells (SISE interpolation)
for each cell c in G.cells:
touching = [s for s in all_segments if segment_influences_cell(s, c, params)]
if touching is not empty:
c.velocity = mean(segment_speed(s) for s in touching)
else:
c.velocity = NaN # or fallback policy
return G
Implementation Notes
The python implementation of ERSM is available in
tomotree.classes._tomo_reconstruction.pyasdo_ERSM_method. Seetomotree.Tomo.do_ERSM_method()for full details and see the source code for full implementation.
Practical Comparison
EBSI is simpler and faster, but may produce tomograms with less spatial details due to whole-ray processing.
ERSM provides more detailed spatial response due to segment-level processing. Usually more expensive computationally.
Both methods benefit from good node geometry, robust travel-time data quality, and physically consistent anisotropy handling.