From 815d90197479533ea0045a58a5cc4867f9af380c Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sun, 22 Oct 2023 23:48:01 -0400 Subject: [PATCH] feat(itkwasm-image-io): initial addition --- .../tests/test_read_write_image.py | 2 - .../python/itkwasm-image-io/README.md | 11 +++ .../python/itkwasm-image-io/docs/Makefile | 20 ++++ .../itkwasm-image-io/docs/_static/favicon.png | Bin 0 -> 13605 bytes .../itkwasm-image-io/docs/_static/logo.svg | 1 + .../python/itkwasm-image-io/docs/conf.py | 56 +++++++++++ .../python/itkwasm-image-io/docs/index.md | 35 +++++++ .../python/itkwasm-image-io/docs/make.bat | 35 +++++++ .../itkwasm-image-io/docs/requirements.txt | 8 ++ .../itkwasm_image_io/__init__.py | 91 ++++++++++++++++++ .../itkwasm_image_io/_version.py | 1 + .../itkwasm_image_io/bio_rad_read_image.py | 32 ++++++ .../bio_rad_read_image_async.py | 32 ++++++ .../itkwasm_image_io/bio_rad_write_image.py | 37 +++++++ .../bio_rad_write_image_async.py | 37 +++++++ .../itkwasm_image_io/bmp_read_image.py | 32 ++++++ .../itkwasm_image_io/bmp_read_image_async.py | 32 ++++++ .../itkwasm_image_io/bmp_write_image.py | 37 +++++++ .../itkwasm_image_io/bmp_write_image_async.py | 37 +++++++ .../itkwasm_image_io/fdf_read_image.py | 32 ++++++ .../itkwasm_image_io/fdf_read_image_async.py | 32 ++++++ .../itkwasm_image_io/fdf_write_image.py | 37 +++++++ .../itkwasm_image_io/fdf_write_image_async.py | 37 +++++++ .../itkwasm_image_io/gdcm_read_image.py | 32 ++++++ .../itkwasm_image_io/gdcm_read_image_async.py | 32 ++++++ .../itkwasm_image_io/gdcm_write_image.py | 37 +++++++ .../gdcm_write_image_async.py | 37 +++++++ .../itkwasm_image_io/ge4_read_image.py | 32 ++++++ .../itkwasm_image_io/ge4_read_image_async.py | 32 ++++++ .../itkwasm_image_io/ge4_write_image.py | 37 +++++++ .../itkwasm_image_io/ge4_write_image_async.py | 37 +++++++ .../itkwasm_image_io/ge5_read_image.py | 32 ++++++ .../itkwasm_image_io/ge5_read_image_async.py | 32 ++++++ .../itkwasm_image_io/ge5_write_image.py | 37 +++++++ .../itkwasm_image_io/ge5_write_image_async.py | 37 +++++++ .../itkwasm_image_io/ge_adw_read_image.py | 32 ++++++ .../ge_adw_read_image_async.py | 32 ++++++ .../itkwasm_image_io/ge_adw_write_image.py | 37 +++++++ .../ge_adw_write_image_async.py | 37 +++++++ .../itkwasm_image_io/gipl_read_image.py | 32 ++++++ .../itkwasm_image_io/gipl_read_image_async.py | 32 ++++++ .../itkwasm_image_io/gipl_write_image.py | 37 +++++++ .../gipl_write_image_async.py | 37 +++++++ .../itkwasm_image_io/jpeg_read_image.py | 32 ++++++ .../itkwasm_image_io/jpeg_read_image_async.py | 32 ++++++ .../itkwasm_image_io/jpeg_write_image.py | 37 +++++++ .../jpeg_write_image_async.py | 37 +++++++ .../itkwasm_image_io/lsm_read_image.py | 32 ++++++ .../itkwasm_image_io/lsm_read_image_async.py | 32 ++++++ .../itkwasm_image_io/lsm_write_image.py | 37 +++++++ .../itkwasm_image_io/lsm_write_image_async.py | 37 +++++++ .../itkwasm_image_io/meta_read_image.py | 32 ++++++ .../itkwasm_image_io/meta_read_image_async.py | 32 ++++++ .../itkwasm_image_io/meta_write_image.py | 37 +++++++ .../meta_write_image_async.py | 37 +++++++ .../itkwasm_image_io/mgh_read_image.py | 32 ++++++ .../itkwasm_image_io/mgh_read_image_async.py | 32 ++++++ .../itkwasm_image_io/mgh_write_image.py | 37 +++++++ .../itkwasm_image_io/mgh_write_image_async.py | 37 +++++++ .../itkwasm_image_io/mrc_read_image.py | 32 ++++++ .../itkwasm_image_io/mrc_read_image_async.py | 32 ++++++ .../itkwasm_image_io/mrc_write_image.py | 37 +++++++ .../itkwasm_image_io/mrc_write_image_async.py | 37 +++++++ .../itkwasm_image_io/nifti_read_image.py | 32 ++++++ .../nifti_read_image_async.py | 32 ++++++ .../itkwasm_image_io/nifti_write_image.py | 37 +++++++ .../nifti_write_image_async.py | 37 +++++++ .../itkwasm_image_io/nrrd_read_image.py | 32 ++++++ .../itkwasm_image_io/nrrd_read_image_async.py | 32 ++++++ .../itkwasm_image_io/nrrd_write_image.py | 37 +++++++ .../nrrd_write_image_async.py | 37 +++++++ .../itkwasm_image_io/png_read_image.py | 32 ++++++ .../itkwasm_image_io/png_read_image_async.py | 32 ++++++ .../itkwasm_image_io/png_write_image.py | 37 +++++++ .../itkwasm_image_io/png_write_image_async.py | 37 +++++++ .../itkwasm_image_io/read_image.py | 49 ++++++++++ .../itkwasm_image_io/scanco_read_image.py | 32 ++++++ .../scanco_read_image_async.py | 32 ++++++ .../itkwasm_image_io/scanco_write_image.py | 37 +++++++ .../scanco_write_image_async.py | 37 +++++++ .../itkwasm_image_io/tiff_read_image.py | 32 ++++++ .../itkwasm_image_io/tiff_read_image_async.py | 32 ++++++ .../itkwasm_image_io/tiff_write_image.py | 37 +++++++ .../tiff_write_image_async.py | 37 +++++++ .../itkwasm_image_io/vtk_read_image.py | 32 ++++++ .../itkwasm_image_io/vtk_read_image_async.py | 32 ++++++ .../itkwasm_image_io/vtk_write_image.py | 37 +++++++ .../itkwasm_image_io/vtk_write_image_async.py | 37 +++++++ .../itkwasm_image_io/wasm_read_image.py | 32 ++++++ .../itkwasm_image_io/wasm_read_image_async.py | 32 ++++++ .../itkwasm_image_io/wasm_write_image.py | 37 +++++++ .../wasm_write_image_async.py | 37 +++++++ .../itkwasm_image_io/wasm_zstd_read_image.py | 32 ++++++ .../wasm_zstd_read_image_async.py | 32 ++++++ .../itkwasm_image_io/wasm_zstd_write_image.py | 37 +++++++ .../wasm_zstd_write_image_async.py | 37 +++++++ .../itkwasm_image_io/write_image.py | 43 +++++++++ .../python/itkwasm-image-io/pyproject.toml | 61 ++++++++++++ .../python/itkwasm-image-io/tests/__init__.py | 0 .../python/itkwasm-image-io/tests/common.py | 6 ++ .../python/itkwasm-image-io/tests/test_png.py | 41 ++++++++ .../tests/test_read_write_image.py | 62 ++++++++++++ 102 files changed, 3418 insertions(+), 2 deletions(-) create mode 100644 packages/image-io/python/itkwasm-image-io/README.md create mode 100644 packages/image-io/python/itkwasm-image-io/docs/Makefile create mode 100644 packages/image-io/python/itkwasm-image-io/docs/_static/favicon.png create mode 100644 packages/image-io/python/itkwasm-image-io/docs/_static/logo.svg create mode 100644 packages/image-io/python/itkwasm-image-io/docs/conf.py create mode 100644 packages/image-io/python/itkwasm-image-io/docs/index.md create mode 100644 packages/image-io/python/itkwasm-image-io/docs/make.bat create mode 100644 packages/image-io/python/itkwasm-image-io/docs/requirements.txt create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/__init__.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/_version.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_read_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_read_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_write_image_async.py create mode 100644 packages/image-io/python/itkwasm-image-io/itkwasm_image_io/write_image.py create mode 100644 packages/image-io/python/itkwasm-image-io/pyproject.toml create mode 100644 packages/image-io/python/itkwasm-image-io/tests/__init__.py create mode 100644 packages/image-io/python/itkwasm-image-io/tests/common.py create mode 100644 packages/image-io/python/itkwasm-image-io/tests/test_png.py create mode 100644 packages/image-io/python/itkwasm-image-io/tests/test_read_write_image.py diff --git a/packages/image-io/python/itkwasm-image-io-wasi/tests/test_read_write_image.py b/packages/image-io/python/itkwasm-image-io-wasi/tests/test_read_write_image.py index 2b50a991c..96d8dd653 100644 --- a/packages/image-io/python/itkwasm-image-io-wasi/tests/test_read_write_image.py +++ b/packages/image-io/python/itkwasm-image-io-wasi/tests/test_read_write_image.py @@ -1,5 +1,3 @@ -from pathlib import Path - from itkwasm import PixelTypes, IntTypes from itkwasm_image_io_wasi import read_image, imread, write_image, imwrite diff --git a/packages/image-io/python/itkwasm-image-io/README.md b/packages/image-io/python/itkwasm-image-io/README.md new file mode 100644 index 000000000..5836e7c60 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/README.md @@ -0,0 +1,11 @@ +# itkwasm-image-io + +[![PyPI version](https://badge.fury.io/py/itkwasm-image-io.svg)](https://badge.fury.io/py/itkwasm-image-io) + +Input and output for scientific and medical image file formats. + +## Installation + +```sh +pip install itkwasm-image-io +``` diff --git a/packages/image-io/python/itkwasm-image-io/docs/Makefile b/packages/image-io/python/itkwasm-image-io/docs/Makefile new file mode 100644 index 000000000..d4bb2cbb9 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/packages/image-io/python/itkwasm-image-io/docs/_static/favicon.png b/packages/image-io/python/itkwasm-image-io/docs/_static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..bd1e535c6d807ba2313cae8722a4944bb28d46af GIT binary patch literal 13605 zcmaJ|2XkCimTskPO0>#_q_YwyZ40q+G6JR z`|mdIsqyg)^VI2dKIYoWR%k1v-CYmfT*$ip{<|<-N6Q<_bvg_HFUX)9yir57t&KX} zTKt_Wc8v=%Pp4Zl*=?&%R|uC*w{2FgwCutp{l5B|N>05aa!nZ5J!Wfr7IZqVK#G&N z4|2LrXIL~hRvBPBZQYV$y86bQd$z+cSC+T0h+`G1uS4t!sJ0G^48WW!P^&G+$RCmf z*`wPk*S5Cji1F2LL@z)UZh+?baDg+_T0n^mR<=gNSZ#G0@pp-ij*i73z6`Xd31nFU z2}(sRE-f#08C*2?-9`cij2keh`TN%!r@Xo3TMvWQAcfXo@cuxi<^O_jj4Vs@fNJ65 zb0LFc*3CoEf^N-%5dgV-av`c;muu|PF2wJJdG^Sy!x7?2a%^6k1LIJ{S|${eoIecW zEKf*0L@=b{+Hoi`5gtAk*mC*j9^8^k21BWz7B6^*_qh{LrWmfAw-!MBTtNVnH6$ju zUk~DoLd3NNie(U|(wiY}jTx;9NLngrpXP><&L@5J^c0wRIrkzc$R2GNg3jG6pBV`E z>L?{Yj26>Cj<<0QT+*$75AE*ZOHB}Pa6YAAr&Vvc<;pEN?T0W)2FInO?yU2yGH zP^F4qQryA1Zi9*{{G(ZkVW)o#gAEnK5{ww;KBl;Am10;bTR|{^&H3+td34YvtGux+ zXe{j7QSpM4Rzgb+6KJy+t0@NSHND~J13-}i_E%w`NpahhS?7a;)<0R!Dv5aeD1?a2ZXsHe`! zh$ll$=ypE#AmodqW8ld{pu2JPFh*hdTt6^3#j}j!-qbx`0-eO93|%>rT^`A}0kbLG zV?mRQScZF>4Xj(sM4MNsc>8!4&`|J^3Ss?~r^VI62G$pGk(Du^rYQ06zjVC%@{hto zRqet#@01O8go>}_k_2a8gI@J!-2pxmCLS=`Ll#+3BanLA7kqV4H;6HfvLAC->0=Ds zKYS0o81BP&I70yI>62oNLuECCR%FbA<609#85*DglF%l$aA5W5h`D@5)vm`14=iSe zw{mvl)n5g6LIVl$Y|Pm3%8fDTd0*9!=bvJLryw>6U=$S?(klk|WNlR| zV*)UQ+?y)A58sA81QC>3p-qrb2xC_9!9$_yAs7iZ7z8d&(7{}{YQqIs>;ho$!XGVA z;ocy!%!F5uREz5J5Hz zYm~2IK{-Qa*pFN{55#$v6|bssc&}R|AIQnvE5M(13@H0h5SznF08ET55Zxi#c{Ufu zzC0NP>UCQV!pzv>&ByTrp1|#n7nELq7#ipkl?b(;*BQNSs`h*g#c~yFb{r0|%j^mZ zq)aaRZ+2C;@C*YsiqaRD<2=KtIM}2gJ^=dq)mOg0??o6aJfKh%n*(qarE%O~Bkbx+ ze+=P)bm%L#zK$@#b<5bSON!aa4pI6p!AIjFw;HE zQUG+2aqmqTsBmMDv7X9U@#5|G9)VifwoebGXH^0$6dy>lBP0ojFm|(<229WbPNuh~ zr)Z2B15#{JVzd;othzn=^u=6R+7Rodqb&&R=*ZI#=S5VjmA2ywz)oTfZIvMp5msLa z#9v(CNzH;0!t1J(bv!&u*k{~pDx(23&5Bk%tOA_!*<)dY2DMz7z)XiW`y7B8QE!`T z=1P_s$F)D70t>$TvHh2YXDNm}4g$sP4prW~{N-<;xpcs@fd^6~WP_XNo6|Qzl`u)g zJYI`={ME2LhUinJG-ev&qrHMb03$sO$#5y+CI%orjhqfBm8mw%X5w8u?SS=cwRzYv z;~#e$d&SSgA z7&eyC1WSmE0#uPy!DNnrMV(r5Df}CePmDWkiMH?D}-zWW`nH| z!1MFN4g19Oh#zKoe)VSF7!*@(lnbAoqCF6{W$E@$PnPWzr*Mb`dai1+vQoxf2iV7r z`fBjbUIUmv9T|i*h{{zyOkhUEJrs6;xI%}zSQo%7Yl5+5JOq82j-OAKuR@~E-@UUfogX5DvLFx>;RX>XOC{fz9eMzgt4(MYYoviO0xW#C+6hCFH(t~arLMNsTs@A_ z0p9Nkxo1^II0P;GRnN6gcqFik>LD!4j87f|Gr7Y-*># z&%HA(mxPT_%g%l-Jl*_OnCOP7S#a3`2w<3Z##MoH!~y1sw5S7(ef!LhIeFP$wx9hT zroGAR=R5|2J9W?7ti60-=zv_A8mtMfN{9XZ6aOk6a6)8o0jpN9Au68_DcsHS15`$3 zz?C1I&SrT6U;IuqIF8w+q(P=2fCq#t*TBpV%Sc6am_f|S32#o|)_|};(D*ECN~M-# z$d^Z%$yyT#@P=eB>cg);$!H1qW^aBLm;hh~l5qRI6El2m0wf%wp{bAMV^|1TU@6#( zh0)^asZ;BR32cn<47bVvJObHYA;UdTT|T`&Q2j=bZ*GWOU@r*bMKyB|z!1bx$ELmc zsCYEK`CF$r8St18_-%@2rWy1i8ERY(%WRY(V>VKwDrY_~Du;{kE0c?>dT8hLyb`FM zt~hQ9xO5^JJgr{KZ3vtVym(3mgE|HksAfVnuvn@f(}mnxcyA3eckU!8%Kk&nZ|uWk zj5`0JBp7V7Il>56LV`Mqox?gt^5HPE8Mn%0FejH~$j~Lce5sqo0&HG6waT!beKm|_ zuAw7FGfSgb)hXTL$WCF;Y^+{L20>UsFeAQ~#J92UEO6xyiy zv&34+yY@o6=8W?`$KY&2*iq+xqFw0_>+|7mruRI9D**D~aUubh&59ns|xz?>L4;9YHM%c+JsAtr!Go-u)bVw!IgURuS089pu%NN_~LF;@* zp4#qcS_eCes|0LJ67a?2MpGbk2818IEJ!)Tz)| zh~k^WS7W>QVY%?2TvIvXo&m%3wpO39DH-q#04lO`SkrJd%x)^8~Q{Q%1)+<9P`1<`9U`(l=FPLp%R(=4LoLRW- zf7yU$;e5tQ31N?UK?K8li>xQty7!Y?e zL#g%)3;6ck=fp@(PZ~Y*LaQT|aF43POD9uIs?so8N*EDe9*_9($v!osLhap#ai;iI z)HiB}M_})cPV?TDHuzI=a?`EXf4{ySpn}}z&k_X~M7Doj>o~XyqG|-z)u*>pfQ)8&2lG_w<81@W-u zbE>%U>BUQG9&%8`$3|X^|72f$7z&!>) zxHR4ljLq0?-WS#Fmm(OB z6l=3Q@SgALUY-k0JO_=O@P}t*+T8X-p|JA*`rZ>zDu1wo9i~haX5({Bz_KWI3(p=; zh?R%ZXD2{E04Hrx`*LF35|SBy$D&!3UJzgtQVxl!+Z#7m)7Ur_ufoo5bb$bT9*etm z(a<0svtzx7oVk|KPhXTP;Cx=pWI9#xubR~tV|72AT@VHV$jk!`F-?)&Uk`*GR%jjt z19Pdftet~l>=gPs*CQ=ZeD02QkPFwNP7_$bfhAVlp3+TlEJRh6Ar-a>LOn1v#7lgD zDcem23Io-3iOEy5=_ae%e1Msi9SPY6;ac|?eChJ5XaxfnH_+HPXcwda0&r3Gnr97! zI4_uYS2{k__GW7w%RpJfAX*jB?g|^MR$4(BMSsrV?3She|z3zP%Ea3uiwXGhi3zq zkj$X5+xe-eY%K)q*nkXOL99wZ(xt~SOf@q>0INeo|6mz!>ViyK^0*ll;^Fz7^fjh| z4`zD>PC*N5v%T72-T7ZD7+1v2l5u?PSx3`}j2Zi$TS)B&0e$Jcsq~jR&aZ-+_@GO_ zXwRtPD}hBw{G7G!uZQ1Y*~CGr&)>i713eAVp!SDxiuig(RckYhu$FJ}4(5pE;Toip z66(ZFGg*R3sP@zYBdT?ywF_dfSOw~5VY_`7a5X?o_LltbqrXo)t7frnZX5@dsI~3k zNdqKi7lC&)GaKqrEV|kzwsO0p{=6}a{rDLscLoBKLZX_{oUt|H5FXi^3!`8wsFK~J zYAcz=0+d~RLJTnXD7f{G--TCTGCKetI5|`TKIHh-E0;FtEru}ZfJp_2nK}R1w2yOF zGAzb10KzpoN~JTKF$S1x)+^vsI|1%@QEi&Zn&ZjC%Vq5#pi&fg0g|MRU^Fs}eP<5O z*>b&L@lL>>yVuZF#1LyxZ;~-@A22i4KyJt6j19+WK$xfwQC3?dD<^|pId5Jb&gyA|l>;$dI6h`mX~FQzH$ibK zWd?H|6Il(R=aa`l%k(gWSKneXfF>7a87OZZ9q_ULcNYv)TLr2G|JUJPZ!+r~szB(i z`*?@}SARFqlgu&@eE0gZFg|+Asg12Z%&_!BmQx!T_r&4?r|`J6Vwi$G)~QgZaXy#} zGAFcfr?=iz&l@@aq)Y>MPT1IHccawI^G-vnW)<*ZmIjb}Yq}#o+V$K-bzrg7ESlT- zv!B48sa<2k&*U-QKo-Qrf?oP<0j%u+qXgKmz3A+n@uGnf2RG{gT_(V2x$_l^Y3&&JZGALsZfI-yrWALY! z7^1r|P&Tg(2Ry{|olVc*#<10FQOV%FmCbE!P|RKmgl~`HB(79VbDTh%JWm#a6ZY44 z_VW%GwGx=8-vG@*fE}xBlR8x^2k<{|lV3?6KdsIqjC@5M4g(ax7SYRyh;7H_Z z?nYcOMpKL8no1chyZd4~{}Ip(`Qr7Pk3fYn8^9*(s0UIqW^<&9t;@3Jk2oF>@sJTZ z0PZz@6^eC!tLo^u_z&k%9Q?84#10 z&zepO015mYjUf(;sB(X`{m~RNTbDU@l}qOy4H6?jol6)UOcWP*CA=xHD-=fGn)uW# zhH0LW{NRNNx!`S16Jy6_3D5b)xjw!|eOzH>#c_4vy{xLGPaY_TiYP90F|)Dx3_|N-qeo+zJ~+oiX`e|m9hkv*&9?`FEAz15retpZ{hhciqE;0tjr1|8bvE}q?@qTGE}K6tQI z2AxoRpP&Y6(jMRi`;To5Pd^G`6f}7M^>>fy8`~KYZ}$)Xjoan{vBYz|o-0{~Y(f~R zjgo<6C?H&vn<#J*dlN_(#jWJW^2~}z3TCD1%bRCxJ7IX**TP-|__`QX(mcpg_p6Mr zk4>sD$VBjsQ=s17UNuAW?^xpEz3iW*p8W4$d3_|lu&_|OEXLJ8gx&3_zWw%VlSypp zSat=M0YoiWz}wjuK$|X=>1I6FZ@nYFFOP`^Zx?Iku2(S{rRDa&EQi8Of~+wKQ#amV zVdnMcIWc?|hO`RO9OK@{VDC|H{M+%Lv&ww4KtNP&o5d2-NmpwfXk?2g7YpPJRU4o} zR@rdVHY5JL*1o=8#5k+?!vgpcfJb@I*`M`5-BN`+2bcu literal 0 HcmV?d00001 diff --git a/packages/image-io/python/itkwasm-image-io/docs/_static/logo.svg b/packages/image-io/python/itkwasm-image-io/docs/_static/logo.svg new file mode 100644 index 000000000..669a445ed --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/docs/_static/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/image-io/python/itkwasm-image-io/docs/conf.py b/packages/image-io/python/itkwasm-image-io/docs/conf.py new file mode 100644 index 000000000..2244708cc --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/docs/conf.py @@ -0,0 +1,56 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +from datetime import date + +project = 'itkwasm-image-io' +copyright = f'{date.today().year}, NumFOCUS' +author = 'Insight Software Consortium' + +extensions = [ + 'sphinx.ext.autosummary', + 'autodoc2', + 'myst_parser', + 'sphinx.ext.intersphinx', + 'sphinx_copybutton', + 'sphinxext.opengraph', + 'sphinx_design', +] + +myst_enable_extensions = ["colon_fence", "fieldlist"] + +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +autodoc2_packages = [ + { + "path": "../itkwasm_image_io", + "exclude_files": ["_version.py"], + }, +] +autodoc2_render_plugin = "myst" + +intersphinx_mapping = { + "python": ("https://docs.python.org/3/", None), + "numpy": ("https://numpy.org/doc/stable", None), + "itkwasm": ("https://itkwasm.readthedocs.io/en/latest/", None), +} + +html_theme = 'furo' +html_static_path = ['_static'] +html_logo = "_static/logo.svg" +html_favicon = "_static/favicon.png" +html_title = f"{project}" + +# Furo options +html_theme_options = { + "top_of_page_button": "edit", + "source_repository": "https://github.com/InsightSoftwareConsortium/itk-wasm", + "source_branch": "main", + "source_directory": "docs", +} \ No newline at end of file diff --git a/packages/image-io/python/itkwasm-image-io/docs/index.md b/packages/image-io/python/itkwasm-image-io/docs/index.md new file mode 100644 index 000000000..844a01e3d --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/docs/index.md @@ -0,0 +1,35 @@ +itkwasm-image-io +======= + +> Input and output for scientific and medical image file formats. + +[![itkwasm-image-io version](https://badge.fury.io/py/itkwasm_image_io.svg)](https://pypi.org/project/itkwasm_image_io/) + +## Installation + +::::{tab-set} + +:::{tab-item} System +```shell +pip install itkwasm-image-io +``` +::: + +:::{tab-item} Browser +In Pyodide, e.g. the [Pyodide REPL](https://pyodide.org/en/stable/console.html) or [JupyterLite](https://jupyterlite.readthedocs.io/en/latest/try/lab), + +```python +import micropip +await micropip.install('itkwasm-image-io') +::: + +:::: + +```{toctree} +:hidden: +:maxdepth: 3 +:caption: 📖 Reference + +apidocs/index.rst +itkwasm docs +``` \ No newline at end of file diff --git a/packages/image-io/python/itkwasm-image-io/docs/make.bat b/packages/image-io/python/itkwasm-image-io/docs/make.bat new file mode 100644 index 000000000..32bb24529 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/packages/image-io/python/itkwasm-image-io/docs/requirements.txt b/packages/image-io/python/itkwasm-image-io/docs/requirements.txt new file mode 100644 index 000000000..0c8041793 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/docs/requirements.txt @@ -0,0 +1,8 @@ +astroid<3 +sphinx +furo +sphinx-autodoc2 +myst-parser +sphinx-copybutton +sphinxext-opengraph +sphinx-design diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/__init__.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/__init__.py new file mode 100644 index 000000000..3f2b7bc42 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/__init__.py @@ -0,0 +1,91 @@ +"""itkwasm-image-io: Input and output for scientific and medical image file formats.""" + +from .read_image import read_image, imread +from .write_image import write_image, imwrite + +from .bio_rad_read_image_async import bio_rad_read_image_async +from .bio_rad_read_image import bio_rad_read_image +from .bio_rad_write_image_async import bio_rad_write_image_async +from .bio_rad_write_image import bio_rad_write_image +from .bmp_read_image_async import bmp_read_image_async +from .bmp_read_image import bmp_read_image +from .bmp_write_image_async import bmp_write_image_async +from .bmp_write_image import bmp_write_image +from .fdf_read_image_async import fdf_read_image_async +from .fdf_read_image import fdf_read_image +from .fdf_write_image_async import fdf_write_image_async +from .fdf_write_image import fdf_write_image +from .gdcm_read_image_async import gdcm_read_image_async +from .gdcm_read_image import gdcm_read_image +from .gdcm_write_image_async import gdcm_write_image_async +from .gdcm_write_image import gdcm_write_image +from .ge_adw_read_image_async import ge_adw_read_image_async +from .ge_adw_read_image import ge_adw_read_image +from .ge_adw_write_image_async import ge_adw_write_image_async +from .ge_adw_write_image import ge_adw_write_image +from .ge4_read_image_async import ge4_read_image_async +from .ge4_read_image import ge4_read_image +from .ge4_write_image_async import ge4_write_image_async +from .ge4_write_image import ge4_write_image +from .ge5_read_image_async import ge5_read_image_async +from .ge5_read_image import ge5_read_image +from .ge5_write_image_async import ge5_write_image_async +from .ge5_write_image import ge5_write_image +from .gipl_read_image_async import gipl_read_image_async +from .gipl_read_image import gipl_read_image +from .gipl_write_image_async import gipl_write_image_async +from .gipl_write_image import gipl_write_image +from .jpeg_read_image_async import jpeg_read_image_async +from .jpeg_read_image import jpeg_read_image +from .jpeg_write_image_async import jpeg_write_image_async +from .jpeg_write_image import jpeg_write_image +from .lsm_read_image_async import lsm_read_image_async +from .lsm_read_image import lsm_read_image +from .lsm_write_image_async import lsm_write_image_async +from .lsm_write_image import lsm_write_image +from .meta_read_image_async import meta_read_image_async +from .meta_read_image import meta_read_image +from .meta_write_image_async import meta_write_image_async +from .meta_write_image import meta_write_image +from .mgh_read_image_async import mgh_read_image_async +from .mgh_read_image import mgh_read_image +from .mgh_write_image_async import mgh_write_image_async +from .mgh_write_image import mgh_write_image +from .mrc_read_image_async import mrc_read_image_async +from .mrc_read_image import mrc_read_image +from .mrc_write_image_async import mrc_write_image_async +from .mrc_write_image import mrc_write_image +from .nifti_read_image_async import nifti_read_image_async +from .nifti_read_image import nifti_read_image +from .nifti_write_image_async import nifti_write_image_async +from .nifti_write_image import nifti_write_image +from .nrrd_read_image_async import nrrd_read_image_async +from .nrrd_read_image import nrrd_read_image +from .nrrd_write_image_async import nrrd_write_image_async +from .nrrd_write_image import nrrd_write_image +from .png_read_image_async import png_read_image_async +from .png_read_image import png_read_image +from .png_write_image_async import png_write_image_async +from .png_write_image import png_write_image +from .scanco_read_image_async import scanco_read_image_async +from .scanco_read_image import scanco_read_image +from .scanco_write_image_async import scanco_write_image_async +from .scanco_write_image import scanco_write_image +from .tiff_read_image_async import tiff_read_image_async +from .tiff_read_image import tiff_read_image +from .tiff_write_image_async import tiff_write_image_async +from .tiff_write_image import tiff_write_image +from .vtk_read_image_async import vtk_read_image_async +from .vtk_read_image import vtk_read_image +from .vtk_write_image_async import vtk_write_image_async +from .vtk_write_image import vtk_write_image +from .wasm_read_image_async import wasm_read_image_async +from .wasm_read_image import wasm_read_image +from .wasm_write_image_async import wasm_write_image_async +from .wasm_write_image import wasm_write_image +from .wasm_zstd_read_image_async import wasm_zstd_read_image_async +from .wasm_zstd_read_image import wasm_zstd_read_image +from .wasm_zstd_write_image_async import wasm_zstd_write_image_async +from .wasm_zstd_write_image import wasm_zstd_write_image + +from ._version import __version__ diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/_version.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/_version.py new file mode 100644 index 000000000..493f7415d --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/_version.py @@ -0,0 +1 @@ +__version__ = "0.3.0" diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_read_image.py new file mode 100644 index 000000000..5a2a82b23 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def bio_rad_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "bio_rad_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_read_image_async.py new file mode 100644 index 000000000..10f4b95b7 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def bio_rad_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "bio_rad_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_write_image.py new file mode 100644 index 000000000..ade6973bd --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def bio_rad_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "bio_rad_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_write_image_async.py new file mode 100644 index 000000000..128651e0c --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bio_rad_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def bio_rad_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "bio_rad_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_read_image.py new file mode 100644 index 000000000..620b8edc8 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def bmp_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "bmp_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_read_image_async.py new file mode 100644 index 000000000..c74c74734 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def bmp_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "bmp_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_write_image.py new file mode 100644 index 000000000..048ffc60d --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def bmp_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "bmp_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_write_image_async.py new file mode 100644 index 000000000..36a0f687c --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/bmp_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def bmp_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "bmp_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_read_image.py new file mode 100644 index 000000000..9f2d0278a --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def fdf_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "fdf_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_read_image_async.py new file mode 100644 index 000000000..b52090ad5 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def fdf_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "fdf_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_write_image.py new file mode 100644 index 000000000..ef74fbe24 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def fdf_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "fdf_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_write_image_async.py new file mode 100644 index 000000000..7afcc16b6 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/fdf_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def fdf_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "fdf_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_read_image.py new file mode 100644 index 000000000..a87b1f3ec --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def gdcm_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "gdcm_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_read_image_async.py new file mode 100644 index 000000000..b883fafc1 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def gdcm_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "gdcm_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_write_image.py new file mode 100644 index 000000000..1ae274872 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def gdcm_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "gdcm_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_write_image_async.py new file mode 100644 index 000000000..186085509 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gdcm_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def gdcm_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "gdcm_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_read_image.py new file mode 100644 index 000000000..b37a0ce0c --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def ge4_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "ge4_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_read_image_async.py new file mode 100644 index 000000000..f963d6701 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def ge4_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "ge4_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_write_image.py new file mode 100644 index 000000000..6ba609f6a --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def ge4_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "ge4_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_write_image_async.py new file mode 100644 index 000000000..3dd30e148 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge4_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def ge4_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "ge4_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_read_image.py new file mode 100644 index 000000000..d03e8b67a --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def ge5_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "ge5_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_read_image_async.py new file mode 100644 index 000000000..32f36b7f9 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def ge5_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "ge5_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_write_image.py new file mode 100644 index 000000000..f56b94c61 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def ge5_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "ge5_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_write_image_async.py new file mode 100644 index 000000000..68b764cf5 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge5_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def ge5_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "ge5_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_read_image.py new file mode 100644 index 000000000..39b0e953d --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def ge_adw_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "ge_adw_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_read_image_async.py new file mode 100644 index 000000000..6ff784f5c --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def ge_adw_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "ge_adw_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_write_image.py new file mode 100644 index 000000000..66d73c664 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def ge_adw_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "ge_adw_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_write_image_async.py new file mode 100644 index 000000000..18fbbc4ec --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/ge_adw_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def ge_adw_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "ge_adw_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_read_image.py new file mode 100644 index 000000000..e8e643f19 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def gipl_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "gipl_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_read_image_async.py new file mode 100644 index 000000000..346e0f3b6 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def gipl_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "gipl_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_write_image.py new file mode 100644 index 000000000..ea7f4744e --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def gipl_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "gipl_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_write_image_async.py new file mode 100644 index 000000000..90fc85fe0 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/gipl_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def gipl_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "gipl_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_read_image.py new file mode 100644 index 000000000..fc00f6f9f --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def jpeg_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "jpeg_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_read_image_async.py new file mode 100644 index 000000000..760fd0016 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def jpeg_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "jpeg_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_write_image.py new file mode 100644 index 000000000..5ae0ad9bc --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def jpeg_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "jpeg_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_write_image_async.py new file mode 100644 index 000000000..e4d048944 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/jpeg_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def jpeg_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "jpeg_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_read_image.py new file mode 100644 index 000000000..19ee224cb --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def lsm_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "lsm_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_read_image_async.py new file mode 100644 index 000000000..c40f2b7ea --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def lsm_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "lsm_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_write_image.py new file mode 100644 index 000000000..633cb4ffe --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def lsm_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "lsm_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_write_image_async.py new file mode 100644 index 000000000..3f3db20c7 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/lsm_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def lsm_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "lsm_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_read_image.py new file mode 100644 index 000000000..95acfb0dc --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def meta_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "meta_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_read_image_async.py new file mode 100644 index 000000000..07552b658 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def meta_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "meta_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_write_image.py new file mode 100644 index 000000000..51cddcf30 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def meta_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "meta_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_write_image_async.py new file mode 100644 index 000000000..1a347f336 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/meta_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def meta_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "meta_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_read_image.py new file mode 100644 index 000000000..1edfc58e8 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def mgh_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "mgh_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_read_image_async.py new file mode 100644 index 000000000..3a2ebd679 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def mgh_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "mgh_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_write_image.py new file mode 100644 index 000000000..c4c0cc207 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def mgh_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "mgh_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_write_image_async.py new file mode 100644 index 000000000..707ee8839 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mgh_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def mgh_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "mgh_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_read_image.py new file mode 100644 index 000000000..bdddf2376 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def mrc_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "mrc_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_read_image_async.py new file mode 100644 index 000000000..3da1d6274 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def mrc_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "mrc_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_write_image.py new file mode 100644 index 000000000..37a5ea666 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def mrc_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "mrc_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_write_image_async.py new file mode 100644 index 000000000..eb74db1ce --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/mrc_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def mrc_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "mrc_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_read_image.py new file mode 100644 index 000000000..ebb55f904 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def nifti_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "nifti_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_read_image_async.py new file mode 100644 index 000000000..0133edcd0 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def nifti_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "nifti_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_write_image.py new file mode 100644 index 000000000..78e1b2fee --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def nifti_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "nifti_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_write_image_async.py new file mode 100644 index 000000000..0898298f9 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nifti_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def nifti_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "nifti_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_read_image.py new file mode 100644 index 000000000..d4e1deb13 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def nrrd_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "nrrd_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_read_image_async.py new file mode 100644 index 000000000..8613c00ff --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def nrrd_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "nrrd_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_write_image.py new file mode 100644 index 000000000..97be2ea10 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def nrrd_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "nrrd_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_write_image_async.py new file mode 100644 index 000000000..2ca2027df --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/nrrd_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def nrrd_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "nrrd_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_read_image.py new file mode 100644 index 000000000..1912873b8 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def png_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "png_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_read_image_async.py new file mode 100644 index 000000000..68a767aab --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def png_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "png_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_write_image.py new file mode 100644 index 000000000..9d96e8307 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def png_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "png_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_write_image_async.py new file mode 100644 index 000000000..5ed264c53 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/png_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def png_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "png_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/read_image.py new file mode 100644 index 000000000..85e318ed5 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/read_image.py @@ -0,0 +1,49 @@ +import os +from typing import Optional, Union + +from itkwasm import ( + environment_dispatch, + Image, + PixelTypes, + IntTypes, + FloatTypes, +) + +def read_image( + serialized_image: os.PathLike, + information_only: bool = False, + pixel_type: Optional[PixelTypes]=None, + component_type: Optional[Union[IntTypes, FloatTypes]]=None, +) -> Image: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :param pixel_type: Pixel type to cast to. + :type pixel_Type: Optional[PixelTypes] + + :param component_type: Component type to cast to. + :type component_type: Optional[Union[IntTypes, FloatTypes]] + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "read_image") + output = func(serialized_image, information_only=information_only, pixel_type=pixel_type, component_type=component_type) + return output + +def imread( + serialized_image: os.PathLike, + information_only: bool = False, + pixel_type: Optional[PixelTypes]=None, + component_type: Optional[Union[IntTypes, FloatTypes]]=None, +) -> Image: + return read_image(serialized_image, information_only=information_only, pixel_type=pixel_type, component_type=component_type) + +imread.__doc__ = f"""{read_image.__doc__} + Alias for read_image. + """ \ No newline at end of file diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_read_image.py new file mode 100644 index 000000000..79a606cf9 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def scanco_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "scanco_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_read_image_async.py new file mode 100644 index 000000000..eb6d1e198 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def scanco_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "scanco_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_write_image.py new file mode 100644 index 000000000..1bbe2cea1 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def scanco_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "scanco_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_write_image_async.py new file mode 100644 index 000000000..a4c570c35 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/scanco_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def scanco_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "scanco_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_read_image.py new file mode 100644 index 000000000..e627995f3 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def tiff_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "tiff_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_read_image_async.py new file mode 100644 index 000000000..217e92310 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def tiff_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "tiff_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_write_image.py new file mode 100644 index 000000000..c85fa3ba3 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def tiff_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "tiff_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_write_image_async.py new file mode 100644 index 000000000..c85246777 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/tiff_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def tiff_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "tiff_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_read_image.py new file mode 100644 index 000000000..08ae17ced --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def vtk_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "vtk_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_read_image_async.py new file mode 100644 index 000000000..2517aa805 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def vtk_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "vtk_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_write_image.py new file mode 100644 index 000000000..ada63126c --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def vtk_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "vtk_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_write_image_async.py new file mode 100644 index 000000000..b5044f017 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/vtk_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def vtk_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "vtk_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_read_image.py new file mode 100644 index 000000000..7bd648d64 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def wasm_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "wasm_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_read_image_async.py new file mode 100644 index 000000000..efbd3fd1a --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def wasm_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "wasm_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_write_image.py new file mode 100644 index 000000000..68b73e04d --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def wasm_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "wasm_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_write_image_async.py new file mode 100644 index 000000000..33bcc793a --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def wasm_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "wasm_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_read_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_read_image.py new file mode 100644 index 000000000..499f62727 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_read_image.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +def wasm_zstd_read_image( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "wasm_zstd_read_image") + output = func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_read_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_read_image_async.py new file mode 100644 index 000000000..ba84a3761 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_read_image_async.py @@ -0,0 +1,32 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + BinaryFile, + Image, +) + +async def wasm_zstd_read_image_async( + serialized_image: os.PathLike, + information_only: bool = False, +) -> Tuple[Any, Image]: + """Read an image file format and convert it to the itk-wasm file format + + :param serialized_image: Input image serialized in the file format + :type serialized_image: os.PathLike + + :param information_only: Only read image metadata -- do not read pixel data. + :type information_only: bool + + :return: Whether the input could be read. If false, the output image is not valid. + :rtype: Any + + :return: Output image + :rtype: Image + """ + func = environment_dispatch("itkwasm_image_io", "wasm_zstd_read_image_async") + output = await func(serialized_image, information_only=information_only) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_write_image.py new file mode 100644 index 000000000..53a0f583e --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_write_image.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +def wasm_zstd_write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "wasm_zstd_write_image") + output = func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_write_image_async.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_write_image_async.py new file mode 100644 index 000000000..28c1e2ad6 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/wasm_zstd_write_image_async.py @@ -0,0 +1,37 @@ +# Generated file. Do not edit. + +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, + BinaryFile, +) + +async def wasm_zstd_write_image_async( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> Tuple[Any]: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + + :return: Whether the input could be written. If false, the output image is not valid. + :rtype: Any + """ + func = environment_dispatch("itkwasm_image_io", "wasm_zstd_write_image_async") + output = await func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return output diff --git a/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/write_image.py b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/write_image.py new file mode 100644 index 000000000..692ec5428 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/itkwasm_image_io/write_image.py @@ -0,0 +1,43 @@ +import os +from typing import Dict, Tuple, Optional, List, Any + +from itkwasm import ( + environment_dispatch, + Image, +) + +def write_image( + image: Image, + serialized_image: str, + information_only: bool = False, + use_compression: bool = False, +) -> None: + """Write an itk-wasm file format converted to an image file format + + :param image: Input image + :type image: Image + + :param serialized_image: Output image serialized in the file format. + :type serialized_image: str + + :param information_only: Only write image metadata -- do not write pixel data. + :type information_only: bool + + :param use_compression: Use compression in the written file + :type use_compression: bool + """ + func = environment_dispatch("itkwasm_image_io", "png_write_image") + func(image, serialized_image, information_only=information_only, use_compression=use_compression) + return + +def imwrite( + image: Image, + serialized_image: os.PathLike, + information_only: bool = False, + use_compression: bool = False, +) -> None: + return write_image(image, serialized_image, information_only=information_only, use_compression=use_compression) + +imwrite.__doc__ = f"""{write_image.__doc__} + Alias for write_image. + """ \ No newline at end of file diff --git a/packages/image-io/python/itkwasm-image-io/pyproject.toml b/packages/image-io/python/itkwasm-image-io/pyproject.toml new file mode 100644 index 000000000..eb0eee3ec --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/pyproject.toml @@ -0,0 +1,61 @@ +[build-system] +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + +[project] +name = "itkwasm-image-io" +readme = "README.md" +license = "Apache-2.0" +dynamic = ["version"] +description = "Input and output for scientific and medical image file formats." +classifiers = [ + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: C++", + "Environment :: WebAssembly", + "Environment :: WebAssembly :: Emscripten", + "Environment :: WebAssembly :: WASI", + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +keywords = [ + "itkwasm", + "webassembly", + "wasi", + "emscripten", +] + +requires-python = ">=3.8" +dependencies = [ + "itkwasm >= 1.0.b131", + "itkwasm-image-io-wasi; sys_platform != \"emscripten\"", + "itkwasm-image-io-emscripten; sys_platform == \"emscripten\"", + +] + +[tool.hatch.version] +path = "itkwasm_image_io/_version.py" + +[tool.hatch.envs.default] +dependencies = [ + "pytest", +] + +[project.urls] +Home = "https://github.com/InsightSoftwareConsortium/itk-wasm" +Source = "https://github.com/InsightSoftwareConsortium/itk-wasm" + +[tool.hatch.envs.default.scripts] +test = "pytest" + + +[tool.hatch.build] +exclude = [ + "/examples", +] diff --git a/packages/image-io/python/itkwasm-image-io/tests/__init__.py b/packages/image-io/python/itkwasm-image-io/tests/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/packages/image-io/python/itkwasm-image-io/tests/common.py b/packages/image-io/python/itkwasm-image-io/tests/common.py new file mode 100644 index 000000000..caf5bf5d9 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/tests/common.py @@ -0,0 +1,6 @@ +from pathlib import Path + +test_input_path = Path(__file__).parent / ".." / ".." / ".." / "test" / "data" / "input" +test_baseline_path = Path(__file__).parent / ".." / ".." / ".." / "test" / "data" / "baseline" +test_output_path = Path(__file__).parent / ".." / ".." / ".." / "test" / "data" / "python" +test_output_path.mkdir(parents=True, exist_ok=True) \ No newline at end of file diff --git a/packages/image-io/python/itkwasm-image-io/tests/test_png.py b/packages/image-io/python/itkwasm-image-io/tests/test_png.py new file mode 100644 index 000000000..4500b5608 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/tests/test_png.py @@ -0,0 +1,41 @@ +from itkwasm_image_io import png_read_image, png_write_image + +from .common import test_input_path, test_output_path + +test_input_file_path = test_input_path / "cthead1.png" +test_output_file_path = test_output_path / "png-test-cthead1.png" + +def verify_image(image): + assert image.imageType.dimension == 2 + assert image.imageType.componentType == "uint8" + assert image.imageType.pixelType == "RGB" + assert image.imageType.components == 3 + assert image.origin[0] == 0.0 + assert image.origin[1] == 0.0 + assert image.spacing[0] == 1.0 + assert image.spacing[1] == 1.0 + assert image.direction[0, 0] == 1.0 + assert image.direction[0, 1] == 0.0 + assert image.direction[1, 0] == 0.0 + assert image.direction[1, 1] == 1.0 + assert image.size[0] == 256 + assert image.size[1] == 256 + assert image.data.shape[1] == 256 + assert image.data.shape[0] == 256 + +def test_png_read_image(): + could_read, image = png_read_image(test_input_file_path) + assert could_read + verify_image(image) + +def test_png_write_image(): + could_read, image = png_read_image(test_input_file_path) + assert could_read + + use_compression = False + could_write = png_write_image(image, test_output_file_path, use_compression) + assert could_write + + could_read, image = png_read_image(test_output_file_path) + assert could_read + verify_image(image) \ No newline at end of file diff --git a/packages/image-io/python/itkwasm-image-io/tests/test_read_write_image.py b/packages/image-io/python/itkwasm-image-io/tests/test_read_write_image.py new file mode 100644 index 000000000..f38adfdb7 --- /dev/null +++ b/packages/image-io/python/itkwasm-image-io/tests/test_read_write_image.py @@ -0,0 +1,62 @@ +from pathlib import Path + +from itkwasm import PixelTypes, IntTypes + +from itkwasm_image_io import read_image, imread, write_image, imwrite + +from .common import test_input_path, test_output_path + +test_input_file_path = test_input_path / "cthead1.png" +test_output_file_path = test_output_path / "read-write-cthead1.png" + +def verify_image(image): + assert image.imageType.dimension == 2 + assert image.imageType.componentType == "uint8" + assert image.imageType.pixelType == "RGB" + assert image.imageType.components == 3 + assert image.origin[0] == 0.0 + assert image.origin[1] == 0.0 + assert image.spacing[0] == 1.0 + assert image.spacing[1] == 1.0 + assert image.direction[0, 0] == 1.0 + assert image.direction[0, 1] == 0.0 + assert image.direction[1, 0] == 0.0 + assert image.direction[1, 1] == 1.0 + assert image.size[0] == 256 + assert image.size[1] == 256 + assert image.data.shape[1] == 256 + assert image.data.shape[0] == 256 + +def test_read_image(): + image = read_image(test_input_file_path) + verify_image(image) + +def test_read_image_pixel_type(): + image = read_image(test_input_file_path, pixel_type=PixelTypes.Vector) + assert image.imageType.pixelType == "Vector" + +def test_read_image_component_type(): + image = read_image(test_input_file_path, component_type=IntTypes.UInt16) + assert image.imageType.componentType == "uint16" + +def test_imread(): + image = imread(test_input_file_path) + verify_image(image) + +def test_write_image(): + image = read_image(test_input_file_path) + + use_compression = False + write_image(image, test_output_file_path, use_compression=use_compression) + + image = read_image(test_output_file_path) + verify_image(image) + +def test_imwrite(): + image = imread(test_input_file_path) + + use_compression = False + imwrite(image, test_output_file_path, use_compression=use_compression) + + image = imread(test_output_file_path) + verify_image(image)