Skip to main content

3D shape analysis using deep learning

Project description

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Python Version PyPI Downloads Wheel Development Status Tests Coverage Status Code style: black


Cellshape-helper provides the ability to convert 3D masks to point clouds.

To install

Step 1: Install PyMesh:

This package relies on PyMesh which needs to be installed first. To install, check out the source code from GitHub:

  • Clone the PyMesh repo into a directory of your choice:
git clone https://github.com/PyMesh/PyMesh.git
cd PyMesh
git submodule update --init
export PYMESH_PATH=`pwd`
  • On Linux, the system dependencies can be installed with apt-get:
apt-get install \
   libeigen3-dev \
   libgmp-dev \
   libgmpxx4ldbl \
   libmpfr-dev \
   libboost-dev \
   libboost-thread-dev \
   libtbb-dev \
   python3-dev
  • On MacOS, the system dependencies can be installed with MacPorts:
port install
    python36 \
    eigen3 \
    gmp \
    mpfr \
    tbb \
    boost
  • Python dependencies such as NumPy and SciPy can be installed using pip:
pip install -r $PYMESH_PATH/python/requirements.txt
  • Build PyMesh with setuptools:
./setup.py build
  • Install PyMesh:
./setup.py install  # May require root privilege
  • Alternatively, one can install PyMesh locally:
./setup.py install --user
  • Check if PyMesh was installed correctly:
python -c "import pymesh; pymesh.test()"
  • Please refer to the PyMesh installation guide if there are any issues.

Step 2: Install cellshape-helper

pip install cellshape-helper

Usage

import cellshape_helper as helper


PATH_TO_TIF_FILES = "path/to/tif/files/"
PATH_TO_SAVE_MESH = "path/to/save/mesh/files/"
PATH_TO_SAVE_PC = "path/to/save/pointcloud/files/"
NUM_POINTS = 2048

helper.tif_to_pc_directory(PATH_TO_TIF_FILES, 
                           PATH_TO_SAVE_MESH, 
                           PATH_TO_SAVE_PC, 
                           NUM_POINTS)

Parameters

  • PATH_TO_TIF_FILES: str.
    The path to you binary masks of cells or nuclei.
  • PATH_TO_SAVE_MESH: str.
    The path where you want to save the mesh objects to.
  • PATH_TO_SAVE_PC: str.
    The path where you want to save your point clouds to.
  • NUM_POINTS: str.
    The number of points to sample from the mesh object when creating a point cloud.

For developers

  • Fork the repository
  • Clone your fork
git clone https://github.com/USERNAME/cellshape-helper 
  • Install an editable version (-e) with the development requirements (dev)
cd cellshape-voxel
pip install -e .[dev] 
  • To install pre-commit hooks to ensure formatting is correct:
pre-commit install
  • To release a new version:

Firstly, update the version with bump2version (bump2version patch, bump2version minor or bump2version major). This will increment the package version (to a release candidate - e.g. 0.0.1rc0) and tag the commit. Push this tag to GitHub to run the deployment workflow:

git push --follow-tags

Once the release candidate has been tested, the release version can be created with:

bump2version release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cellshape-helper-0.0.13rc0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

cellshape_helper-0.0.13rc0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file cellshape-helper-0.0.13rc0.tar.gz.

File metadata

  • Download URL: cellshape-helper-0.0.13rc0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for cellshape-helper-0.0.13rc0.tar.gz
Algorithm Hash digest
SHA256 f915b1f424bbdeb54c4e3b06a392972906c2a4321c0f2a1e9352e8f45d5809e1
MD5 73eead8ef07e2e2be8eac0ce1764a9bf
BLAKE2b-256 4d8870edd7f60bdfd94fef919a539a8d91b274eef94616d65820e9681545a853

See more details on using hashes here.

File details

Details for the file cellshape_helper-0.0.13rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for cellshape_helper-0.0.13rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 403e28fc448829db80fe6e40fabf41dde27669560b14bb2f8590e15db709aabc
MD5 e2918bc43301cf65b8fc7ab0c1eb6472
BLAKE2b-256 e132a9f0b23ec127e4517eb58f13d78473e3a447d0065ddd2ab1980bf7b56aab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page