← all repositories
loli/medpy

MedPy: the medical imaging toolbox that predates your deep learning pipeline

A Python library for the unglamorous half of medical image processing — loading, filtering, and segmenting 3D/4D scans without writing ITK boilerplate yourself.

★623 stars Jupyter Notebook Computer VisionDomain Apps
Velocity · 7d
−0.3
★ / day
star history

What it does MedPy is an image processing library aimed at medical images — the high-dimensional kind: 2D, 3D, and 4D datasets from CT, MRI, and friends. It handles the formats clinicians actually produce (DICOM, NIfTI, MHA/MHD) and provides a grab bag of tools for filtering, feature extraction, and segmentation, including graph-cut based approaches. It also ships as a collection of ready-to-run scripts, not just an API.

The interesting bit It sits on top of SimpleITK/ITK but wraps the common medical-imaging chores into plain Python, so you get the format wrangling and algorithms without the C++-flavored ceremony. The bundled scripts mean you can often skip writing code entirely for standard tasks.

Key highlights

  • Supports 2D, 3D, and 4D medical images across DICOM, NIfTI, MHA/MHD formats
  • Segmentation tools including graph-cut methods
  • Feature extraction utilities for feeding downstream ML pipelines
  • Ships both a library and a set of standalone scripts
  • Available on PyPI and conda-forge; has a Zenodo DOI for citability

Caveats

  • The README is thin on specifics — no feature list, no examples, so you’ll need the separate docs site to judge coverage
  • GPL v3 licensed, which may matter if you’re embedding it in a product
  • Python 2 holdouts are stuck on releases ≤ 0.3.0

Verdict Worth a look if you process CT/MRI volumes and want segmentation and I/O handled for you. If your pipeline is already deep-learning-first with its own preprocessing stack, this may be redundant.

Frequently asked

What is loli/medpy?
A Python library for the unglamorous half of medical image processing — loading, filtering, and segmenting 3D/4D scans without writing ITK boilerplate yourself.
Is medpy open source?
Yes — loli/medpy is open source, released under the GPL-3.0 license.
What language is medpy written in?
loli/medpy is primarily written in Jupyter Notebook.
How popular is medpy?
loli/medpy has 623 stars on GitHub.
Where can I find medpy?
loli/medpy is on GitHub at https://github.com/loli/medpy.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.