Skip to main content

Cell Navigation (cellnav)

A framework implementation to of 3D methods for data representation, surface reconstruction and geodesic distance measures built on top of the Open3D and rustworkx libraries. It is used to generate a navigatable surface from a point cloud and to compute geodesic distances on the surface. The framework is designed to be easily extendable and to provide a unified interface for different methods. It is intended to be used for research and development in the field of 3D data processing and analysis of cell surfaces.

Installation - For Users

To install CellNav, you can use pip:

pip install cellnav

Installation - For Contributors

If you want to contribute to the development of CellNav, you can clone the repository and install the package in editable mode. This allows you to make changes to the code and see the effects immediately without needing to reinstall the package.

Pip

# Clone the repository
git clone https://github.com/Zatyrus/CellNav.git
cd CellNav

# Ideally create a new (conda) environment
# for this project to avoid conflicts with other packages
conda create -n cellnav python==3.12
conda activate cellnav

# Install the package in editable mode
pip install -e .

Python Poetry

# Clone the repository
git clone https://github.com/Zatyrus/CellNav.git
cd CellNav

# Ideally create a new (conda) environment
# for this project to avoid conflicts with other packages
conda create -n cellnav python==3.12
conda activate cellnav

# Install the package using Poetry
poetry install

Tips for Jupyter Notebooks

If you want to run the Jupyter notebooks included in the repository, you need to ensure that you have Jupyter installed in the same environment where CellNav is installed. Here are the steps to set up the environment for running the notebooks:

# optionally activate the conda environment if you created one
conda activate cellnav

# Install Jupyter and related packages
pip install jupyter ipykernel ipywidgets

Outline of the Codebase

CellNav - Repository
├───cellnav
│   ├───core
│   │   ├───containers
│   │   ├───framework
│   │   └───helpers
│   ├───generators
│   ├───util 
│   └───visualization
└───tutorials

The CellNav codebase is organized into several modules, each responsible for different aspects of the framework:

  • core: Contains the core classes and functions for data representation, surface reconstruction, and geodesic distance measures. This includes containers for point clouds and meshes, the main framework for processing data, helper functions for various tasks, and utility functions for common operations.
  • generators: Contains functions for generating synthetic 3D shapes and point clouds, which can be used for testing and demonstration purposes.
  • util: Contains utility functions for various tasks such as data manipulation and other common operations that are used across the framework. Importantly, the GeometryTransformer class is located here, which provides methods for mutating and transforming geometries, such as creating surfaces from point clouds.
  • visualization: Contains functions for visualizing point clouds and meshes using Open3D.

Quick Start and Tutorials

To get started with CellNav, import a generator for your favorite 3D-shape from the cellnav.generators module and create a surface from it. For example, to create a surface from a sphere generator:

from cellnav.generators import generate_sphere, add_gaussian_noise
from cellnav import GeometryTransformer

# Generate a sphere point cloud
sphere = generate_sphere(
   center = (0,0,0),
   radius=1.0, 
   num_points=1000
   )

# Add Gaussian noise to the point cloud
sphere = add_gaussian_noise(sphere, sigma=0.1)

# Let's take a look
sphere.visualize()

# Create a surface from the point cloud
sphere_mesh = GeometryTransformer().concave_hull_from(sphere, alpha = 0.8)

# color the point cloud and surface for better visualization
sphere.paint_uniform_color([0, 1, 0]) # green
sphere_mesh.paint_uniform_color([1, 0, 0]) # red

# Visualize the surface together with the original point cloud
# Tip: Press the "W" key in the visualizer to show the edges of the surface mesh
sphere_mesh.visualize_with(sphere)

For more detailed tutorials and examples, please refer to the Jupyter notebooks included in the tutorials directory of the repository. These notebooks cover various topics such as surface reconstruction, geodesic distance measures, and more.

Metadata

Release files for cellnav 0.0.9

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

Source distribution (sdist)

Source distribution for cellnav 0.0.9
File Size Uploaded Provenance Actions
cellnav-0.0.9.tar.gz 52.7 kB Without provenance Details for cellnav-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cellnav 0.0.9
File Interpreter ABI Platform Actions
cellnav-0.0.9-py3-none-any.whl Python 3 none any Details for cellnav-0.0.9-py3-none-any.whl

Total release size: 125.7 kB

Release files / cellnav-0.0.9.tar.gz

Download URL cellnav-0.0.9.tar.gz
Size 52.7 kB
Tags Source
SHA-256 checksum
How to use checksums
24687115af7fc888783bbccc827ca6a4fb48828104bf3702f60ad4642d175c5b
BLAKE2b-256 checksum
How to use checksums
800aac8ed3d1eceabe8d0c308fd4d015a23ae26e5f0aba342e6e72337f8791d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.9.9 Windows/10

Release files / cellnav-0.0.9-py3-none-any.whl

Download URL cellnav-0.0.9-py3-none-any.whl
Size 73.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbe985632874c6b322da7e56cf2c8bceaf0ef9521e1154c725cf0caa7dd38e25
BLAKE2b-256 checksum
How to use checksums
263b58ae7bd2bcf95572f5fd9d3a5f729964a8568a65b58edf15c083356d223c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.9.9 Windows/10

Security for cellnav 0.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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