npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@itk-wasm/image-io

v1.1.1

Published

Input and output for scientific and medical image file formats.

Downloads

2,078

Readme

@itk-wasm/image-io

npm version

Input and output for scientific and medical image file formats.

💻 Live API Demo

🕮 Documentation 📚

Installation

npm install @itk-wasm/image-io

Usage

Browser interface

Import:

import {
  readImage,
  writeImage,
  bioRadReadImage,
  bioRadWriteImage,
  bmpReadImage,
  bmpWriteImage,
  fdfReadImage,
  fdfWriteImage,
  gdcmReadImage,
  gdcmWriteImage,
  geAdwReadImage,
  geAdwWriteImage,
  ge4ReadImage,
  ge4WriteImage,
  ge5ReadImage,
  ge5WriteImage,
  giplReadImage,
  giplWriteImage,
  hdf5ReadImage,
  hdf5WriteImage,
  jpegReadImage,
  jpegWriteImage,
  lsmReadImage,
  lsmWriteImage,
  metaReadImage,
  metaWriteImage,
  mghReadImage,
  mghWriteImage,
  mincReadImage,
  mincWriteImage,
  mrcReadImage,
  mrcWriteImage,
  niftiReadImage,
  niftiWriteImage,
  nrrdReadImage,
  nrrdWriteImage,
  pngReadImage,
  pngWriteImage,
  scancoReadImage,
  scancoWriteImage,
  tiffReadImage,
  tiffWriteImage,
  vtkReadImage,
  vtkWriteImage,
  wasmReadImage,
  wasmWriteImage,
  wasmZstdReadImage,
  wasmZstdWriteImage,
  setPipelinesBaseUrl,
  getPipelinesBaseUrl,
} from "@itk-wasm/image-io"

readImage

Read an image file format and convert it to an itk-wasm Image.

async function readImage(
  serializedImage: File | BinaryFile,
  options: ReadImageOptions = {}
) : Promise<ReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File or BinaryFile | Input image serialized in the file format. |

ReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------: | :-------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | componentType | typeof IntTypes or typeof FloatTypes | Component type, from itk-wasm IntTypes, FloatTypes, for the output pixel components. Defaults to the input component type. | | pixelType | typeof PixelTypes | Pixel type, from itk-wasm PixelTypes, for the output pixels. Defaults to the input pixel type. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

ReadImageResult interface:

| Property | Type | Description | | :-----------: | :--------------: | :------------------------------------------------------------------------ | | webWorker | Worker | WebWorker used for computation | | image | Image | Output image |

writeImage

Write an itk-wasm Image converted to an image file format

async function writeImage(
  image: Image,
  serializedImage: string,
  options: WriteImageOptions = {}
) : Promise<WriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

WriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------: | :---------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | mimeType | string | Mime type of the output image file. | | componentType | typeof IntTypes or typeof FloatTypes | Component type, from itk-wasm IntTypes, FloatTypes, for the output pixel components. Defaults to the input component type. | | pixelType | typeof PixelTypes | Pixel type, from itk-wasm PixelTypes, for the output pixels. Defaults to the input pixel type. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

WriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | webWorker | Worker | WebWorker used for computation | | serializedImage | BinaryFile | Output image serialized in the file format. |

bioRadReadImage

Read an image file format and convert it to the itk-wasm file format

async function bioRadReadImage(
  serializedImage: File | BinaryFile,
  options: BioRadReadImageOptions = {}
) : Promise<BioRadReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

BioRadReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

BioRadReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

bioRadWriteImage

Write an itk-wasm file format converted to an image file format

async function bioRadWriteImage(
  image: Image,
  serializedImage: string,
  options: BioRadWriteImageOptions = {}
) : Promise<BioRadWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

BioRadWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

BioRadWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

bmpReadImage

Read an image file format and convert it to the itk-wasm file format

async function bmpReadImage(
  serializedImage: File | BinaryFile,
  options: BmpReadImageOptions = {}
) : Promise<BmpReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

BmpReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

BmpReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

bmpWriteImage

Write an itk-wasm file format converted to an image file format

async function bmpWriteImage(
  image: Image,
  serializedImage: string,
  options: BmpWriteImageOptions = {}
) : Promise<BmpWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

BmpWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

BmpWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

fdfReadImage

Read an image file format and convert it to the itk-wasm file format

async function fdfReadImage(
  serializedImage: File | BinaryFile,
  options: FdfReadImageOptions = {}
) : Promise<FdfReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

FdfReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

FdfReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

fdfWriteImage

Write an itk-wasm file format converted to an image file format

async function fdfWriteImage(
  image: Image,
  serializedImage: string,
  options: FdfWriteImageOptions = {}
) : Promise<FdfWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

FdfWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

FdfWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

gdcmReadImage

Read an image file format and convert it to the itk-wasm file format

async function gdcmReadImage(
  serializedImage: File | BinaryFile,
  options: GdcmReadImageOptions = {}
) : Promise<GdcmReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

GdcmReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

GdcmReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

gdcmWriteImage

Write an itk-wasm file format converted to an image file format

async function gdcmWriteImage(
  image: Image,
  serializedImage: string,
  options: GdcmWriteImageOptions = {}
) : Promise<GdcmWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

GdcmWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

GdcmWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

geAdwReadImage

Read an image file format and convert it to the itk-wasm file format

async function geAdwReadImage(
  serializedImage: File | BinaryFile,
  options: GeAdwReadImageOptions = {}
) : Promise<GeAdwReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

GeAdwReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

GeAdwReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

geAdwWriteImage

Write an itk-wasm file format converted to an image file format

async function geAdwWriteImage(
  image: Image,
  serializedImage: string,
  options: GeAdwWriteImageOptions = {}
) : Promise<GeAdwWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

GeAdwWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

GeAdwWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

ge4ReadImage

Read an image file format and convert it to the itk-wasm file format

async function ge4ReadImage(
  serializedImage: File | BinaryFile,
  options: Ge4ReadImageOptions = {}
) : Promise<Ge4ReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

Ge4ReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

Ge4ReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

ge4WriteImage

Write an itk-wasm file format converted to an image file format

async function ge4WriteImage(
  image: Image,
  serializedImage: string,
  options: Ge4WriteImageOptions = {}
) : Promise<Ge4WriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

Ge4WriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

Ge4WriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

ge5ReadImage

Read an image file format and convert it to the itk-wasm file format

async function ge5ReadImage(
  serializedImage: File | BinaryFile,
  options: Ge5ReadImageOptions = {}
) : Promise<Ge5ReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

Ge5ReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

Ge5ReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

ge5WriteImage

Write an itk-wasm file format converted to an image file format

async function ge5WriteImage(
  image: Image,
  serializedImage: string,
  options: Ge5WriteImageOptions = {}
) : Promise<Ge5WriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

Ge5WriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

Ge5WriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

giplReadImage

Read an image file format and convert it to the itk-wasm file format

async function giplReadImage(
  serializedImage: File | BinaryFile,
  options: GiplReadImageOptions = {}
) : Promise<GiplReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

GiplReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

GiplReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

giplWriteImage

Write an itk-wasm file format converted to an image file format

async function giplWriteImage(
  image: Image,
  serializedImage: string,
  options: GiplWriteImageOptions = {}
) : Promise<GiplWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

GiplWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

GiplWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

hdf5ReadImage

Read an image file format and convert it to the itk-wasm file format

async function hdf5ReadImage(
  serializedImage: File | BinaryFile,
  options: Hdf5ReadImageOptions = {}
) : Promise<Hdf5ReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

Hdf5ReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

Hdf5ReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

hdf5WriteImage

Write an itk-wasm file format converted to an image file format

async function hdf5WriteImage(
  image: Image,
  serializedImage: string,
  options: Hdf5WriteImageOptions = {}
) : Promise<Hdf5WriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

Hdf5WriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

Hdf5WriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

jpegReadImage

Read an image file format and convert it to the itk-wasm file format

async function jpegReadImage(
  serializedImage: File | BinaryFile,
  options: JpegReadImageOptions = {}
) : Promise<JpegReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

JpegReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

JpegReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

jpegWriteImage

Write an itk-wasm file format converted to an image file format

async function jpegWriteImage(
  image: Image,
  serializedImage: string,
  options: JpegWriteImageOptions = {}
) : Promise<JpegWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

JpegWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

JpegWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

lsmReadImage

Read an image file format and convert it to the itk-wasm file format

async function lsmReadImage(
  serializedImage: File | BinaryFile,
  options: LsmReadImageOptions = {}
) : Promise<LsmReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

LsmReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

LsmReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

lsmWriteImage

Write an itk-wasm file format converted to an image file format

async function lsmWriteImage(
  image: Image,
  serializedImage: string,
  options: LsmWriteImageOptions = {}
) : Promise<LsmWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

LsmWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

LsmWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

metaReadImage

Read an image file format and convert it to the itk-wasm file format

async function metaReadImage(
  serializedImage: File | BinaryFile,
  options: MetaReadImageOptions = {}
) : Promise<MetaReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

MetaReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

MetaReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

metaWriteImage

Write an itk-wasm file format converted to an image file format

async function metaWriteImage(
  image: Image,
  serializedImage: string,
  options: MetaWriteImageOptions = {}
) : Promise<MetaWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

MetaWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

MetaWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input could be written. If false, the output image is not valid. | | serializedImage | BinaryFile | Output image serialized in the file format. | | webWorker | Worker | WebWorker used for computation. |

mghReadImage

Read an image file format and convert it to the itk-wasm file format

async function mghReadImage(
  serializedImage: File | BinaryFile,
  options: MghReadImageOptions = {}
) : Promise<MghReadImageResult>

| Parameter | Type | Description | | :---------------: | :-----------------: | :---------------------------------------- | | serializedImage | File | BinaryFile | Input image serialized in the file format |

MghReadImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only read image metadata -- do not read pixel data. | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

MghReadImageResult interface:

| Property | Type | Description | | :---------: | :--------------: | :------------------------------------------------------------------------ | | couldRead | JsonCompatible | Whether the input could be read. If false, the output image is not valid. | | image | Image | Output image | | webWorker | Worker | WebWorker used for computation. |

mghWriteImage

Write an itk-wasm file format converted to an image file format

async function mghWriteImage(
  image: Image,
  serializedImage: string,
  options: MghWriteImageOptions = {}
) : Promise<MghWriteImageResult>

| Parameter | Type | Description | | :---------------: | :------: | :------------------------------------------ | | image | Image | Input image | | serializedImage | string | Output image serialized in the file format. |

MghWriteImageOptions interface:

| Property | Type | Description | | :---------------: | :-------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------- | | informationOnly | boolean | Only write image metadata -- do not write pixel data. | | useCompression | boolean | Use compression in the written file | | webWorker | null or Worker or boolean | WebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

MghWriteImageResult interface:

| Property | Type | Description | | :---------------: | :--------------: | :--------------------------------------------------------------------------- | | couldWrite | JsonCompatible | Whether the input