Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return readMeshFile(null, file).then(({ mesh: itkMesh, webWorker }) => {
const read1 = performance.now();
const duration = Number(read1 - read0).toFixed(1).toString()
console.log("Mesh reading took " + duration + " milliseconds.")
webWorker.terminate()
const pipelinePath = 'MeshToPolyData'
const args = ['mesh.json', 'polyData.json']
const desiredOutputs = [
{ path: args[1], type: IOTypes.vtkPolyData }
]
const inputs = [
{ path: args[0], type: IOTypes.Mesh, data: itkMesh }
]
is3D = itkMesh.meshType.dimension === 3
convert0 = performance.now()
return runPipelineBrowser(null, pipelinePath, args, desiredOutputs, inputs)
}).then(function ({ outputs, webWorker }) {
const convert1 = performance.now();