@vitessce/all 3.5.11 → 3.5.12

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-68f84e2a.js";
2
- import { aP as BaseDecoder } from "./index-b2384476.js";
2
+ import { aP as BaseDecoder } from "./index-c7da990c.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,6 +1,6 @@
1
1
  import React__default, { createElement, isValidElement, PureComponent, Component } from "react";
2
2
  import ReactDOM__default, { findDOMNode as findDOMNode$1 } from "react-dom";
3
- import { aS as commonjsGlobal$1, aT as objectAssign, g as getDefaultExportFromCjs$1, aU as earcut } from "./index-b2384476.js";
3
+ import { aS as commonjsGlobal$1, aT as objectAssign, g as getDefaultExportFromCjs$1, aU as earcut } from "./index-c7da990c.js";
4
4
  import "@vitessce/vit-s";
5
5
  var promise = {};
6
6
  (function(exports2) {
@@ -1,4 +1,4 @@
1
- import { aV as _export, aW as _coreExports, aX as _fails, aY as _toObject, aZ as _objectKeys, g as getDefaultExportFromCjs, a_ as _wksExports, a$ as _cof, b0 as _iterators, b1 as _anObject, b2 as _hide, b3 as _ctx, b4 as _toLength, b5 as _globalExports, b6 as _objectDp, b7 as _descriptors, b8 as _isObject, b9 as _metaExports, ba as _objectCreate, bb as _iterDefine, bc as _iterStep, bd as _isArray, be as _iobject, bf as _setToStringTag, bg as _aFunction, bh as _propertyDesc, bi as _root, bj as _baseGetTag, bk as isObjectLike_1, bl as isObject_1, bm as _Symbol$iterator, bn as _Object$assign, bo as _objectGopd, bp as _toIobject, bq as _html, br as _domCreate, bs as _library, bt as _Object$defineProperty, bu as _Symbol, bv as _objectPie, bw as _has, bx as _redefine, by as _objectAssign, aS as commonjsGlobal, bz as getAugmentedNamespace, bA as propTypesExports } from "./index-b2384476.js";
1
+ import { aV as _export, aW as _coreExports, aX as _fails, aY as _toObject, aZ as _objectKeys, g as getDefaultExportFromCjs, a_ as _wksExports, a$ as _cof, b0 as _iterators, b1 as _anObject, b2 as _hide, b3 as _ctx, b4 as _toLength, b5 as _globalExports, b6 as _objectDp, b7 as _descriptors, b8 as _isObject, b9 as _metaExports, ba as _objectCreate, bb as _iterDefine, bc as _iterStep, bd as _isArray, be as _iobject, bf as _setToStringTag, bg as _aFunction, bh as _propertyDesc, bi as _root, bj as _baseGetTag, bk as isObjectLike_1, bl as isObject_1, bm as _Symbol$iterator, bn as _Object$assign, bo as _objectGopd, bp as _toIobject, bq as _html, br as _domCreate, bs as _library, bt as _Object$defineProperty, bu as _Symbol, bv as _objectPie, bw as _has, bx as _redefine, by as _objectAssign, aS as commonjsGlobal, bz as getAugmentedNamespace, bA as propTypesExports } from "./index-c7da990c.js";
2
2
  import React__default from "react";
3
3
  function _mergeNamespaces(n, m) {
4
4
  for (var i = 0; i < m.length; i++) {
@@ -10820,7 +10820,8 @@ const COMPONENT_COORDINATION_TYPES = {
10820
10820
  CoordinationType$1.OBS_COLOR_ENCODING,
10821
10821
  CoordinationType$1.ADDITIONAL_OBS_SETS,
10822
10822
  CoordinationType$1.MOLECULE_HIGHLIGHT,
10823
- CoordinationType$1.TOOLTIPS_VISIBLE
10823
+ CoordinationType$1.TOOLTIPS_VISIBLE,
10824
+ CoordinationType$1.PHOTOMETRIC_INTERPRETATION
10824
10825
  ],
10825
10826
  [ViewType$1.SPATIAL_BETA]: [
10826
10827
  CoordinationType$1.META_COORDINATION_SCOPES,
@@ -10893,7 +10894,8 @@ const COMPONENT_COORDINATION_TYPES = {
10893
10894
  CoordinationType$1.LEGEND_VISIBLE,
10894
10895
  CoordinationType$1.SPATIAL_CHANNEL_LABELS_VISIBLE,
10895
10896
  CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION,
10896
- CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE
10897
+ CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE,
10898
+ CoordinationType$1.PHOTOMETRIC_INTERPRETATION
10897
10899
  ],
10898
10900
  [ViewType$1.HEATMAP]: [
10899
10901
  CoordinationType$1.DATASET,
@@ -11008,7 +11010,8 @@ const COMPONENT_COORDINATION_TYPES = {
11008
11010
  CoordinationType$1.SPATIAL_ROTATION_Y,
11009
11011
  CoordinationType$1.SPATIAL_ROTATION_Z,
11010
11012
  CoordinationType$1.SPATIAL_ROTATION_ORBIT,
11011
- CoordinationType$1.SPATIAL_ORBIT_AXIS
11013
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
11014
+ CoordinationType$1.PHOTOMETRIC_INTERPRETATION
11012
11015
  ],
11013
11016
  [ViewType$1.LAYER_CONTROLLER_BETA]: [
11014
11017
  CoordinationType$1.META_COORDINATION_SCOPES,
@@ -177346,16 +177349,16 @@ async function getDecoder(fileDirectory) {
177346
177349
  const Decoder = await importFn();
177347
177350
  return new Decoder(fileDirectory);
177348
177351
  }
177349
- addDecoder([void 0, 1], () => import("./raw-7ad8e084.js").then((m2) => m2.default));
177350
- addDecoder(5, () => import("./lzw-ffd426d3.js").then((m2) => m2.default));
177352
+ addDecoder([void 0, 1], () => import("./raw-1af0a143.js").then((m2) => m2.default));
177353
+ addDecoder(5, () => import("./lzw-615797a2.js").then((m2) => m2.default));
177351
177354
  addDecoder(6, () => {
177352
177355
  throw new Error("old style JPEG compression is not supported.");
177353
177356
  });
177354
- addDecoder(7, () => import("./jpeg-8687eb38.js").then((m2) => m2.default));
177355
- addDecoder([8, 32946], () => import("./deflate-916bb37d.js").then((m2) => m2.default));
177356
- addDecoder(32773, () => import("./packbits-3388263e.js").then((m2) => m2.default));
177357
- addDecoder(34887, () => import("./lerc-42867a4a.js").then((m2) => m2.default));
177358
- addDecoder(50001, () => import("./webimage-60247a11.js").then((m2) => m2.default));
177357
+ addDecoder(7, () => import("./jpeg-32441425.js").then((m2) => m2.default));
177358
+ addDecoder([8, 32946], () => import("./deflate-327fa967.js").then((m2) => m2.default));
177359
+ addDecoder(32773, () => import("./packbits-b9451794.js").then((m2) => m2.default));
177360
+ addDecoder(34887, () => import("./lerc-84a2944c.js").then((m2) => m2.default));
177361
+ addDecoder(50001, () => import("./webimage-40ad658c.js").then((m2) => m2.default));
177359
177362
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
177360
177363
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
177361
177364
  }
@@ -213005,9 +213008,6 @@ function physicalSizeToMatrix(xSize, ySize, zSize, xUnit, yUnit, zUnit) {
213005
213008
  sizes.push(unit$1(`${zSize} ${zUnit}`.replace("µ", "u")));
213006
213009
  }
213007
213010
  const scale2 = sizes.map((i2) => divide(i2, unit$1("1 um")));
213008
- if (!sizes[0].equals(sizes[1])) {
213009
- scale2[1] = divide(sizes[1], sizes[0]);
213010
- }
213011
213011
  if (!scale2[2]) {
213012
213012
  scale2[2] = 1;
213013
213013
  }
@@ -216511,6 +216511,7 @@ let Spatial$1 = class Spatial extends AbstractSpatialOrScatterplot {
216511
216511
  return null;
216512
216512
  }
216513
216513
  createRasterLayer(rawLayerDef, loader2, i2) {
216514
+ const { photometricInterpretation } = this.props;
216514
216515
  const layerDef = {
216515
216516
  ...rawLayerDef,
216516
216517
  channels: rawLayerDef.channels.filter((channel) => channel.selection && channel.color && channel.slider)
@@ -216589,6 +216590,23 @@ let Spatial$1 = class Spatial extends AbstractSpatialOrScatterplot {
216589
216590
  if (isInterleaved$1((Array.isArray(data2) ? data2[0] : data2).shape)) {
216590
216591
  rgbInterleavedProps.visible = layerDef.visible;
216591
216592
  }
216593
+ const rgbProps = photometricInterpretation === "RGB" ? {
216594
+ colors: [
216595
+ [255, 0, 0],
216596
+ [0, 255, 0],
216597
+ [0, 0, 255]
216598
+ ],
216599
+ contrastLimits: [
216600
+ [0, 255],
216601
+ [0, 255],
216602
+ [0, 255]
216603
+ ],
216604
+ channelsVisible: [
216605
+ true,
216606
+ true,
216607
+ true
216608
+ ]
216609
+ } : {};
216592
216610
  return new Layer2({
216593
216611
  loader: layerLoader,
216594
216612
  id: `${layerDef.use3d ? "volume" : "image"}-layer-${layerDef.index}-${i2}`,
@@ -216610,7 +216628,8 @@ let Spatial$1 = class Spatial extends AbstractSpatialOrScatterplot {
216610
216628
  onViewportLoad: layerProps.callback,
216611
216629
  excludeBackground: layerProps.excludeBackground,
216612
216630
  extensions,
216613
- ...rgbInterleavedProps
216631
+ ...rgbInterleavedProps,
216632
+ ...rgbProps
216614
216633
  });
216615
216634
  }
216616
216635
  use3d() {
@@ -216829,7 +216848,8 @@ let Spatial$1 = class Spatial extends AbstractSpatialOrScatterplot {
216829
216848
  "geneExpressionColormapRange",
216830
216849
  "expressionData",
216831
216850
  "imageLayerCallbacks",
216832
- "geneExpressionColormap"
216851
+ "geneExpressionColormap",
216852
+ "photometricInterpretation"
216833
216853
  ].some(shallowDiff)) {
216834
216854
  this.onUpdateImages();
216835
216855
  forceUpdate = true;
@@ -216928,7 +216948,7 @@ function SpatialSubscriber$1(props) {
216928
216948
  const loaders = useLoaders();
216929
216949
  const setComponentHover = useSetComponentHover();
216930
216950
  const setComponentViewInfo = useSetComponentViewInfo(uuid);
216931
- const [{ dataset, obsType, featureType, featureValueType, spatialZoom: zoom2, spatialTargetX: targetX2, spatialTargetY: targetY2, spatialTargetZ: targetZ, spatialRotationX: rotationX, spatialRotationY: rotationY, spatialRotationZ: rotationZ, spatialRotationOrbit: rotationOrbit, spatialOrbitAxis: orbitAxis, spatialImageLayer: imageLayers, spatialSegmentationLayer: cellsLayer, spatialPointLayer: moleculesLayer, spatialNeighborhoodLayer: neighborhoodsLayer, obsFilter: cellFilter, obsHighlight: cellHighlight, moleculeHighlight, featureSelection: geneSelection, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, spatialAxisFixed, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, tooltipsVisible }, { setSpatialZoom: setZoom, setSpatialTargetX: setTargetX, setSpatialTargetY: setTargetY, setSpatialTargetZ: setTargetZ, setSpatialRotationX: setRotationX, setSpatialRotationOrbit: setRotationOrbit, setSpatialOrbitAxis: setOrbitAxis, setSpatialImageLayer: setRasterLayers, setSpatialSegmentationLayer: setCellsLayer, setSpatialPointLayer: setMoleculesLayer, setSpatialNeighborhoodLayer: setNeighborhoodsLayer, setObsFilter: setCellFilter, setObsSetSelection: setCellSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setMoleculeHighlight, setSpatialAxisFixed, setFeatureValueColormap: setGeneExpressionColormap, setFeatureValueColormapRange: setGeneExpressionColormapRange, setTooltipsVisible }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.SPATIAL], coordinationScopes);
216951
+ const [{ dataset, obsType, featureType, featureValueType, spatialZoom: zoom2, spatialTargetX: targetX2, spatialTargetY: targetY2, spatialTargetZ: targetZ, spatialRotationX: rotationX, spatialRotationY: rotationY, spatialRotationZ: rotationZ, spatialRotationOrbit: rotationOrbit, spatialOrbitAxis: orbitAxis, spatialImageLayer: imageLayers, spatialSegmentationLayer: cellsLayer, spatialPointLayer: moleculesLayer, spatialNeighborhoodLayer: neighborhoodsLayer, obsFilter: cellFilter, obsHighlight: cellHighlight, moleculeHighlight, featureSelection: geneSelection, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, spatialAxisFixed, featureValueColormap: geneExpressionColormap, featureValueColormapRange: geneExpressionColormapRange, tooltipsVisible, photometricInterpretation: photometricInterpretationFromCoordination }, { setSpatialZoom: setZoom, setSpatialTargetX: setTargetX, setSpatialTargetY: setTargetY, setSpatialTargetZ: setTargetZ, setSpatialRotationX: setRotationX, setSpatialRotationOrbit: setRotationOrbit, setSpatialOrbitAxis: setOrbitAxis, setSpatialImageLayer: setRasterLayers, setSpatialSegmentationLayer: setCellsLayer, setSpatialPointLayer: setMoleculesLayer, setSpatialNeighborhoodLayer: setNeighborhoodsLayer, setObsFilter: setCellFilter, setObsSetSelection: setCellSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setMoleculeHighlight, setSpatialAxisFixed, setFeatureValueColormap: setGeneExpressionColormap, setFeatureValueColormapRange: setGeneExpressionColormapRange, setTooltipsVisible }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.SPATIAL], coordinationScopes);
216932
216952
  const { spatialZoom: initialZoom, spatialTargetX: initialTargetX, spatialTargetY: initialTargetY, spatialTargetZ: initialTargetZ } = useInitialCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.SPATIAL], coordinationScopes);
216933
216953
  const observationsLabel = observationsLabelOverride || obsType;
216934
216954
  const [{ imageLayerCallbacks, segmentationLayerCallbacks }] = useAuxiliaryCoordination(COMPONENT_COORDINATION_TYPES.layerController, coordinationScopes);
@@ -216948,10 +216968,11 @@ function SpatialSubscriber$1(props) {
216948
216968
  const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
216949
216969
  const [{ obsIndex: matrixObsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
216950
216970
  const [{ image: image2 }, imageStatus, imageUrls] = useImageData(loaders, dataset, false, { setSpatialImageLayer: setRasterLayers }, { spatialImageLayer: imageLayers }, {});
216951
- const { loaders: imageLayerLoaders = [], meta: meta2 = [] } = image2 || {};
216971
+ const { loaders: imageLayerLoaders = [], meta: meta2 = [], instance: instance2 } = image2 || {};
216952
216972
  const [neighborhoods, neighborhoodsStatus, neighborhoodsUrls] = useNeighborhoodsData(loaders, dataset, false, { setSpatialNeighborhoodLayer: setNeighborhoodsLayer }, { spatialNeighborhoodLayer: neighborhoodsLayer });
216953
216973
  const [{ featureLabelsMap: featureLabelsMapOrig }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
216954
216974
  const [featureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(featureType, featureLabelsMapOrig, { stripCuriePrefixes: true });
216975
+ const photometricInterpretation = photometricInterpretationFromCoordination ?? (instance2 == null ? void 0 : instance2.getPhotometricInterpretation());
216955
216976
  const isReady = useReady([
216956
216977
  obsLocationsStatus,
216957
216978
  obsLabelsStatus,
@@ -217204,7 +217225,7 @@ function SpatialSubscriber$1(props) {
217204
217225
  orbitAxis
217205
217226
  }, setViewState, originalViewState, imageLayerDefs: imageLayers, obsSegmentationsLayerDefs: cellsLayer, obsLocationsLayerDefs: moleculesLayer, neighborhoodLayerDefs: neighborhoodsLayer, obsLocationsIndex, obsSegmentationsIndex, obsLocations, obsLocationsLabels, obsLocationsFeatureIndex, hasSegmentations: hasSegmentationsData, obsSegmentations, obsSegmentationsType, obsCentroids, obsCentroidsIndex, cellFilter, cellSelection, cellHighlight, cellColors, neighborhoods, imageLayerLoaders: resolutionFilteredImageLayerLoaders, setCellFilter, setCellSelection: setCellSelectionProp, setCellHighlight, setHoverInfo, setMoleculeHighlight, setComponentHover: () => {
217206
217227
  setComponentHover(uuid);
217207
- }, updateViewInfo: setComponentViewInfo, imageLayerCallbacks, segmentationLayerCallbacks, spatialAxisFixed, geneExpressionColormap, geneExpressionColormapRange, expressionData: shiftedExpressionDataForBitmask, cellColorEncoding, getExpressionValue, theme, useFullResolutionImage }), tooltipsVisible && jsxRuntimeExports.jsx(SpatialTooltipSubscriber$1, { parentUuid: uuid, obsHighlight: cellHighlight || moleculeHighlight, width: width2, height: height2, getObsInfo: getTooltipObsInfo, useHoverInfoForTooltip, hoverData, hoverCoord, hoverMode, getObsIdFromHoverData, featureType, featureLabelsMap }), jsxRuntimeExports.jsx(Legend, {
217228
+ }, updateViewInfo: setComponentViewInfo, imageLayerCallbacks, segmentationLayerCallbacks, spatialAxisFixed, geneExpressionColormap, geneExpressionColormapRange, expressionData: shiftedExpressionDataForBitmask, cellColorEncoding, getExpressionValue, theme, useFullResolutionImage, photometricInterpretation }), tooltipsVisible && jsxRuntimeExports.jsx(SpatialTooltipSubscriber$1, { parentUuid: uuid, obsHighlight: cellHighlight || moleculeHighlight, width: width2, height: height2, getObsInfo: getTooltipObsInfo, useHoverInfoForTooltip, hoverData, hoverCoord, hoverMode, getObsIdFromHoverData, featureType, featureLabelsMap }), jsxRuntimeExports.jsx(Legend, {
217208
217229
  visible: true,
217209
217230
  // Fix to dark theme due to black background of spatial plot.
217210
217231
  theme: "dark",
@@ -218637,7 +218658,7 @@ class ErrorBoundary extends React__default.Component {
218637
218658
  }
218638
218659
  }
218639
218660
  const LazySpatialThree = React__default.lazy(async () => {
218640
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-1de95a31.js");
218661
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-fd7c132d.js");
218641
218662
  return { default: SpatialWrapper2 };
218642
218663
  });
218643
218664
  const SpatialThreeAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialThree, { ...props }) }) }) }));
@@ -225150,7 +225171,7 @@ const buttonStyles = {
225150
225171
  };
225151
225172
  function LayerController$1(props) {
225152
225173
  var _a3;
225153
- const { layer, name: name2, loader: loader2, theme, handleLayerRemove, handleLayerChange, shouldShowTransparentColor, shouldShowDomain, shouldShowColormap, ChannelController, setViewState, disable3d, setImageLayerCallback, setAreLayerChannelsLoading, areLayerChannelsLoading, disabled, spatialHeight, spatialWidth, disableChannelsIfRgbDetected, shouldShowRemoveLayerButton } = props;
225174
+ const { layer, name: name2, loader: loader2, theme, handleLayerRemove, handleLayerChange, shouldShowTransparentColor, shouldShowDomain, shouldShowColormap, ChannelController, setViewState, disable3d, setImageLayerCallback, setAreLayerChannelsLoading, areLayerChannelsLoading, disabled, spatialHeight, spatialWidth, photometricInterpretation, shouldShowRemoveLayerButton } = props;
225154
225175
  const { colormap, opacity: opacity2, channels: channels2, transparentColor, renderingMode, xSlice, ySlice, zSlice, resolution, use3d, modelMatrix: modelMatrix2 } = layer;
225155
225176
  const channelRef = useRef(channels2);
225156
225177
  useEffect(() => {
@@ -225365,7 +225386,7 @@ function LayerController$1(props) {
225365
225386
  handleColormapChange: setColormap,
225366
225387
  handleGlobalChannelsSelectionChange,
225367
225388
  handleTransparentColorChange: setTransparentColor,
225368
- disableChannelsIfRgbDetected: isRgb(loader2, channels2) && disableChannelsIfRgbDetected,
225389
+ disableChannelsIfRgbDetected: photometricInterpretation === "RGB",
225369
225390
  handleDomainChange,
225370
225391
  shouldShowTransparentColor,
225371
225392
  shouldShowDomain,
@@ -225381,7 +225402,7 @@ function LayerController$1(props) {
225381
225402
  spatialHeight,
225382
225403
  spatialWidth,
225383
225404
  modelMatrix: modelMatrix2
225384
- }), isRgb(loader2, channels2) && disableChannelsIfRgbDetected ? null : channelControllers, isRgb(loader2, channels2) && disableChannelsIfRgbDetected ? null : jsxRuntimeExports.jsx(Button$1, { disabled: channels2.length === MAX_CHANNELS$1, onClick: handleChannelAdd, fullWidth: true, variant: "outlined", style: buttonStyles, startIcon: jsxRuntimeExports.jsx(AddIcon, {}), size: "small", children: "Add Channel" })] });
225405
+ }), photometricInterpretation === "RGB" ? null : channelControllers, photometricInterpretation === "RGB" ? null : jsxRuntimeExports.jsx(Button$1, { disabled: channels2.length === MAX_CHANNELS$1, onClick: handleChannelAdd, fullWidth: true, variant: "outlined", style: buttonStyles, startIcon: jsxRuntimeExports.jsx(AddIcon, {}), size: "small", children: "Add Channel" })] });
225385
225406
  return jsxRuntimeExports.jsxs(Accordion$1, { className: controllerSectionClasses.layerControllerRoot, onChange: (e3, expanded) => {
225386
225407
  var _a4, _b3, _c3;
225387
225408
  return !disabled && setIsExpanded(expanded && ((_c3 = (_b3 = (_a4 = e3 == null ? void 0 : e3.target) == null ? void 0 : _a4.attributes) == null ? void 0 : _b3.role) == null ? void 0 : _c3.value) === "presentation");
@@ -225458,6 +225479,7 @@ const LayerControllerMemoized = React__default.memo(forwardRef((props, ref2) =>
225458
225479
  setAreLoadingImageChannels,
225459
225480
  handleRasterLayerChange,
225460
225481
  handleRasterLayerRemove,
225482
+ photometricInterpretation,
225461
225483
  obsSegmentationsType,
225462
225484
  segmentationLayerLoaders,
225463
225485
  segmentationLayerMeta,
@@ -225579,6 +225601,7 @@ const LayerControllerMemoized = React__default.memo(forwardRef((props, ref2) =>
225579
225601
  disable3d: globalDisable3d || (disable3d || []).indexOf(layerMeta.name) >= 0 || typeof layerIs3DIndex === "number" && layerIs3DIndex !== -1 && layerIs3DIndex !== i2,
225580
225602
  disabled: typeof layerIs3DIndex === "number" && layerIs3DIndex !== -1 && layerIs3DIndex !== i2,
225581
225603
  disableChannelsIfRgbDetected,
225604
+ photometricInterpretation,
225582
225605
  imageLayerCallbacks,
225583
225606
  setImageLayerCallback,
225584
225607
  setViewState: ({ zoom: newZoom, target: target2, rotationX: newRotationX, rotationOrbit: newRotationOrbit }) => {
@@ -225602,7 +225625,7 @@ const LayerControllerMemoized = React__default.memo(forwardRef((props, ref2) =>
225602
225625
  function LayerControllerSubscriber$1(props) {
225603
225626
  const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title: title2 = "Spatial Layers", disable3d, globalDisable3d, disableChannelsIfRgbDetected, enableLayerButtonsWithOneLayer, helpText = ViewHelpMapping.LAYER_CONTROLLER } = props;
225604
225627
  const loaders = useLoaders();
225605
- const [{ dataset, obsType, spatialImageLayer: rasterLayers, spatialSegmentationLayer: cellsLayer, spatialPointLayer: moleculesLayer }, { setSpatialImageLayer: setRasterLayers, setSpatialSegmentationLayer: setCellsLayer, setSpatialPointLayer: setMoleculesLayer, setSpatialTargetX: setTargetX, setSpatialTargetY: setTargetY, setSpatialTargetZ: setTargetZ, setSpatialRotationX: setRotationX, setSpatialRotationOrbit: setRotationOrbit, setSpatialZoom: setZoom }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.LAYER_CONTROLLER], coordinationScopes);
225628
+ const [{ dataset, obsType, spatialImageLayer: rasterLayers, spatialSegmentationLayer: cellsLayer, spatialPointLayer: moleculesLayer, photometricInterpretation: photometricInterpretationFromCoordination }, { setSpatialImageLayer: setRasterLayers, setSpatialSegmentationLayer: setCellsLayer, setSpatialPointLayer: setMoleculesLayer, setSpatialTargetX: setTargetX, setSpatialTargetY: setTargetY, setSpatialTargetZ: setTargetZ, setSpatialRotationX: setRotationX, setSpatialRotationOrbit: setRotationOrbit, setSpatialZoom: setZoom }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.LAYER_CONTROLLER], coordinationScopes);
225606
225629
  const [{ imageLayerCallbacks, areLoadingImageChannels, segmentationLayerCallbacks, areLoadingSegmentationChannels }, { setImageLayerCallbacks, setAreLoadingImageChannels, setSegmentationLayerCallbacks, setAreLoadingSegmentationChannels }] = useAuxiliaryCoordination(COMPONENT_COORDINATION_TYPES.layerController, coordinationScopes);
225607
225630
  const [spatialLayout] = useComponentLayout("spatial", ["spatialImageLayer"], coordinationScopes);
225608
225631
  const layerControllerRef = useRef();
@@ -225611,12 +225634,13 @@ function LayerControllerSubscriber$1(props) {
225611
225634
  const [obsLocationsData, obsLocationsStatus] = useObsLocationsData(loaders, dataset, false, { setSpatialPointLayer: setMoleculesLayer }, { spatialPointLayer: moleculesLayer }, {});
225612
225635
  const [{ obsSegmentations, obsSegmentationsType }, obsSegmentationsStatus] = useObsSegmentationsData(loaders, dataset, false, { setSpatialSegmentationLayer: setCellsLayer }, { spatialSegmentationLayer: cellsLayer }, {});
225613
225636
  const [{ image: image2 }, imageStatus] = useImageData(loaders, dataset, false, { setSpatialImageLayer: setRasterLayers }, { spatialImageLayer: rasterLayers }, {});
225614
- const { loaders: imageLayerLoaders, meta: imageLayerMeta } = image2 || {};
225637
+ const { loaders: imageLayerLoaders, meta: imageLayerMeta, instance: instance2 } = image2 || {};
225615
225638
  const isReady = useReady([
225616
225639
  obsLocationsStatus,
225617
225640
  obsSegmentationsStatus,
225618
225641
  imageStatus
225619
225642
  ]);
225643
+ const photometricInterpretation = photometricInterpretationFromCoordination ?? (instance2 == null ? void 0 : instance2.getPhotometricInterpretation());
225620
225644
  const segmentationLayerLoaders = obsSegmentations && obsSegmentationsType === "bitmask" ? obsSegmentations.loaders : null;
225621
225645
  const segmentationLayerMeta = obsSegmentations && obsSegmentationsType === "bitmask" ? obsSegmentations.meta : null;
225622
225646
  const handleImageAdd = useCallback(async (index2) => {
@@ -225678,6 +225702,7 @@ function LayerControllerSubscriber$1(props) {
225678
225702
  setAreLoadingImageChannels,
225679
225703
  handleRasterLayerChange,
225680
225704
  handleRasterLayerRemove,
225705
+ photometricInterpretation,
225681
225706
  obsSegmentationsType,
225682
225707
  segmentationLayerLoaders,
225683
225708
  segmentationLayerMeta,
@@ -229496,7 +229521,7 @@ const useStyles$6 = makeStyles((theme) => ({
229496
229521
  }));
229497
229522
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
229498
229523
  const LazyHiGlassComponent = React__default.lazy(async () => {
229499
- const { HiGlassComponent } = await import("./higlass-5022c0ac.js");
229524
+ const { HiGlassComponent } = await import("./higlass-a114d38b.js");
229500
229525
  return { default: HiGlassComponent };
229501
229526
  });
229502
229527
  const HG_SIZE = 800;
@@ -232444,7 +232469,7 @@ const useStyles$5 = makeStyles(() => ({
232444
232469
  }
232445
232470
  }));
232446
232471
  const LazyReactNeuroglancer = React__default.lazy(async () => {
232447
- const ReactNeuroglancer = await import("./index-9fa0b8f0.js").then((n3) => n3.i);
232472
+ const ReactNeuroglancer = await import("./index-9c4bd1c8.js").then((n3) => n3.i);
232448
232473
  return ReactNeuroglancer;
232449
232474
  });
232450
232475
  function createWorker() {
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs, R as Raycaster, O as OrthographicCamera, P as PerspectiveCamera, S as Scene, a as PCFSoftShadowMap, N as NoToneMapping, A as ACESFilmicToneMapping, V as Vector2, b as Vector3, L as Layers, T as Texture, c as RGBAFormat, U as UnsignedByteType, W as WebGLRenderer, C as Camera, B as BasicShadowMap, d as PCFShadowMap, e as VSMShadowMap, f as BufferGeometry, M as Material, h as Color, i as Clock, _ as _extends, j as THREE, G as Group, k as Matrix4, l as TrianglesDrawMode, m as TriangleFanDrawMode, n as TriangleStripDrawMode, o as REVISION, p as Ray$1, q as Plane, E as EventDispatcher, r as MOUSE, s as TOUCH, Q as Quaternion, t as Spherical, u as Loader, v as LoaderUtils, F as FileLoader, w as SpotLight, x as PointLight, D as DirectionalLight, y as MeshBasicMaterial, z as MeshPhysicalMaterial, I as InstancedMesh, H as Object3D, J as TextureLoader, K as ImageBitmapLoader, X as BufferAttribute, Y as InterleavedBuffer, Z as LinearFilter, $ as LinearMipmapLinearFilter, a0 as RepeatWrapping, a1 as PointsMaterial, a2 as LineBasicMaterial, a3 as MeshStandardMaterial, a4 as DoubleSide, a5 as PropertyBinding, a6 as SkinnedMesh, a7 as Mesh, a8 as LineSegments, a9 as Line$1, aa as LineLoop, ab as Points, ac as MathUtils, ad as Skeleton, ae as InterpolateLinear, af as AnimationClip, ag as Bone, ah as NearestFilter, ai as NearestMipmapNearestFilter, aj as LinearMipmapNearestFilter, ak as NearestMipmapLinearFilter, al as ClampToEdgeWrapping, am as MirroredRepeatWrapping, an as InterpolateDiscrete, ao as FrontSide, ap as InterleavedBufferAttribute, aq as VectorKeyframeTrack, ar as QuaternionKeyframeTrack, as as NumberKeyframeTrack, at as Box3, au as Sphere, av as Interpolant, aw as InstancedBufferGeometry, ax as Float32BufferAttribute, ay as InstancedInterleavedBuffer, az as WireframeGeometry, aA as ShaderMaterial, aB as UniformsUtils, aC as UniformsLib, aD as Vector4, aE as Line3, aF as SphereGeometry, aG as Triangle, aH as BackSide, aI as jsxRuntimeExports, aJ as Matrix3, aK as CoordinationType, aL as Data3DTexture, aM as RedFormat, aN as FloatType, aO as getImageSize } from "./index-b2384476.js";
1
+ import { g as getDefaultExportFromCjs, R as Raycaster, O as OrthographicCamera, P as PerspectiveCamera, S as Scene, a as PCFSoftShadowMap, N as NoToneMapping, A as ACESFilmicToneMapping, V as Vector2, b as Vector3, L as Layers, T as Texture, c as RGBAFormat, U as UnsignedByteType, W as WebGLRenderer, C as Camera, B as BasicShadowMap, d as PCFShadowMap, e as VSMShadowMap, f as BufferGeometry, M as Material, h as Color, i as Clock, _ as _extends, j as THREE, G as Group, k as Matrix4, l as TrianglesDrawMode, m as TriangleFanDrawMode, n as TriangleStripDrawMode, o as REVISION, p as Ray$1, q as Plane, E as EventDispatcher, r as MOUSE, s as TOUCH, Q as Quaternion, t as Spherical, u as Loader, v as LoaderUtils, F as FileLoader, w as SpotLight, x as PointLight, D as DirectionalLight, y as MeshBasicMaterial, z as MeshPhysicalMaterial, I as InstancedMesh, H as Object3D, J as TextureLoader, K as ImageBitmapLoader, X as BufferAttribute, Y as InterleavedBuffer, Z as LinearFilter, $ as LinearMipmapLinearFilter, a0 as RepeatWrapping, a1 as PointsMaterial, a2 as LineBasicMaterial, a3 as MeshStandardMaterial, a4 as DoubleSide, a5 as PropertyBinding, a6 as SkinnedMesh, a7 as Mesh, a8 as LineSegments, a9 as Line$1, aa as LineLoop, ab as Points, ac as MathUtils, ad as Skeleton, ae as InterpolateLinear, af as AnimationClip, ag as Bone, ah as NearestFilter, ai as NearestMipmapNearestFilter, aj as LinearMipmapNearestFilter, ak as NearestMipmapLinearFilter, al as ClampToEdgeWrapping, am as MirroredRepeatWrapping, an as InterpolateDiscrete, ao as FrontSide, ap as InterleavedBufferAttribute, aq as VectorKeyframeTrack, ar as QuaternionKeyframeTrack, as as NumberKeyframeTrack, at as Box3, au as Sphere, av as Interpolant, aw as InstancedBufferGeometry, ax as Float32BufferAttribute, ay as InstancedInterleavedBuffer, az as WireframeGeometry, aA as ShaderMaterial, aB as UniformsUtils, aC as UniformsLib, aD as Vector4, aE as Line3, aF as SphereGeometry, aG as Triangle, aH as BackSide, aI as jsxRuntimeExports, aJ as Matrix3, aK as CoordinationType, aL as Data3DTexture, aM as RedFormat, aN as FloatType, aO as getImageSize } from "./index-c7da990c.js";
2
2
  import * as React from "react";
3
3
  import React__default, { useReducer, useRef, useDebugValue, useEffect, useLayoutEffect, useState, useMemo, forwardRef } from "react";
4
4
  import "@vitessce/vit-s";
@@ -23800,7 +23800,7 @@ const Text = /* @__PURE__ */ React.forwardRef(({
23800
23800
  const {
23801
23801
  Text: TextMeshImpl,
23802
23802
  preloadFont
23803
- } = suspend(async () => import("./troika-three-text.esm-1b1516c6.js"), []);
23803
+ } = suspend(async () => import("./troika-three-text.esm-c7a0339e.js"), []);
23804
23804
  const invalidate2 = useThree(({
23805
23805
  invalidate: invalidate3
23806
23806
  }) => invalidate3);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bM, bK, bI, bL, bJ, bH, bN } from "./index-b2384476.js";
1
+ import { bM, bK, bI, bL, bJ, bH, bN } from "./index-c7da990c.js";
2
2
  import { useComplexCoordination, useComplexCoordinationSecondary, useCoordination, useCoordinationScopes, useCoordinationScopesBy, useGridItemSize, useMultiCoordinationScopesNonNull, useMultiCoordinationScopesSecondaryNonNull, usePageModeView } from "@vitessce/vit-s";
3
3
  import "react";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-b2384476.js";
1
+ import { aP as BaseDecoder } from "./index-c7da990c.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, aP as BaseDecoder, aQ as LercParameters, aR as LercAddCompression } from "./index-b2384476.js";
2
+ import { g as getDefaultExportFromCjs, aP as BaseDecoder, aQ as LercParameters, aR as LercAddCompression } from "./index-c7da990c.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-b2384476.js";
1
+ import { aP as BaseDecoder } from "./index-c7da990c.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-b2384476.js";
1
+ import { aP as BaseDecoder } from "./index-c7da990c.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-b2384476.js";
1
+ import { aP as BaseDecoder } from "./index-c7da990c.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { aB as UniformsUtils, bB as MeshDepthMaterial, bC as RGBADepthPacking, bD as MeshDistanceMaterial, bE as ShaderChunk, T as Texture, Z as LinearFilter, aw as InstancedBufferGeometry, au as Sphere, at as Box3, aH as BackSide, a4 as DoubleSide, bF as InstancedBufferAttribute, V as Vector2, aD as Vector4, h as Color, aJ as Matrix3, a7 as Mesh, ao as FrontSide, bG as PlaneGeometry, f as BufferGeometry, ax as Float32BufferAttribute, y as MeshBasicMaterial, k as Matrix4, b as Vector3 } from "./index-b2384476.js";
1
+ import { aB as UniformsUtils, bB as MeshDepthMaterial, bC as RGBADepthPacking, bD as MeshDistanceMaterial, bE as ShaderChunk, T as Texture, Z as LinearFilter, aw as InstancedBufferGeometry, au as Sphere, at as Box3, aH as BackSide, a4 as DoubleSide, bF as InstancedBufferAttribute, V as Vector2, aD as Vector4, h as Color, aJ as Matrix3, a7 as Mesh, ao as FrontSide, bG as PlaneGeometry, f as BufferGeometry, ax as Float32BufferAttribute, y as MeshBasicMaterial, k as Matrix4, b as Vector3 } from "./index-c7da990c.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { aP as BaseDecoder } from "./index-b2384476.js";
1
+ import { aP as BaseDecoder } from "./index-c7da990c.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/all",
3
- "version": "3.5.11",
3
+ "version": "3.5.12",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -18,35 +18,35 @@
18
18
  "dependencies": {
19
19
  "@material-ui/core": "~4.12.3",
20
20
  "zod": "^3.21.4",
21
- "@vitessce/constants-internal": "3.5.11",
22
- "@vitessce/abstract": "3.5.11",
23
- "@vitessce/csv": "3.5.11",
24
- "@vitessce/description": "3.5.11",
25
- "@vitessce/feature-list": "3.5.11",
26
- "@vitessce/genomic-profiles": "3.5.11",
27
- "@vitessce/heatmap": "3.5.11",
28
- "@vitessce/glb": "3.5.11",
29
- "@vitessce/json": "3.5.11",
30
- "@vitessce/layer-controller": "3.5.11",
31
- "@vitessce/layer-controller-beta": "3.5.11",
32
- "@vitessce/link-controller": "3.5.11",
33
- "@vitessce/obs-sets-manager": "3.5.11",
34
- "@vitessce/ome-tiff": "3.5.11",
35
- "@vitessce/plugins": "3.5.11",
36
- "@vitessce/scatterplot-embedding": "3.5.11",
37
- "@vitessce/scatterplot-gating": "3.5.11",
38
- "@vitessce/schemas": "3.5.11",
39
- "@vitessce/spatial": "3.5.11",
40
- "@vitessce/spatial-beta": "3.5.11",
41
- "@vitessce/statistical-plots": "3.5.11",
42
- "@vitessce/status": "3.5.11",
43
- "@vitessce/vit-s": "3.5.11",
44
- "@vitessce/zarr": "3.5.11",
45
- "@vitessce/globals": "3.5.11",
46
- "@vitessce/spatial-zarr": "3.5.11",
47
- "@vitessce/spatial-three": "3.5.11",
48
- "@vitessce/biomarker-select": "3.5.11",
49
- "@vitessce/neuroglancer": "3.5.11"
21
+ "@vitessce/constants-internal": "3.5.12",
22
+ "@vitessce/abstract": "3.5.12",
23
+ "@vitessce/csv": "3.5.12",
24
+ "@vitessce/description": "3.5.12",
25
+ "@vitessce/feature-list": "3.5.12",
26
+ "@vitessce/genomic-profiles": "3.5.12",
27
+ "@vitessce/heatmap": "3.5.12",
28
+ "@vitessce/glb": "3.5.12",
29
+ "@vitessce/json": "3.5.12",
30
+ "@vitessce/layer-controller": "3.5.12",
31
+ "@vitessce/layer-controller-beta": "3.5.12",
32
+ "@vitessce/link-controller": "3.5.12",
33
+ "@vitessce/obs-sets-manager": "3.5.12",
34
+ "@vitessce/ome-tiff": "3.5.12",
35
+ "@vitessce/plugins": "3.5.12",
36
+ "@vitessce/scatterplot-embedding": "3.5.12",
37
+ "@vitessce/scatterplot-gating": "3.5.12",
38
+ "@vitessce/schemas": "3.5.12",
39
+ "@vitessce/spatial": "3.5.12",
40
+ "@vitessce/spatial-beta": "3.5.12",
41
+ "@vitessce/statistical-plots": "3.5.12",
42
+ "@vitessce/status": "3.5.12",
43
+ "@vitessce/vit-s": "3.5.12",
44
+ "@vitessce/zarr": "3.5.12",
45
+ "@vitessce/globals": "3.5.12",
46
+ "@vitessce/spatial-zarr": "3.5.12",
47
+ "@vitessce/spatial-three": "3.5.12",
48
+ "@vitessce/biomarker-select": "3.5.12",
49
+ "@vitessce/neuroglancer": "3.5.12"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/react": "^18.0.28",