Skip to main content

Python bindings for gorpho

Project description

pygorpho

Python bindings for gorpho.

This is a Python library for fast 3D mathematical morphology using CUDA. Currently, the library provides:

  • Dilation and erosion for grayscale 3D images.
  • Support for flat or grayscale structuring elements.
  • A van Herk/Gil-Werman implementation for fast dilation/erosion with flat line segments in 3D.
  • Automatic block processing for 3D images which can't fit in GPU memory.

Documentation can be found on readthedocs

Installation

First, make sure you have CUDA Toolkit 9.2 or later installed. Also, you must install NumPy:

pip install numpy

Then, install with pip:

pip install pygorpho

Installing from source

Again, make sure you have CUDA Toolkit 9.2 or later installed. Also, you need a compatible C++ compiler, which supports C++14. Then, following these instructions should allow you to build and install the package:

  1. Clone the repo: git clone https://github.com/patmjen/pygorpho.git
  2. Change directory: cd pygorpho
  3. Install the required Python packages: pip install numpy scikit-build cmake ninja
  4. Build and install: python setup.py install

That should be it! To test, navigate to another directory (e.g. cd ..), run python, and try to import pygorpho as pg.

Note: the reason you have to navigate to another directory before importing the package is because the build step makes a shared library. This will be installed with pygorpho, but if you stay in the folder where you cloned the git repo., import pygorpho will import from the local version, and not the installed version.

Project details


Download files

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

Files for pygorpho, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size pygorpho-0.3.0-cp35-cp35m-manylinux2010_x86_64.whl (1.0 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size pygorpho-0.3.0-cp35-cp35m-win_amd64.whl (1.0 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size pygorpho-0.3.0-cp36-cp36m-manylinux2010_x86_64.whl (1.0 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size pygorpho-0.3.0-cp36-cp36m-win_amd64.whl (996.5 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size pygorpho-0.3.0-cp37-cp37m-manylinux2010_x86_64.whl (1.0 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size pygorpho-0.3.0-cp37-cp37m-win_amd64.whl (996.5 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size pygorpho-0.3.0.tar.gz (8.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page