From 80a60a6baee51910cad51c47d2ae67c8cd75638d Mon Sep 17 00:00:00 2001 From: ilan-gold Date: Tue, 4 Feb 2020 14:19:37 -0500 Subject: [PATCH] Update name for bits flag --- .../microscopy-viewer-layer/data-utils/tiff-utils.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/layers/microscopy-viewer-layer/data-utils/tiff-utils.js b/src/layers/microscopy-viewer-layer/data-utils/tiff-utils.js index 7ecf94f98..2134c288f 100644 --- a/src/layers/microscopy-viewer-layer/data-utils/tiff-utils.js +++ b/src/layers/microscopy-viewer-layer/data-utils/tiff-utils.js @@ -3,12 +3,12 @@ import {fromUrl, Pool, getDecoder } from 'geotiff/dist/geotiff.bundle.min.js'; async function loadTile({image, channel, x, y, pool}) { var tile = await image.getTileOrStrip(x,y, 0, pool) var dataObj = {} - const bits8 = image.fileDirectory.BitsPerSample[0]===8 - const bits16 = image.fileDirectory.BitsPerSample[0]===16 - const bits32 = image.fileDirectory.BitsPerSample[0]===32 - dataObj[channel] = (bits8 && new Uint8Array(tile.data)) || - (bits16 && new Uint16Array(tile.data)) || - (bits32 && new Uint32Array(tile.data)) + const is8Bits = image.fileDirectory.BitsPerSample[0]===8 + const is16Bits = image.fileDirectory.BitsPerSample[0]===16 + const is32Bits = image.fileDirectory.BitsPerSample[0]===32 + dataObj[channel] = (is8Bits && new Uint8Array(tile.data)) || + (is16Bits && new Uint16Array(tile.data)) || + (is32Bits && new Uint32Array(tile.data)) return dataObj }