Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
break
case IntTypes.UInt64:
image.data = new BigUint64Array(outputs[0].data.buffer)
break
case FloatTypes.Float32:
image.data = new Float32Array(outputs[0].data.buffer)
break
case FloatTypes.Float64:
image.data = new Float64Array(outputs[0].data.buffer)
break
default:
console.error('Unexpected component type: ' + image.imageType.componentType)
}
return image
})
}