Skip to content

integer32llc/dimble

 
 

Repository files navigation

dimble

Nimble Digital Imaging for Medicine

Near lossless and easy conversion from DICOM and back

  • Done

Support for fast and random access of metadata

  • Done

Extremely fast and zero-copy loading to CPU/GPU

  • Done

All relevant data types including uint16, f16, bf16, complex64 and complex128

  • Currently supports f32, trivial to support other datatypes

Bindings for Python and conversion to NumPy/CuPy/JAX/Torch tensors

  • Currently supports loading to Torch tensors (easily extensible)

Safe: no codegen/exec based on the metadata

  • Done

Support for ITK file formats [ref], including NIfTI

  • Done

Installation

# using ssh
git clone [email protected]:StrongCompute/dimble.git
# OR using https
git clone https://github.com/StrongCompute/dimble.git

cd dimble

make install
make validate_install

Usage

import dimble

# convert to dimble
dimble.dicom_to_dimble('xray.dicom', 'xray.dimble')

# load a dimble file's pixel data
dataset = dimble.load_dimble('xray.dimble', fields=["7FE00010"], device="cpu")

# load a dimble file's pixel data sliced to a 224x224 chunk offset by 100 in each dimension
dataset = dimble.load_dimble('xray.dimble', fields=["7FE00010"], device="cpu", slices=[slice(100,100+224), slice(100,100+224)])

# convert back to dicom
dimble.dimble_to_dicom("xray.dimble", "xray.dicom")

Developing

make install-dev

Testing

make install-dev
make test

About

Nimble Digital Imaging IO for Medicine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 52.7%
  • Python 46.1%
  • Other 1.2%