@aics/vole-app 3.2.3 → 3.3.1
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/LICENSE +21 -25
- package/es/aics-image-viewer/components/App/index.js +18 -12
- package/es/aics-image-viewer/components/AxisClipSliders/index.js +2 -1
- package/es/aics-image-viewer/components/ChannelsWidget.js +2 -2
- package/es/aics-image-viewer/components/ControlPanel/index.js +15 -11
- package/es/aics-image-viewer/components/ControlPanel/styles.css +5 -5
- package/es/aics-image-viewer/components/ErrorAlert/index.js +102 -65
- package/es/aics-image-viewer/components/ErrorAlert/styles.css +40 -7
- package/es/aics-image-viewer/components/StyleProvider/index.js +65 -27
- package/es/aics-image-viewer/components/TfEditor/index.js +8 -1
- package/es/aics-image-viewer/components/Toolbar/index.js +65 -7
- package/es/aics-image-viewer/components/Toolbar/styles.css +22 -110
- package/es/aics-image-viewer/components/shared/ControlPanelRow/styles.css +1 -1
- package/es/aics-image-viewer/components/useVolume.js +45 -40
- package/es/aics-image-viewer/shared/constants.js +3 -1
- package/es/aics-image-viewer/shared/utils/playControls.js +12 -1
- package/es/aics-image-viewer/shared/utils/sceneStore.js +26 -7
- package/es/aics-image-viewer/shared/utils/test/urlParsing.test.js +10 -2
- package/es/aics-image-viewer/shared/utils/urlParsing.js +17 -3
- package/es/aics-image-viewer/shared/utils/viewerChannelSettings.js +3 -4
- package/es/aics-image-viewer/state/store.js +24 -6
- package/es/aics-image-viewer/state/subscribers.js +22 -1
- package/es/aics-image-viewer/state/test/reset.test.js +3 -1
- package/package.json +5 -5
- package/type-declarations/aics-image-viewer/components/App/types.d.ts +2 -2
- package/type-declarations/aics-image-viewer/components/ControlPanel/index.d.ts +4 -5
- package/type-declarations/aics-image-viewer/components/ErrorAlert/index.d.ts +8 -5
- package/type-declarations/aics-image-viewer/components/Toolbar/index.d.ts +4 -0
- package/type-declarations/aics-image-viewer/components/useVolume.d.ts +3 -3
- package/type-declarations/aics-image-viewer/shared/constants.d.ts +1 -1
- package/type-declarations/aics-image-viewer/shared/utils/playControls.d.ts +1 -0
- package/type-declarations/aics-image-viewer/shared/utils/sceneStore.d.ts +3 -2
- package/type-declarations/aics-image-viewer/shared/utils/urlParsing.d.ts +7 -1
- package/type-declarations/aics-image-viewer/state/store.d.ts +2 -0
- package/type-declarations/aics-image-viewer/state/types.d.ts +2 -0
- package/LICENSE.txt +0 -26
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { MetadataRecord } from "../../shared/types";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { type ChannelsWidgetProps } from "../ChannelsWidget";
|
|
4
|
+
import { type CustomizeWidgetProps } from "../CustomizeWidget";
|
|
5
|
+
import { type GlobalVolumeControlsProps } from "../GlobalVolumeControls";
|
|
6
6
|
import "./styles.css";
|
|
7
|
-
|
|
8
|
-
interface ControlPanelProps extends PropsOf<typeof ChannelsWidget>, PropsOf<typeof GlobalVolumeControls>, PropsOf<typeof CustomizeWidget> {
|
|
7
|
+
interface ControlPanelProps extends ChannelsWidgetProps, GlobalVolumeControlsProps, CustomizeWidgetProps {
|
|
9
8
|
hasImage: boolean;
|
|
10
9
|
visibleControls: GlobalVolumeControlsProps["visibleControls"] & CustomizeWidgetProps["visibleControls"] & {
|
|
11
10
|
colorPresetsDropdown: boolean;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
+
import { type Volume } from "@aics/vole-core";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import "./styles.css";
|
|
3
4
|
export type ErrorAlertDescription = {
|
|
4
5
|
title: string;
|
|
5
6
|
description: React.ReactNode;
|
|
6
7
|
};
|
|
8
|
+
type ErrorInfo = {
|
|
9
|
+
error: unknown;
|
|
10
|
+
count: number;
|
|
11
|
+
dims?: [number, number, number, number, number];
|
|
12
|
+
};
|
|
7
13
|
export type ErrorAlertProps = {
|
|
8
|
-
errors:
|
|
9
|
-
/** The number of times we've seen an error of the type that is currently being displayed before */
|
|
10
|
-
firstErrorCount?: number;
|
|
14
|
+
errors: ErrorInfo[];
|
|
11
15
|
afterClose?: () => void;
|
|
12
|
-
onSkipError?: () => void;
|
|
13
16
|
};
|
|
14
17
|
declare const ErrorAlert: React.FC<ErrorAlertProps>;
|
|
15
|
-
export declare const useErrorAlert: () => [React.ReactNode, (error: unknown) => void];
|
|
18
|
+
export declare const useErrorAlert: () => [React.ReactNode, (error: unknown, image?: Volume) => void];
|
|
16
19
|
export default ErrorAlert;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { VolumeDims } from "@aics/vole-core";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import "./styles.css";
|
|
3
4
|
type ToolbarProps = {
|
|
@@ -6,6 +7,8 @@ type ToolbarProps = {
|
|
|
6
7
|
hasCellId: boolean;
|
|
7
8
|
hasParentImage: boolean;
|
|
8
9
|
canPathTrace: boolean;
|
|
10
|
+
multiscaleDims?: VolumeDims[];
|
|
11
|
+
multiscaleIndex?: number;
|
|
9
12
|
resetCamera: () => void;
|
|
10
13
|
downloadScreenshot: () => void;
|
|
11
14
|
resetToSavedViewerState: () => void;
|
|
@@ -16,6 +19,7 @@ type ToolbarProps = {
|
|
|
16
19
|
resetCameraButton: boolean;
|
|
17
20
|
showAxesButton: boolean;
|
|
18
21
|
showBoundingBoxButton: boolean;
|
|
22
|
+
scaleLevelControls: boolean;
|
|
19
23
|
};
|
|
20
24
|
};
|
|
21
25
|
declare const Toolbar: React.FC<ToolbarProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RawArrayLoaderOptions, type View3d, type Volume } from "@aics/vole-core";
|
|
1
|
+
import { LoadSpec, type RawArrayLoaderOptions, type View3d, type Volume } from "@aics/vole-core";
|
|
2
2
|
import type { AxisName } from "../shared/types";
|
|
3
3
|
import PlayControls from "../shared/utils/playControls";
|
|
4
4
|
import type { ChannelGrouping, ViewerChannelSettings } from "../shared/utils/viewerChannelSettings";
|
|
@@ -7,11 +7,11 @@ export type UseVolumeOptions = {
|
|
|
7
7
|
/** Callback called just once when the volume is created. */
|
|
8
8
|
onCreateImage?: (image: Volume) => void;
|
|
9
9
|
/** Callback called on any scene change, including the initial image load. */
|
|
10
|
-
onChangeScene?: (image: Volume, sceneIndex: number) => void;
|
|
10
|
+
onChangeScene?: (image: Volume, sceneIndex: number, loadSpec: LoadSpec) => void;
|
|
11
11
|
/** Callback for when a single channel of the volume has loaded. */
|
|
12
12
|
onChannelLoaded?: (image: Volume, channelIndex: number, isInitialLoad: boolean) => void;
|
|
13
13
|
/** Callback for when image loading encounters an error. */
|
|
14
|
-
onError?: (error: unknown) => void;
|
|
14
|
+
onError?: (error: unknown, image?: Volume) => void;
|
|
15
15
|
/** The name of a channel which should be treated as a mask rather than as viewable data. */
|
|
16
16
|
maskChannelName?: string;
|
|
17
17
|
};
|
|
@@ -10,7 +10,7 @@ export declare const TFEDITOR_DEFAULT_COLOR: ColorArray;
|
|
|
10
10
|
export declare const TFEDITOR_MAX_BIN = 255;
|
|
11
11
|
export declare const CACHE_MAX_SIZE = 1000000000;
|
|
12
12
|
export declare const QUEUE_MAX_SIZE = 10;
|
|
13
|
-
export declare const QUEUE_MAX_LOW_PRIORITY_SIZE =
|
|
13
|
+
export declare const QUEUE_MAX_LOW_PRIORITY_SIZE = 6;
|
|
14
14
|
/** Maps an axis the user can "play" through to the direction to prefetch while playing that axis */
|
|
15
15
|
export declare const AXIS_TO_LOADER_PRIORITY: Record<AxisName | "t", PrefetchDirection>;
|
|
16
16
|
/** Maps channel data types to their minimum and maximum values */
|
|
@@ -5,6 +5,7 @@ export default class PlayControls {
|
|
|
5
5
|
playWaitingForLoad: boolean;
|
|
6
6
|
playHolding: boolean;
|
|
7
7
|
playTimeoutId: number;
|
|
8
|
+
private lastStepTime;
|
|
8
9
|
getVolumeIsLoaded?: () => boolean;
|
|
9
10
|
stepAxis?: (axis: PlayAxisName) => void;
|
|
10
11
|
onPlayingAxisChanged?: (axis: PlayAxisName | null) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { LoadSpec, PrefetchDirection, RawArrayLoaderOptions, Volume, VolumeLoaderContext } from "@aics/vole-core";
|
|
1
|
+
import type { LoadSpec, PrefetchDirection, RawArrayLoaderOptions, Volume, VolumeLoaderContext, ZarrLoaderFetchOptions } from "@aics/vole-core";
|
|
2
2
|
import type { ThreadableVolumeLoader } from "@aics/vole-core/es/types/loaders/IVolumeLoader";
|
|
3
3
|
export type LoadSceneOptions = {
|
|
4
|
-
onCreateScene?: (volume: Volume, sceneIndex: number) => void;
|
|
4
|
+
onCreateScene?: (volume: Volume, sceneIndex: number, loadSpec: LoadSpec) => void;
|
|
5
5
|
onChannelLoaded?: (volume: Volume, channelIndex: number) => void;
|
|
6
6
|
};
|
|
7
7
|
export default class SceneStore {
|
|
@@ -18,4 +18,5 @@ export default class SceneStore {
|
|
|
18
18
|
createVolume(scene: number, loadSpec: LoadSpec, onChannelLoaded?: (volume: Volume, channelIndex: number) => void): Promise<Volume>;
|
|
19
19
|
syncMultichannelLoading(sync: boolean): void;
|
|
20
20
|
setPrefetchPriority(priority: PrefetchDirection[]): void;
|
|
21
|
+
updateFetchOptions(fetchOptions: Partial<ZarrLoaderFetchOptions>): void;
|
|
21
22
|
}
|
|
@@ -50,7 +50,9 @@ export declare enum ViewerStateKeys {
|
|
|
50
50
|
Scene = "scene",
|
|
51
51
|
CameraState = "cam",
|
|
52
52
|
SingleChannelMode = "scm",
|
|
53
|
-
SingleChannelIndex = "sci"
|
|
53
|
+
SingleChannelIndex = "sci",
|
|
54
|
+
UseExactScaleLevel = "esl",
|
|
55
|
+
ScaleLevelIndex = "scl"
|
|
54
56
|
}
|
|
55
57
|
export declare enum CameraTransformKeys {
|
|
56
58
|
/** Camera position in 3D coordinates. */
|
|
@@ -230,6 +232,10 @@ export declare class ViewerStateParams {
|
|
|
230
232
|
[ViewerStateKeys.Time]?: string;
|
|
231
233
|
/** Scene number, for multiscene images. 0 by default. */
|
|
232
234
|
[ViewerStateKeys.Scene]?: string;
|
|
235
|
+
/** Whether to use an exact scale level index. 0 by default. */
|
|
236
|
+
[ViewerStateKeys.UseExactScaleLevel]?: string;
|
|
237
|
+
/** The exact scale level index to use, if `UseExactScaleLevel` is 1. 0 by default. */
|
|
238
|
+
[ViewerStateKeys.ScaleLevelIndex]?: string;
|
|
233
239
|
/**
|
|
234
240
|
* Camera transform settings, as a list of `key:value` pairs separated by commas.
|
|
235
241
|
* Valid keys are defined in `CameraTransformKeys`:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ColorArray } from "../shared/utils/colorRepresentations";
|
|
2
|
+
import type { ViewerChannelSettings } from "../shared/utils/viewerChannelSettings";
|
|
2
3
|
import { type ResetStateSlice } from "./reset";
|
|
3
4
|
import type { ChannelState, ViewerState } from "./types";
|
|
4
5
|
export type ViewerStateActions = {
|
|
@@ -8,6 +9,7 @@ export type ViewerStateActions = {
|
|
|
8
9
|
}>) => void;
|
|
9
10
|
changeChannelSetting: <K extends keyof ChannelState>(index: number | number[], value: Partial<Record<K, ChannelState[K]>>) => void;
|
|
10
11
|
replaceAllChannelSettings: (channelSettings: ChannelState[]) => void;
|
|
12
|
+
initChannelSettings: (names: string[], settings?: ViewerChannelSettings) => ChannelState[];
|
|
11
13
|
applyColorPresets: (colors: ColorArray[]) => void;
|
|
12
14
|
};
|
|
13
15
|
export type ViewerStore = ViewerState & ViewerStateActions & ResetStateSlice & {
|
package/LICENSE.txt
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Allen Institute Software License – This software license is the 2-clause BSD license
|
|
2
|
-
plus clause a third clause that prohibits redistribution for commercial purposes without further permission.
|
|
3
|
-
|
|
4
|
-
Copyright © 2017. Allen Institute. All rights reserved.
|
|
5
|
-
|
|
6
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
|
7
|
-
following conditions are met:
|
|
8
|
-
|
|
9
|
-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
|
10
|
-
following disclaimer.
|
|
11
|
-
|
|
12
|
-
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
|
|
13
|
-
following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
14
|
-
|
|
15
|
-
3. Redistributions for commercial purposes are not permitted without the Allen Institute’s written permission.
|
|
16
|
-
For purposes of this license, commercial purposes is the incorporation of the Allen Institute's software into
|
|
17
|
-
anything for which you will charge fees or other compensation. Contact terms@alleninstitute.org for commercial
|
|
18
|
-
licensing opportunities.
|
|
19
|
-
|
|
20
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
|
21
|
-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
23
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
25
|
-
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
|
26
|
-
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|