dti = DTI(gpu=True) dti.fit(dataset.dwi, bvals=dataset.bval, bvecs=dataset.bvec) fa_map = dti.fa() tvis.plot_volume(fa_map, cmap='viridis') TWK Lausanne ships a Ray‑based distributed executor . Example for scaling across a Kubernetes cluster:
from twk.distributed import RayExecutor
# ------------------------------------------------- # 1. Load a BIDS‑compliant dataset # ------------------------------------------------- bids_root = "/data/subject01" dataset = tio.load_bids(bids_root) twk lausanne download
singularity pull docker://epfl/twk-lausanne:2.0 singularity exec twk-lausanne_2.0.sif twk-dashboard These containers embed all optional dependencies (CUDA, neuroimaging libraries, JupyterLab) and are . 4.4. Source Code (Git) If you prefer to develop on the bleeding edge:
pytest -n auto Below is a minimal example that demonstrates a typical end‑to‑end analysis: loading a BIDS dataset, preprocessing, statistical modelling, and visualising results. dti = DTI(gpu=True) dti
The suite is built around a , with optional C/C++ extensions for performance‑critical kernels. It follows the FAIR (Findable, Accessible, Interoperable, Re‑usable) principles and integrates seamlessly with other community tools such as Nilearn , MNE‑Python , FSL , SPM , and AFNI . 2. Historical Context | Year | Milestone | |------|-----------| | 2015 | Project conception at EPFL’s Laboratory for Cognitive Neuroimaging (LCN). | | 2016 | First public release (v0.1) on GitHub under the permissive BSD‑3‑Clause license. | | 2018 | Integration of a GPU‑accelerated diffusion‑tensor toolbox (via CUDA). | | 2020 | Introduction of the “Lausanne 2020 ” data‑standardisation layer, aligning with BIDS (Brain Imaging Data Structure). | | 2022 | Full support for containerised deployment (Docker, Singularity) and a cloud‑ready version for AWS/GCP. | | 2024 | Release of TWK Lausanne 2.0 , featuring a modular plugin architecture, a web‑based dashboard, and an extensive Python API. |
python -m pip install "twk-lausanne[cuda]" Pre‑built images are published on Docker Hub: featuring a modular plugin architecture
# Verify CUDA availability assert cuda_enabled(), "CUDA not found – install the twk-lausanne[cuda] extra."