Metadata-Version: 2.2
Name: metaimageio
Version: 1.3.1
Summary: Support for reading and writing images in MetaIO file format.
Author: Ali Uneri
Project-URL: Homepage, https://auneri.github.io/MetaImageIO
Project-URL: Repository, https://github.com/auneri/MetaImageIO
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: numpy>=1.26
Provides-Extra: flake8
Requires-Dist: flake8; extra == "flake8"
Requires-Dist: flake8-bugbear; extra == "flake8"
Requires-Dist: flake8-builtins; extra == "flake8"
Requires-Dist: flake8-comprehensions; extra == "flake8"
Requires-Dist: flake8-docstrings; extra == "flake8"
Requires-Dist: flake8-import-order; extra == "flake8"
Requires-Dist: flake8-mutable; extra == "flake8"
Requires-Dist: flake8-pyproject; extra == "flake8"
Requires-Dist: flake8-quotes; extra == "flake8"
Requires-Dist: flake8-use-fstring; extra == "flake8"
Requires-Dist: flake8-use-pathlib; extra == "flake8"
Requires-Dist: pep8-naming; extra == "flake8"
Provides-Extra: imageio
Requires-Dist: imageio>=2.28; extra == "imageio"
Provides-Extra: pytest
Requires-Dist: pytest; extra == "pytest"
Requires-Dist: pytest-cov; extra == "pytest"

# MetaImageIO

Support for reading and writing images in [MetaIO](https://itk.org/Wiki/ITK/MetaIO/Documentation) file format.

[![license](https://img.shields.io/github/license/auneri/MetaImageIO)](https://github.com/auneri/metaimageio/blob/main/LICENSE.md)
[![build](https://img.shields.io/github/actions/workflow/status/auneri/MetaImageIO/main.yml)](https://github.com/auneri/metaimageio/actions)
[![pypi](https://img.shields.io/pypi/v/metaimageio)](https://pypi.org/project/metaimageio)
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/metaimageio)](https://anaconda.org/conda-forge/metaimageio)
[![matlab-file-exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/104070-metaimageio)

## Getting started in Python

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

```python
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](https://imageio.readthedocs.io) plugins.

```python
import imageio.v2 as iio
mio.imageio.add_format()
image = iio.imread('/path/to/input.mha', format='MetaImageIO')
meta = image.meta
```

```python
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](https://www.mathworks.com/help/matlab/matlab_env/get-add-ons.html).

```matlab
[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](https://www.mathworks.com/help/matlab/ref/imformats.html).

```matlab
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](https://github.com/auneri/metaimageio).
4. Merge the auto-generated pull request on [metaimageio-feedstock](https://github.com/conda-forge/metaimageio-feedstock).
