@vitessce/layer-controller 3.3.1 → 3.3.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.
- package/dist/{deflate-40bcb0d2.js → deflate-84699058.js} +1 -1
- package/dist/{index-1314685c.js → index-4165f7de.js} +248 -166
- package/dist/index.js +1 -1
- package/dist/{jpeg-92d14e62.js → jpeg-25dc7b6a.js} +1 -1
- package/dist/{lerc-730e23a1.js → lerc-232392d2.js} +1 -1
- package/dist/{lzw-4c0c7a73.js → lzw-584b32a2.js} +1 -1
- package/dist/{packbits-dbc1b105.js → packbits-c9c3d153.js} +1 -1
- package/dist/{raw-2b757edd.js → raw-2190043c.js} +1 -1
- package/dist/{webimage-3e2aece7.js → webimage-fca1ce63.js} +1 -1
- package/dist-tsc/LayerControllerSubscriber.d.ts.map +1 -1
- package/dist-tsc/LayerControllerSubscriber.js +4 -4
- package/dist-tsc/VolumeOptions.d.ts.map +1 -1
- package/dist-tsc/VolumeOptions.js +2 -2
- package/package.json +6 -6
- package/src/LayerControllerSubscriber.js +8 -0
- package/src/VolumeOptions.js +0 -2
|
@@ -2178,13 +2178,13 @@ var refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);
|
|
|
2178
2178
|
const refType$1 = refType;
|
|
2179
2179
|
function clamp$3(value) {
|
|
2180
2180
|
var min = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
2181
|
-
var
|
|
2181
|
+
var max2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
2182
2182
|
{
|
|
2183
|
-
if (value < min || value >
|
|
2184
|
-
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(
|
|
2183
|
+
if (value < min || value > max2) {
|
|
2184
|
+
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max2, "]."));
|
|
2185
2185
|
}
|
|
2186
2186
|
}
|
|
2187
|
-
return Math.min(Math.max(min, value),
|
|
2187
|
+
return Math.min(Math.max(min, value), max2);
|
|
2188
2188
|
}
|
|
2189
2189
|
function hexToRgb(color) {
|
|
2190
2190
|
color = color.substr(1);
|
|
@@ -15060,8 +15060,8 @@ const ValueLabel$1 = withStyles2(styles$6, {
|
|
|
15060
15060
|
function asc(a2, b) {
|
|
15061
15061
|
return a2 - b;
|
|
15062
15062
|
}
|
|
15063
|
-
function clamp$2(value, min,
|
|
15064
|
-
return Math.min(Math.max(min, value),
|
|
15063
|
+
function clamp$2(value, min, max2) {
|
|
15064
|
+
return Math.min(Math.max(min, value), max2);
|
|
15065
15065
|
}
|
|
15066
15066
|
function findClosest(values2, currentValue) {
|
|
15067
15067
|
var _values$reduce = values2.reduce(function(acc, value, index2) {
|
|
@@ -15094,11 +15094,11 @@ function trackFinger(event, touchId) {
|
|
|
15094
15094
|
y: event.clientY
|
|
15095
15095
|
};
|
|
15096
15096
|
}
|
|
15097
|
-
function valueToPercent(value, min,
|
|
15098
|
-
return (value - min) * 100 / (
|
|
15097
|
+
function valueToPercent(value, min, max2) {
|
|
15098
|
+
return (value - min) * 100 / (max2 - min);
|
|
15099
15099
|
}
|
|
15100
|
-
function percentToValue(percent2, min,
|
|
15101
|
-
return (
|
|
15100
|
+
function percentToValue(percent2, min, max2) {
|
|
15101
|
+
return (max2 - min) * percent2 + min;
|
|
15102
15102
|
}
|
|
15103
15103
|
function getDecimalPrecision(num) {
|
|
15104
15104
|
if (Math.abs(num) < 1) {
|
|
@@ -15386,7 +15386,7 @@ var styles$5 = function styles25(theme) {
|
|
|
15386
15386
|
};
|
|
15387
15387
|
};
|
|
15388
15388
|
var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
15389
|
-
var ariaLabel = props2["aria-label"], ariaLabelledby = props2["aria-labelledby"], ariaValuetext = props2["aria-valuetext"], classes = props2.classes, className = props2.className, _props$color = props2.color, color = _props$color === void 0 ? "primary" : _props$color, _props$component = props2.component, Component2 = _props$component === void 0 ? "span" : _props$component, defaultValue2 = props2.defaultValue, _props$disabled = props2.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, getAriaLabel = props2.getAriaLabel, getAriaValueText = props2.getAriaValueText, _props$marks = props2.marks, marksProp = _props$marks === void 0 ? false : _props$marks, _props$max = props2.max,
|
|
15389
|
+
var ariaLabel = props2["aria-label"], ariaLabelledby = props2["aria-labelledby"], ariaValuetext = props2["aria-valuetext"], classes = props2.classes, className = props2.className, _props$color = props2.color, color = _props$color === void 0 ? "primary" : _props$color, _props$component = props2.component, Component2 = _props$component === void 0 ? "span" : _props$component, defaultValue2 = props2.defaultValue, _props$disabled = props2.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, getAriaLabel = props2.getAriaLabel, getAriaValueText = props2.getAriaValueText, _props$marks = props2.marks, marksProp = _props$marks === void 0 ? false : _props$marks, _props$max = props2.max, max2 = _props$max === void 0 ? 100 : _props$max, _props$min = props2.min, min = _props$min === void 0 ? 0 : _props$min, name2 = props2.name, onChange = props2.onChange, onChangeCommitted = props2.onChangeCommitted, onMouseDown = props2.onMouseDown, _props$orientation = props2.orientation, orientation = _props$orientation === void 0 ? "horizontal" : _props$orientation, _props$scale = props2.scale, scale2 = _props$scale === void 0 ? Identity : _props$scale, _props$step = props2.step, step = _props$step === void 0 ? 1 : _props$step, _props$ThumbComponent = props2.ThumbComponent, ThumbComponent = _props$ThumbComponent === void 0 ? "span" : _props$ThumbComponent, _props$track = props2.track, track = _props$track === void 0 ? "normal" : _props$track, valueProp = props2.value, _props$ValueLabelComp = props2.ValueLabelComponent, ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel$1 : _props$ValueLabelComp, _props$valueLabelDisp = props2.valueLabelDisplay, valueLabelDisplay = _props$valueLabelDisp === void 0 ? "off" : _props$valueLabelDisp, _props$valueLabelForm = props2.valueLabelFormat, valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm, other = _objectWithoutProperties(props2, ["aria-label", "aria-labelledby", "aria-valuetext", "classes", "className", "color", "component", "defaultValue", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "ThumbComponent", "track", "value", "ValueLabelComponent", "valueLabelDisplay", "valueLabelFormat"]);
|
|
15390
15390
|
var theme = useTheme();
|
|
15391
15391
|
var touchId = React.useRef();
|
|
15392
15392
|
var _React$useState = React.useState(-1), active = _React$useState[0], setActive = _React$useState[1];
|
|
@@ -15399,9 +15399,9 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15399
15399
|
var range2 = Array.isArray(valueDerived);
|
|
15400
15400
|
var values2 = range2 ? valueDerived.slice().sort(asc) : [valueDerived];
|
|
15401
15401
|
values2 = values2.map(function(value) {
|
|
15402
|
-
return clamp$2(value, min,
|
|
15402
|
+
return clamp$2(value, min, max2);
|
|
15403
15403
|
});
|
|
15404
|
-
var marks = marksProp === true && step !== null ? _toConsumableArray$j(Array(Math.floor((
|
|
15404
|
+
var marks = marksProp === true && step !== null ? _toConsumableArray$j(Array(Math.floor((max2 - min) / step) + 1)).map(function(_, index2) {
|
|
15405
15405
|
return {
|
|
15406
15406
|
value: min + step * index2
|
|
15407
15407
|
};
|
|
@@ -15436,7 +15436,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15436
15436
|
var handleKeyDown2 = useEventCallback(function(event) {
|
|
15437
15437
|
var index2 = Number(event.currentTarget.getAttribute("data-index"));
|
|
15438
15438
|
var value = values2[index2];
|
|
15439
|
-
var tenPercents = (
|
|
15439
|
+
var tenPercents = (max2 - min) / 10;
|
|
15440
15440
|
var marksValues = marks.map(function(mark) {
|
|
15441
15441
|
return mark.value;
|
|
15442
15442
|
});
|
|
@@ -15449,7 +15449,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15449
15449
|
newValue = min;
|
|
15450
15450
|
break;
|
|
15451
15451
|
case "End":
|
|
15452
|
-
newValue =
|
|
15452
|
+
newValue = max2;
|
|
15453
15453
|
break;
|
|
15454
15454
|
case "PageUp":
|
|
15455
15455
|
if (step) {
|
|
@@ -15484,7 +15484,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15484
15484
|
if (step) {
|
|
15485
15485
|
newValue = roundValueToStep(newValue, step, min);
|
|
15486
15486
|
}
|
|
15487
|
-
newValue = clamp$2(newValue, min,
|
|
15487
|
+
newValue = clamp$2(newValue, min, max2);
|
|
15488
15488
|
if (range2) {
|
|
15489
15489
|
var previousValue = newValue;
|
|
15490
15490
|
newValue = setValueIndex({
|
|
@@ -15526,7 +15526,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15526
15526
|
percent2 = 1 - percent2;
|
|
15527
15527
|
}
|
|
15528
15528
|
var newValue;
|
|
15529
|
-
newValue = percentToValue(percent2, min,
|
|
15529
|
+
newValue = percentToValue(percent2, min, max2);
|
|
15530
15530
|
if (step) {
|
|
15531
15531
|
newValue = roundValueToStep(newValue, step, min);
|
|
15532
15532
|
} else {
|
|
@@ -15536,7 +15536,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15536
15536
|
var closestIndex = findClosest(marksValues, newValue);
|
|
15537
15537
|
newValue = marksValues[closestIndex];
|
|
15538
15538
|
}
|
|
15539
|
-
newValue = clamp$2(newValue, min,
|
|
15539
|
+
newValue = clamp$2(newValue, min, max2);
|
|
15540
15540
|
var activeIndex = 0;
|
|
15541
15541
|
if (range2) {
|
|
15542
15542
|
if (!move) {
|
|
@@ -15665,8 +15665,8 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15665
15665
|
doc.addEventListener("mousemove", handleTouchMove);
|
|
15666
15666
|
doc.addEventListener("mouseup", handleTouchEnd);
|
|
15667
15667
|
});
|
|
15668
|
-
var trackOffset = valueToPercent(range2 ? values2[0] : min, min,
|
|
15669
|
-
var trackLeap = valueToPercent(values2[values2.length - 1], min,
|
|
15668
|
+
var trackOffset = valueToPercent(range2 ? values2[0] : min, min, max2);
|
|
15669
|
+
var trackLeap = valueToPercent(values2[values2.length - 1], min, max2) - trackOffset;
|
|
15670
15670
|
var trackStyle = _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));
|
|
15671
15671
|
return /* @__PURE__ */ React.createElement(Component2, _extends({
|
|
15672
15672
|
ref: handleRef,
|
|
@@ -15684,7 +15684,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15684
15684
|
name: name2,
|
|
15685
15685
|
type: "hidden"
|
|
15686
15686
|
}), marks.map(function(mark, index2) {
|
|
15687
|
-
var percent2 = valueToPercent(mark.value, min,
|
|
15687
|
+
var percent2 = valueToPercent(mark.value, min, max2);
|
|
15688
15688
|
var style2 = axisProps[axis].offset(percent2);
|
|
15689
15689
|
var markActive;
|
|
15690
15690
|
if (track === false) {
|
|
@@ -15705,7 +15705,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15705
15705
|
className: clsx(classes.markLabel, markActive && classes.markLabelActive)
|
|
15706
15706
|
}, mark.label) : null);
|
|
15707
15707
|
}), values2.map(function(value, index2) {
|
|
15708
|
-
var percent2 = valueToPercent(value, min,
|
|
15708
|
+
var percent2 = valueToPercent(value, min, max2);
|
|
15709
15709
|
var style2 = axisProps[axis].offset(percent2);
|
|
15710
15710
|
return /* @__PURE__ */ React.createElement(ValueLabelComponent, {
|
|
15711
15711
|
key: index2,
|
|
@@ -15725,7 +15725,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
15725
15725
|
"aria-label": getAriaLabel ? getAriaLabel(index2) : ariaLabel,
|
|
15726
15726
|
"aria-labelledby": ariaLabelledby,
|
|
15727
15727
|
"aria-orientation": orientation,
|
|
15728
|
-
"aria-valuemax": scale2(
|
|
15728
|
+
"aria-valuemax": scale2(max2),
|
|
15729
15729
|
"aria-valuemin": scale2(min),
|
|
15730
15730
|
"aria-valuenow": scale2(value),
|
|
15731
15731
|
"aria-valuetext": getAriaValueText ? getAriaValueText(scale2(value), index2) : ariaValuetext,
|
|
@@ -16849,7 +16849,9 @@ const FileType$1 = {
|
|
|
16849
16849
|
OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
|
|
16850
16850
|
OBS_SETS_CSV: "obsSets.csv",
|
|
16851
16851
|
OBS_SETS_JSON: "obsSets.json",
|
|
16852
|
+
// OME-Zarr
|
|
16852
16853
|
IMAGE_OME_ZARR: "image.ome-zarr",
|
|
16854
|
+
OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
|
|
16853
16855
|
// AnnData
|
|
16854
16856
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
|
|
16855
16857
|
OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
|
|
@@ -17333,7 +17335,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
17333
17335
|
CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
|
|
17334
17336
|
CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
|
|
17335
17337
|
CoordinationType$1.IMAGE_CHANNEL,
|
|
17338
|
+
CoordinationType$1.IMAGE_LAYER,
|
|
17336
17339
|
CoordinationType$1.SEGMENTATION_CHANNEL,
|
|
17340
|
+
CoordinationType$1.SEGMENTATION_LAYER,
|
|
17337
17341
|
CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
|
|
17338
17342
|
CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
|
|
17339
17343
|
CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
|
|
@@ -17351,6 +17355,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
17351
17355
|
CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
|
|
17352
17356
|
CoordinationType$1.SPATIAL_LAYER_COLOR,
|
|
17353
17357
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
17358
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
|
17359
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
|
|
17360
|
+
CoordinationType$1.FEATURE_SELECTION,
|
|
17354
17361
|
CoordinationType$1.TOOLTIPS_VISIBLE,
|
|
17355
17362
|
CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
|
|
17356
17363
|
CoordinationType$1.LEGEND_VISIBLE,
|
|
@@ -21887,14 +21894,14 @@ class ZodString extends ZodType {
|
|
|
21887
21894
|
return min;
|
|
21888
21895
|
}
|
|
21889
21896
|
get maxLength() {
|
|
21890
|
-
let
|
|
21897
|
+
let max2 = null;
|
|
21891
21898
|
for (const ch of this._def.checks) {
|
|
21892
21899
|
if (ch.kind === "max") {
|
|
21893
|
-
if (
|
|
21894
|
-
|
|
21900
|
+
if (max2 === null || ch.value < max2)
|
|
21901
|
+
max2 = ch.value;
|
|
21895
21902
|
}
|
|
21896
21903
|
}
|
|
21897
|
-
return
|
|
21904
|
+
return max2;
|
|
21898
21905
|
}
|
|
21899
21906
|
}
|
|
21900
21907
|
ZodString.create = (params) => {
|
|
@@ -22109,20 +22116,20 @@ class ZodNumber extends ZodType {
|
|
|
22109
22116
|
return min;
|
|
22110
22117
|
}
|
|
22111
22118
|
get maxValue() {
|
|
22112
|
-
let
|
|
22119
|
+
let max2 = null;
|
|
22113
22120
|
for (const ch of this._def.checks) {
|
|
22114
22121
|
if (ch.kind === "max") {
|
|
22115
|
-
if (
|
|
22116
|
-
|
|
22122
|
+
if (max2 === null || ch.value < max2)
|
|
22123
|
+
max2 = ch.value;
|
|
22117
22124
|
}
|
|
22118
22125
|
}
|
|
22119
|
-
return
|
|
22126
|
+
return max2;
|
|
22120
22127
|
}
|
|
22121
22128
|
get isInt() {
|
|
22122
22129
|
return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util$4.isInteger(ch.value));
|
|
22123
22130
|
}
|
|
22124
22131
|
get isFinite() {
|
|
22125
|
-
let
|
|
22132
|
+
let max2 = null, min = null;
|
|
22126
22133
|
for (const ch of this._def.checks) {
|
|
22127
22134
|
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
|
22128
22135
|
return true;
|
|
@@ -22130,11 +22137,11 @@ class ZodNumber extends ZodType {
|
|
|
22130
22137
|
if (min === null || ch.value > min)
|
|
22131
22138
|
min = ch.value;
|
|
22132
22139
|
} else if (ch.kind === "max") {
|
|
22133
|
-
if (
|
|
22134
|
-
|
|
22140
|
+
if (max2 === null || ch.value < max2)
|
|
22141
|
+
max2 = ch.value;
|
|
22135
22142
|
}
|
|
22136
22143
|
}
|
|
22137
|
-
return Number.isFinite(min) && Number.isFinite(
|
|
22144
|
+
return Number.isFinite(min) && Number.isFinite(max2);
|
|
22138
22145
|
}
|
|
22139
22146
|
}
|
|
22140
22147
|
ZodNumber.create = (params) => {
|
|
@@ -22292,14 +22299,14 @@ class ZodBigInt extends ZodType {
|
|
|
22292
22299
|
return min;
|
|
22293
22300
|
}
|
|
22294
22301
|
get maxValue() {
|
|
22295
|
-
let
|
|
22302
|
+
let max2 = null;
|
|
22296
22303
|
for (const ch of this._def.checks) {
|
|
22297
22304
|
if (ch.kind === "max") {
|
|
22298
|
-
if (
|
|
22299
|
-
|
|
22305
|
+
if (max2 === null || ch.value < max2)
|
|
22306
|
+
max2 = ch.value;
|
|
22300
22307
|
}
|
|
22301
22308
|
}
|
|
22302
|
-
return
|
|
22309
|
+
return max2;
|
|
22303
22310
|
}
|
|
22304
22311
|
}
|
|
22305
22312
|
ZodBigInt.create = (params) => {
|
|
@@ -22427,14 +22434,14 @@ class ZodDate extends ZodType {
|
|
|
22427
22434
|
return min != null ? new Date(min) : null;
|
|
22428
22435
|
}
|
|
22429
22436
|
get maxDate() {
|
|
22430
|
-
let
|
|
22437
|
+
let max2 = null;
|
|
22431
22438
|
for (const ch of this._def.checks) {
|
|
22432
22439
|
if (ch.kind === "max") {
|
|
22433
|
-
if (
|
|
22434
|
-
|
|
22440
|
+
if (max2 === null || ch.value < max2)
|
|
22441
|
+
max2 = ch.value;
|
|
22435
22442
|
}
|
|
22436
22443
|
}
|
|
22437
|
-
return
|
|
22444
|
+
return max2 != null ? new Date(max2) : null;
|
|
22438
22445
|
}
|
|
22439
22446
|
}
|
|
22440
22447
|
ZodDate.create = (params) => {
|
|
@@ -26793,7 +26800,7 @@ var toComparators_1 = toComparators$1;
|
|
|
26793
26800
|
const SemVer$4 = semver;
|
|
26794
26801
|
const Range$7 = requireRange();
|
|
26795
26802
|
const maxSatisfying$1 = (versions, range2, options) => {
|
|
26796
|
-
let
|
|
26803
|
+
let max2 = null;
|
|
26797
26804
|
let maxSV = null;
|
|
26798
26805
|
let rangeObj = null;
|
|
26799
26806
|
try {
|
|
@@ -26803,13 +26810,13 @@ const maxSatisfying$1 = (versions, range2, options) => {
|
|
|
26803
26810
|
}
|
|
26804
26811
|
versions.forEach((v) => {
|
|
26805
26812
|
if (rangeObj.test(v)) {
|
|
26806
|
-
if (!
|
|
26807
|
-
|
|
26808
|
-
maxSV = new SemVer$4(
|
|
26813
|
+
if (!max2 || maxSV.compare(v) === -1) {
|
|
26814
|
+
max2 = v;
|
|
26815
|
+
maxSV = new SemVer$4(max2, options);
|
|
26809
26816
|
}
|
|
26810
26817
|
}
|
|
26811
26818
|
});
|
|
26812
|
-
return
|
|
26819
|
+
return max2;
|
|
26813
26820
|
};
|
|
26814
26821
|
var maxSatisfying_1 = maxSatisfying$1;
|
|
26815
26822
|
const SemVer$3 = semver;
|
|
@@ -26994,17 +27001,17 @@ var simplify = (versions, range2, options) => {
|
|
|
26994
27001
|
set2.push([first, null]);
|
|
26995
27002
|
}
|
|
26996
27003
|
const ranges2 = [];
|
|
26997
|
-
for (const [min,
|
|
26998
|
-
if (min ===
|
|
27004
|
+
for (const [min, max2] of set2) {
|
|
27005
|
+
if (min === max2) {
|
|
26999
27006
|
ranges2.push(min);
|
|
27000
|
-
} else if (!
|
|
27007
|
+
} else if (!max2 && min === v[0]) {
|
|
27001
27008
|
ranges2.push("*");
|
|
27002
|
-
} else if (!
|
|
27009
|
+
} else if (!max2) {
|
|
27003
27010
|
ranges2.push(`>=${min}`);
|
|
27004
27011
|
} else if (min === v[0]) {
|
|
27005
|
-
ranges2.push(`<=${
|
|
27012
|
+
ranges2.push(`<=${max2}`);
|
|
27006
27013
|
} else {
|
|
27007
|
-
ranges2.push(`${min} - ${
|
|
27014
|
+
ranges2.push(`${min} - ${max2}`);
|
|
27008
27015
|
}
|
|
27009
27016
|
}
|
|
27010
27017
|
const simplified = ranges2.join(" || ");
|
|
@@ -27529,30 +27536,39 @@ const omeCoordinateTransformations = z.array(z.union([
|
|
|
27529
27536
|
scale: z.array(z.number())
|
|
27530
27537
|
})
|
|
27531
27538
|
]));
|
|
27532
|
-
z.object({
|
|
27539
|
+
const imageOmeTiffSchema = z.object({
|
|
27533
27540
|
offsetsUrl: z.string().optional(),
|
|
27534
27541
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
27535
27542
|
});
|
|
27543
|
+
imageOmeTiffSchema.extend({
|
|
27544
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
|
27545
|
+
});
|
|
27536
27546
|
const imageOmeZarrSchema = z.object({
|
|
27537
27547
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
27538
27548
|
});
|
|
27539
27549
|
imageOmeZarrSchema.extend({
|
|
27550
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
|
27551
|
+
});
|
|
27552
|
+
const imageSpatialdataSchema = imageOmeZarrSchema.extend({
|
|
27540
27553
|
path: z.string()
|
|
27541
27554
|
});
|
|
27542
|
-
z.object({
|
|
27555
|
+
const obsSegmentationsSpatialdataSchema = z.object({
|
|
27556
|
+
// TODO: should this also extend the imageOmeZarrSchema?
|
|
27557
|
+
// TODO: should this be renamed labelsSpatialdataSchema?
|
|
27558
|
+
// TODO: support obsTypesFromChannelNames?
|
|
27543
27559
|
path: z.string()
|
|
27544
27560
|
});
|
|
27545
27561
|
z.object({
|
|
27546
27562
|
path: z.string()
|
|
27547
27563
|
});
|
|
27548
|
-
z.object({
|
|
27564
|
+
const obsSpotsSpatialdataSchema = z.object({
|
|
27549
27565
|
path: z.string(),
|
|
27550
27566
|
tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
|
|
27551
27567
|
});
|
|
27552
|
-
annDataObsFeatureMatrix.extend({
|
|
27568
|
+
const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
|
|
27553
27569
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
|
27554
27570
|
});
|
|
27555
|
-
z.object({
|
|
27571
|
+
const obsSetsSpatialdataSchema = z.object({
|
|
27556
27572
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
27557
27573
|
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
27558
27574
|
obsSets: annDataObsSets
|
|
@@ -27615,6 +27631,19 @@ z.object({
|
|
|
27615
27631
|
z.array(annDataConvenienceObsEmbeddingItem)
|
|
27616
27632
|
])
|
|
27617
27633
|
}).partial();
|
|
27634
|
+
z.object({
|
|
27635
|
+
// TODO: should `image` be a special schema
|
|
27636
|
+
// to allow specifying fileUid (like for embeddingType)?
|
|
27637
|
+
image: imageSpatialdataSchema,
|
|
27638
|
+
// TODO: should this be a special schema
|
|
27639
|
+
// to allow specifying fileUid (like for embeddingType)?
|
|
27640
|
+
labels: obsSegmentationsSpatialdataSchema,
|
|
27641
|
+
obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
|
|
27642
|
+
obsSpots: obsSpotsSpatialdataSchema,
|
|
27643
|
+
// TODO: obsPoints
|
|
27644
|
+
// TODO: obsLocations
|
|
27645
|
+
obsSets: obsSetsSpatialdataSchema
|
|
27646
|
+
}).partial();
|
|
27618
27647
|
z.object({
|
|
27619
27648
|
obsLabelsTypes: z.array(z.string()).optional(),
|
|
27620
27649
|
embeddingTypes: z.array(z.string()).optional()
|
|
@@ -27983,14 +28012,14 @@ var tinycolor = { exports: {} };
|
|
|
27983
28012
|
r2 = bound01(r2, 255);
|
|
27984
28013
|
g2 = bound01(g2, 255);
|
|
27985
28014
|
b = bound01(b, 255);
|
|
27986
|
-
var
|
|
27987
|
-
var h, s2, l2 = (
|
|
27988
|
-
if (
|
|
28015
|
+
var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
|
|
28016
|
+
var h, s2, l2 = (max2 + min) / 2;
|
|
28017
|
+
if (max2 == min) {
|
|
27989
28018
|
h = s2 = 0;
|
|
27990
28019
|
} else {
|
|
27991
|
-
var d =
|
|
27992
|
-
s2 = l2 > 0.5 ? d / (2 -
|
|
27993
|
-
switch (
|
|
28020
|
+
var d = max2 - min;
|
|
28021
|
+
s2 = l2 > 0.5 ? d / (2 - max2 - min) : d / (max2 + min);
|
|
28022
|
+
switch (max2) {
|
|
27994
28023
|
case r2:
|
|
27995
28024
|
h = (g2 - b) / d + (g2 < b ? 6 : 0);
|
|
27996
28025
|
break;
|
|
@@ -28038,14 +28067,14 @@ var tinycolor = { exports: {} };
|
|
|
28038
28067
|
r2 = bound01(r2, 255);
|
|
28039
28068
|
g2 = bound01(g2, 255);
|
|
28040
28069
|
b = bound01(b, 255);
|
|
28041
|
-
var
|
|
28042
|
-
var h, s2, v =
|
|
28043
|
-
var d =
|
|
28044
|
-
s2 =
|
|
28045
|
-
if (
|
|
28070
|
+
var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
|
|
28071
|
+
var h, s2, v = max2;
|
|
28072
|
+
var d = max2 - min;
|
|
28073
|
+
s2 = max2 === 0 ? 0 : d / max2;
|
|
28074
|
+
if (max2 == min) {
|
|
28046
28075
|
h = 0;
|
|
28047
28076
|
} else {
|
|
28048
|
-
switch (
|
|
28077
|
+
switch (max2) {
|
|
28049
28078
|
case r2:
|
|
28050
28079
|
h = (g2 - b) / d + (g2 < b ? 6 : 0);
|
|
28051
28080
|
break;
|
|
@@ -28442,19 +28471,19 @@ var tinycolor = { exports: {} };
|
|
|
28442
28471
|
}
|
|
28443
28472
|
return a2;
|
|
28444
28473
|
}
|
|
28445
|
-
function bound01(n2,
|
|
28474
|
+
function bound01(n2, max2) {
|
|
28446
28475
|
if (isOnePointZero(n2)) {
|
|
28447
28476
|
n2 = "100%";
|
|
28448
28477
|
}
|
|
28449
28478
|
var processPercent = isPercentage(n2);
|
|
28450
|
-
n2 = mathMin(
|
|
28479
|
+
n2 = mathMin(max2, mathMax(0, parseFloat(n2)));
|
|
28451
28480
|
if (processPercent) {
|
|
28452
|
-
n2 = parseInt(n2 *
|
|
28481
|
+
n2 = parseInt(n2 * max2, 10) / 100;
|
|
28453
28482
|
}
|
|
28454
|
-
if (Math2.abs(n2 -
|
|
28483
|
+
if (Math2.abs(n2 - max2) < 1e-6) {
|
|
28455
28484
|
return 1;
|
|
28456
28485
|
}
|
|
28457
|
-
return n2 %
|
|
28486
|
+
return n2 % max2 / parseFloat(max2);
|
|
28458
28487
|
}
|
|
28459
28488
|
function clamp01(val) {
|
|
28460
28489
|
return mathMin(1, mathMax(0, val));
|
|
@@ -29513,10 +29542,10 @@ var json2csv_umd = { exports: {} };
|
|
|
29513
29542
|
};
|
|
29514
29543
|
Buffer3.prototype.inspect = function inspect2() {
|
|
29515
29544
|
var str = "";
|
|
29516
|
-
var
|
|
29545
|
+
var max2 = INSPECT_MAX_BYTES;
|
|
29517
29546
|
if (this.length > 0) {
|
|
29518
|
-
str = this.toString("hex", 0,
|
|
29519
|
-
if (this.length >
|
|
29547
|
+
str = this.toString("hex", 0, max2).match(/.{2}/g).join(" ");
|
|
29548
|
+
if (this.length > max2)
|
|
29520
29549
|
str += " ... ";
|
|
29521
29550
|
}
|
|
29522
29551
|
return "<Buffer " + str + ">";
|
|
@@ -30082,10 +30111,10 @@ var json2csv_umd = { exports: {} };
|
|
|
30082
30111
|
checkOffset(offset4, 8, this.length);
|
|
30083
30112
|
return read(this, offset4, false, 52, 8);
|
|
30084
30113
|
};
|
|
30085
|
-
function checkInt(buf, value, offset4, ext,
|
|
30114
|
+
function checkInt(buf, value, offset4, ext, max2, min) {
|
|
30086
30115
|
if (!internalIsBuffer(buf))
|
|
30087
30116
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
30088
|
-
if (value >
|
|
30117
|
+
if (value > max2 || value < min)
|
|
30089
30118
|
throw new RangeError('"value" argument is out of bounds');
|
|
30090
30119
|
if (offset4 + ext > buf.length)
|
|
30091
30120
|
throw new RangeError("Index out of range");
|
|
@@ -30310,7 +30339,7 @@ var json2csv_umd = { exports: {} };
|
|
|
30310
30339
|
}
|
|
30311
30340
|
return offset4 + 4;
|
|
30312
30341
|
};
|
|
30313
|
-
function checkIEEE754(buf, value, offset4, ext,
|
|
30342
|
+
function checkIEEE754(buf, value, offset4, ext, max2, min) {
|
|
30314
30343
|
if (offset4 + ext > buf.length)
|
|
30315
30344
|
throw new RangeError("Index out of range");
|
|
30316
30345
|
if (offset4 < 0)
|
|
@@ -34218,8 +34247,8 @@ function acos$1(radians2, result) {
|
|
|
34218
34247
|
function atan$1(radians2, result) {
|
|
34219
34248
|
return map(radians2, (angle2) => Math.atan(angle2), result);
|
|
34220
34249
|
}
|
|
34221
|
-
function clamp$1(value, min,
|
|
34222
|
-
return map(value, (value2) => Math.max(min, Math.min(
|
|
34250
|
+
function clamp$1(value, min, max2) {
|
|
34251
|
+
return map(value, (value2) => Math.max(min, Math.min(max2, value2)));
|
|
34223
34252
|
}
|
|
34224
34253
|
function lerp$5(a2, b, t2) {
|
|
34225
34254
|
if (isArray$2(a2)) {
|
|
@@ -34506,9 +34535,9 @@ class MathArray extends _extendableBuiltin(Array) {
|
|
|
34506
34535
|
divideScalar(a2) {
|
|
34507
34536
|
return this.multiplyByScalar(1 / a2);
|
|
34508
34537
|
}
|
|
34509
|
-
clampScalar(min,
|
|
34538
|
+
clampScalar(min, max2) {
|
|
34510
34539
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
34511
|
-
this[i2] = Math.min(Math.max(this[i2], min),
|
|
34540
|
+
this[i2] = Math.min(Math.max(this[i2], min), max2);
|
|
34512
34541
|
}
|
|
34513
34542
|
return this.check();
|
|
34514
34543
|
}
|
|
@@ -51312,8 +51341,8 @@ function mod$1(value, divisor) {
|
|
|
51312
51341
|
function lerp(start, end, step) {
|
|
51313
51342
|
return step * end + (1 - step) * start;
|
|
51314
51343
|
}
|
|
51315
|
-
function clamp(x2, min,
|
|
51316
|
-
return x2 < min ? min : x2 >
|
|
51344
|
+
function clamp(x2, min, max2) {
|
|
51345
|
+
return x2 < min ? min : x2 > max2 ? max2 : x2;
|
|
51317
51346
|
}
|
|
51318
51347
|
function ieLog2(x2) {
|
|
51319
51348
|
return Math.log(x2) * Math.LOG2E;
|
|
@@ -61034,17 +61063,17 @@ class DataColumn {
|
|
|
61034
61063
|
const len2 = numInstances * size;
|
|
61035
61064
|
if (value && len2 && value.length >= len2) {
|
|
61036
61065
|
const min = new Array(size).fill(Infinity);
|
|
61037
|
-
const
|
|
61066
|
+
const max2 = new Array(size).fill(-Infinity);
|
|
61038
61067
|
for (let i2 = 0; i2 < len2; ) {
|
|
61039
61068
|
for (let j = 0; j < size; j++) {
|
|
61040
61069
|
const v = value[i2++];
|
|
61041
61070
|
if (v < min[j])
|
|
61042
61071
|
min[j] = v;
|
|
61043
|
-
if (v >
|
|
61044
|
-
|
|
61072
|
+
if (v > max2[j])
|
|
61073
|
+
max2[j] = v;
|
|
61045
61074
|
}
|
|
61046
61075
|
}
|
|
61047
|
-
result = [min,
|
|
61076
|
+
result = [min, max2];
|
|
61048
61077
|
}
|
|
61049
61078
|
}
|
|
61050
61079
|
this.state.bounds = result;
|
|
@@ -87125,10 +87154,10 @@ class GroupNode extends ScenegraphNode {
|
|
|
87125
87154
|
if (!bounds2) {
|
|
87126
87155
|
return;
|
|
87127
87156
|
}
|
|
87128
|
-
const [min,
|
|
87129
|
-
const center2 = new Vector3(min).add(
|
|
87157
|
+
const [min, max2] = bounds2;
|
|
87158
|
+
const center2 = new Vector3(min).add(max2).divide([2, 2, 2]);
|
|
87130
87159
|
worldMatrix.transformAsPoint(center2, center2);
|
|
87131
|
-
const halfSize = new Vector3(
|
|
87160
|
+
const halfSize = new Vector3(max2).subtract(min).divide([2, 2, 2]);
|
|
87132
87161
|
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
87133
87162
|
for (let v = 0; v < 8; v++) {
|
|
87134
87163
|
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
@@ -96077,7 +96106,7 @@ class Tile {
|
|
|
96077
96106
|
const { errors } = this;
|
|
96078
96107
|
let numVertices = 0;
|
|
96079
96108
|
let numTriangles = 0;
|
|
96080
|
-
const
|
|
96109
|
+
const max2 = size - 1;
|
|
96081
96110
|
indices.fill(0);
|
|
96082
96111
|
function countElements(ax, ay, bx, by, cx, cy) {
|
|
96083
96112
|
const mx = ax + bx >> 1;
|
|
@@ -96092,8 +96121,8 @@ class Tile {
|
|
|
96092
96121
|
numTriangles++;
|
|
96093
96122
|
}
|
|
96094
96123
|
}
|
|
96095
|
-
countElements(0, 0,
|
|
96096
|
-
countElements(
|
|
96124
|
+
countElements(0, 0, max2, max2, max2, 0);
|
|
96125
|
+
countElements(max2, max2, 0, 0, 0, max2);
|
|
96097
96126
|
const vertices = new Uint16Array(numVertices * 2);
|
|
96098
96127
|
const triangles = new Uint32Array(numTriangles * 3);
|
|
96099
96128
|
let triIndex = 0;
|
|
@@ -96118,8 +96147,8 @@ class Tile {
|
|
|
96118
96147
|
triangles[triIndex++] = c;
|
|
96119
96148
|
}
|
|
96120
96149
|
}
|
|
96121
|
-
processTriangle(0, 0,
|
|
96122
|
-
processTriangle(
|
|
96150
|
+
processTriangle(0, 0, max2, max2, max2, 0);
|
|
96151
|
+
processTriangle(max2, max2, 0, 0, 0, max2);
|
|
96123
96152
|
return { vertices, triangles };
|
|
96124
96153
|
}
|
|
96125
96154
|
}
|
|
@@ -135677,16 +135706,16 @@ function addDecoder(cases, importFn) {
|
|
|
135677
135706
|
}
|
|
135678
135707
|
cases.forEach((c) => registry$1.set(c, importFn));
|
|
135679
135708
|
}
|
|
135680
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
135681
|
-
addDecoder(5, () => import("./lzw-
|
|
135709
|
+
addDecoder([void 0, 1], () => import("./raw-2190043c.js").then((m) => m.default));
|
|
135710
|
+
addDecoder(5, () => import("./lzw-584b32a2.js").then((m) => m.default));
|
|
135682
135711
|
addDecoder(6, () => {
|
|
135683
135712
|
throw new Error("old style JPEG compression is not supported.");
|
|
135684
135713
|
});
|
|
135685
|
-
addDecoder(7, () => import("./jpeg-
|
|
135686
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
135687
|
-
addDecoder(32773, () => import("./packbits-
|
|
135688
|
-
addDecoder(34887, () => import("./lerc-
|
|
135689
|
-
addDecoder(50001, () => import("./webimage-
|
|
135714
|
+
addDecoder(7, () => import("./jpeg-25dc7b6a.js").then((m) => m.default));
|
|
135715
|
+
addDecoder([8, 32946], () => import("./deflate-84699058.js").then((m) => m.default));
|
|
135716
|
+
addDecoder(32773, () => import("./packbits-c9c3d153.js").then((m) => m.default));
|
|
135717
|
+
addDecoder(34887, () => import("./lerc-232392d2.js").then((m) => m.default));
|
|
135718
|
+
addDecoder(50001, () => import("./webimage-fca1ce63.js").then((m) => m.default));
|
|
135690
135719
|
function decodeRowAcc(row, stride) {
|
|
135691
135720
|
let length2 = row.length - stride;
|
|
135692
135721
|
let offset4 = 0;
|
|
@@ -139285,9 +139314,9 @@ const buf2binstring = (buf, len2) => {
|
|
|
139285
139314
|
}
|
|
139286
139315
|
return result;
|
|
139287
139316
|
};
|
|
139288
|
-
var buf2string = (buf,
|
|
139317
|
+
var buf2string = (buf, max2) => {
|
|
139289
139318
|
let i2, out;
|
|
139290
|
-
const len2 =
|
|
139319
|
+
const len2 = max2 || buf.length;
|
|
139291
139320
|
const utf16buf = new Array(len2 * 2);
|
|
139292
139321
|
for (out = 0, i2 = 0; i2 < len2; ) {
|
|
139293
139322
|
let c = buf[i2++];
|
|
@@ -139320,22 +139349,22 @@ var buf2string = (buf, max) => {
|
|
|
139320
139349
|
}
|
|
139321
139350
|
return buf2binstring(utf16buf, out);
|
|
139322
139351
|
};
|
|
139323
|
-
var utf8border = (buf,
|
|
139324
|
-
|
|
139325
|
-
if (
|
|
139326
|
-
|
|
139352
|
+
var utf8border = (buf, max2) => {
|
|
139353
|
+
max2 = max2 || buf.length;
|
|
139354
|
+
if (max2 > buf.length) {
|
|
139355
|
+
max2 = buf.length;
|
|
139327
139356
|
}
|
|
139328
|
-
let pos =
|
|
139357
|
+
let pos = max2 - 1;
|
|
139329
139358
|
while (pos >= 0 && (buf[pos] & 192) === 128) {
|
|
139330
139359
|
pos--;
|
|
139331
139360
|
}
|
|
139332
139361
|
if (pos < 0) {
|
|
139333
|
-
return
|
|
139362
|
+
return max2;
|
|
139334
139363
|
}
|
|
139335
139364
|
if (pos === 0) {
|
|
139336
|
-
return
|
|
139365
|
+
return max2;
|
|
139337
139366
|
}
|
|
139338
|
-
return pos + _utf8len[buf[pos]] >
|
|
139367
|
+
return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
|
|
139339
139368
|
};
|
|
139340
139369
|
var strings = {
|
|
139341
139370
|
string2buf,
|
|
@@ -139885,7 +139914,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
139885
139914
|
const bits = opts2.bits;
|
|
139886
139915
|
let len2 = 0;
|
|
139887
139916
|
let sym = 0;
|
|
139888
|
-
let min = 0,
|
|
139917
|
+
let min = 0, max2 = 0;
|
|
139889
139918
|
let root2 = 0;
|
|
139890
139919
|
let curr = 0;
|
|
139891
139920
|
let drop = 0;
|
|
@@ -139912,21 +139941,21 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
139912
139941
|
count2[lens2[lens_index + sym]]++;
|
|
139913
139942
|
}
|
|
139914
139943
|
root2 = bits;
|
|
139915
|
-
for (
|
|
139916
|
-
if (count2[
|
|
139944
|
+
for (max2 = MAXBITS; max2 >= 1; max2--) {
|
|
139945
|
+
if (count2[max2] !== 0) {
|
|
139917
139946
|
break;
|
|
139918
139947
|
}
|
|
139919
139948
|
}
|
|
139920
|
-
if (root2 >
|
|
139921
|
-
root2 =
|
|
139949
|
+
if (root2 > max2) {
|
|
139950
|
+
root2 = max2;
|
|
139922
139951
|
}
|
|
139923
|
-
if (
|
|
139952
|
+
if (max2 === 0) {
|
|
139924
139953
|
table[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
139925
139954
|
table[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
139926
139955
|
opts2.bits = 1;
|
|
139927
139956
|
return 0;
|
|
139928
139957
|
}
|
|
139929
|
-
for (min = 1; min <
|
|
139958
|
+
for (min = 1; min < max2; min++) {
|
|
139930
139959
|
if (count2[min] !== 0) {
|
|
139931
139960
|
break;
|
|
139932
139961
|
}
|
|
@@ -139942,7 +139971,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
139942
139971
|
return -1;
|
|
139943
139972
|
}
|
|
139944
139973
|
}
|
|
139945
|
-
if (left > 0 && (type === CODES ||
|
|
139974
|
+
if (left > 0 && (type === CODES || max2 !== 1)) {
|
|
139946
139975
|
return -1;
|
|
139947
139976
|
}
|
|
139948
139977
|
offs[1] = 0;
|
|
@@ -140011,7 +140040,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
140011
140040
|
}
|
|
140012
140041
|
sym++;
|
|
140013
140042
|
if (--count2[len2] === 0) {
|
|
140014
|
-
if (len2 ===
|
|
140043
|
+
if (len2 === max2) {
|
|
140015
140044
|
break;
|
|
140016
140045
|
}
|
|
140017
140046
|
len2 = lens2[lens_index + work[sym]];
|
|
@@ -140023,7 +140052,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
140023
140052
|
next += min;
|
|
140024
140053
|
curr = len2 - drop;
|
|
140025
140054
|
left = 1 << curr;
|
|
140026
|
-
while (curr + drop <
|
|
140055
|
+
while (curr + drop < max2) {
|
|
140027
140056
|
left -= count2[curr + drop];
|
|
140028
140057
|
if (left <= 0) {
|
|
140029
140058
|
break;
|
|
@@ -142519,14 +142548,14 @@ class LZWDecoder extends BaseDecoder {
|
|
|
142519
142548
|
function getChannelStats(arr) {
|
|
142520
142549
|
let len2 = arr.length;
|
|
142521
142550
|
let min = Infinity;
|
|
142522
|
-
let
|
|
142551
|
+
let max2 = -Infinity;
|
|
142523
142552
|
let total = 0;
|
|
142524
142553
|
while (len2--) {
|
|
142525
142554
|
if (arr[len2] < min) {
|
|
142526
142555
|
min = arr[len2];
|
|
142527
142556
|
}
|
|
142528
|
-
if (arr[len2] >
|
|
142529
|
-
|
|
142557
|
+
if (arr[len2] > max2) {
|
|
142558
|
+
max2 = arr[len2];
|
|
142530
142559
|
}
|
|
142531
142560
|
total += arr[len2];
|
|
142532
142561
|
}
|
|
@@ -142564,7 +142593,7 @@ function getChannelStats(arr) {
|
|
|
142564
142593
|
q1,
|
|
142565
142594
|
q3,
|
|
142566
142595
|
median,
|
|
142567
|
-
domain: [min,
|
|
142596
|
+
domain: [min, max2],
|
|
142568
142597
|
contrastLimits
|
|
142569
142598
|
};
|
|
142570
142599
|
}
|
|
@@ -146841,18 +146870,18 @@ void main() {
|
|
|
146841
146870
|
`;
|
|
146842
146871
|
function extent(values2, valueof) {
|
|
146843
146872
|
let min;
|
|
146844
|
-
let
|
|
146873
|
+
let max2;
|
|
146845
146874
|
if (valueof === void 0) {
|
|
146846
146875
|
for (const value of values2) {
|
|
146847
146876
|
if (value != null) {
|
|
146848
146877
|
if (min === void 0) {
|
|
146849
146878
|
if (value >= value)
|
|
146850
|
-
min =
|
|
146879
|
+
min = max2 = value;
|
|
146851
146880
|
} else {
|
|
146852
146881
|
if (min > value)
|
|
146853
146882
|
min = value;
|
|
146854
|
-
if (
|
|
146855
|
-
|
|
146883
|
+
if (max2 < value)
|
|
146884
|
+
max2 = value;
|
|
146856
146885
|
}
|
|
146857
146886
|
}
|
|
146858
146887
|
}
|
|
@@ -146862,34 +146891,52 @@ function extent(values2, valueof) {
|
|
|
146862
146891
|
if ((value = valueof(value, ++index2, values2)) != null) {
|
|
146863
146892
|
if (min === void 0) {
|
|
146864
146893
|
if (value >= value)
|
|
146865
|
-
min =
|
|
146894
|
+
min = max2 = value;
|
|
146866
146895
|
} else {
|
|
146867
146896
|
if (min > value)
|
|
146868
146897
|
min = value;
|
|
146869
|
-
if (
|
|
146870
|
-
|
|
146898
|
+
if (max2 < value)
|
|
146899
|
+
max2 = value;
|
|
146871
146900
|
}
|
|
146872
146901
|
}
|
|
146873
146902
|
}
|
|
146874
146903
|
}
|
|
146875
|
-
return [min,
|
|
146904
|
+
return [min, max2];
|
|
146905
|
+
}
|
|
146906
|
+
function max(values2, valueof) {
|
|
146907
|
+
let max2;
|
|
146908
|
+
if (valueof === void 0) {
|
|
146909
|
+
for (const value of values2) {
|
|
146910
|
+
if (value != null && (max2 < value || max2 === void 0 && value >= value)) {
|
|
146911
|
+
max2 = value;
|
|
146912
|
+
}
|
|
146913
|
+
}
|
|
146914
|
+
} else {
|
|
146915
|
+
let index2 = -1;
|
|
146916
|
+
for (let value of values2) {
|
|
146917
|
+
if ((value = valueof(value, ++index2, values2)) != null && (max2 < value || max2 === void 0 && value >= value)) {
|
|
146918
|
+
max2 = value;
|
|
146919
|
+
}
|
|
146920
|
+
}
|
|
146921
|
+
}
|
|
146922
|
+
return max2;
|
|
146876
146923
|
}
|
|
146877
146924
|
function normalize(arr) {
|
|
146878
|
-
const [min,
|
|
146879
|
-
const ratio = 255 / (
|
|
146925
|
+
const [min, max2] = extent(arr);
|
|
146926
|
+
const ratio = 255 / (max2 - min);
|
|
146880
146927
|
const data = new Uint8Array(arr.map((i2) => Math.floor((i2 - min) * ratio)));
|
|
146881
146928
|
return data;
|
|
146882
146929
|
}
|
|
146883
|
-
function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, texSize) {
|
|
146930
|
+
function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, texSize) {
|
|
146884
146931
|
let totalValuesLength = 0;
|
|
146885
146932
|
let totalColorsLength = 0;
|
|
146886
146933
|
channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
|
|
146887
|
-
var _a2, _b, _c, _d
|
|
146934
|
+
var _a2, _b, _c, _d;
|
|
146888
146935
|
if (isSetColorMode) {
|
|
146889
|
-
|
|
146890
|
-
|
|
146936
|
+
totalColorsLength += (((_b = (_a2 = setColorValues[channelIndex]) == null ? void 0 : _a2.setColors) == null ? void 0 : _b.length) || 0) * 3;
|
|
146937
|
+
totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
|
|
146891
146938
|
} else {
|
|
146892
|
-
totalValuesLength += ((
|
|
146939
|
+
totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
|
|
146893
146940
|
}
|
|
146894
146941
|
});
|
|
146895
146942
|
const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
|
|
@@ -146907,12 +146954,20 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
|
|
|
146907
146954
|
let indexOffset = 0;
|
|
146908
146955
|
let colorOffset = 0;
|
|
146909
146956
|
channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
|
|
146957
|
+
const matrixObsIndex = multiMatrixObsIndex[channelIndex];
|
|
146958
|
+
const bitmaskValueIsIndex = matrixObsIndex === null;
|
|
146910
146959
|
if (isSetColorMode) {
|
|
146911
146960
|
const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
|
|
146912
146961
|
if (setColorIndices && setColors && obsIndex) {
|
|
146913
146962
|
for (let i2 = 0; i2 < obsIndex.length; i2++) {
|
|
146914
|
-
|
|
146915
|
-
|
|
146963
|
+
let obsId = String(i2 + 1);
|
|
146964
|
+
let obsI = i2;
|
|
146965
|
+
if (!bitmaskValueIsIndex) {
|
|
146966
|
+
obsId = obsIndex[i2];
|
|
146967
|
+
obsI = parseInt(obsId) - 1;
|
|
146968
|
+
}
|
|
146969
|
+
const colorIndex = setColorIndices.get(obsId);
|
|
146970
|
+
totalData[indexOffset + obsI] = colorIndex === void 0 ? 0 : colorIndex + 1;
|
|
146916
146971
|
}
|
|
146917
146972
|
for (let i2 = 0; i2 < setColors.length; i2++) {
|
|
146918
146973
|
const { color: [r2, g2, b] } = setColors[i2];
|
|
@@ -146927,7 +146982,16 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
|
|
|
146927
146982
|
colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
|
|
146928
146983
|
} else {
|
|
146929
146984
|
const featureArr = multiFeatureValues[channelIndex];
|
|
146930
|
-
|
|
146985
|
+
const normalizedFeatureArr = normalize(featureArr);
|
|
146986
|
+
if (!bitmaskValueIsIndex && matrixObsIndex) {
|
|
146987
|
+
for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
|
|
146988
|
+
const obsId = matrixObsIndex[i2];
|
|
146989
|
+
const obsI = parseInt(obsId) - 1;
|
|
146990
|
+
totalData[indexOffset + obsI] = normalizedFeatureArr[i2];
|
|
146991
|
+
}
|
|
146992
|
+
} else {
|
|
146993
|
+
totalData.set(normalizedFeatureArr, indexOffset);
|
|
146994
|
+
}
|
|
146931
146995
|
indicesOffsets.push(indexOffset);
|
|
146932
146996
|
indexOffset += featureArr.length;
|
|
146933
146997
|
colorsOffsets.push(colorOffset);
|
|
@@ -146954,6 +147018,17 @@ function padWithDefault(arr, defaultValue2, padWidth) {
|
|
|
146954
147018
|
function getColor(arr) {
|
|
146955
147019
|
return arr ? arr.map((v) => v / 255) : [0, 0, 0];
|
|
146956
147020
|
}
|
|
147021
|
+
function isEqualShallow(prevArr, nextArr) {
|
|
147022
|
+
if (prevArr === nextArr) {
|
|
147023
|
+
return true;
|
|
147024
|
+
}
|
|
147025
|
+
if (Array.isArray(prevArr) && Array.isArray(nextArr)) {
|
|
147026
|
+
if (prevArr.length === nextArr.length) {
|
|
147027
|
+
return !prevArr.some((v, i2) => v !== nextArr[i2] && (!Array.isArray(v) && !Array.isArray(nextArr[i2]) || (v.length > 0 || nextArr[i2].length > 0)));
|
|
147028
|
+
}
|
|
147029
|
+
}
|
|
147030
|
+
return prevArr === nextArr;
|
|
147031
|
+
}
|
|
146957
147032
|
const defaultProps = {
|
|
146958
147033
|
channelStrokeWidths: { type: "array", value: null, compare: true },
|
|
146959
147034
|
channelsFilled: { type: "array", value: null, compare: true },
|
|
@@ -146963,6 +147038,7 @@ const defaultProps = {
|
|
|
146963
147038
|
colormap: { type: "string", value: GLSL_COLORMAP_DEFAULT, compare: true },
|
|
146964
147039
|
expressionData: { type: "object", value: null, compare: true },
|
|
146965
147040
|
multiFeatureValues: { type: "array", value: null, compare: true },
|
|
147041
|
+
multiMatrixObsIndex: { type: "array", value: null, compare: true },
|
|
146966
147042
|
setColorValues: { type: "array", value: null, compare: true },
|
|
146967
147043
|
channelFeatureValueColormaps: { type: "array", value: null, compare: true },
|
|
146968
147044
|
channelFeatureValueColormapRanges: { type: "array", value: null, compare: true },
|
|
@@ -147009,9 +147085,9 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
147009
147085
|
}
|
|
147010
147086
|
updateState({ props: props2, oldProps, changeFlags }) {
|
|
147011
147087
|
super.updateState({ props: props2, oldProps, changeFlags });
|
|
147012
|
-
if (props2.multiFeatureValues
|
|
147013
|
-
const { multiFeatureValues, setColorValues, channelIsSetColorMode } = this.props;
|
|
147014
|
-
const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode);
|
|
147088
|
+
if (!isEqualShallow(props2.multiFeatureValues, oldProps.multiFeatureValues) || !isEqualShallow(props2.multiMatrixObsIndex, oldProps.multiMatrixObsIndex) || !isEqualShallow(props2.setColorValues, oldProps.setColorValues) || !isEqualShallow(props2.channelIsSetColorMode, oldProps.channelIsSetColorMode)) {
|
|
147089
|
+
const { multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode } = this.props;
|
|
147090
|
+
const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode);
|
|
147015
147091
|
this.setState({
|
|
147016
147092
|
valueTex,
|
|
147017
147093
|
colorTex,
|
|
@@ -147163,9 +147239,9 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
147163
147239
|
type: GL$1.FLOAT
|
|
147164
147240
|
});
|
|
147165
147241
|
}
|
|
147166
|
-
multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode) {
|
|
147242
|
+
multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode) {
|
|
147167
147243
|
const isWebGL2On = isWebGL2$1(this.context.gl);
|
|
147168
|
-
const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
|
|
147244
|
+
const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
|
|
147169
147245
|
return [
|
|
147170
147246
|
// Color indices texture
|
|
147171
147247
|
new Texture2D(this.context.gl, {
|
|
@@ -147419,9 +147495,9 @@ function getDomains() {
|
|
|
147419
147495
|
const domains = {};
|
|
147420
147496
|
const needMin = ["Int8", "Int16", "Int32"];
|
|
147421
147497
|
Object.keys(DTYPE_VALUES).forEach((dtype) => {
|
|
147422
|
-
const { max } = DTYPE_VALUES[dtype];
|
|
147423
|
-
const min = needMin.includes(dtype) ? -(
|
|
147424
|
-
domains[dtype] = [min,
|
|
147498
|
+
const { max: max2 } = DTYPE_VALUES[dtype];
|
|
147499
|
+
const min = needMin.includes(dtype) ? -(max2 + 1) : 0;
|
|
147500
|
+
domains[dtype] = [min, max2];
|
|
147425
147501
|
});
|
|
147426
147502
|
return domains;
|
|
147427
147503
|
}
|
|
@@ -147674,20 +147750,20 @@ function ChannelSlider({
|
|
|
147674
147750
|
dtype,
|
|
147675
147751
|
disabled
|
|
147676
147752
|
}) {
|
|
147677
|
-
const [min,
|
|
147753
|
+
const [min, max2] = domain;
|
|
147678
147754
|
const sliderCopy = slider.slice();
|
|
147679
147755
|
if (slider[0] < min) {
|
|
147680
147756
|
sliderCopy[0] = min;
|
|
147681
147757
|
}
|
|
147682
|
-
if (slider[1] >
|
|
147683
|
-
sliderCopy[1] =
|
|
147758
|
+
if (slider[1] > max2) {
|
|
147759
|
+
sliderCopy[1] = max2;
|
|
147684
147760
|
}
|
|
147685
147761
|
const handleChangeDebounced = useCallback(
|
|
147686
147762
|
debounce$1(handleChange, 3, { trailing: true }),
|
|
147687
147763
|
[handleChange]
|
|
147688
147764
|
);
|
|
147689
147765
|
const classes = useChannelSliderStyles();
|
|
147690
|
-
const step =
|
|
147766
|
+
const step = max2 - min < 500 && dtype.startsWith("Float") ? (max2 - min) / 500 : 1;
|
|
147691
147767
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147692
147768
|
Slider$1,
|
|
147693
147769
|
{
|
|
@@ -147702,7 +147778,7 @@ function ChannelSlider({
|
|
|
147702
147778
|
},
|
|
147703
147779
|
getAriaValueText: () => `Current colormap values: ${color}-${slider}`,
|
|
147704
147780
|
min,
|
|
147705
|
-
max,
|
|
147781
|
+
max: max2,
|
|
147706
147782
|
step,
|
|
147707
147783
|
orientation: "horizontal",
|
|
147708
147784
|
style: { color, marginTop: "7px" },
|
|
@@ -148472,7 +148548,7 @@ const Slicer = ({
|
|
|
148472
148548
|
];
|
|
148473
148549
|
const classes = useSlicerStyles();
|
|
148474
148550
|
const Slicers = sliceValuesAndSetSliceFunctions.map(
|
|
148475
|
-
([val, setVal, label, [min,
|
|
148551
|
+
([val, setVal, label, [min, max2]]) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
148476
148552
|
Grid$1,
|
|
148477
148553
|
{
|
|
148478
148554
|
container: true,
|
|
@@ -148485,7 +148561,6 @@ const Slicer = ({
|
|
|
148485
148561
|
{
|
|
148486
148562
|
className: !use3d ? classes.disabled : classes.enabled,
|
|
148487
148563
|
style: { marginBottom: 0 },
|
|
148488
|
-
variant: "h2",
|
|
148489
148564
|
children: [
|
|
148490
148565
|
label,
|
|
148491
148566
|
":"
|
|
@@ -148503,7 +148578,7 @@ const Slicer = ({
|
|
|
148503
148578
|
valueLabelFormat: (v) => abbreviateNumber(v),
|
|
148504
148579
|
"aria-label": `Volume options ${label} slider`,
|
|
148505
148580
|
min,
|
|
148506
|
-
max,
|
|
148581
|
+
max: max2,
|
|
148507
148582
|
step: 5e-3,
|
|
148508
148583
|
orientation: "horizontal"
|
|
148509
148584
|
}
|
|
@@ -148519,7 +148594,6 @@ const Slicer = ({
|
|
|
148519
148594
|
{
|
|
148520
148595
|
className: !use3d ? classes.disabled : classes.enabled,
|
|
148521
148596
|
style: { marginTop: 16, marginBottom: 0 },
|
|
148522
|
-
variant: "h2",
|
|
148523
148597
|
children: [
|
|
148524
148598
|
"Clipping Planes:",
|
|
148525
148599
|
" "
|
|
@@ -149212,6 +149286,8 @@ const LayerControllerMemoized = React__default.memo(
|
|
|
149212
149286
|
forwardRef((props2, ref) => {
|
|
149213
149287
|
const {
|
|
149214
149288
|
title,
|
|
149289
|
+
closeButtonVisible,
|
|
149290
|
+
downloadButtonVisible,
|
|
149215
149291
|
removeGridComponent,
|
|
149216
149292
|
theme,
|
|
149217
149293
|
isReady,
|
|
@@ -149264,6 +149340,8 @@ const LayerControllerMemoized = React__default.memo(
|
|
|
149264
149340
|
{
|
|
149265
149341
|
title,
|
|
149266
149342
|
isScroll: true,
|
|
149343
|
+
closeButtonVisible,
|
|
149344
|
+
downloadButtonVisible,
|
|
149267
149345
|
removeGridComponent,
|
|
149268
149346
|
theme,
|
|
149269
149347
|
isReady,
|
|
@@ -149437,6 +149515,8 @@ const LayerControllerMemoized = React__default.memo(
|
|
|
149437
149515
|
function LayerControllerSubscriber(props2) {
|
|
149438
149516
|
const {
|
|
149439
149517
|
coordinationScopes,
|
|
149518
|
+
closeButtonVisible,
|
|
149519
|
+
downloadButtonVisible,
|
|
149440
149520
|
removeGridComponent,
|
|
149441
149521
|
theme,
|
|
149442
149522
|
title = "Spatial Layers",
|
|
@@ -149571,6 +149651,8 @@ function LayerControllerSubscriber(props2) {
|
|
|
149571
149651
|
{
|
|
149572
149652
|
ref: layerControllerRef,
|
|
149573
149653
|
title,
|
|
149654
|
+
closeButtonVisible,
|
|
149655
|
+
downloadButtonVisible,
|
|
149574
149656
|
removeGridComponent,
|
|
149575
149657
|
theme,
|
|
149576
149658
|
isReady,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-4165f7de.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayerControllerSubscriber.d.ts","sourceRoot":"","sources":["../src/LayerControllerSubscriber.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayerControllerSubscriber.d.ts","sourceRoot":"","sources":["../src/LayerControllerSubscriber.js"],"names":[],"mappings":"AAqSA;;;;;;;;;;;;;;;GAeG;AACH;IAbyB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,SAAS,EAAvB,MAAM;IACS,eAAe,EAA9B,OAAO;IACQ,4BAA4B,EAA3C,OAAO;IAEQ,8BAA8B,EAA7C,OAAO;gBA0MjB"}
|
|
@@ -17,10 +17,10 @@ import ImageAddButton from './ImageAddButton.js';
|
|
|
17
17
|
// the actual Spatial component. Re-rendering this component is very
|
|
18
18
|
// expensive so we have to be careful with props in this file in general.
|
|
19
19
|
const LayerControllerMemoized = React.memo(forwardRef((props, ref) => {
|
|
20
|
-
const { title, removeGridComponent, theme, isReady, dataset, obsType, moleculesLayer, setMoleculesLayer, cellsLayer, // May be one polygon layer object or an array of bitmask layers.
|
|
20
|
+
const { title, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, isReady, dataset, obsType, moleculesLayer, setMoleculesLayer, cellsLayer, // May be one polygon layer object or an array of bitmask layers.
|
|
21
21
|
setCellsLayer, rasterLayers, imageLayerLoaders, imageLayerMeta, imageLayerCallbacks, setImageLayerCallbacks, areLoadingImageChannels, setAreLoadingImageChannels, handleRasterLayerChange, handleRasterLayerRemove, obsSegmentationsType, segmentationLayerLoaders, segmentationLayerMeta, segmentationLayerCallbacks, setSegmentationLayerCallbacks, areLoadingSegmentationChannels, setAreLoadingSegmentationChannels, handleSegmentationLayerChange, handleSegmentationLayerRemove, disable3d, globalDisable3d, disableChannelsIfRgbDetected, layerIs3DIndex, setZoom, setTargetX, setTargetY, setTargetZ, setRotationX, setRotationOrbit, componentHeight, componentWidth, spatialLayout, handleImageAdd, enableLayerButtonsWithOneLayer, } = props;
|
|
22
22
|
const shouldShowImageLayerButton = Boolean(enableLayerButtonsWithOneLayer || imageLayerLoaders?.length > 1);
|
|
23
|
-
return (_jsx(TitleInfo, { title: title, isScroll: true, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, children: _jsxs("div", { className: "layer-controller-container", ref: ref, children: [moleculesLayer && (_jsx(VectorLayerController, { label: "Molecules", layerType: "molecules", layer: moleculesLayer, handleLayerChange: setMoleculesLayer }, `${dataset}-molecules`)), cellsLayer && obsSegmentationsType === 'polygon' && (_jsx(VectorLayerController, { label: `${capitalize(obsType)} Segmentations`, layerType: "cells", layer: cellsLayer, handleLayerChange: setCellsLayer }, `${dataset}-cells`)), cellsLayer && obsSegmentationsType === 'bitmask'
|
|
23
|
+
return (_jsx(TitleInfo, { title: title, isScroll: true, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, children: _jsxs("div", { className: "layer-controller-container", ref: ref, children: [moleculesLayer && (_jsx(VectorLayerController, { label: "Molecules", layerType: "molecules", layer: moleculesLayer, handleLayerChange: setMoleculesLayer }, `${dataset}-molecules`)), cellsLayer && obsSegmentationsType === 'polygon' && (_jsx(VectorLayerController, { label: `${capitalize(obsType)} Segmentations`, layerType: "cells", layer: cellsLayer, handleLayerChange: setCellsLayer }, `${dataset}-cells`)), cellsLayer && obsSegmentationsType === 'bitmask'
|
|
24
24
|
&& cellsLayer.map((layer, i) => {
|
|
25
25
|
const { index } = layer;
|
|
26
26
|
const loader = segmentationLayerLoaders?.[index];
|
|
@@ -125,7 +125,7 @@ const LayerControllerMemoized = React.memo(forwardRef((props, ref) => {
|
|
|
125
125
|
* show the the layer add/remove buttons.
|
|
126
126
|
*/
|
|
127
127
|
export function LayerControllerSubscriber(props) {
|
|
128
|
-
const { coordinationScopes, removeGridComponent, theme, title = 'Spatial Layers', disable3d, globalDisable3d, disableChannelsIfRgbDetected, enableLayerButtonsWithOneLayer, } = props;
|
|
128
|
+
const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title = 'Spatial Layers', disable3d, globalDisable3d, disableChannelsIfRgbDetected, enableLayerButtonsWithOneLayer, } = props;
|
|
129
129
|
const loaders = useLoaders();
|
|
130
130
|
// Get "props" from the coordination space.
|
|
131
131
|
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.LAYER_CONTROLLER], coordinationScopes);
|
|
@@ -188,7 +188,7 @@ export function LayerControllerSubscriber(props) {
|
|
|
188
188
|
setCellsLayer(newLayers);
|
|
189
189
|
}, [cellsLayer, setCellsLayer]);
|
|
190
190
|
const layerIs3DIndex = rasterLayers?.findIndex && rasterLayers.findIndex(layer => layer.use3d);
|
|
191
|
-
return (_jsx(LayerControllerMemoized, { ref: layerControllerRef, title: title, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, moleculesLayer: moleculesLayer, dataset: dataset, obsType: obsType, setMoleculesLayer: setMoleculesLayer, cellsLayer: cellsLayer, setCellsLayer: setCellsLayer, rasterLayers: rasterLayers, imageLayerLoaders: imageLayerLoaders, imageLayerMeta: imageLayerMeta, imageLayerCallbacks: imageLayerCallbacks, setImageLayerCallbacks: setImageLayerCallbacks, areLoadingImageChannels: areLoadingImageChannels, setAreLoadingImageChannels: setAreLoadingImageChannels, handleRasterLayerChange: handleRasterLayerChange, handleRasterLayerRemove: handleRasterLayerRemove, obsSegmentationsType: obsSegmentationsType, segmentationLayerLoaders: segmentationLayerLoaders, segmentationLayerMeta: segmentationLayerMeta, segmentationLayerCallbacks: segmentationLayerCallbacks, setSegmentationLayerCallbacks: setSegmentationLayerCallbacks, areLoadingSegmentationChannels: areLoadingSegmentationChannels, setAreLoadingSegmentationChannels: setAreLoadingSegmentationChannels, handleSegmentationLayerChange: handleSegmentationLayerChange, handleSegmentationLayerRemove: handleSegmentationLayerRemove, disable3d: disable3d, globalDisable3d: globalDisable3d, layerIs3DIndex: layerIs3DIndex, disableChannelsIfRgbDetected: disableChannelsIfRgbDetected, enableLayerButtonsWithOneLayer: enableLayerButtonsWithOneLayer, setZoom: setZoom, setTargetX: setTargetX, setTargetY: setTargetY, setTargetZ: setTargetZ, setRotationX: setRotationX, setRotationOrbit: setRotationOrbit,
|
|
191
|
+
return (_jsx(LayerControllerMemoized, { ref: layerControllerRef, title: title, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, moleculesLayer: moleculesLayer, dataset: dataset, obsType: obsType, setMoleculesLayer: setMoleculesLayer, cellsLayer: cellsLayer, setCellsLayer: setCellsLayer, rasterLayers: rasterLayers, imageLayerLoaders: imageLayerLoaders, imageLayerMeta: imageLayerMeta, imageLayerCallbacks: imageLayerCallbacks, setImageLayerCallbacks: setImageLayerCallbacks, areLoadingImageChannels: areLoadingImageChannels, setAreLoadingImageChannels: setAreLoadingImageChannels, handleRasterLayerChange: handleRasterLayerChange, handleRasterLayerRemove: handleRasterLayerRemove, obsSegmentationsType: obsSegmentationsType, segmentationLayerLoaders: segmentationLayerLoaders, segmentationLayerMeta: segmentationLayerMeta, segmentationLayerCallbacks: segmentationLayerCallbacks, setSegmentationLayerCallbacks: setSegmentationLayerCallbacks, areLoadingSegmentationChannels: areLoadingSegmentationChannels, setAreLoadingSegmentationChannels: setAreLoadingSegmentationChannels, handleSegmentationLayerChange: handleSegmentationLayerChange, handleSegmentationLayerRemove: handleSegmentationLayerRemove, disable3d: disable3d, globalDisable3d: globalDisable3d, layerIs3DIndex: layerIs3DIndex, disableChannelsIfRgbDetected: disableChannelsIfRgbDetected, enableLayerButtonsWithOneLayer: enableLayerButtonsWithOneLayer, setZoom: setZoom, setTargetX: setTargetX, setTargetY: setTargetY, setTargetZ: setTargetZ, setRotationX: setRotationX, setRotationOrbit: setRotationOrbit,
|
|
192
192
|
// Fall back to window for height and width.
|
|
193
193
|
componentHeight: componentHeight || windowHeight, componentWidth: componentWidth || windowWidth, spatialLayout: spatialLayout, handleImageAdd: handleImageAdd }));
|
|
194
194
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumeOptions.d.ts","sourceRoot":"","sources":["../src/VolumeOptions.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"VolumeOptions.d.ts","sourceRoot":"","sources":["../src/VolumeOptions.js"],"names":[],"mappings":";AAuLA;;;;;;;;;;;;;gBAqCC"}
|
|
@@ -43,8 +43,8 @@ const Slicer = ({ xSlice, ySlice, zSlice, handleSlicerSetting, loader, use3d, })
|
|
|
43
43
|
],
|
|
44
44
|
];
|
|
45
45
|
const classes = useSlicerStyles();
|
|
46
|
-
const Slicers = sliceValuesAndSetSliceFunctions.map(([val, setVal, label, [min, max]]) => (_jsxs(Grid, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [_jsx(Grid, { item: true, xs: 1, children: _jsxs(Typography, { className: !use3d ? classes.disabled : classes.enabled, style: { marginBottom: 0 },
|
|
47
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Typography, { className: !use3d ? classes.disabled : classes.enabled, style: { marginTop: 16, marginBottom: 0 },
|
|
46
|
+
const Slicers = sliceValuesAndSetSliceFunctions.map(([val, setVal, label, [min, max]]) => (_jsxs(Grid, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [_jsx(Grid, { item: true, xs: 1, children: _jsxs(Typography, { className: !use3d ? classes.disabled : classes.enabled, style: { marginBottom: 0 }, children: [label, ":"] }) }), _jsx(Grid, { item: true, xs: 11, children: _jsx(Slider, { disabled: !use3d, className: !use3d ? classes.disabled : classes.enabled, value: val, onChange: (e, v) => setVal(v), valueLabelDisplay: "auto", valueLabelFormat: v => abbreviateNumber(v), "aria-label": `Volume options ${label} slider`, min: min, max: max, step: 0.005, orientation: "horizontal" }) })] }, label)));
|
|
47
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Typography, { className: !use3d ? classes.disabled : classes.enabled, style: { marginTop: 16, marginBottom: 0 }, children: ["Clipping Planes:", ' '] }), ' ', Slicers] }));
|
|
48
48
|
};
|
|
49
49
|
const renderingOptions = Object.values(viv.RENDERING_MODES);
|
|
50
50
|
function RenderingModeSelect({ handleRenderingModeChange, renderingMode, use3d, }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/layer-controller",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
22
|
"math.gl": "^3.5.6",
|
|
23
23
|
"react-aria": "^3.28.0",
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
28
|
-
"@vitessce/
|
|
24
|
+
"@vitessce/gl": "3.3.3",
|
|
25
|
+
"@vitessce/constants-internal": "3.3.3",
|
|
26
|
+
"@vitessce/utils": "3.3.3",
|
|
27
|
+
"@vitessce/spatial-utils": "3.3.3",
|
|
28
|
+
"@vitessce/vit-s": "3.3.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"react": "^18.0.0",
|
|
@@ -33,6 +33,8 @@ const LayerControllerMemoized = React.memo(
|
|
|
33
33
|
forwardRef((props, ref) => {
|
|
34
34
|
const {
|
|
35
35
|
title,
|
|
36
|
+
closeButtonVisible,
|
|
37
|
+
downloadButtonVisible,
|
|
36
38
|
removeGridComponent,
|
|
37
39
|
theme,
|
|
38
40
|
isReady,
|
|
@@ -86,6 +88,8 @@ const LayerControllerMemoized = React.memo(
|
|
|
86
88
|
<TitleInfo
|
|
87
89
|
title={title}
|
|
88
90
|
isScroll
|
|
91
|
+
closeButtonVisible={closeButtonVisible}
|
|
92
|
+
downloadButtonVisible={downloadButtonVisible}
|
|
89
93
|
removeGridComponent={removeGridComponent}
|
|
90
94
|
theme={theme}
|
|
91
95
|
isReady={isReady}
|
|
@@ -306,6 +310,8 @@ const LayerControllerMemoized = React.memo(
|
|
|
306
310
|
export function LayerControllerSubscriber(props) {
|
|
307
311
|
const {
|
|
308
312
|
coordinationScopes,
|
|
313
|
+
closeButtonVisible,
|
|
314
|
+
downloadButtonVisible,
|
|
309
315
|
removeGridComponent,
|
|
310
316
|
theme,
|
|
311
317
|
title = 'Spatial Layers',
|
|
@@ -450,6 +456,8 @@ export function LayerControllerSubscriber(props) {
|
|
|
450
456
|
<LayerControllerMemoized
|
|
451
457
|
ref={layerControllerRef}
|
|
452
458
|
title={title}
|
|
459
|
+
closeButtonVisible={closeButtonVisible}
|
|
460
|
+
downloadButtonVisible={downloadButtonVisible}
|
|
453
461
|
removeGridComponent={removeGridComponent}
|
|
454
462
|
theme={theme}
|
|
455
463
|
isReady={isReady}
|
package/src/VolumeOptions.js
CHANGED
|
@@ -75,7 +75,6 @@ const Slicer = ({
|
|
|
75
75
|
<Typography
|
|
76
76
|
className={!use3d ? classes.disabled : classes.enabled}
|
|
77
77
|
style={{ marginBottom: 0 }}
|
|
78
|
-
variant="h2"
|
|
79
78
|
>
|
|
80
79
|
{label}:
|
|
81
80
|
</Typography>
|
|
@@ -103,7 +102,6 @@ const Slicer = ({
|
|
|
103
102
|
<Typography
|
|
104
103
|
className={!use3d ? classes.disabled : classes.enabled}
|
|
105
104
|
style={{ marginTop: 16, marginBottom: 0 }}
|
|
106
|
-
variant="h2"
|
|
107
105
|
>
|
|
108
106
|
Clipping Planes:{' '}
|
|
109
107
|
</Typography>{' '}
|