Geodesic Distance

Hi Team

2 queries, easy one first: how do I measure the geodesic distance between 2 points using EP Workbench. On the MeshEditor I can use the geodesic cutter to show me a geodesic path between 2 points but it won’t tell me the path length

Second, trickier one. I can import a study into Matlab using importcarto_mem and the output gets saved as a .mat file. When I then try and load this into EP Workbench it fails to load and the error in the command window is:

bench/settings.ini
userdata/electric/ecgNames
userdata/electric/electrodeNames_bip
userdata/electric/electrodeNames_uni
userdata/electric/names
userdata/electric/tags
userdata/notes
Traceback (most recent call last):
File “main.py”, line 865, in _load_openep_mat
File “openep\io\readers.py”, line 113, in load_openep_mat
File “openep\io\readers.py”, line 91, in _load_mat
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Hi Waqas,

Thank you for your query.

For point 1, There is no built-in feature to measure geodesic distance between 2 points at the moment, however, you can get around it by setting up a Work-in-Progress Python plugin. You can select two landmarks on the mesh, and then access the landmarks programmatically using a Python script.

(1) Press on the Work-in-progress tab on the top right corner.
(2) Create a new WIP
(3) Set the interpreter to a conda environment (this should be a Python executable path).
(4) You can then write and run the main code from the WIP Editor:

    case = cases[case_1]
    landmark_names = case.electric.landmark_points.internal_names
    landmark_points = case.electric.landmark_points.points * scale
    print(landmark_points)

Work-in-Progress Blog post:

For point 2, ensure you have run the ‘batchConvert’ function after the data conversion step, in MATLAB:

batchConvert(<directory>, <outputdirectory>).

That should allow EP Workbench to read the .mat file correctly.