Skip to main content

MetaImageIO

Support for reading and writing images in MetaIO file format.

license build pypi conda-forge matlab-file-exchange

Getting started in Python

Install using pip install metaimageio or conda install -c conda-forge metaimageio.

import metaimageio as mio
image, meta = mio.read('/path/to/input.mha')
mio.write('/path/to/output.mha', image, ElementSpacing=meta['ElementSpacing'])

(Highly optional) Add to imageio plugins.

import imageio.v2 as iio
mio.imageio.add_format()
image = iio.imread('/path/to/input.mha', format='MetaImageIO')
meta = image.meta
import imageio.v3 as iio
from metaimageio.imageio import MetaImageIOPlugin
image = iio.imread('/path/to/input.mha', plugin=MetaImageIOPlugin)
meta = iio.immeta('/path/to/input.mha', plugin=MetaImageIOPlugin)

Getting started in MATLAB

Install using the Add-On Manager.

[image, meta] = metaimageio.read('/path/to/input.mha');
metaimageio.write('/path/to/output.mha', image, 'ElementSpacing', meta.ElementSpacing);

(Optional) Add to image file format registry.

metaimageio.imformats();
image = imread('/path/to/input.mha');
meta = imfinfo('/path/to/input.mha');

Releasing a new version

  1. Update project.version in pyproject.toml and CHANGELOG with commit message "Release vX.X.X".
  2. Add tag vX.X.X with message "Release vX.X.X".
  3. Push the tag and create a new release on metaimageio.
  4. Merge the auto-generated pull request on metaimageio-feedstock.

Release files for metaimageio 1.3.2

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

Source distribution (sdist)

Source distribution for metaimageio 1.3.2
File Size Uploaded
metaimageio-1.3.2.tar.gz 10.5 kB Details

Built distribution (wheel)

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

Total release size: 22.8 kB

Release files / metaimageio-1.3.2.tar.gz

Download URL metaimageio-1.3.2.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fddd289c1c18326b3fabf678688c973f12fde4134fd9efcda28b167e68a4c342
BLAKE2b-256 checksum
How to use checksums
9abaf1c88ee5973127104189451bf1535f3370e63cea327219b94c65c2605507
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / metaimageio-1.3.2-py3-none-any.whl

Download URL metaimageio-1.3.2-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dba2c3d35538f0891d397a766bd816f0658d161ee9b096cd0bd83aab88a6d56
BLAKE2b-256 checksum
How to use checksums
891d7b1e462f1d92722e5bd20d963eba5af5aaeee3b4eefc0c7f008b2b2c9f91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

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