A simple Python-based tool for finding brain atlas regions based on MNI coordinates.
Project description
mni-to-atlas
A simple Python-based tool for finding brain atlas regions based on MNI coordinates, with basic plotting abilities to show the sagittal, coronal, and axial views of the coordinates on the atlas.
The following atlases are currently supported:
- Automated anatomical labelling atlas [1]
- Automated anatomical labelling 3 atlas (1mm3 voxel version) [2]
- Human Connectome Project extended parcellation atlas [3]
If there is an atlas you would like to see added, please open an issue.
Example screenshot of the plotting:
Requirements:
See here for the list of requirements.
Use Example:
- Install the package into the desired environment using pip
pip install mni-to-atlas
. - Import the
AtlasBrowser
class into your workspace. - Create an instance of the
AtlasBrowser
class and specify an atlas to use (can be "AAL", "AAL3", or "HCPEx"). - Provide MNI coordinates to the
AtlasBrowser
object to find the corresponding atlas regions. The brain regions for these coordinates are then returned as a list of strings.- The coordinates should be an (n x 3) array, where each row contains an x-, y-, and z-axis MNI coordinate.
- By default, plotting the coordinates is not performed, however this can be changed by setting
plot = True
in thefind_regions
method. In this case, a figure will be generated for each set of coordinates.
# Import the AtlasBrowser class
from mni_to_atlas import AtlasBrowser
# Instantiate the AtlasBrowser class and specify the atlas to use
atlas = AtlasBrowser("AAL3")
# Provide MNI coordinates as an (n x 3) array
coordinates = np.array([[-24, -53, 73],
[-25, 20, 78]])
# Find the brain regions at the MNI coordinates (plotting is optional)
regions = atlas.find_regions(coordinates, plot=True)
References:
- Tzourio-Mazoyer et al. (2002) DOI: 10.1006/nimg.2001.0978
- Rolls et al. (2020) DOI: 10.1016/j.neuroimage.2019.116189
- Huang et al. (2022) DOI: 10.1007/s00429-021-02421-6
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mni_to_atlas-1.1.0.tar.gz
(663.4 kB
view details)
Built Distribution
mni_to_atlas-1.1.0-py3-none-any.whl
(662.9 kB
view details)
File details
Details for the file mni_to_atlas-1.1.0.tar.gz
.
File metadata
- Download URL: mni_to_atlas-1.1.0.tar.gz
- Upload date:
- Size: 663.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4de3eebdecba602b3ce9022b3944df7d123c288602b44a7e6e7f6f686680286 |
|
MD5 | c0bcddb8ba2fb027ed569f581a24cdff |
|
BLAKE2b-256 | cfc166c04b82952648de9639bd4ded10197a4ba1b444055f2f462326044b14a0 |
File details
Details for the file mni_to_atlas-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: mni_to_atlas-1.1.0-py3-none-any.whl
- Upload date:
- Size: 662.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fba683171032f36d7f0b3171c9b150cb85bde0764a278e0164c77965b59bbf6e |
|
MD5 | cba2d688a2556bc06818cbf5ecbd5e41 |
|
BLAKE2b-256 | 8334b0205fcaef2d0b12f20bbf79034972f9a1c16929960e03ff395fd53bb224 |