Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
611e38c
ENH: Initial Wasm build configuration
thewtex Jun 19, 2023
b21c83c
ENH: Add initial Wasm CI configuration
thewtex Jun 21, 2023
23519cd
ENH: Download Wasm test input data
thewtex Jun 21, 2023
5fbd408
ENH: Initial tests for native builds
thewtex Jun 22, 2023
737cb8d
ENH: Bump itk-wasm image to include LLVM 16
thewtex Jul 9, 2023
80b848a
BUG: Include build:testData in build npm script
thewtex Jul 9, 2023
b2f81d4
ENH: Make test:wasi ctest output verbose
thewtex Jul 10, 2023
b01882e
ENH: Run wasm tests in CI
thewtex Jul 10, 2023
4f15a62
ENH: Add wasm typescript package generated sources
thewtex Jul 10, 2023
b18e533
ENH: Add package-lock.json for typescript package
thewtex Jul 10, 2023
ef808cb
ENH: Add typescript package build artifacts to .gitignore
thewtex Jul 10, 2023
7a1cc5a
ENH: Add Node.js test
thewtex Jul 10, 2023
d1c46bc
ENH: Bump elastix version
thewtex Aug 26, 2023
724ffd6
COMP: Set ELASTIX_NO_INSTALL_EXECUTABLES with Wasm
thewtex Aug 26, 2023
8cb2624
COMP: Free up disk space for wasi build
thewtex Aug 26, 2023
18c028d
ENH: Bump itk-wasm version 1.0.0-b.130
thewtex Aug 26, 2023
900afba
COMP: Add -j -l constraints to wasm build based on nproc
thewtex Aug 27, 2023
33052d1
ENH: Update typescript bindings
thewtex Aug 27, 2023
1140d68
ENH: Build and test TypeScript in CI
thewtex Aug 27, 2023
c275dea
ENH: Wasm bindgen python
thewtex Aug 27, 2023
f79035a
BUG: Add emscripten module interface modules
thewtex Aug 27, 2023
05efc87
ENH: Rename elastix binary from elastix-wasm to elastix
thewtex Aug 27, 2023
c2d0da8
ENH: Add python wasi test
thewtex Aug 28, 2023
a594e4a
ENH: TypeScript add demo load sample inputs
thewtex Aug 28, 2023
3d8d27d
ENH: Add pre-built emscripten elastix.wasm
thewtex Aug 28, 2023
f54d029
ENH: Bump itk-wasm to 1.0.0-b.138
thewtex Sep 13, 2023
85300fb
ENH: Write output transform file
thewtex Sep 13, 2023
2f17e32
STYLE: Rename ElastixWasm.cxx to elastix-wasm.cxx
thewtex Sep 13, 2023
65dc1b4
ENH: Create initial parameter pipeline files
thewtex Sep 14, 2023
ca5f4d4
ENH: Bump elastix for initial external ITK transform support
thewtex Sep 19, 2023
083af90
ENH: Do not enable module tests binaries in the elastix wasm build
thewtex Sep 19, 2023
b2a3967
COMP: Bump itk-wasm docker image for wasi HDF5 transform build support
thewtex Sep 19, 2023
6d7b3ff
STYLE: elastix-wasm.cxx formatting
thewtex Sep 19, 2023
fa0ed95
BUG: elastix-wasm returns identity with zero output transforms
thewtex Sep 19, 2023
84c1051
ENH: Add wasm read-parameter-file pipeline
thewtex Sep 20, 2023
1f14002
ENH: Add write-parameter-file wasm pipeline
thewtex Sep 20, 2023
ceba462
ENH: Add default-parameter-map wasm pipeline
thewtex Sep 20, 2023
4a3256b
COMP: npm audit fix
thewtex Sep 20, 2023
10e86e1
ENH: Add bindgen outputs
thewtex Sep 20, 2023
4691e8f
BUG Fix read and write wasm parameter file arguments
thewtex Sep 20, 2023
bb1e017
STYLE: Run clang-format on wasm .cxx
thewtex Sep 20, 2023
79b3207
ENH: Wrapping updates
thewtex Sep 20, 2023
ab951d6
ENH: Add s to file in read-parameter-file, write-parameter-file names
thewtex Sep 20, 2023
30ae783
ENH: Add 2D wasm test data inputs
thewtex Sep 20, 2023
29b0e2f
ENH: wasm demo app controll, load-sample-input modules
thewtex Sep 20, 2023
d169300
ENH: Add Cypress configuration
thewtex Sep 20, 2023
2ed62b5
DOC: Update typescript README
thewtex Sep 20, 2023
8ca05fd
BUG: Update node.js test for transform input
thewtex Sep 21, 2023
6cb5191
ENH: node.js default-parameter-map test
thewtex Sep 21, 2023
ad04995
ENH: Add node read-parameter-files-test.js
thewtex Sep 21, 2023
7a346dc
ENH: Add read-parameter-files browser test
thewtex Sep 21, 2023
e56d15b
ENH: Add node write-parameter-files test
thewtex Sep 21, 2023
770ae28
WIP: ENH: Add write-parameter-files browser test
thewtex Sep 22, 2023
5ee4535
ENH: wasm demo app bindgen and load sample data updates for output files
thewtex Sep 24, 2023
6abb5c3
ENH: wasm pipeline input parameters, initial transform support
thewtex Sep 25, 2023
ec6f4d7
BUG: Updates to typescript tests
thewtex Sep 25, 2023
e64711f
ENH: Add compare viewer to elastix wasm demo
thewtex Sep 26, 2023
6046ab4
ENH: Use default multi-stage parameter-maps for elastix demo
thewtex Sep 26, 2023
68eaab3
STYLE: Apply clang-format to wasm pipelines
thewtex Sep 26, 2023
bf167ec
ENH: elastix-wasm transform parameter object output
thewtex Sep 26, 2023
c15e2fe
ENH: Add elastix-wasm pipeline initial transform parameter object sup…
thewtex Sep 26, 2023
2756bc0
ENH: Update bindings for transform parameter file arguments
thewtex Sep 26, 2023
c9e51eb
ENH: Add additional test data pre-built wasm binaries
thewtex Sep 26, 2023
9174394
feat: flesh out elastix wasm demo
thewtex Sep 26, 2023
29ce686
ENH: Add read-parameter-files.wasi.wasm
thewtex Sep 26, 2023
990cd96
ENH: Improve wasm demo initialization
thewtex Sep 27, 2023
9fb37dc
ENH: WASM binding output paths are passed as input function arguments
thewtex Sep 27, 2023
891d409
DOC: read-parameter-files positional tweaks
thewtex Sep 28, 2023
441ea3b
ENH: Add test_write_parameter_files.py wasi test
thewtex Sep 28, 2023
45e1714
ENH: itkwasm-elastix-emscripten write-parameter-files test
thewtex Sep 29, 2023
e2cce11
ENH: Add itkwasm-elastix tests
thewtex Sep 29, 2023
72ae9ff
STYLE: wasm/ .cxx clang-format updates
thewtex Sep 29, 2023
ba69be1
ENH: Additional CI wasm python test output
thewtex Sep 29, 2023
4c8ae94
ENH: Use free-disk-space Action
thewtex Sep 29, 2023
11fb267
ENH: Use packaged itk-wasm
thewtex Oct 1, 2023
60f053a
BUG: Update test baseline
thewtex Oct 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: WebAssembly

on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main

jobs:
build-wasm:
name: "build-test-wasm"
runs-on: ubuntu-22.04

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false

- name: Install cypress deps
run: |
sudo apt-get update
# https://docs.cypress.io/guides/continuous-integration/introduction#Dependencies
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '18'

- name: Install
run: |
npm ci
npm run build:testData

- name: Build TypeScript
working-directory: ./wasm/typescript
run: |
npm ci
npm run build

- name: Test TypeScript
working-directory: ./wasm/typescript
run: |
npm test

- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.10'

- name: Test Python WASI
working-directory: ./wasm/python/itkwasm-elastix-wasi
run: |
pip install pytest itkwasm-compare-images itk-io
pip install -e .
pytest -s
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ zstd-1.2.0-linux.tar
zstd-1.2.0-linux/
.ipynb_checkpoints/
examples/Parameters.*.txt
node_modules/
wasi-build
emscripten-build
wasm/typescript/demo/
wasm/test
23 changes: 18 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ if(SKBUILD)
mark_as_advanced(ELASTIX_NO_INSTALL_EXECUTABLES ELASTIX_NO_INSTALL_RUNTIME_LIBRARIES ELASTIX_NO_INSTALL_DEVELOPMENT)
endif()

set(elastix_GIT_REPOSITORY "https://github.com/SuperElastix/elastix.git")
set(elastix_GIT_TAG "798ecaebab9d264d0f3cb375a1bf74174c41343c")
if(WASI OR EMSCRIPTEN)
option(ELASTIX_USE_OPENMP "OpenMP not supported on WASI or Emscripten" OFF)
option(ELASTIX_NO_INSTALL_EXECUTABLES "Do not install executables" ON)
endif()

# set(elastix_GIT_REPOSITORY "https://github.com/SuperElastix/elastix.git")
set(elastix_GIT_REPOSITORY "https://github.com/thewtex/elastix.git")
set(elastix_GIT_TAG "e5428a8b8347d869040fc5b3ecc58106368c8ce4")
FetchContent_Declare(
elx
GIT_REPOSITORY ${elastix_GIT_REPOSITORY}
Expand Down Expand Up @@ -94,9 +100,10 @@ if(ELASTIX_USE_OPENCL)
endif()

# Reset parameters for ITK remote module build
set(BUILD_TESTING ${_itk_build_testing})
set(BUILD_SHARED_LIBS ${_itk_build_shared})

if (NOT WASI AND NOT EMSCRIPTEN)
set(BUILD_TESTING ${_itk_build_testing})
set(BUILD_SHARED_LIBS ${_itk_build_shared})
endif()

if(ITK_WRAP_PYTHON) # Python wrapping is enabled
get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
Expand All @@ -111,10 +118,16 @@ if(ITK_WRAP_PYTHON) # Python wrapping is enabled
endif()
endif()

option(ITKELASTIX_BUILD_WASM_EXECUTABLES "Build WASM executables" OFF)

if(NOT ITK_SOURCE_DIR)
find_package(ITK REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})
include(ITKModuleExternal)
if(WASI OR EMSCRIPTEN OR ITKELASTIX_BUILD_WASM_EXECUTABLES)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(wasm)
endif()
else()
set(ITK_DIR ${CMAKE_BINARY_DIR})
itk_module_impl()
Expand Down
4 changes: 2 additions & 2 deletions examples/ITK_Example13_ITKResampling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -212,7 +212,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.0"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/ITK_Example21_ConstrainedRegistration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.0"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
Binary file modified examples/exampleoutput/itk_composite_transform.h5
Binary file not shown.
1 change: 1 addition & 0 deletions itk-module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ itk_module(Elastix
TEST_DEPENDS
ITKTestKernel
ITKMetaIO
ITKTransformIO
DESCRIPTION
"${DOCUMENTATION}"
EXCLUDE_FROM_DEFAULT
Expand Down
Loading