Metadata-Version: 2.1
Name: cpab
Version: 0.0.7
Summary: Compute one dimensional CPAB transformations in Numpy and Pytorch
Home-page: https://github.com/imartinezl/cpab
Author: Iñigo Martinez
Author-email: inigomlap@gmail.com
Maintainer: Iñigo Martinez
Maintainer-email: inigomlap@gmail.com
License: MIT license
Project-URL: Bug Reports, https://github.com/imartinezl/cpab/issues
Project-URL: Documentation, https://cpab.readthedocs.io
Project-URL: Source Code, https://github.com/imartinezl/cpab
Keywords: diffeomorphisms,tessellations,transformations,continuous piecewise-affine,velocity fields
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: <4,>=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE

.. cpab documentation master file, created by
  sphinx-quickstart on Mon Jun 28 18:23:50 2021.
  You can adapt this file completely to your liking, but it should at least
  contain the root `toctree` directive.

|

.. figure:: https://raw.githubusercontent.com/imartinezl/cpab/master/docs/source/_static/logo.png
  :width: 300
  :align: center

|

Finite-dimensional spaces of simple, fast, and highly-expressive diffeomorphisms derived from parametric, continuously-defined, velocity fields in Numpy and Pytorch

.. image:: https://img.shields.io/pypi/status/cpab?style=flat-square
    :target: https://pypi.python.org/pypi/cpab
    :alt: PyPI Status

.. image:: https://img.shields.io/pypi/v/cpab?style=flat-square
    :target: https://pypi.python.org/pypi/cpab
    :alt: PyPI Version

.. image:: https://img.shields.io/github/license/imartinezl/cpab?style=flat-square
    :target: https://github.com/imartinezl/cpab/blob/master/LICENSE
    :alt: License

.. image:: https://img.shields.io/github/workflow/status/imartinezl/cpab/Workflow?style=flat-square
    :target: https://github.com/imartinezl/cpab/actions
    :alt: Actions

.. image:: https://img.shields.io/pypi/dm/cpab?style=flat-square
    :target: https://pepy.tech/project/cpab

.. image:: https://img.shields.io/github/languages/top/imartinezl/cpab?style=flat-square
    :target: https://github.com/imartinezl/cpab
    :alt: Top Language

.. image:: https://img.shields.io/github/issues/imartinezl/cpab?style=flat-square
    :target: https://github.com/imartinezl/cpab
    :alt: Github Issues


Getting Started
---------------

Use the following template to run a simulation with `cpab`:

.. code-block:: python

    import cpab



Installation
------------

As the compiled **cpab** package is hosted on the Python Package Index (PyPI) you can easily install it with ``pip``.
To install **cpab**, run this command in your terminal of choice:

.. code-block:: shell-session

    $ pip install cpab

or, alternatively:

.. code-block:: shell-session

    $ python -m pip install cpab

If you want to get **cpab**'s latest version, you can refer to the
repository hosted at github:

.. code-block:: shell-session

    python -m pip install https://github.com/imartinezl/cpab/archive/master.zip

Environment Setup
-----------------

Requirements
^^^^^^^^^^^^

**cpab** builds on ``numpy``, ``torch``, ``scipy``, ``ninja``,  and ``matplotlib`` libraries.

Python 3
^^^^^^^^

To find out which version of ``python`` you have, open a terminal window and try the following command:

.. code-block:: shell-session

    $ python3 --version
    Python 3.6.9

If you have ``python3`` on your machine, then this command should respond with a version number. If you do not have ``python3`` installed, follow these `instructions <https://realpython.com/installing-python>`_.

Pip
^^^

``pip`` is the reference Python package manager. It’s used to install and update packages. In case ``pip`` is not installed in your OS, follow these `procedure <https://pip.pypa.io/en/stable/installation/>`_.


Virtual Environment
^^^^^^^^^^^^^^^^^^^

``venv`` creates a “virtual” isolated Python installation and installs packages into that virtual installation. It is always recommended to use a virtual environment while developing Python applications. To create a virtual environment, go to your project’s directory and run venv.

.. code-block:: shell-session

    $ python3 -m venv env

Before you can start installing or using packages in your virtual environment you’ll need to activate it. 

.. code-block:: shell-session

    $ source env/bin/activate


Source Code
-----------

cpab is developed on GitHub, where the code is
`always available <https://github.com/imartinezl/cpab>`_.

You can either clone the public repository:

.. code-block:: shell-session

    $ git clone git://github.com/imartinezl/cpab.git

Or, download the `tarball <https://github.com/imartinezl/cpab/tarball/main>`_:

.. code-block:: shell-session

    $ curl -OL https://github.com/imartinezl/cpab/tarball/main
    # optionally, zipball is also available (for Windows users).

Once you have a copy of the source, you can embed it in your own Python
package, or install it into your site-packages easily:


.. code-block:: shell-session

    $ cd cpab
    $ python -m pip install .


MIT License

Copyright (c) 2021 Iñigo Martínez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


