ITK.js: Mesh to polyData conversion

Hi everyone, I’m trying to manipulate itk.js and I’m stuck trying to understand the MeshToPolyData.js file in Pipelines. Does it really allow to do the Mesh/Polydata conversion ? if true, how can I use it ?

Thanks.

It should be similar to any other ITK filter. Here is the basic usage:


The test is written in C++, but it should be easy to translate to JavaScript.

1 Like

Thanks for your answer I’ll try to translate your example to Js.

This is used to convert an itk.js itk/Mesh to a vtk.js vtkPolyData for visualization.

Here is an example usage:

Here is the result:

2 Likes