Unwrapping module#

Tools for unwrapping 3D shapes into more basic shapes.

napari_shape_odyssey.unwrapping.map_surface_to_disk(surface: napari.types.SurfaceData, only_uvs: bool = True, force_disk: bool = True) napari.types.SurfaceData#

Map a surface to a disk.

Parameters
  • surface (napari.types.SurfaceData) – The surface to be mapped to a disk.

  • only_uvs (bool) – If True, only the texture coordinates are returned.

Returns

The mapped surface.

Return type

napari.types.SurfaceData

napari_shape_odyssey.unwrapping.map_surface_to_sphere(surface: napari.types.SurfaceData) napari.types.SurfaceData#

Map a surface to a sphere.

Parameters

surface (napari.types.SurfaceData) – The surface to be mapped to a sphere.

Returns

The mapped surface.

Return type

napari.types.SurfaceData

napari_shape_odyssey.unwrapping.mercator_projection(surface: napari.types.SurfaceData, width: int = 256, height: int = 256) napari.types.ImageData#

Map a sphere to a 2D image using the Mercator projection.

Parameters

surface (napari.types.SurfaceData) – The surface to be mapped to a 2D image.

Returns

The mapped image.

Return type

napari.types.ImageData