The Thumbnail Generation API provides the service for generating thumbnails of morphologies/electrophysiologies and the soma of morphologies. The API is designed to receive a content_url
from a BBP Nexus resource (morphology or electrophysiology) and produce a corresponding thumbnail image.
To get started with the Thumbnail Generation API, follow these simple steps:
Clone the repository:
git clone https://github.com/BlueBrain/thumbnail-generation-api.git
cd thumbnail-generation-api
Install Poetry
Install the dependencies:
poetry install
Run the application:
poetry run uvicorn main:app --reload
Your Thumbnail Generation API should now be running at http://127.0.0.1:8000
.
Here are some simple examples to get you started with using the Thumbnail Generation API:
Generate a thumbnail for electrophysiologies:
curl -X GET "http://127.0.0.1:8000/generate/trace-image?content_url=https://bbp.epfl.ch/nexus/v1/files/public/hippocampus/https%3A%2F%2Fbbp.epfl.ch%2Fneurosciencegraph%2Fdata%2Fb67a2aa6-d132-409b-8de5-49bb306bb251" -H "accept: application/json" -H "Authorization: Bearer YOUR_BEARER_TOKEN"
Generate a thumbnail for morphologies:
curl -X GET "http://127.0.0.1:8000/generate/morphology-image?content_url=https://bbp.epfl.ch/nexus/v1/files/bbp/mouselight/https%3A%2F%2Fbbp.epfl.ch%2Fnexus%2Fv1%2Fresources%2Fbbp%2Fmouselight%2F_%2F0befd25c-a28a-4916-9a8a-adcd767db118" -H "accept: application/json" -H "Authorization: Bearer YOUR_BEARER_TOKEN"
For more detailed usage and examples, please refer to the visit http://127.0.0.1:8000/docs
.
Tests can be run using the following command:
pytest
The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.
For license and authors, see LICENSE.txt and AUTHORS.txt respectively.
Copyright © 2024 Blue Brain Project/EPFL