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.1

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.1
File Size Uploaded Provenance Actions
medicalimageanalysis-3.0.1.tar.gz 237.7 kB Without provenance Details for medicalimageanalysis-3.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 498.8 kB

Release files / medicalimageanalysis-3.0.1.tar.gz

Download URL medicalimageanalysis-3.0.1.tar.gz
Size 237.7 kB
Tags Source
SHA-256 checksum
How to use checksums
81cd1658a3ca7680cb0b2951c53d9486eda23b9f59fa912ee31b1477628b2fa9
BLAKE2b-256 checksum
How to use checksums
94bfedad2270785a2e82a46840d02dc86e8fd5c1631dd719ed69f1567ee14b02
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.1-py3-none-any.whl

Download URL medicalimageanalysis-3.0.1-py3-none-any.whl
Size 261.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c8f3c5e4724ff1da602a88a9f6fb8745426c1e9d6520373fc87be18bf75d4f4
BLAKE2b-256 checksum
How to use checksums
f0bc9a879593dc7e6688075ca04ed8868312f4d69eda71d8ceacd4ef785a734f
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.1

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