Skip to main content

Library-first toolkit for inspecting, previewing, and QA reporting imaging datasets.

Project description

VoxelKit

Inspect. Preview. QA-check. One toolkit, every format.

PyPI Stars Python License: MIT DOI

Documentation · Getting Started · CLI Reference · Python API


You just received 500 brain scans. Before you write a single line of training code — do you know if the data is actually healthy?

VoxelKit answers that in one command.

voxelkit report-batch data/scans/

No format-specific boilerplate. No juggling nibabel, h5py, and tifffile separately. One consistent interface across every file type you work with.


Features

  • 🔍 Inspect — shape, dtype, and metadata from any supported file, instantly
  • 🖼️ Preview — PNG slice from any 3D/4D volume, one command
  • 📊 QA Reports — per-file stats and warnings (NaNs, constant arrays, zero-dominated volumes)
  • 📁 Batch QA — scan an entire directory, emit JSON or a self-contained HTML report with thumbnails
  • 🩻 DICOM Support — single .dcm files and full series directories; PHI stripped by default
  • 🛡️ Anonymisationvoxelkit anonymise ./dicoms/ --output ./clean/ scrubs PHI in bulk
  • 🔄 DICOM → NIfTIvoxelkit convert scan.dcm scan.nii.gz
  • 🧬 Embedding Analysis — dead dimensions, outlier samples, collapsed spaces
  • 🌐 REST API — FastAPI server for HTTP-based workflows
  • 🖥️ Local GUI — optional Streamlit interface, runs entirely offline

Supported Formats

Format Extensions / Input
NIfTI .nii .nii.gz
HDF5 .h5 .hdf5
NumPy .npy .npz
TIFF .tif .tiff
DICOM .dcm file or directory of slices (series)

Install

pip install voxelkit
pip install voxelkit[gui]   # optional Streamlit GUI

Requires Python ≥ 3.9.

Quick Start

# What's in this file?
voxelkit inspect scan.nii.gz

# Is the data healthy?
voxelkit report scan.nii.gz

# Show me a slice
voxelkit preview scan.nii.gz --plane axial --output preview.png

# Check a whole dataset at once (JSON or self-contained HTML)
voxelkit report-batch data/scans/
voxelkit report-batch data/scans/ --html report.html

DICOM workflows:

# Inspect a single .dcm or a whole series directory (PHI stripped by default)
voxelkit inspect scan.dcm
voxelkit inspect ./series/

# Scrub PHI from every .dcm under a directory
voxelkit anonymise ./incoming/ --output ./anonymised/

# Convert DICOM to NIfTI
voxelkit convert ./series/ volume.nii.gz

Or from Python:

from voxelkit import inspect_file, report_file, report_batch

info   = inspect_file("scan.nii.gz")        # also handles .dcm + series dirs
report = report_file("scan.nii.gz")
batch  = report_batch("data/scans/")

# DICOM-specific helpers
from voxelkit.dicom import anonymise_directory, dicom_to_nifti
anonymise_directory("./incoming/", "./anonymised/")
dicom_to_nifti("./series/", "volume.nii.gz")

Full Documentation

Everything else — complete CLI reference, Python API docs, REST API, QA warning explanations, and contributing guide — lives at:

arsalaanahmad.github.io/VoxelKit

Contributing

Contributions are welcome. See the Contributing Guide for setup instructions, workflow, and how to report issues.

Citation

If you use VoxelKit in research, please cite:

@software{voxelkit,
  author  = {Arsalaan Ahmad},
  title   = {VoxelKit},
  doi     = {10.5281/zenodo.19774569},
  url     = {https://github.com/ArsalaanAhmad/VoxelKit},
}

Disclaimer

VoxelKit is a developer and research utility. It is not a clinical decision system and must not be used for diagnosis or treatment.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voxelkit-0.1.6.tar.gz (61.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voxelkit-0.1.6-py3-none-any.whl (65.9 kB view details)

Uploaded Python 3

File details

Details for the file voxelkit-0.1.6.tar.gz.

File metadata

  • Download URL: voxelkit-0.1.6.tar.gz
  • Upload date:
  • Size: 61.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for voxelkit-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4eb1530b0c08c71b6f09f5fbc4ef5aadfcc34479658778ded225200140bd9963
MD5 08eeef464127e7a89f077f8e7a741384
BLAKE2b-256 d60c8c16b753d8a0f0363f01d75cda8bf8d4aaa8299c2fe46bfc92ba5ee87485

See more details on using hashes here.

Provenance

The following attestation bundles were made for voxelkit-0.1.6.tar.gz:

Publisher: publish.yml on ArsalaanAhmad/VoxelKit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file voxelkit-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: voxelkit-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 65.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for voxelkit-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f61ff80c5f67979ee3bf28cabe2f266cbb0c229bb60d881f7fcfe89fd265f6de
MD5 18370ba50d9c8a0affcf3402d28f534e
BLAKE2b-256 d864e40821b876bac76750e77676ed420b4370f18879bc2d77761cb30d144d47

See more details on using hashes here.

Provenance

The following attestation bundles were made for voxelkit-0.1.6-py3-none-any.whl:

Publisher: publish.yml on ArsalaanAhmad/VoxelKit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page