Schema-driven BIDS converter, curator, and editor (re-imagination of BIDS-Manager v0.2.5)
Project description
BIDS Manager
Schema-driven BIDS converter, curator, and editor. PyQt6 GUI + CLI for turning DICOM, EEG, and MEG trees into BIDS-compliant datasets, with a post-conversion Editor for sidecar / TSV / NIfTI inspection and metadata fixes.
๐ documentation ๐
What's new in v1.0.0
v1.0.0 is a complete re-imagination of BIDS-Manager (0.x). The old HeuDiConv / dcm2bids two-engine pipeline + 9.2k-LOC single-file GUI has been replaced by:
- A schema-driven engine โ every layer (classification, naming,
GUI forms, validation, sidecar generation) reads from the same
machine-readable BIDS schema via
bidsschematools. Naming logic is no longer scattered across the heuristic, the config builder, and the renamer. dcm2niixinvoked directly as the default MRI backend โ no HeuDiConv / dcm2bids wrapper between us and the converter.- A two-tab PyQt6 GUI โ Converter (scan + plan + run) and Editor (post-conversion BIDS tree + sidecar form + TSV editor + NIfTI viewer + validator).
- A NIfTI viewer in the Editor with single-pane + tri-view
(sagittal / coronal / axial) sharing one crosshair, click-and-drag
scrubbing, and a 4-D time-series Graph with neighbour-scope grid.
All NIfTI loads run on a
QThreadso the GUI doesn't freeze on large BOLDs. - Event-sourced project bundles (
.bidsmgr/directories) recording every user action for full undo + provenance. - Modular, testable architecture โ 16 sub-packages, no
Pipelinegod-object, no Qt outsidebidsmgr.gui. ~730 unit/GUI tests + 49 real-data tests passing.
The PyPI distribution name is bids-manager (unchanged from 0.x).
The import name is bidsmgr (new) โ same pattern as
pip install scikit-learn โ import sklearn.
If you're upgrading from v0.2.5: the old from bids_manager import โฆ
imports and the old CLI entry points (dicom-inventory,
build-heuristic, run-heudiconv, run-dcm2bids, post-conv-renamer,
โฆ) are gone. The replacement surface is documented below. The v0.2.5
codebase is preserved in git history.
Install
pip install bids-manager
Requires Python โฅ 3.10. Installs the bidsmgr Python package and
seven console scripts (one GUI + five CLI verbs, see below).
Use
GUI
bidsmgr # launch the GUI
bidsmgr --theme dark # force a theme on launch
bidsmgr --project PATH.bidsmgr # open a saved project
The GUI has two tabs:
- Converter โ point at a raw DICOM / EEG / MEG tree, review the
schema-classified inventory in the inspection table, edit subject /
session / sequence assignments via the Properties panel, run the
conversion through
dcm2niix(MRI) /mne-bids(EEG/MEG) /bidsphysio(Siemens physio). Per-subject staging with atomic commit; errors land under<bids_root>/.bidsmgr/errors/. - Editor โ open any BIDS dataset, browse it as a tree, edit JSON
sidecars in a schema-aware form (required/recommended/optional
fields colour-coded), edit TSVs in a table, view NIfTI volumes
(2-D slice, tri-view, 4-D time-series graph), and run dataset /
folder / file validation (layer 1 always; the official
bidsschematools.validator.validate_bidsas layer 2 via the Strict toggle).
CLI
Five verbs covering the whole pipeline:
bidsmgr-scan <raw_root> <inv.tsv> [--dataset NAME] [--line-freq 50|60] [--montage NAME] [-j N] [--probe-convert]
bidsmgr-rebuild <inv.tsv> [--from {entities,columns}] [--dry-run]
bidsmgr-convert <inv.tsv> <bids_parent> [--dataset NAME] [-j N] [--overwrite] [--dry-run]
bidsmgr-metadata <bids_parent> [--inventory-tsv โฆ] [--fill-todos] [--name โฆ]
bidsmgr-validate <bids_parent> [--strict] [--strict-warn] [--html]
Each verb has independent CLI dispatch under bidsmgr.cli.<verb>:main
and reads/writes files on disk, so any stage can be run standalone.
Project layout
BIDS-Manager/ โ repo root
โโโ pyproject.toml PEP 621, name = "bids-manager"
โโโ README.md โ you are here
โโโ LICENSE
โโโ CLAUDE.md project map for Claude Code
โโโ docs/ architecture + planning documents
โ โโโ architecture.md
โ โโโ super_plan.md
โ โโโ improvement_plan.md
โ โโโ gui_mockups.html
โ โโโ inspector_proto/ standalone PyQt6 GUI prototype
โโโ miscellaneous/images/ non-package image assets
โโโ external/ vendored Python embed (Windows installer)
โโโ Installers/ packaged Windows installer
โโโ bidsmgr/ โ the importable Python package
โ โโโ __init__.py __version__ = "1.0.0"
โ โโโ main.py GUI entry
โ โโโ schema/ bidsschematools wrapper (keystone)
โ โโโ inventory/ per-modality scanners
โ โโโ classifier/ chained classifiers
โ โโโ planner/ EntityPlan + edits
โ โโโ converter/ pluggable backends
โ โ โโโ backends/
โ โโโ metadata/ post-conv schema engine
โ โโโ fixups/ fmap, IntendedFor, scans.tsv
โ โโโ project/ event-sourced .bidsmgr files
โ โโโ editor/ post-conv editor logic (no Qt)
โ โโโ gui/ โ THE ONLY Qt subtree
โ โ โโโ theme.qss
โ โ โโโ theme_manager.py
โ โ โโโ widgets/ delegates/ models/
โ โโโ workers/ QThread bridges
โ โโโ cli/ CLI verbs
โ โโโ util/ cross-OS path safety, Qt platform helpers
โโโ tests/
โโโ unit/ integration/ real_data/ gui/ fixtures/
Architectural prevention guards (see docs/architecture.md):
schema/is the keystone โ everything imports from it; it imports nothing.gui/is the only Qt-coupled subtree;workers/also imports Qt (the QThread bridge); nothing else does.- No
Pipelineorchestrator. Orchestration is explicit code incli/<verb>.pyandgui/<panel>.py. - Pure-data types only (Pydantic / dataclass; no I/O methods).
- Functions over classes where possible.
Develop
pip install -e ".[dev]"
python -c "import bidsmgr; print(bidsmgr.__version__)"
pytest
GUI tests run headless under QT_QPA_PLATFORM=offscreen via
pytest-qt. Real-data tests are gated on env vars
BIDS_MANAGER_REAL_{MRI,EEG,MEG}_DATA=1 and datasets at
/Users/karelo/Development/datasets/BIDS_Manager/raw_data/.
License
MIT โ see LICENSE.
Citation
Authored by Karel Lรณpez Vilaret and Jochem Rieger, ANCP Lab, Carl von Ossietzky Universitรคt Oldenburg. See the About dialog in the GUI for the full acknowledgements.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bids_manager-1.0.0.tar.gz.
File metadata
- Download URL: bids_manager-1.0.0.tar.gz
- Upload date:
- Size: 657.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25221ccf792635da18f612ab1e5da8169d6c0e83cb52d12543ffb350675fecee
|
|
| MD5 |
31383b776307d7714c00b0335f4fcf68
|
|
| BLAKE2b-256 |
2a3262c20009e304631f27a58e45b6daa53ddb1dff58cb0e65b380c8ce016faf
|
File details
Details for the file bids_manager-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bids_manager-1.0.0-py3-none-any.whl
- Upload date:
- Size: 707.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e7aeff7bd34919502189eb2e4051603420fb16c17ae6a0a6756396a59598380
|
|
| MD5 |
502a3cb1cb9b2b7449b32b1c9d9828da
|
|
| BLAKE2b-256 |
46bffc9e15ddec7a997d14eda593f929787b03a594af067a3363796b4289d40b
|