Skip to main content

u-Unwrap2D

Library for 2D Contour-guided computing and Shape parameterization

PyPI version Downloads Downloads Python version GitHub stars GitHub forks Licence: GPL v3

:star2: Apr 2026 :star2:

  • u-Unwrap is available in PyPI and can be directly installed with pip install u-Unwrap

August 29, 2024

u-Unwrap2D is a Python library built on top of u-Unwrap3D to enable mapping of 2D contours and 2D shapes into canonical representations for registration and windowing to facilitate downstream analysis with particular attention to single cell biology.

The disk parameterization of u-Unwrap2D or u-Unwrap is described in the following manuscript, particularly with respect to spatiotemporal analysis of single cell morphodynamics: Mapping Cell Morphology to a Standard Coordinate System for Analyzing Dynamic Cell Signaling, Imageomics NeurIPS Workshop, 2025, written by Shiqiu Yu, Gaudenz Danuser, Felix Y. Zhou.

The contour-guided spatial windowing is briefly described in the following manuscript, and used to compare edge-based molecular signaling patterns across experimental conditions: Caveolin-1 regulates context-dependent signaling and survival in Ewing sarcoma, bioRxiv, 2025, written by Dagan Segal, Xiaoyu Wang, Hanieh Mazloom-Farisbaf, Felix Y. Zhou, Divya Rajendran, Erin Butler, Bingying Chen, Bo-Jui Chang, Khushi Ahuja, Averi Perny, Kushal Bhatt, Dana Kim Reed, Diego H. Castrillon, Jeon Lee, Elise Jeffery, Lei Wang, Khai Nguyen, Noelle S. Williams, Stephen X. Skapek, Satwik Rajaram, Reto Fiolka, Khuloud Jaqaman, Gary Hon, James F. Amatruda, Gaudenz Danuser.

The functions in this library on built on the idealogy of u-Unwrap3D for 2D. For more information please read: Surface-guided computing to quantify dynamic interactions between cell morphology and molecular signals in 3D, bioRxiv, 2025, written by Felix Y. Zhou, Virangika K. Wimalasena, Qiongjing Zou, Andrew Weems, Gabriel M. Gihana, Edward Jenkins, Bingying Chen, Bo-Jui Chang, Meghan K. Driscoll, Andrew J. Ewald and Gaudenz Danuser.

Library Features

u-Unwrap2D exposes differential geometric and image processing functions to primarily enable two core functionalities depicted in the banner image:

  1. Disk Parameterization of Cell Shape: The entire cell shape is mapped to a disk. As this involves metric distortion. u-Unwrap implements conformal mapping, equiareal mapping through a robust density-based relaxation scheme, and (in development), equidistant mapping based on redistributing vertices of the equiareal map.
  2. Contour-Guided Spatial Windowing: The cell contour is propagated using conformalized mean curvature flow implemented in an active contours scheme that allows additional regularization by gradient of a harmonic Poisson distance transform. This implementation as depicted allows flexible handling of highly complex, high-curvature cell geometries inaccessible by conventional methods. Compared to disk parameterization, contour-guided spatial windowing allows more equidistant propagation into the cell area, and is much more efficient to run for edge-centric analyses.

Additionally:

  • An optimized diffeomorphic and gradient vector flow algorithm for consistent cell boundary tracking of highly morphodynamic shapes, (see tutorial/example1_unwrap2Dpipeline.ipynb)

The library functions are provided through one module, which can be accessed by import unwrap2D.unwrap2D after installation.

Module Functionality
unwrap2D Functions for unwrapping 2D contours and mapping images to disk and square representations. Much recycle/adapt u-Unwrap3D functions.

Getting Started

The simplest way to get started is to check out the included notebooks in the tutorials/ folder of this GitHub which guides users using example data in the example_data/ folder through key steps of our NeurIPS 2025 Workshop paper for using u-Unwrap to perform consistent spatiotemporal windowing of a highly dynamic neutrophil cell.

  1. example1_unwrap2Dpipeline.ipynb: This notebook demonstrates the spatiotemporal analysis pipeline involving consistent edge boundary tracking and disk parameterization of each timepoint.
  2. example2_windowing_analysis.ipynb: This notebook is an example of spatial windowing on the disk parameterization and subsequent further analysis, including sampling the activity matrix (remapping signal activities), and visualization of the windows mapped back to the original cell shape.

Dependencies and Installation

PyPI Installation

u-Unwrap is available in PyPI. Install using pip:

pip install u-Unwrap

Manual Installation

You should be able to install the library using pip:

pip install .

Should this fail, the only dependency is u-Unwrap3D, our 3D unwrapping library which can be installed using the command below from PyPI or from its GitHub, https://github.com/DanuserLab/u-unwrap3D. u-Unwrap3D has been tested for Python 3.9-3.12. You can try installing that library first, then perform the above pip install ..

pip install u-Unwrap3D

Questions and Issues

Feel free to open a GitHub issue, and we will get back as soon as we can.

Developers

Felix Zhou (felixzhou1@gmail.com)

Shiqiu Yu (Shiqiu.Yu2@UTSouthwestern.edu)

Danuser Lab Links

Danuser Lab Website

Software Links

Metadata

Release files for u-Unwrap 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for u-Unwrap 0.1.1
File Size Uploaded
u_unwrap-0.1.1.tar.gz 71.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for u-Unwrap 0.1.1
File Interpreter ABI Platform
u_unwrap-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 130.6 kB

Release files / u_unwrap-0.1.1.tar.gz

Download URL u_unwrap-0.1.1.tar.gz
Size 71.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bb71d1b2113c013506f0f19f58f3fbe89b4db2d420f9ac73f6961c9d40da0e98
BLAKE2b-256 checksum
How to use checksums
c0572cb15ea4f0755be243178df704cb4ee910792e9f83340760be05cd8e337d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / u_unwrap-0.1.1-py3-none-any.whl

Download URL u_unwrap-0.1.1-py3-none-any.whl
Size 59.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
215769560d85e6bce0c7a6058238418930bfe14b81d2d4655ee45dfe6bc98bc6
BLAKE2b-256 checksum
How to use checksums
ace9f7a7b254bb599847e4509d7bea67e7428149dc5bcf9e7c1389a00523eeee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page