|
1 | 1 | # Installation
|
2 | 2 |
|
3 |
| -Building WebAssembly pipelines is driven by the `itk-wasm` Node.js command line executable, which drives builds, run tests, and generates interface bindings. Install with: |
| 3 | +## Getting Started with create-itk-wasm |
| 4 | + |
| 5 | +The best way to get started with ITK-Wasm C++ development is using `create-itk-wasm`, which scaffolds a complete development environment. This tool sets up: |
| 6 | + |
| 7 | +- **Native C++ binary build** - Traditional compiled executables for development and testing |
| 8 | +- **Docker Emscripten toolchain build** - WebAssembly compilation for browser environments |
| 9 | +- **WASI toolchain build** - WebAssembly System Interface for server-side and Node.js execution |
| 10 | +- **Binding infrastructure** - Automatic generation of TypeScript and Python language bindings |
| 11 | + |
| 12 | +To create a new ITK-Wasm project, install Node.js and Docker, then run: |
4 | 13 |
|
5 | 14 | ```sh
|
6 |
| -npm install -g itk-wasm |
| 15 | +npx create-itk-wasm my-project |
| 16 | +cd my-project |
7 | 17 | ```
|
8 | 18 |
|
9 |
| -For more information and guidance on installation, see [the tutorial |
10 |
| -Introduction](../tutorial/hello_world?id=introduction). |
| 19 | +This creates a complete project structure with example pipelines and build configurations. |
| 20 | + |
| 21 | +## C++ Architecture Overview |
| 22 | + |
| 23 | +ITK-Wasm C++ pipelines are built on a robust architecture consisting of several key components: |
| 24 | + |
| 25 | +### ITKWebAssemblyInterface Module |
| 26 | + |
| 27 | +The core foundation is the `ITKWebAssemblyInterface` module, which provides: |
| 28 | +- Serialization and deserialization of spatial data structures to/from WebAssembly memory |
| 29 | +- Type-safe interfaces for images, meshes, point sets, and transforms |
| 30 | +- Efficient data transfer mechanisms between WebAssembly and host environments |
| 31 | + |
| 32 | +### CLI11 Integration |
| 33 | + |
| 34 | +Command-line interfaces are built using [CLI11](https://github.com/CLIUtils/CLI11), providing: |
| 35 | +- Modern C++ argument parsing |
| 36 | +- Automatic help generation |
| 37 | +- Type-safe parameter handling |
| 38 | +- Consistent interface patterns across all pipelines |
| 39 | + |
| 40 | +### Pipeline Structure |
| 41 | + |
| 42 | +Each ITK-Wasm pipeline follows a standardized pattern: |
| 43 | +1. Parse command-line arguments with CLI11 |
| 44 | +2. Load input data using ITKWebAssemblyInterface |
| 45 | +3. Process data |
| 46 | +4. Serialize outputs for return to the calling environment |
| 47 | + |
| 48 | +## Learn More |
| 49 | + |
| 50 | +For comprehensive technical details and research background, see the SciPy 2024 paper: |
| 51 | + |
| 52 | +> McCormick, M., Elliott, P. (2024). ITK-Wasm: High-Performance Spatial Analysis Across Programming Languages and Hardware Architectures. Proceedings of the 23rd Python in Science Conference (SciPy 2024), 268-279. https://doi.org/10.25080/TCFJ5130 |
| 53 | +
|
| 54 | +## Next Steps |
| 55 | + |
| 56 | +For hands-on guidance on building your first ITK-Wasm pipeline, see [the tutorial Introduction](../tutorial/hello_world?id=introduction). |
0 commit comments