Skip to main content

Aligning Big Brains and Atlases, controlled from Python.

Project description

ABBA Python

Aligning Big Brains and Atlases, controlled from Python.

ABBA in brief

Aligning Big Brains & Atlases, abbreviated as ABBA, allows you to register thin serial sections to multiple atlases in coronal, sagittal, and horizontal orientations. It is mainly a Java application, but this repo makes all of its API accessible in Python.

With ABBA Python, you can control ABBA API from python, and get some additional perks. In particular you get access to all BrainGlobe atlases.

[!WARNING] Due to some threading issues, the GUI does not work with MacOSX

Getting started

  1. Install miniconda or miniforge.
  2. Create a conda environment with Python 3.8, pyimagej, OpenJDK 8 and maven and activate it
  3. Install abba_python
mamba create -c conda-forge -n abba-env python=3.8 openjdk=8 pip maven pyimagej

conda activate abba-env

pip install abba_python

To begin using ABBA with a graphical user interface (GUI):

In the created environment, launch Python and run the following commands:

from abba_python import abba
abba.start_imagej()

You can then use ABBA within Fiji; for more details, visit https://biop.github.io/ijp-imagetoatlas/. ABBA is typically used in conjunction with QuPath: a QuPath project can serve as input for ABBA, and the registration results can be imported back into QuPath for further processing.

To begin with ABBA with jupyter lab

In the created environment, install jupyterlab and ipywidgets:

pip install jupyterlab
pip install ipywidgets

You can now run jupyter lab and start using notebooks, like the ones provided in examples in the github repo.

Installing extra modules

Elastix/Transformix

ABBA's automated in-plane registration relies on elastix 5.0.1. To utilize all of ABBA's functionalities, you need to separately install elastix and transformix on your operating system. During the initial run of ABBA, you will be prompted to specify their executable locations. Alternatively, you can set their paths using the API (refer to the first example notebook).

DeepSlice

ABBA can leverage the deep-learning registration tool DeepSlice, either through the web interface (in the GUI) or by running it locally. To use DeepSlice locally, you must install it in a separate conda environment and specify its path to ABBA, either through the GUI or the API (as explained in the first example notebook).

Note that DeepSlice can also be used locally with the pure Java version thanks to this (new) design.

To install DeepSlice, please refer to the documentation.

In Sept 2023, this was working:

conda create -n deepslice python=3.7
conda activate deepslice
conda install pip
pip install DeepSlice==1.1.5
pip install urllib3==1.26.6 # see https://github.com/PolarBean/DeepSlice/issues/46

You also need to make conda available at the system level: You need to follow this two steps procedure to enable Windows to use conda from cmd.exe:

  • Into the environment variable, edit PATH, add path to your ..\Anaconda3\condabin default would be C:\ProgramData\Anaconda3\condabin
  • Open a new PowerShell (and/or PowerShell (x86) ), run the following command once to initialize conda: conda init

Note on versions

OpenJDK versions above 8 can work, but they have been less tested, so there may be unexpected bugs. To avoid certificate issues, it is recommended to have openjdk installed from conda-forge.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Cookiecutter

audreyr/cookiecutter-pypackage

Project details


Download files

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

Source Distribution

abba_python-0.7.11.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abba_python-0.7.11-py2.py3-none-any.whl (17.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file abba_python-0.7.11.tar.gz.

File metadata

  • Download URL: abba_python-0.7.11.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for abba_python-0.7.11.tar.gz
Algorithm Hash digest
SHA256 8b645c7478621acbdf1792a4c086409aa6dd514a3949677a21dedaec2f9486b9
MD5 e22836d33040647bf379ebaefb91c4a4
BLAKE2b-256 8ead84a2a718b4e3650ad7e20709f695be687186582a161acaec6b44db087024

See more details on using hashes here.

File details

Details for the file abba_python-0.7.11-py2.py3-none-any.whl.

File metadata

  • Download URL: abba_python-0.7.11-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for abba_python-0.7.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ec6c4b210d617fe35c1f643f924a7d5a13ee0d422e95b9196cc88da8fe9e5691
MD5 0e2cde4e1dbc7d69881a5611c04f7421
BLAKE2b-256 7c483aee4f67a110603dbeadbc510937bbae6792711a22f96838761754f536ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page