subject: extend HelloWorld web-build example so that i can build itk example common/add noise to Binary Image, yinyang.png using node. couple of questions please bear with me.
- itk-wasm is a webassembly of itk TOOLKIT, CORRECT? it also has emscripten toolchain (itkwasm/emscripten) docker image which is pulled from docker hub.correct?
following is my CMakeLists.txt file and pay attention no Emscripten exists in that.
here is my HelloWorld.cxx file. as you can see it is the extension of HelloWorld and i have added the code related to sample itk/common/add noise to binary image. which adds noise to yinyang.png file. here is the first part of the c++ code.
and here is the second part of the c++ code.
the commented part is also included and i did not remove the comments. the whole code is included.
Q. is it valid to use this code with the provided cmake file and explanations above, and use [itk-wasm build] and the result of the build is HelloWorld.js webassembly module which is in web-build folder?
here is the output at wsl2/ubuntu terminal in vscode/nodejs:
- There is only one line of code itk::ReadImage(argv) , argv = “yinyang.png.json”. runPipelineNode(pipelinepath, args) is passing yinyang.png.json to c++ code. I dont think this is going to work. I also passed yinyang.png to the itk::ReadImage but that also crashes.
ANY HELP IS APPRECIATED
here is HelloWorld.js module:
part2 of HelloWorld.js
line 9 is where the exception is thrown in this module.
I could not possibly understand it , may matt maccormic can help me, please any one can help would be appreciated.