surfa.mesh.sphere.SphericalMapBarycentric#

class surfa.mesh.sphere.SphericalMapBarycentric(sphere, shape=(256, 512))#

A barycentric interpolator to map spherical surface overlays into a 2D image grid with (phi, theta) units.

Parameters
  • sphere (Mesh) – Spherical mesh to build parameterization map on.

  • shape (tuple of int) – 2D shape of the output parameterization map.

Methods

parameterize(overlay)#

Parameterize a spherical surface overlay into a 2D (phi, theta) map.

Parameters

overlay (Overlay) – Overlay to parameterize.

Returns

map – Sampled image parameterization.

Return type

Slice

sample(image)#

Sample a parameterized 2D (phi, theta) map back into a surface overlay.

Parameters

map (Slice) – 2D image parameterization.

Returns

sampled – Overlay sampled from the parameterization.

Return type

Overlay