Skip to main content

RadiObject

What? A TileDB-backed data structure for radiology data at scale.

Why? NIfTI/DICOM must be read from local disk and don't support partial reads. TileDB enables cloud-native storage (S3), efficient partial reads, and hierarchical organization of multi-volume datasets.

Thoughts

Installation

pip install radiobject

Quick Start

from radiobject import RadiObject

# Create from NIfTI files using images dict (recommended)
radi = RadiObject.from_niftis(
    uri="./my-dataset",
    images={
        "CT": "./imagesTr/*.nii.gz",      # Glob pattern
        "seg": "./labelsTr",               # Directory path
    },
    validate_alignment=True,               # Ensure matching subjects across collections
    obs_meta=metadata_df,                  # Optional subject-level metadata
)

# Access data (pandas-like)
vol = radi.CT.iloc[0]            # First CT volume
data = vol[100:200, :, :]        # Partial read (only loads needed tiles)

# Filtering (returns views)
subset = radi.filter("age > 40")       # Query expression
subset = radi.head(10)                 # First 10 subjects
subset.materialize("./subset")         # Write to storage

Works with local paths or S3 URIs (s3://bucket/dataset).

How It Works

NIfTI requires decompressing entire volumes; TileDB reads only the tiles needed. This enables 200-660x faster partial reads. See benchmarks →

Sample Data

Download sample datasets for tutorials and testing:

# Install download dependencies
pip install radiobject[download]

# Download BraTS brain tumor data (for tutorials 00-04)
python scripts/download_dataset.py msd-brain-tumour

# List all available datasets
python scripts/download_dataset.py --list

Documentation

License

MIT

Download files

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

Source Distribution

radiobject-0.1.1.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

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

radiobject-0.1.1-py3-none-any.whl (75.0 kB view details)

Uploaded Python 3

File details

Details for the file radiobject-0.1.1.tar.gz.

File metadata

  • Download URL: radiobject-0.1.1.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for radiobject-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d4672ff9d1f37ed40499b42752e972a745309a6dc3beee20df1989254aea6ce5
MD5 354e1456e020ea82cb209b0acb740874
BLAKE2b-256 de8930946fe69d6196cde916dfe6e73f0ed7a1433f6b7add0257320e1f0dff28

See more details on using hashes here.

File details

Details for the file radiobject-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: radiobject-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 75.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for radiobject-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e7bef85da73c168ee111e5a6dfe00927a51a9cfe1b1fd603a67add8d08036a9
MD5 48f4c3b3c1696b0863c2bf6509b9a066
BLAKE2b-256 9ab321286955621fc0903545fc5d71f99eb1de381b3fcabf147def00a1e07b6e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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