@vitessce/ome-tiff 3.5.2 → 3.5.3

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,7 +1,6 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-f018c011.js";
2
+ import { B as BaseDecoder } from "./index-f73347bc.js";
3
3
  import "react";
4
- import "@vitessce/vit-s";
5
4
  class DeflateDecoder extends BaseDecoder {
6
5
  decodeBlock(buffer) {
7
6
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -5,7 +5,6 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  import "react";
8
- import { AbstractTwoStepLoader, LoaderResult } from "@vitessce/vit-s";
9
8
  function _mergeNamespaces(n3, m) {
10
9
  for (var i2 = 0; i2 < m.length; i2++) {
11
10
  const e2 = m[i2];
@@ -103682,16 +103681,16 @@ async function getDecoder(fileDirectory) {
103682
103681
  const Decoder = await importFn();
103683
103682
  return new Decoder(fileDirectory);
103684
103683
  }
103685
- addDecoder([void 0, 1], () => import("./raw-b3f361b7.js").then((m) => m.default));
103686
- addDecoder(5, () => import("./lzw-1dc5a1fb.js").then((m) => m.default));
103684
+ addDecoder([void 0, 1], () => import("./raw-7ef75647.js").then((m) => m.default));
103685
+ addDecoder(5, () => import("./lzw-d4b8181c.js").then((m) => m.default));
103687
103686
  addDecoder(6, () => {
103688
103687
  throw new Error("old style JPEG compression is not supported.");
103689
103688
  });
103690
- addDecoder(7, () => import("./jpeg-2591b9cb.js").then((m) => m.default));
103691
- addDecoder([8, 32946], () => import("./deflate-d76f90df.js").then((m) => m.default));
103692
- addDecoder(32773, () => import("./packbits-de305dec.js").then((m) => m.default));
103693
- addDecoder(34887, () => import("./lerc-199ab287.js").then((m) => m.default));
103694
- addDecoder(50001, () => import("./webimage-3d6df3c5.js").then((m) => m.default));
103689
+ addDecoder(7, () => import("./jpeg-99d7b315.js").then((m) => m.default));
103690
+ addDecoder([8, 32946], () => import("./deflate-5158a038.js").then((m) => m.default));
103691
+ addDecoder(32773, () => import("./packbits-4ae9e6b5.js").then((m) => m.default));
103692
+ addDecoder(34887, () => import("./lerc-d7d1e916.js").then((m) => m.default));
103693
+ addDecoder(50001, () => import("./webimage-cce70aeb.js").then((m) => m.default));
103695
103694
  function copyNewSize(array, width, height, samplesPerPixel = 1) {
103696
103695
  return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
103697
103696
  }
@@ -116198,12 +116197,6 @@ const DTYPE_VALUES = {
116198
116197
  cast: (data) => new Float32Array(data)
116199
116198
  }
116200
116199
  };
116201
- var RENDERING_MODES = /* @__PURE__ */ ((RENDERING_MODES2) => {
116202
- RENDERING_MODES2["MAX_INTENSITY_PROJECTION"] = "Maximum Intensity Projection";
116203
- RENDERING_MODES2["MIN_INTENSITY_PROJECTION"] = "Minimum Intensity Projection";
116204
- RENDERING_MODES2["ADDITIVE"] = "Additive";
116205
- return RENDERING_MODES2;
116206
- })(RENDERING_MODES || {});
116207
116200
  const apply_transparent_color = `vec4 apply_transparent_color(vec3 color, vec3 transparentColor, bool useTransparentColor, float opacity){
116208
116201
  return vec4(color, (color == transparentColor && useTransparentColor) ? 0. : opacity);
116209
116202
  }
@@ -121721,6 +121714,19 @@ class BitmaskLayer2 extends XRLayer {
121721
121714
  }
121722
121715
  BitmaskLayer2.layerName = "BitmaskLayer";
121723
121716
  BitmaskLayer2.defaultProps = defaultProps;
121717
+ const GLOBAL_LABELS = ["z", "t"];
121718
+ const DEFAULT_RASTER_DOMAIN_TYPE = "Min/Max";
121719
+ const DEFAULT_RASTER_LAYER_PROPS = {
121720
+ visible: true,
121721
+ colormap: null,
121722
+ opacity: 1,
121723
+ domainType: DEFAULT_RASTER_DOMAIN_TYPE,
121724
+ transparentColor: [0, 0, 0],
121725
+ // Importing the full viv package here would add a lot of weight to the bundle
121726
+ renderingMode: "Additive",
121727
+ // viv.RENDERING_MODES.ADDITIVE,
121728
+ use3d: false
121729
+ };
121724
121730
  function _extends() {
121725
121731
  _extends = Object.assign ? Object.assign.bind() : function(target) {
121726
121732
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -137174,17 +137180,6 @@ const getMultiSelectionStats = async ({ loader, selections, use3d }) => {
137174
137180
  const sliders = stats.map((stat) => stat.slider);
137175
137181
  return { domains, sliders };
137176
137182
  };
137177
- const GLOBAL_LABELS = ["z", "t"];
137178
- const DEFAULT_RASTER_DOMAIN_TYPE = "Min/Max";
137179
- const DEFAULT_RASTER_LAYER_PROPS = {
137180
- visible: true,
137181
- colormap: null,
137182
- opacity: 1,
137183
- domainType: DEFAULT_RASTER_DOMAIN_TYPE,
137184
- transparentColor: [0, 0, 0],
137185
- renderingMode: RENDERING_MODES.ADDITIVE,
137186
- use3d: false
137187
- };
137188
137183
  function getSourceFromLoader(loader, level) {
137189
137184
  const { data } = loader;
137190
137185
  const source = Array.isArray(data) ? data[level || data.length - 1] : data;
@@ -137665,7 +137660,7 @@ class ImageWrapper {
137665
137660
  }
137666
137661
  getDtype() {
137667
137662
  const loader = this.vivLoader;
137668
- const source = getSourceFromLoader(loader);
137663
+ const source = getSourceFromLoader(loader, void 0);
137669
137664
  if ("dtype" in source) {
137670
137665
  return source.dtype;
137671
137666
  }
@@ -137772,6 +137767,53 @@ class ImageWrapper {
137772
137767
  return "BlackIsZero";
137773
137768
  }
137774
137769
  }
137770
+ class LoaderResult {
137771
+ /**
137772
+ * @param {LoaderDataType} data
137773
+ * @param {object[]|string|null} url Single URL or array of { url, name } objects.
137774
+ * @param {object|null} coordinationValues
137775
+ * @param {RequestInit|null} requestInit
137776
+ */
137777
+ constructor(data, url, coordinationValues = null, requestInit = null) {
137778
+ this.data = data;
137779
+ this.url = url;
137780
+ this.coordinationValues = coordinationValues;
137781
+ this.requestInit = requestInit;
137782
+ }
137783
+ }
137784
+ class AbstractLoader {
137785
+ /**
137786
+ *
137787
+ * @param {LoaderParams} params
137788
+ */
137789
+ constructor({ type: type2, fileType, url, requestInit, options, coordinationValues }) {
137790
+ this.fileType = fileType;
137791
+ this.type = type2;
137792
+ this.url = url;
137793
+ this.requestInit = requestInit;
137794
+ this.options = options;
137795
+ this.coordinationValues = coordinationValues;
137796
+ }
137797
+ /**
137798
+ *
137799
+ * @returns {Promise<LoaderResult<any>>}
137800
+ */
137801
+ // eslint-disable-next-line class-methods-use-this
137802
+ async load() {
137803
+ return Promise.resolve(new LoaderResult(true, null));
137804
+ }
137805
+ }
137806
+ class AbstractTwoStepLoader extends AbstractLoader {
137807
+ /**
137808
+ *
137809
+ * @param {DataSourceType} dataSource
137810
+ * @param {LoaderParams} params
137811
+ */
137812
+ constructor(dataSource, params) {
137813
+ super(params);
137814
+ this.dataSource = dataSource;
137815
+ }
137816
+ }
137775
137817
  class CoordinationLevel {
137776
137818
  constructor(value) {
137777
137819
  this.value = value;
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
- import { c, b, O } from "./index-f018c011.js";
1
+ import { c, b, O } from "./index-f73347bc.js";
2
2
  import "react";
3
- import "@vitessce/vit-s";
4
3
  export {
5
4
  c as OmeTiffAsObsSegmentationsLoader,
6
5
  b as OmeTiffLoader,
@@ -1,6 +1,5 @@
1
- import { B as BaseDecoder } from "./index-f018c011.js";
1
+ import { B as BaseDecoder } from "./index-f73347bc.js";
2
2
  import "react";
3
- import "@vitessce/vit-s";
4
3
  const dctZigZag = new Int32Array([
5
4
  0,
6
5
  1,
@@ -1,7 +1,6 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-f018c011.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-f73347bc.js";
3
3
  import "react";
4
- import "@vitessce/vit-s";
5
4
  var LercDecode = { exports: {} };
6
5
  (function(module) {
7
6
  /* Copyright 2015-2021 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */
@@ -1,6 +1,5 @@
1
- import { B as BaseDecoder } from "./index-f018c011.js";
1
+ import { B as BaseDecoder } from "./index-f73347bc.js";
2
2
  import "react";
3
- import "@vitessce/vit-s";
4
3
  const MIN_BITS = 9;
5
4
  const CLEAR_CODE = 256;
6
5
  const EOI_CODE = 257;
@@ -1,6 +1,5 @@
1
- import { B as BaseDecoder } from "./index-f018c011.js";
1
+ import { B as BaseDecoder } from "./index-f73347bc.js";
2
2
  import "react";
3
- import "@vitessce/vit-s";
4
3
  class PackbitsDecoder extends BaseDecoder {
5
4
  decodeBlock(buffer) {
6
5
  const dataView = new DataView(buffer);
@@ -1,6 +1,5 @@
1
- import { B as BaseDecoder } from "./index-f018c011.js";
1
+ import { B as BaseDecoder } from "./index-f73347bc.js";
2
2
  import "react";
3
- import "@vitessce/vit-s";
4
3
  class RawDecoder extends BaseDecoder {
5
4
  decodeBlock(buffer) {
6
5
  return buffer;
@@ -1,6 +1,5 @@
1
- import { B as BaseDecoder } from "./index-f018c011.js";
1
+ import { B as BaseDecoder } from "./index-f73347bc.js";
2
2
  import "react";
3
- import "@vitessce/vit-s";
4
3
  class WebImageDecoder extends BaseDecoder {
5
4
  constructor() {
6
5
  super();
@@ -1,5 +1,5 @@
1
1
  import { viv } from '@vitessce/gl';
2
- import { LoaderResult } from '@vitessce/vit-s';
2
+ import { LoaderResult } from '@vitessce/abstract';
3
3
  import { initializeRasterLayersAndChannels, coordinateTransformationsToMatrix, getNgffAxesForTiff, } from '@vitessce/spatial-utils';
4
4
  import { ImageWrapper, } from '@vitessce/image-utils';
5
5
  import { CoordinationLevel as CL } from '@vitessce/config';
@@ -1,6 +1,8 @@
1
- export default class OmeTiffLoader {
1
+ export default class OmeTiffLoader extends AbstractTwoStepLoader<any> {
2
+ constructor(dataSource: any, params: import("../../abstract/node_modules/@vitessce/types/dist-tsc").LoaderParams);
2
3
  loadOffsets(): Promise<any>;
3
4
  load(): Promise<any>;
4
5
  autoImageCache: any;
5
6
  }
7
+ import { AbstractTwoStepLoader } from '@vitessce/abstract';
6
8
  //# sourceMappingURL=OmeTiffLoader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OmeTiffLoader.d.ts","sourceRoot":"","sources":["../src/OmeTiffLoader.js"],"names":[],"mappings":"AAUA;IACE,4BAWC;IAED,qBAqHC;IA1CG,oBAIC;CAuCN"}
1
+ {"version":3,"file":"OmeTiffLoader.d.ts","sourceRoot":"","sources":["../src/OmeTiffLoader.js"],"names":[],"mappings":"AAUA;;IACE,4BAWC;IAED,qBAqHC;IA1CG,oBAIC;CAuCN;sCAvImD,oBAAoB"}
@@ -1,7 +1,7 @@
1
1
  import { viv } from '@vitessce/gl';
2
2
  import { initializeRasterLayersAndChannels, coordinateTransformationsToMatrix, getNgffAxesForTiff, } from '@vitessce/spatial-utils';
3
3
  import { ImageWrapper } from '@vitessce/image-utils';
4
- import { AbstractTwoStepLoader, LoaderResult } from '@vitessce/vit-s';
4
+ import { AbstractTwoStepLoader, LoaderResult } from '@vitessce/abstract';
5
5
  import { CoordinationLevel as CL } from '@vitessce/config';
6
6
  export default class OmeTiffLoader extends AbstractTwoStepLoader {
7
7
  async loadOffsets() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/ome-tiff",
3
- "version": "3.5.2",
3
+ "version": "3.5.3",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -18,14 +18,14 @@
18
18
  "dependencies": {
19
19
  "d3-array": "^2.4.0",
20
20
  "lodash-es": "^4.17.21",
21
- "@vitessce/constants-internal": "3.5.2",
22
- "@vitessce/config": "3.5.2",
23
- "@vitessce/gl": "3.5.2",
24
- "@vitessce/sets-utils": "3.5.2",
25
- "@vitessce/spatial-utils": "3.5.2",
26
- "@vitessce/image-utils": "3.5.2",
27
- "@vitessce/utils": "3.5.2",
28
- "@vitessce/vit-s": "3.5.2"
21
+ "@vitessce/abstract": "3.5.3",
22
+ "@vitessce/constants-internal": "3.5.3",
23
+ "@vitessce/config": "3.5.3",
24
+ "@vitessce/gl": "3.5.3",
25
+ "@vitessce/sets-utils": "3.5.3",
26
+ "@vitessce/spatial-utils": "3.5.3",
27
+ "@vitessce/image-utils": "3.5.3",
28
+ "@vitessce/utils": "3.5.3"
29
29
  },
30
30
  "scripts": {
31
31
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
@@ -1,5 +1,5 @@
1
1
  import { viv } from '@vitessce/gl';
2
- import { LoaderResult } from '@vitessce/vit-s';
2
+ import { LoaderResult } from '@vitessce/abstract';
3
3
  import {
4
4
  initializeRasterLayersAndChannels,
5
5
  coordinateTransformationsToMatrix,
@@ -5,7 +5,7 @@ import {
5
5
  getNgffAxesForTiff,
6
6
  } from '@vitessce/spatial-utils';
7
7
  import { ImageWrapper } from '@vitessce/image-utils';
8
- import { AbstractTwoStepLoader, LoaderResult } from '@vitessce/vit-s';
8
+ import { AbstractTwoStepLoader, LoaderResult } from '@vitessce/abstract';
9
9
  import { CoordinationLevel as CL } from '@vitessce/config';
10
10
 
11
11
  export default class OmeTiffLoader extends AbstractTwoStepLoader {