Longitudinal Distance#

Longitudinal Distance#

Definition: Perpendicular distance between reference apex and reference base.

The longitudinal distance is defined as the shortest distance between a reference node at base region and a reference node at apex region. In our implementation, we apply this computation to one or more nodesets and reduce the final value, allowing us to compute the longitudinal distance at Endocardium and Epicardium and record the ‘mean’ longitudinal distance.

For each nodeset and each timestep, we extract the top-most and lower-most nodes and compute the centroid for base and apex, respecitively. The final value for each timestep is used in the reduction method.

Here is a visual representation (note that longitudinal lines for ‘extreme’ approach are in an offeset from longitudinal axis for visualization purposes):

[2]:
ld = lv_ideal.plot_longitudinal_distance(
    nodesets = {lv_ideal.REGIONS.ENDO, lv_ideal.REGIONS.EPI},
    approach="extremes",
)
[3]:
lds = lv_ideal.longitudinal_distances(
    recompute=True,
    nodesets = {lv_ideal.REGIONS.ENDO, lv_ideal.REGIONS.EPI},
    approach="extremes",
    t=0.0,
    log_level=logging.ERROR,
)
INFO:LV.BaseMetricsComputations:Computing metric 'LV_STATES.LONGITUDINAL_DISTANCE' using nodesets: {<LV_SURFS.ENDO: 1>, <LV_SURFS.EPI: 2>}
[4]:
print("Sample longitudinal distance:", ld)
print("Reduced longitudinal distance by internal algorithm:", lds)
Sample longitudinal distance: 89.31646251678467
Reduced longitudinal distance by internal algorithm: 89.31646251678467

‘Extremes’ vs ‘Estimate apex and base’#

Although the computation for longitudinal distance seems straightforward, there is reseonable doubt reggarding how to choose top-most and bottom-most reference nodes. In our implementation, we have two approaches: extremes and estimate_apex_base.

The first method chooses the apex and base nodes based on minimum and maximum, respectively, along the Z axis; moreover, because there might not exist a node at specified location, we simply compute the distance along the found z values. Therefore, this approach is very constrained on the assumption that the geometry’s longitudinal axis is closely aligned with the Z axis.

On the other hand, the second approach applies the ‘est_apex_and_base_refs_iteratively’ method, which finds the approximate location of apex and base locations. This method returns a reference node for Apex and Base for that given nodeset, which allows for the euclidean distance between the two points and, since the estimation methods works iteractively (see docs for details), this methods does not imposes a strict aligment with the Z axis.

Here is a visualization with both approaches (note that longitudinal lines for ‘extreme’ approach are in an offeset from longitudinal axis for visualization purposes):

[5]:
ld_ex = lv_typeA.plot_longitudinal_distance(
    nodesets = {lv_typeA.REGIONS.ENDO, lv_typeA.REGIONS.EPI},
    approach="extremes",
    t=0.15
)
[6]:
ld_es = lv_typeA.plot_longitudinal_distance(
    nodesets = {lv_typeA.REGIONS.ENDO, lv_typeA.REGIONS.EPI},
    approach="estimate_apex_base",
    t=0.15
)
[7]:
print("with 'extremes:", ld_ex)
print("with 'estimate_apex_base':", ld_es)
with 'extremes: 95.43416627496481
with 'estimate_apex_base': 78.57643780907293

Considering that non-ideal geometries have irregular shapes at apex and base regions for all nodesets, we recommend using ‘estimate_apex_base’, which automatically finds the best estimation for reference nodes at each nodeset.

TODO: Using longitudinal distance#