How to use the itk/IntTypes.UInt8 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 InsightSoftwareConsortium / itkwidgets / js / lib / viewer.js View on Github external
.then(function ({stdout, stderr, outputs, webWorker}) {
      webWorker.terminate()
      const t1 = performance.now();
      const duration = Number(t1 - t0).toFixed(1).toString()
      console.log("decompression took " + duration + " milliseconds.")

      switch (image.imageType.componentType) {
        case IntTypes.Int8:
          image.data = new Int8Array(outputs[0].data.buffer)
          break
        case IntTypes.UInt8:
          image.data = outputs[0].data
          break
        case IntTypes.Int16:
          image.data = new Int16Array(outputs[0].data.buffer)
          break
        case IntTypes.UInt16:
          image.data = new Uint16Array(outputs[0].data.buffer)
          break
        case IntTypes.Int32:
          image.data = new Int32Array(outputs[0].data.buffer)
          break
        case IntTypes.UInt32:
          image.data = new Uint32Array(outputs[0].data.buffer)
          break
        case IntTypes.Int64:
          image.data = new BigUint64Array(outputs[0].data.buffer)