@vitessce/image-utils 3.8.10 → 3.9.0

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-CtJlyOO6.js";
2
+ import { B as BaseDecoder } from "./index-CGeOpq7J.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -19863,6 +19863,34 @@ const VIEWER_PALETTE = [
19863
19863
  [255, 128, 0],
19864
19864
  [255, 0, 0]
19865
19865
  ];
19866
+ function extent$1(values, valueof) {
19867
+ let min2;
19868
+ let max2;
19869
+ {
19870
+ for (const value of values) {
19871
+ if (value != null) {
19872
+ if (min2 === void 0) {
19873
+ if (value >= value) min2 = max2 = value;
19874
+ } else {
19875
+ if (min2 > value) min2 = value;
19876
+ if (max2 < value) max2 = value;
19877
+ }
19878
+ }
19879
+ }
19880
+ }
19881
+ return [min2, max2];
19882
+ }
19883
+ function max(values, valueof) {
19884
+ let max2;
19885
+ {
19886
+ for (const value of values) {
19887
+ if (value != null && (max2 < value || max2 === void 0 && value >= value)) {
19888
+ max2 = value;
19889
+ }
19890
+ }
19891
+ }
19892
+ return max2;
19893
+ }
19866
19894
  function assert$b(condition, message) {
19867
19895
  if (!condition) {
19868
19896
  throw new Error(message || "loader assertion failed.");
@@ -95105,7 +95133,7 @@ function clipExtent(x02, y02, x12, y12) {
95105
95133
  return clipStream;
95106
95134
  };
95107
95135
  }
95108
- function extent$1() {
95136
+ function extent() {
95109
95137
  var x02 = 0, y02 = 0, x12 = 960, y12 = 500, cache2, cacheStream, clip2;
95110
95138
  return clip2 = {
95111
95139
  stream: function(stream) {
@@ -96439,7 +96467,7 @@ const d3Geo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
96439
96467
  geoBounds: bounds,
96440
96468
  geoCentroid: centroid,
96441
96469
  geoCircle: circle$1,
96442
- geoClipExtent: extent$1,
96470
+ geoClipExtent: extent,
96443
96471
  geoConicConformal: conicConformal,
96444
96472
  geoConicConformalRaw: conicConformalRaw,
96445
96473
  geoConicEqualArea: conicEqualArea,
@@ -120227,22 +120255,22 @@ function addDecoder(cases, importFn) {
120227
120255
  }
120228
120256
  cases.forEach((c) => registry$1.set(c, importFn));
120229
120257
  }
120230
- addDecoder([void 0, 1], () => import("./raw-CguKu3ST.js").then((m) => m.default));
120231
- addDecoder(5, () => import("./lzw-B6Xpa4J1.js").then((m) => m.default));
120258
+ addDecoder([void 0, 1], () => import("./raw-CFmlYhVO.js").then((m) => m.default));
120259
+ addDecoder(5, () => import("./lzw-Dd-iX4_u.js").then((m) => m.default));
120232
120260
  addDecoder(6, () => {
120233
120261
  throw new Error("old style JPEG compression is not supported.");
120234
120262
  });
120235
- addDecoder(7, () => import("./jpeg-Bee3eiUs.js").then((m) => m.default));
120236
- addDecoder([8, 32946], () => import("./deflate-MAab7qvb.js").then((m) => m.default));
120237
- addDecoder(32773, () => import("./packbits-DCgEnEs7.js").then((m) => m.default));
120263
+ addDecoder(7, () => import("./jpeg-CYLX6Id9.js").then((m) => m.default));
120264
+ addDecoder([8, 32946], () => import("./deflate-Bs7SHvEF.js").then((m) => m.default));
120265
+ addDecoder(32773, () => import("./packbits-CqPEN5Xk.js").then((m) => m.default));
120238
120266
  addDecoder(
120239
120267
  34887,
120240
- () => import("./lerc-BvsBT0NB.js").then(async (m) => {
120268
+ () => import("./lerc-DSITWi_1.js").then(async (m) => {
120241
120269
  await m.zstd.init();
120242
120270
  return m;
120243
120271
  }).then((m) => m.default)
120244
120272
  );
120245
- addDecoder(50001, () => import("./webimage-pR7EmhHQ.js").then((m) => m.default));
120273
+ addDecoder(50001, () => import("./webimage-BHCtcAsA.js").then((m) => m.default));
120246
120274
  function decodeRowAcc(row, stride) {
120247
120275
  let length2 = row.length - stride;
120248
120276
  let offset = 0;
@@ -133797,36 +133825,8 @@ void main() {
133797
133825
  DECKGL_FILTER_COLOR(gl_FragColor, geometry);
133798
133826
  }
133799
133827
  `;
133800
- function extent(values, valueof) {
133801
- let min2;
133802
- let max2;
133803
- {
133804
- for (const value of values) {
133805
- if (value != null) {
133806
- if (min2 === void 0) {
133807
- if (value >= value) min2 = max2 = value;
133808
- } else {
133809
- if (min2 > value) min2 = value;
133810
- if (max2 < value) max2 = value;
133811
- }
133812
- }
133813
- }
133814
- }
133815
- return [min2, max2];
133816
- }
133817
- function max(values, valueof) {
133818
- let max2;
133819
- {
133820
- for (const value of values) {
133821
- if (value != null && (max2 < value || max2 === void 0 && value >= value)) {
133822
- max2 = value;
133823
- }
133824
- }
133825
- }
133826
- return max2;
133827
- }
133828
133828
  function normalize(arr) {
133829
- const [min2, max2] = extent(arr);
133829
+ const [min2, max2] = extent$1(arr);
133830
133830
  const ratio = 255 / (max2 - min2);
133831
133831
  const data = new Uint8Array(arr.map((i2) => Math.floor((i2 - min2) * ratio)));
133832
133832
  return data;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I } from "./index-CtJlyOO6.js";
1
+ import { I } from "./index-CGeOpq7J.js";
2
2
  export {
3
3
  I as ImageWrapper
4
4
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CtJlyOO6.js";
1
+ import { B as BaseDecoder } from "./index-CGeOpq7J.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-CtJlyOO6.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-CGeOpq7J.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-CtJlyOO6.js";
1
+ import { B as BaseDecoder } from "./index-CGeOpq7J.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-CtJlyOO6.js";
1
+ import { B as BaseDecoder } from "./index-CGeOpq7J.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-CtJlyOO6.js";
1
+ import { B as BaseDecoder } from "./index-CGeOpq7J.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-CtJlyOO6.js";
1
+ import { B as BaseDecoder } from "./index-CGeOpq7J.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.8.10",
3
+ "version": "3.9.0",
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.8.10",
21
- "@vitessce/spatial-utils": "3.8.10",
22
- "@vitessce/utils": "3.8.10",
23
- "@vitessce/globals": "3.8.10"
20
+ "@vitessce/spatial-utils": "3.9.0",
21
+ "@vitessce/types": "3.9.0",
22
+ "@vitessce/utils": "3.9.0",
23
+ "@vitessce/globals": "3.9.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "vite": "^7.0.0",