{ "info": { "author": "Andrei Shkarin", "author_email": "andrei.shkarin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "================\nPyEllipsoid\n================\n\n.. image:: https://travis-ci.org/ashkarin/pyellipsoid.svg?branch=master\n :target: https://travis-ci.org/ashkarin/pyellipsoid\n\n\n**PyEllipsoid** is the package for drawing and analysis of ellipsoids in 3D volumetric images (3D arrays).\n\n\nInstallation\n------------\n\nThe easiest way to install the latest version is by using pip::\n\n $ pip install pyellipsoid\n\nYou may also use Git to clone the repository and install it manually::\n\n $ git clone https://github.com/ashkarin/pyellipsoid.git\n $ cd pyellipsoid\n $ python setup.py install\n\nHow to use\n------------\nTo draw an ellipsoid:\n\n.. code-block:: python\n\n import numpy as np\n from pyellipsoid import drawing\n\n # Define an image shape, axis order is: Z, Y, X\n image_shape = (128, 128, 128)\n\n # Define an ellipsoid, axis order is: X, Y, Z\n ell_center = (64, 64, 64)\n ell_radii = (5, 50, 30)\n ell_angles = np.deg2rad([80, 30, 20]) # Order of rotations is X, Y, Z\n\n # Draw a 3D binary image containing the ellipsoid\n image = drawing.make_ellipsoid_image(image_shape, ell_center, ell_radii, ell_angles)\n\n\nTo compute inertia ellipsoid for given ellipsoid image:\n\n.. code-block:: python\n\n import numpy as np\n from pyellipsoid import drawing, analysis\n\n # Draw a 3D binary image containing an ellipsoid\n image_shape = (128, 128, 128)\n ell_center = (64, 64, 64)\n ell_radii = (5, 50, 30)\n ell_angles = np.deg2rad([80, 30, 20])\n image = drawing.make_ellipsoid_image(image_shape, ell_center, ell_radii, ell_angles)\n\n # Compute inertia ellipsoid\n points = analysis.sample_random_points(image)\n inertia_ellipsoid = analysis.compute_inertia_ellipsoid(points)\n\n\nTo rotate axes and find relative rotation between the original and rotated axes:\n\n.. code-block:: python\n\n import numpy as np\n from pyellipsoid import geometry\n\n original_axes = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])\n rot_angles = np.deg2rad([0, 0, 45]) # Rotate around Z-axis by 45 deg\n\n # Build rotation matrix and rotate the axes\n rotm = geometry.build_rotation_matrix(*rot_angles)\n rotated_axes = np.dot(rotm, np.transpose(original_axes)).T\n\n # Find relative rotation\n rel_rotm = geometry.find_relative_axes_rotation(original_axes, rotated_axes)\n\n # Validate relative rotation matrix\n rel_rotated_axes = np.dot(rel_rotm, np.transpose(original_axes)).T\n assert(np.all(rotated_axes == rel_rotated_axes))\n\n # Compute rotation angles\n # Please note, that these angles might differ from rot_angles!\n rel_rot_angles = geometry.rotation_matrix_to_angles(rel_rotm)\n print(np.rad2deg(rel_rot_angles))\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ashkarin/pyellipsoid", "keywords": "ellipsoid drawing rotation analysis", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyellipsoid", "package_url": "https://pypi.org/project/pyellipsoid/", "platform": "", "project_url": "https://pypi.org/project/pyellipsoid/", "project_urls": { "Bug Reports": "https://github.com/ashkarin/pyellipsoid/issues", "Homepage": "https://github.com/ashkarin/pyellipsoid", "Source": "https://github.com/ashkarin/pyellipsoid" }, "release_url": "https://pypi.org/project/pyellipsoid/0.0.2/", "requires_dist": [ "numpy" ], "requires_python": "", "summary": "Ellipsoids drawing and analysis in 3D volumetric images.", "version": "0.0.2" }, "last_serial": 5244777, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "8ac126c7fde3dbd81fe2d18c6e82d11c", "sha256": "8115f86beacce3f0f406cc42c4978840630c176c8ad11888417740406f283ea8" }, "downloads": -1, "filename": "pyellipsoid-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "8ac126c7fde3dbd81fe2d18c6e82d11c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7170, "upload_time": "2019-05-08T10:03:51", "url": "https://files.pythonhosted.org/packages/9d/b6/fa01e37d332f5f88006fbd4ba1d6f4f5479f58286b55d75a47cc82949ef1/pyellipsoid-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e5fceb677e4ee03626f85cb2dde2baf", "sha256": "1c4b941730d71719e95f9cd6e591fc2df8d511d8c6ec8be2c938b0fcf1fd7752" }, "downloads": -1, "filename": "pyellipsoid-0.0.1-py3.7.egg", "has_sig": false, "md5_digest": "4e5fceb677e4ee03626f85cb2dde2baf", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 12150, "upload_time": "2019-05-08T21:15:20", "url": "https://files.pythonhosted.org/packages/d9/73/341d025f9fe462d04b133d211f0a29b590d3e40f66bc029097463cbfc471/pyellipsoid-0.0.1-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "7dfbbb2a8efa64388b08909a6bd8052b", "sha256": "7dc01dee6cd126a97f759a95118b59021b577de8130851d0488bfd3abfb9f92d" }, "downloads": -1, "filename": "pyellipsoid-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7dfbbb2a8efa64388b08909a6bd8052b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7168, "upload_time": "2019-05-08T10:03:53", "url": "https://files.pythonhosted.org/packages/63/a6/f30d9e20e7695734eca46abb7635522a52b5870cd9a2fb8ed4f5f428b39d/pyellipsoid-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "066bb1e37b1414144c7e2b2d43fcad91", "sha256": "90342104bc9e64dbf104cf8e0e8911a79277744d5e5bf9c07042aada04b52e32" }, "downloads": -1, "filename": "pyellipsoid-0.0.1.tar.gz", "has_sig": false, "md5_digest": "066bb1e37b1414144c7e2b2d43fcad91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5454, "upload_time": "2019-05-08T10:03:54", "url": "https://files.pythonhosted.org/packages/0d/32/7f0cc9343ae934f335516a2ca6d45c63bda1d3e5b0ef6779b7e6640e37dc/pyellipsoid-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "2fb05db6fef56a02d477a83b7204f2c2", "sha256": "6c01165a302879b427275b5cc8fe6c4b7d2636f610c37b46b14ff551b5b8ca68" }, "downloads": -1, "filename": "pyellipsoid-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "2fb05db6fef56a02d477a83b7204f2c2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7207, "upload_time": "2019-05-08T21:15:17", "url": "https://files.pythonhosted.org/packages/d7/a0/4e4b4a12a5fa428dfaaff479aeab4a69970c7e560c9ee1eab6af077ca86a/pyellipsoid-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "52a97d6fb879af317f0d0667ba2f075d", "sha256": "b2e100d6a060a7ef1952a156a281b002fab01b86a60f5dfcea9e87732d7fc3e1" }, "downloads": -1, "filename": "pyellipsoid-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "52a97d6fb879af317f0d0667ba2f075d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7208, "upload_time": "2019-05-08T21:15:19", "url": "https://files.pythonhosted.org/packages/ad/08/5937df81cfe3117765cf430dba8167d1bb577a952be9dd0f2466a43c5987/pyellipsoid-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c347a3030927734d48e0a37d50dd9d2c", "sha256": "a913aefbb700dde84b620b442671ba80a9a0d1005d126442b3646c6ee0468d81" }, "downloads": -1, "filename": "pyellipsoid-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c347a3030927734d48e0a37d50dd9d2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5496, "upload_time": "2019-05-08T21:15:22", "url": "https://files.pythonhosted.org/packages/37/5a/76b41d98cc307171836bc2c4af6eccf10e8573674609345b0f2e883c7f4c/pyellipsoid-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2fb05db6fef56a02d477a83b7204f2c2", "sha256": "6c01165a302879b427275b5cc8fe6c4b7d2636f610c37b46b14ff551b5b8ca68" }, "downloads": -1, "filename": "pyellipsoid-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "2fb05db6fef56a02d477a83b7204f2c2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7207, "upload_time": "2019-05-08T21:15:17", "url": "https://files.pythonhosted.org/packages/d7/a0/4e4b4a12a5fa428dfaaff479aeab4a69970c7e560c9ee1eab6af077ca86a/pyellipsoid-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "52a97d6fb879af317f0d0667ba2f075d", "sha256": "b2e100d6a060a7ef1952a156a281b002fab01b86a60f5dfcea9e87732d7fc3e1" }, "downloads": -1, "filename": "pyellipsoid-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "52a97d6fb879af317f0d0667ba2f075d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7208, "upload_time": "2019-05-08T21:15:19", "url": "https://files.pythonhosted.org/packages/ad/08/5937df81cfe3117765cf430dba8167d1bb577a952be9dd0f2466a43c5987/pyellipsoid-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c347a3030927734d48e0a37d50dd9d2c", "sha256": "a913aefbb700dde84b620b442671ba80a9a0d1005d126442b3646c6ee0468d81" }, "downloads": -1, "filename": "pyellipsoid-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c347a3030927734d48e0a37d50dd9d2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5496, "upload_time": "2019-05-08T21:15:22", "url": "https://files.pythonhosted.org/packages/37/5a/76b41d98cc307171836bc2c4af6eccf10e8573674609345b0f2e883c7f4c/pyellipsoid-0.0.2.tar.gz" } ] }