How to use the itk/IOTypes.vtkPolyData function in itk

To help you get started, we’ve selected a few itk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kitware / itk-vtk-viewer / src / processFiles.js View on Github external
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();