3. Add the itk-js
script to your PATH
with: npm install -g itk
4. Download and unpack a VTK Example
5. Remove rendering code from the sources (which can otherwise remain unmodified), and add calls to web_add_executable
and web_target_link_libraries
in the CMakeLists.txt
.
6. In a bash shell: itk-js build -i kitware/itk-js-vtk /path/to/VTK/Example/Source
To test the handwritten ImageMarchingCubes JavaScript implementation, load this volume in ParaView Glance. Open the browser developer console (Ctrl + Shift + I), and run the Contour Filter on the volume with Contour Value set to 500
and Compute Normals and Merge Points enabled.