Skip to content

Commit 12b9454

Browse files
Update docs regarding spherical interpolators (#62)
1 parent 93044cf commit 12b9454

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/openlifu/seg/skinseg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ def spherical_interpolator_from_mesh(
308308
Returns:
309309
A spherical interpolator, which is a callable that maps (theta,phi) pairs of spherical coordinates (phi being azimuthal)
310310
to r values (radial spherical coordinate values). The angles are in radians.
311+
A spherical interpolator can also run in batch mode, operating on a numpy array of shape (...,2) consisting
312+
of theta,phi pairs in the last axis.
311313
312314
Summary of the algorithm:
313315
- Transform the input mesh based on the desired origin and orientation of the spherical coordinate system.

src/openlifu/virtual_fit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def progress_callback(progress_percent : int, step_description : str): # noqa: A
350350
planefit_points_unprojected_spherical = cartesian_to_spherical_vectorized(
351351
planefit_points_unprojected_cartesian
352352
) # shape (num dthetas, num dphis, 3)
353-
skin_projected_r_values = skin_interpolator(planefit_points_unprojected_spherical[...,1:]) # shape (num dthetas, num dphis) # TODO adjust docstrings to demand a *vectorizable* spherical interpolator
353+
skin_projected_r_values = skin_interpolator(planefit_points_unprojected_spherical[...,1:]) # shape (num dthetas, num dphis)
354354
planefit_points_cartesian = spherical_to_cartesian_vectorized( # Could instead renormalize planefit_points_unprojected_cartesian, not sure if it would give a speedup versus this
355355
np.stack([
356356
skin_projected_r_values, # New r values after projection to skin

0 commit comments

Comments
 (0)