@vitessce/image-utils 3.6.14 → 3.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-BbTJFIrH.js";
2
+ import { B as BaseDecoder } from "./index-CrnSIpc2.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -120225,22 +120225,22 @@ function addDecoder(cases, importFn) {
120225
120225
  }
120226
120226
  cases.forEach((c) => registry$1.set(c, importFn));
120227
120227
  }
120228
- addDecoder([void 0, 1], () => import("./raw-Dh_XQWs1.js").then((m) => m.default));
120229
- addDecoder(5, () => import("./lzw-1_s14ynQ.js").then((m) => m.default));
120228
+ addDecoder([void 0, 1], () => import("./raw-CU40fHlB.js").then((m) => m.default));
120229
+ addDecoder(5, () => import("./lzw-Cx8CUZ3I.js").then((m) => m.default));
120230
120230
  addDecoder(6, () => {
120231
120231
  throw new Error("old style JPEG compression is not supported.");
120232
120232
  });
120233
- addDecoder(7, () => import("./jpeg-CuuzsL-b.js").then((m) => m.default));
120234
- addDecoder([8, 32946], () => import("./deflate-B1WFcaes.js").then((m) => m.default));
120235
- addDecoder(32773, () => import("./packbits-C_zxEcEq.js").then((m) => m.default));
120233
+ addDecoder(7, () => import("./jpeg-IHVyFDaf.js").then((m) => m.default));
120234
+ addDecoder([8, 32946], () => import("./deflate-QFiR_eHt.js").then((m) => m.default));
120235
+ addDecoder(32773, () => import("./packbits-DhtrR3HF.js").then((m) => m.default));
120236
120236
  addDecoder(
120237
120237
  34887,
120238
- () => import("./lerc-DYxL2LGE.js").then(async (m) => {
120238
+ () => import("./lerc-CTnJE0lo.js").then(async (m) => {
120239
120239
  await m.zstd.init();
120240
120240
  return m;
120241
120241
  }).then((m) => m.default)
120242
120242
  );
120243
- addDecoder(50001, () => import("./webimage-44VOmBRw.js").then((m) => m.default));
120243
+ addDecoder(50001, () => import("./webimage-CZCTvbYg.js").then((m) => m.default));
120244
120244
  function decodeRowAcc(row, stride) {
120245
120245
  let length2 = row.length - stride;
120246
120246
  let offset = 0;
@@ -133812,10 +133812,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
133812
133812
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
133813
133813
  var _a3, _b2, _c, _d;
133814
133814
  if (isSetColorMode) {
133815
- totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) || 0) * 3;
133815
+ totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) ?? 0) * 3;
133816
133816
  totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
133817
133817
  } else {
133818
- totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
133818
+ totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) ?? 0;
133819
133819
  }
133820
133820
  });
133821
133821
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
@@ -133836,7 +133836,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
133836
133836
  const matrixObsIndex = multiMatrixObsIndex[channelIndex];
133837
133837
  const bitmaskValueIsIndex = matrixObsIndex === null;
133838
133838
  if (isSetColorMode) {
133839
- const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
133839
+ const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] ?? {};
133840
133840
  if (setColorIndices && setColors && obsIndex) {
133841
133841
  for (let i2 = 0; i2 < obsIndex.length; i2++) {
133842
133842
  let obsId = String(i2 + 1);
@@ -133860,7 +133860,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
133860
133860
  indexOffset += (obsIndex == null ? void 0 : obsIndex.length) || 0;
133861
133861
  colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
133862
133862
  } else {
133863
- const featureArr = multiFeatureValues[channelIndex];
133863
+ const featureArr = multiFeatureValues[channelIndex] ?? [];
133864
133864
  const normalizedFeatureArr = normalize(featureArr);
133865
133865
  if (!bitmaskValueIsIndex && matrixObsIndex) {
133866
133866
  for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I } from "./index-BbTJFIrH.js";
1
+ import { I } from "./index-CrnSIpc2.js";
2
2
  export {
3
3
  I as ImageWrapper
4
4
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BbTJFIrH.js";
1
+ import { B as BaseDecoder } from "./index-CrnSIpc2.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-BbTJFIrH.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-CrnSIpc2.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BbTJFIrH.js";
1
+ import { B as BaseDecoder } from "./index-CrnSIpc2.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BbTJFIrH.js";
1
+ import { B as BaseDecoder } from "./index-CrnSIpc2.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BbTJFIrH.js";
1
+ import { B as BaseDecoder } from "./index-CrnSIpc2.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-BbTJFIrH.js";
1
+ import { B as BaseDecoder } from "./index-CrnSIpc2.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/image-utils",
3
- "version": "3.6.14",
3
+ "version": "3.6.16",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -17,10 +17,10 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "@hms-dbmi/viv": "~0.16.0",
20
- "@vitessce/types": "3.6.14",
21
- "@vitessce/spatial-utils": "3.6.14",
22
- "@vitessce/utils": "3.6.14",
23
- "@vitessce/globals": "3.6.14"
20
+ "@vitessce/types": "3.6.16",
21
+ "@vitessce/spatial-utils": "3.6.16",
22
+ "@vitessce/utils": "3.6.16",
23
+ "@vitessce/globals": "3.6.16"
24
24
  },
25
25
  "devDependencies": {
26
26
  "vite": "^6.3.5",