To expand:
I have tried the Marching cubes filter but is not working as it expects a 3D image data, not a mesh
vtkPolyData=...; // the data
// This doesn't work
let meshSmoother = vtk.Filters.General.vtkImageMarchingCubes.newInstance({computeNormals: true, mergePoints: true});
meshSmoother.setInputData(vtkPolyData);
globalScene.mapper.setInputConnection(meshSmoother.getOutputPort());
// However, this works fine (unsmoothed)
globalScene.mapper.setInputData(vtkPolyData);
The first part launch an exception at reset camera function saying getOrigin is not a function
Uncaught TypeError: a.getOrigin is not a function
at Vf.e.requestData (vtk.js:2:1014101)
at Se.e.update (vtk.js:2:749747)
at s (vtk.js:2:748117)
at Array.n (vtk.js:2:749576)
at Se.e.getInputData (vtk.js:2:749300)
at e.getBounds (vtk.js:2:1279332)
at vtk.js:2:1290265
at Array.forEach (<anonymous>)
at o (vtk.js:2:1289818)
at e.pick (vtk.js:2:1292360)