From adee2159e3289a143a6bcc0c09deab22d9edb1cc Mon Sep 17 00:00:00 2001 From: ilan-gold Date: Tue, 4 Feb 2020 14:18:35 -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..4f51058e1 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 isBits8 = image.fileDirectory.BitsPerSample[0]===8 + const isBits16 = image.fileDirectory.BitsPerSample[0]===16 + const isBits32 = image.fileDirectory.BitsPerSample[0]===32 + dataObj[channel] = (isBits8 && new Uint8Array(tile.data)) || + (isBits16 && new Uint16Array(tile.data)) || + (isBits32 && new Uint32Array(tile.data)) return dataObj }