Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/auneri/metaimageio
Support for reading and writing images in MetaIO file format.
https://github.com/auneri/metaimageio
matlab python
Last synced: 3 months ago
JSON representation
Support for reading and writing images in MetaIO file format.
- Host: GitHub
- URL: https://github.com/auneri/metaimageio
- Owner: auneri
- License: mit
- Created: 2021-12-23T02:28:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-25T20:28:23.000Z (over 1 year ago)
- Last Synced: 2024-10-04T21:45:29.959Z (4 months ago)
- Topics: matlab, python
- Language: Python
- Homepage: https://auneri.github.io/MetaImageIO/
- Size: 80.1 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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
image, meta = metaimageio.read('/path/to/input.mha')
metaimageio.write('/path/to/output.mha', image, ElementSpacing=meta['ElementSpacing'])
```Add to [imageio](https://imageio.readthedocs.io) plugins.
```python
import imageio
metaimageio.imageio()
image = imageio.imread('/path/to/input.mha')
meta = image.meta
```## 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);
```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');
```