Hi,
I am sorry that I will not be able to help you much, but I haven’t been touching itk for over a year, and I do not remember details. Since the .js code generated by Emscripten was not meeting my performance requirements, I have decided to not use it (implement my own filters in js).
Moreover, I have never been using itk-wasm - I was just using itk v.“9.3.2”. According to what you wrote, it seems to me that you just do not have dependecies in node_modules. Please look at my package.json and package-lock.json files below - I had installed itk in node_modules with “runPipelineNode”. Maybe
npm i itk
would make it work?
As I wrote, I do not remember what exactly I was doing, but I made this short instruction for myself (below you will find files) so maybe this will help:
Compilation and running of pipelines with Emscripten
-
Be sure that docker is running.
-
Use Ubuntu or git bash
cd ../WebstormProjects/nodehelloworld
-
Prepare CMakeLists.txt file (see examples) and execute in Ubuntu bash:
./insighttoolkit-itk-js-latest web-build
-
Prepare runPipelineNode (see index.js, medianTest.js) and execute for example:
npx node ./medianTest.js
or
npx node ./index.js
etc.
Links
Example of segmentation pipeline written ITK / C++ (see links inside):
- Example of vtkItk Cmake
Slicer/Libs/vtkITK/CMakeLists.txt at 08789e8f2224f89206b2d6a49d1d452d4e677994 · Slicer/Slicer · GitHub
package.json (328 Bytes)
package-lock.json (6.3 KB)
medianTest.js (199 Bytes)
MedianFilterTest.cxx (3.4 KB)
index.js (185 Bytes)
hello.cxx (98 Bytes)
CMakeLists.txt_old2 (562 Bytes)
CMakeLists.txt_old (235 Bytes)
insighttoolkit-itk-js-latest (5.7 KB)
CMakeLists.txt (468 Bytes)
I hope this will help, because really I am not an expert with this (i managed to compile a few simple examples, that’s all)
Good luck!