Spaces:
Sleeping
Sleeping
metadata
title: Bids Neuroimaging
emoji: π
colorFrom: indigo
colorTo: indigo
sdk: docker
pinned: false
license: cc-by-4.0
short_description: Visualize Aphasia Recovery Cohort (ARC) Dataset - Mini Samp
BIDS Neuroimaging Viewer
A FastAPI-based web application for visualizing neuroimaging data in BIDS format using NiiVue.
Installation
- Clone the repository:
git clone <your-repo-url>
cd bids-neuroimaging
- Create a virtual environment and install dependencies:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
- Install the custom datasets fork with BIDS loader:
pip install git+https://github.com/The-Obstacle-Is-The-Way/datasets.git@feat/bids-loader
Running the Application
Start the FastAPI server with:
fastapi dev main.py
Or using uvicorn directly:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
Then open your browser and navigate to:
- Main viewer: http://localhost:8000
- Health check: http://localhost:8000/health
Features
- Interactive 3D visualization of NIfTI files using NiiVue
- Multiple viewing modes: Multiplanar + 3D, and 3D Render Only
- Next button to iterate through dataset samples (implement the
/nextendpoint)
Development
The main application is in main.py. To implement the "Next" functionality:
- Modify the
/nextendpoint inmain.pyto load and return the next sample - The endpoint should return a JSON with the base64-encoded NIfTI data
Configuration Reference
For Hugging Face Spaces deployment, check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference