Skip to main content

MedicalImageAnalysis

MedicalImageAnalysis is a Python toolkit for reading medical imaging datasets, organizing them into reusable in-memory objects, and building workflows around ROIs, meshes, rigid transforms, and deformable registrations.

Documentation

Documentation

Why use MedicalImageAnalysis?

  • Reader-first workflows for loading DICOM, MetaImage, and mesh data
  • Shared Data registry for images, dose, ROIs, POIs, rigid transforms, and deformables
  • Structure-first design so image-centric workflows live on Image, Roi, Rigid, and Deformable
  • Direct utility access for users who want lower-level control over conversions, meshing, and registration

Installation

README.md

pip install medicalimageanalysis

Or install from source:

git clone https://github.com/caleb-oconnor/MedicalImageAnalysis.git
cd MedicalImageAnalysis
pip install -e .

Quick start

import medicalimageanalysis as mia

mia.read_dicoms(folder_path="C:/Data/Patient01")

print(mia.Data.image_list())
print(mia.Data.roi_list())

image = mia.Data.image[mia.Data.image_list()[0]]
print(image.array.shape)

Common workflows

Read a DICOM study

import medicalimageanalysis as mia

files = mia.file_parser(folder_path="C:/Data/Patient01")
mia.read_dicoms(file_list=files["Dicom"])

Build a mesh from an ROI

import medicalimageanalysis as mia

image = mia.Data.image["CT 01"]
roi = image.roi["Liver"]
roi.create_mesh(reduction=0.5)

print(roi.mesh.n_points)

Run a rigid registration

import medicalimageanalysis as mia

rigid = mia.Rigid(reference_name="CT 01", moving_name="MR 01")
rigid.compute_registration(
    method="icp_point",
    reference_rois=["Liver"],
    moving_rois=["Liver"],
)

Run a deformable registration

import medicalimageanalysis as mia
a
deformable = mia.Deformable()
deformable.compute_registration(
    method="itk_fast_demons",
    reference_name="CT 01",
    moving_name="MR 01",
    reference_rois=["Liver"],
    moving_rois=["Liver"],
)

Project structure

  • medicalimageanalysis.reader — high-level loading entry points
  • medicalimageanalysis.read — format-specific reader classes
  • medicalimageanalysis.structure — image, ROI, dose, rigid, and deformable objects
  • medicalimageanalysis.utils — lower-level conversion, meshing, and registration utilities
  • docs/ — Sphinx documentation source

Documentation publishing note

The repository keeps the documentation source under docs/. The hosted documentation site is generated from those files and published at:

https://caleb-oconnor.github.io/MedicalImageAnalysis/

License

Licensed under the BSD 3-Clause License.

See LICENSE.txt for details.

Metadata

Release files for medicalimageanalysis 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for medicalimageanalysis 3.0.0
File Size Uploaded Provenance Actions
medicalimageanalysis-3.0.0.tar.gz 218.6 kB Without provenance Details for medicalimageanalysis-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for medicalimageanalysis 3.0.0
File Interpreter ABI Platform Actions
medicalimageanalysis-3.0.0-py3-none-any.whl Python 3 none any Details for medicalimageanalysis-3.0.0-py3-none-any.whl

Total release size: 458.9 kB

Release files / medicalimageanalysis-3.0.0.tar.gz

Download URL medicalimageanalysis-3.0.0.tar.gz
Size 218.6 kB
Tags Source
SHA-256 checksum
How to use checksums
489d5e30424bf0d22476ebd0eaaf8acab822d11f263d349fc161183b30d226a8
BLAKE2b-256 checksum
How to use checksums
f0da8465c37eaab61fbf2a8e58543d3adc82c9ff86fe327c8d4f2c545167a439
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / medicalimageanalysis-3.0.0-py3-none-any.whl

Download URL medicalimageanalysis-3.0.0-py3-none-any.whl
Size 240.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e8c9569b501f50a57723ca3fb93ae1588eff08053618304a37198b22df2ca62
BLAKE2b-256 checksum
How to use checksums
d7bb90489d38a3613b30f8eb4e2062809b364f3249207c5bc255fb860de0aba6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Security for medicalimageanalysis 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page