-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into BumpITKv4.5rc2
- Loading branch information
Showing
23 changed files
with
3,824 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build-wasm-documentation: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: true | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Build | ||
run: | | ||
pnpm build | ||
- name: Build package typescript documentation | ||
run: | | ||
mkdir -p docs/ts/docs | ||
mkdir -p docs//ts/app | ||
sed "s% basePath:.*% basePath: '/ITKMorphologicalContourInterpolation/ts/docs',%" wasm/typescript/index.html > docs/ts/docs/index.html | ||
cp wasm/typescript/README.md docs/ts/docs/ | ||
mkdir -p docs/ts/docs/test/browser/demo-app | ||
cp wasm/typescript/test/browser/demo-app/logo.svg docs/ts/docs/test/browser/demo-app/ | ||
pushd wasm/typescript | ||
rm -rf demo-app node_modules/.vite | ||
export VITE_BASE_URL="/ITKMorphologicalContourInterpolation/ts/app/" | ||
pnpm build | ||
popd | ||
rsync -a wasm/typescript/demo-app/ docs/ts/app/ | ||
- name: Build package python documentation | ||
run: | | ||
mkdir -p docs/py/docs | ||
mkdir -p docs/py/app | ||
export SPHINX_BASE_URL="/ITKMorphologicalContourInterpolation/py/docs/" | ||
pushd wasm/python/itkwasm-morphological-contour-interpolation/docs | ||
pip install -r requirements.txt | ||
make html | ||
popd | ||
rsync -a wasm/python/itkwasm-morphological-contour-interpolation/docs/_build/html/ docs/py/docs/ | ||
- name: Upload Pages artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs | ||
retention-days: 7 | ||
|
||
deploy-gh-pages: | ||
needs: build-wasm-documentation | ||
runs-on: ubuntu-22.04 | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
contents: read | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
# with: | ||
# preview: true <-> currently not available to the public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: WebAssembly | ||
|
||
on: [push,pull_request] | ||
|
||
jobs: | ||
build-wasm: | ||
name: "Build WebAssembly" | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: true | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Build | ||
run: | | ||
pnpm build | ||
- name: Test | ||
run: | | ||
pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,6 @@ | |
*.exe | ||
*.out | ||
*.app | ||
|
||
# wasm build | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# ITKMorphologicalContourInterpolation | ||
|
||
![Build, test, package](https://github.com/KitwareMedical/ITKMorphologicalContourInterpolation/workflows/Build,%20test,%20package/badge.svg) | ||
|
||
[![PyPI](https://img.shields.io/pypi/v/itk-morphologicalcontourinterpolation.svg)](https://pypi.python.org/pypi/itk-morphologicalcontourinterpolation) | ||
|
||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/KitwareMedical/ITKMorphologicalContourInterpolation/blob/master/LICENSE) | ||
|
||
## Overview | ||
|
||
An [ITK](https://itk.org)-based implementation of morphological contour interpolation based off the paper: | ||
|
||
Albu AB1, Beugeling T, Laurendeau D. | ||
"A morphology-based approach for interslice interpolation of anatomical slices from volumetric images." | ||
IEEE Trans Biomed Eng. | ||
2008 Aug;55(8):2022-38. | ||
doi: 10.1109/TBME.2008.921158. | ||
|
||
👨💻 [`Live API Demo`] ✨ | ||
|
||
Documentation can be found in the [Insight Journal article](https://www.insight-journal.org/browse/publication/977): | ||
|
||
Zukić D., Vicory J., McCormick M., Wisse L., Gerig G., Yushkevich P., Aylward S. | ||
"ND Morphological Contour Interpolation", | ||
The Insight Journal. January-December, 2016. | ||
https://hdl.handle.net/10380/3563 | ||
https://insight-journal.org/browse/publication/977 | ||
|
||
- 🕮 [`Wasm Python Documentation`] 📚 | ||
- 🕮 [`JavaScript Documentation`] 📚 | ||
|
||
## Installation | ||
|
||
### Python | ||
|
||
To install the wasm Python packages: | ||
|
||
```sh | ||
pip install itkwasm-morphological-contour-interpolation | ||
``` | ||
|
||
To install the native Python packages: | ||
|
||
```sh | ||
python -m pip install --upgrade pip | ||
python -m pip install itk-morphologicalcontourinterpolation | ||
``` | ||
|
||
### JavaScript | ||
|
||
Install the JavaScript/TypeScript package: | ||
|
||
```sh | ||
npm install @itk-wasm/morphological-contour-interpolation | ||
``` | ||
|
||
### C++ | ||
|
||
Since ITK 4.11.0, this module is available in the ITK source tree as a remote module. To enable it, set: | ||
|
||
``` | ||
Module_MorphologicalContourInterpolation:BOOL=ON | ||
``` | ||
|
||
in ITK's CMake build configuration. | ||
|
||
## License | ||
|
||
This software is distributed under the Apache 2.0 license. Please see the *LICENSE* file for details. | ||
|
||
## Acknowledgements | ||
|
||
This work is supported by NIH grant R01 EB014346, "Continued development and maintenance of the ITK-SNAP 3D image segmentation software." | ||
|
||
[`Live API Demo`]: https://kitwaremedical.github.io/ITKMorphologicalContourInterpolation/ts/app/ | ||
[`Wasm Python Documentation`]: https://kitwaremedical.github.io/ITKMorphologicalContourInterpolation/py/docs/ | ||
[`JavaScript Documentation`]: https://kitwaremedical.github.io/ITKMorphologicalContourInterpolation/ts/docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: morphological-contour-interpolation | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- pytest | ||
- python=3.11 | ||
- pip | ||
- pip: | ||
- hatch | ||
- itkwasm-image-io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "@itk-wasm/morphological-contour-interpolation-build", | ||
"version": "1.0.0", | ||
"description": "npm scripts to generate itk-wasm artifacts.", | ||
"private": true, | ||
"type": "module", | ||
"itk-wasm": { | ||
"typescript-package-name": "@itk-wasm/morphological-contour-interpolation", | ||
"typescript-output-dir": "wasm/typescript", | ||
"python-package-name": "itkwasm-morphological-contour-interpolation", | ||
"python-output-dir": "wasm/python", | ||
"package-description": "Morphology-based approach for interslice interpolation of anatomical slices from volumetric images.", | ||
"repository": "https://github.com/KitwareMedical/ITKMorphologicalContourInterpolation" | ||
}, | ||
"scripts": { | ||
"build": "pnpm build:gen:typescript && pnpm -r build && pnpm build:gen:python", | ||
"build:emscripten": "itk-wasm pnpm-script build:emscripten", | ||
"build:emscripten:debug": "itk-wasm pnpm-script build:emscripten:debug", | ||
"build:wasi": "itk-wasm pnpm-script build:wasi", | ||
"build:wasi:debug": "itk-wasm pnpm-script build:wasi:debug", | ||
"build:python:wasi": "itk-wasm pnpm-script build:python:wasi", | ||
"bindgen:typescript": "itk-wasm pnpm-script bindgen:typescript", | ||
"bindgen:python": "itk-wasm pnpm-script bindgen:python", | ||
"build:gen:typescript": "itk-wasm pnpm-script build:gen:typescript", | ||
"build:gen:python": "itk-wasm pnpm-script build:gen:python", | ||
"build:micromamba": "itk-wasm pnpm-script build:micromamba", | ||
"build:python:versionSync": "itk-wasm pnpm-script build:python:versionSync", | ||
"publish:python": "itk-wasm pnpm-script publish:python", | ||
"test": "pnpm test:data:download && pnpm -r test && pnpm test:python", | ||
"test:data:download": "echo \"not needed\"", | ||
"test:data:pack": "dam pack test/data test/data.tar.gz", | ||
"test:python:wasi": "itk-wasm pnpm-script test:python:wasi", | ||
"test:python:emscripten": "itk-wasm pnpm-script test:python:emscripten", | ||
"test:python:dispatch": "itk-wasm pnpm-script test:python:dispatch", | ||
"test:python": "itk-wasm pnpm-script test:python", | ||
"test:wasi": "itk-wasm pnpm-script test:wasi -- -V", | ||
"clean": "git clean -fdx -e node_modules" | ||
}, | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@itk-wasm/dam": "^1.1.0", | ||
"@thewtex/setup-micromamba": "^1.9.7", | ||
"itk-wasm": "^1.0.0-b.166" | ||
} | ||
} |
Oops, something went wrong.