c-martinez / pydescriptors

Python implementation of various 2D and 3D compactness measures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyDescriptors

Compactness shape descriptors in Python

This package contains Python implementation of various 2D and 3D compactness measures described in 2D and 3D Shape Descriptors.

Installation

You can install this package by downloading the source and installing it with pip:

$ wget https://github.com/c-martinez/pydescriptors/archive/master.zip
$ pip install master.zip

Or directly from git:

$ pip install git+git://github.com/c-martinez/pydescriptors.git

Usage

from pydescriptors.compactness import hz as compactness_hz
from pydescriptors.compactness import bribiesca as compactness_bribiesca
from pydescriptors.helpers import getSphere

sphere = getSphere(20)
X,Y,Z = sphere.nonzero()

compactness_bribiesca(X,Y,Z)
compactness_hz(X,Y,Z)

Testing

Run:

$ nosetests

Citations

If you use this code, please cite 2D and 3D Shape Descriptors.

TODO:

  • Add tests for compactness
  • Add Usage
  • Add installation guide (from source)
  • Add more descriptors
  • Documentation
  • Auto testing
  • pyflakes (auto)
  • pep8 (auto)
  • Add citation file
  • Add to Zenodo
  • Add TODO's as issues

About

Python implementation of various 2D and 3D compactness measures.

License:Apache License 2.0


Languages

Language:Python 51.7%Language:Jupyter Notebook 48.3%