3D shape analysis using deep learning
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cellshape-helper-0.0.13.tar.gz
.
File metadata
- Download URL: cellshape-helper-0.0.13.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5ed4d6a7a8332baaa263972e02f9f8a4fd6b490612d583da36a49c6c5907f0d |
|
MD5 | 3a4f3e38684c0cc167704b7ee85e86e9 |
|
BLAKE2b-256 | 88a162d773ab1be59dc2800bb6072e5f88508184d14dc96d7c3e206c7a89c3b2 |
File details
Details for the file cellshape_helper-0.0.13-py3-none-any.whl
.
File metadata
- Download URL: cellshape_helper-0.0.13-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f621f6f4a76dfd903ea5da538b9ab167e6a3b4d1be34eb9ff562c96af179fc1a |
|
MD5 | 303dc4dae1fc4a626f6fb98f4a685f5b |
|
BLAKE2b-256 | 248475c12cdf04ec358cce65c8fc6cf5e9bb4de8d553893ce3da1b1066917177 |