Skip to main content

Support for reading and writing images in MetaIO file format.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metaimageio-1.3.2.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metaimageio-1.3.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file metaimageio-1.3.2.tar.gz.

File metadata

  • Download URL: metaimageio-1.3.2.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for metaimageio-1.3.2.tar.gz
Algorithm Hash digest
SHA256 fddd289c1c18326b3fabf678688c973f12fde4134fd9efcda28b167e68a4c342
MD5 a88694cbd7b2d64de00e70ee29755e60
BLAKE2b-256 9abaf1c88ee5973127104189451bf1535f3370e63cea327219b94c65c2605507

See more details on using hashes here.

File details

Details for the file metaimageio-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: metaimageio-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for metaimageio-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7dba2c3d35538f0891d397a766bd816f0658d161ee9b096cd0bd83aab88a6d56
MD5 0a04ad9fa6aa262ddc12a95ebf284818
BLAKE2b-256 891d7b1e462f1d92722e5bd20d963eba5af5aaeee3b4eefc0c7f008b2b2c9f91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page