ITK-Wasm’s goal is to work harmoniously with WebAssembly (wasm) community standards to make the new stack for scientific computing a reality.
ITK-Wasm adds the glue that enables simple, performant, easy-to-reason about, composable, interoperable, and universally deployable wasm modules to be created by your average research software engineer. This includes the ability to operate performantly on scientific datasets, with an emphasis on multi-dimensional spatial data.
Towards that end, ITK-Wasm provides powerful, joyful tooling for scientific computation in wasm through a number of distinct but related parts.
C++ core tooling
Build environment Docker images
A Node.js CLI to build wasm, generate language bindings, etc.
Small, language-specific libraries that facilicate idiomatic integration
Example packages built with ITK-Wasm
File format support
This section provides a high level overview of these constituent parts.
ITK-Wasm’s C++ core tooling provides:
Fundamental numerical methods and multidimensional scientific data structures
An elegant, modern interface to create processing pipelines
A bridge to interoperable web techologies
A bridge to Web3 and traditional desktop computing
These are embodied in the C++ core with:
The Insight Toolkit (ITK) is an open-source, cross-platform library that provides developers with an extensive suite of software tools based on a proven, spatially-oriented architecture for processing scientific data in two, three, or more dimensions.
ITK includes fundamental numerical libraries, such as Eigen.
ITK’s C++ template-based architecture inherently helps keep wasm modules small while enabling the compiler to add extensive performance optimizations.
The itk-wasm GitHub repository is also an ITK Remote Module,
WebAssemblyInterface, that implements wasm-interface specific functionality.
Wasm module C++ processing pipelines are written with CLI11’s simple and intuitive interface.
Build environment Docker images#
Build environment Docker images encapsulate
itkwasm/wasi Docker images are dockcross images – Docker images with pre-configured C++ cross-compiling toolchains that enable easy-application, reproducible builds, and a clean separation of the build environment, source tree, and build artifacts.
These images include not only the CMake pre-configured toolchains, but pre-built versions of the ITK-Wasm C++ core. Moreover, wasm tools for optimization, debugging, emulation and system execution, testing, are bundled. A number of build and system configurations are included to make optimized and debuggable builds for scientific codebases a breeze.
Command line interface (CLI)#
itk-wasm command line interface (CLI) drives
generation of language bindings and language package configuration,
and testing for wasm binaries.
The CLI can be installed via Node.js / NPM
npm install -g itk-wasm
Small, language-specific libraries are used by generated bindings to provide simple, clean, performant, and idiomatic interfaces in the host languages.
While most ITK-Wasm packages are not developed in the
InsightSoftwareConsortium/itk-wasm repository – a package built with ITK-Wasm can be developed by anyone and maintained in any repository – there are a number of packages developed in the
itk-wasm repository. These packages
provide common functionality for other packages, such as testing and IO functionality,
and continuously exercise and test the base functionality.
Descriptions of these packages can be found in the package listing page.
File format support#
Assistance for handling data serialized in file formats plays a crucial role in enabling comprehensive analysis using a variety of software tools.
ITK-Wasm offers IO modules designed to interact with various standard scientific image and mesh file formats. These modules allow for the loading of data into language-native interface types through bindings like TypeScript and Python.
In addition to supporting external file formats, ITK-Wasm also introduces its own file formats. These ITK-Wasm file formats are optimized and offer a direct correspondence to spatial interface types, utilizing a straightforward JSON + binary array buffer format.
More information can be found in the File Format Section.