CedricConday/nifti-qc
nifti-qc
Catch silently-broken NIfTI geometry — qform/sform mismatch, non-orthonormal affines, misaligned inputs — before it propagates into your results.
Neuroimaging pipelines fail quietly. A volume whose qform and sform disagree loads without error in every standard reader; which one your tool happens to consult decides where the data lands in space. Two volumes that were never truly co-registered will still produce a voxel-wise comparison, and it will look fine. These are not crashes, they are wrong answers that pass review.
This Space runs the `nifti-qc` package interactively. Upload one or more .nii / .nii.gz files, or press Load a broken example to scan two synthetic volumes with faults deliberately built in.
Everything runs in your browser. The real nifti-qc package is installed into a WebAssembly Python runtime (Pyodide) on page load, so no volume you open here is ever uploaded anywhere — which matters for medical imaging, because you can point it at real patient data without it leaving your machine. First load takes about twenty seconds while the runtime and packages download; after that it is instant.
There is no server. This is a static page, so the results you see come from the same Python code you would get from pip install nifti-qc, not from a reimplementation.
Use it as a library
pip install nifti-qcfrom nifti_qc import scan
report = scan(["sub-01_T1w.nii.gz", "sub-01_FLAIR.nii.gz"])
for fr in report.files:
for f in fr.findings:
print(f.severity, f.code, f.message)Or in CI:
nifti-qc path/to/data/*.nii.gzChecks
How this Space is built
numpy is deliberately absent from the in-browser install because Pyodide ships it natively; asking micropip for it sends it to PyPI, where there is no pure-Python wheel.
Links
- Source: <https://github.com/CedricConday/nifti-qc>
- PyPI: <https://pypi.org/project/nifti-qc/>
- Built on nibabel
MIT licensed.
