Skip to content

Commit

Permalink
ENH: Bump elastix to 5.2.0, update wasm
Browse files Browse the repository at this point in the history
Rebase wasm patches for elastix. Bump itk-wasm and the ITK-Wasm docker
image for ITK 5.4.0 support. Disable a wasi test with an odd error:

```
3: Test command: /wasi-runtimes/wasmtime/bin/wasmtime-pwd.sh "/work/wasi-build/elastix.wasi.wasm" "/work/wasm/test/data/input/parameters_single.json" "/work/wasi-build/wasm/CT_2D_head_registered_initial.iwi.cbor" "/work/wasi-build/wasm/CT_2D_head_initial.h5" "/work/wasi-build/wasm/CT_2D_head_initial.json" "-f" "/work/wasm/test/data/input/CT_2D_head_fixed.iwi.cbor" "-m" "/work/wasm/test/data/input/CT_2D_head_moving.iwi.cbor" "-i" "/work/wasm/test/data/input/CT_2D_head_translation.h5"
3: Working Directory: /work/wasi-build/wasm
3: Test timeout computed to be: 10000000
3: Error: failed to run main module `/work/wasi-build/elastix.wasi.wasm`
3:
3: Caused by:
3:     0: failed to invoke command default
3:     1: error while executing at wasm backtrace:
3:            0: 0x388ff6 - elastix.wasi.wasm!__cxx_global_array_dtor.54
3:            1: 0x95b08 - elastix.wasi.wasm!__funcs_on_exit
3:            2: 0x95cb2 - elastix.wasi.wasm!__wasm_call_dtors
3:            3: 0x15df748 - elastix.wasi.wasm!itk_wasm_delayed_exit
3:            4: 0x15df7d1 - elastix.wasi.wasm!_start
3:        note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information
3:     2: wasm trap: uninitialized element
 3/10 Test  #3: elastix-wasm-2d-initial-transform-test ....................***Failed    7.99 sec
```

Also update CI configuration accordingly.
  • Loading branch information
thewtex committed Aug 8, 2024
1 parent d2e5098 commit 39c47c4
Show file tree
Hide file tree
Showing 67 changed files with 8,429 additions and 6,032 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,29 @@ jobs:

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

- name: Install
uses: pnpm/action-setup@v2
with:
run_install: true

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

- name: Download test data
run: |
npm ci
npm run build:testData
pnpm run test:data:download
- name: Build TypeScript
working-directory: ./wasm/typescript
- name: Build
run: |
npm ci
npm run build
pnpm 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'
pnpm test
- name: Test Python WASI
working-directory: ./wasm/python/itkwasm-elastix-wasi
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ wasi-build
emscripten-build
wasm/typescript/demo/
wasm/test
micromamba/
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ endif()
# set(elastix_GIT_REPOSITORY "https://github.com/SuperElastix/elastix.git")
set(elastix_GIT_REPOSITORY "https://github.com/thewtex/elastix.git")
# Upstream + wasm patches
# Branch: ITKElastix-2023-01-01-022aa6cd
set(elastix_GIT_TAG "022aa6cdaaa5621f3d6b2f245c388a9669cc7ef9")
# Branch: ITKElastix-2024-07-18-ebb429a33b
set(elastix_GIT_TAG "0ab3f57a6528cce609feedeb1650e7c850beca94")
FetchContent_Declare(
elx
GIT_REPOSITORY ${elastix_GIT_REPOSITORY}
Expand Down
11 changes: 11 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: itkwasm-elastix
channels:
- conda-forge
dependencies:
- pytest
- python=3.11
- pip
- pip:
- hatch
- itkwasm-compare-images
- itkwasm-image-io
Loading

0 comments on commit 39c47c4

Please sign in to comment.