You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

metaimageio

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metaimageio

Support for reading and writing images in MetaIO file format.

1.3.2
pipPyPI
Maintainers
1

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

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts