Skip to content

Commit

Permalink
Merge pull request #296 from InsightSoftwareConsortium/elastix-5.2.0
Browse files Browse the repository at this point in the history
ENH: Bump elastix to 5.2.0, update wasm
  • Loading branch information
thewtex authored Aug 12, 2024
2 parents d2e5098 + d2ccb61 commit 24144dd
Show file tree
Hide file tree
Showing 98 changed files with 12,624 additions and 6,446 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,16 @@ jobs:
- 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
- uses: prefix-dev/[email protected]

- name: Build TypeScript
working-directory: ./wasm/typescript
- name: Build
run: |
npm ci
npm run build
pixi 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'
pixi run test-typescript
- 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
pixi run test-python-wasi
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ wasi-build
emscripten-build
wasm/typescript/demo/
wasm/test
micromamba/
.pixi/
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if(NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 17)
set(CMAKE_CXX_STANDARD 17)
endif()


if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
Expand Down Expand Up @@ -67,8 +68,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
41 changes: 41 additions & 0 deletions itk_wasm_env.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

function die() {
echo "$1"
exit 1
}

export ITK_WASM_DESCRIPTION=${ITK_WASM_DESCRIPTION:-$(cat package.json | jq -e -r '."itk-wasm"."description"')}
if [[ "${ITK_WASM_DESCRIPTION}" = "null" ]]; then
die "itk-wasm.description not set in package.json"
fi

export ITK_WASM_REPOSITORY=${ITK_WASM_REPOSITORY:-$(cat package.json | jq -e -r '."itk-wasm"."repository"')}
if [[ "${ITK_WASM_REPOSITORY}" = "null" ]]; then
die "itk-wasm.repository not set in package.json"
fi

export ITK_WASM_EMSCRIPTEN_DOCKER_IMAGE=${ITK_WASM_EMSCRIPTEN_DOCKER_IMAGE:-$(cat package.json | jq -e -r '."itk-wasm"."emscripten-docker-image" // "itkwasm/emscripten:latest"')}
export ITK_WASM_WASI_DOCKER_IMAGE=${ITK_WASM_WASI_DOCKER_IMAGE:-$(cat package.json | jq -e -r '."itk-wasm"."wasi-docker-image" // "itkwasm/wasi:latest"')}

export ITK_WASM_TEST_DATA_HASH=${ITK_WASM_TEST_DATA_HASH:-$(cat package.json | jq -e -r '."itk-wasm"."test-data-hash"')}
export ITK_WASM_TEST_DATA_URLS=${ITK_WASM_TEST_DATA_URLS:-$(cat package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')}

export ITK_WASM_TYPESCRIPT_PACKAGE_NAME=${ITK_WASM_TYPESCRIPT_PACKAGE_NAME:-$(cat package.json | jq -e -r '."itk-wasm"."typescript-package-name"')}
if [[ "${ITK_WASM_TYPESCRIPT_PACKAGE_NAME}" = "null" ]]; then
die "itk-wasm.typescript-package-name not set in package.json"
fi
export ITK_WASM_TYPESCRIPT_OUTPUT_DIR=${ITK_WASM_TYPESCRIPT_OUTPUT_DIR:-$(cat package.json | jq -e -r '."itk-wasm"."typescript-output-dir" // "typescript"')}

export ITK_WASM_PYTHON_PACKAGE_NAME=${ITK_WASM_PYTHON_PACKAGE_NAME:-$(cat package.json | jq -e -r '."itk-wasm"."python-package-name"')}
if [[ "${ITK_WASM_PYTHON_PACKAGE_NAME}" = "null" ]]; then
die "itk-wasm.python-package-name not set in package.json"
fi
export ITK_WASM_PYTHON_OUTPUT_DIR=${ITK_WASM_PYTHON_OUTPUT_DIR:-$(cat package.json | jq -e -r '."itk-wasm"."python-output-dir" // "python"')}

export ITK_WASM_PACKAGE_VERSION=${ITK_WASM_PACKAGE_VERSION:-$(cat package.json | jq -e -r '."itk-wasm"."package-version"')}
if [[ "${ITK_WASM_PACKAGE_VERSION}" = "null" ]]; then
die "itk-wasm.package-version not set in package.json"
fi

env
Loading

0 comments on commit 24144dd

Please sign in to comment.