@cornerstonejs/tools 1.66.5 → 1.66.7
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/cjs/drawingSvg/drawArrow.js +1 -1
- package/dist/cjs/drawingSvg/drawArrow.js.map +1 -1
- package/dist/cjs/drawingSvg/drawCircle.js +1 -1
- package/dist/cjs/drawingSvg/drawCircle.js.map +1 -1
- package/dist/cjs/drawingSvg/drawEllipseByCoordinates.js +1 -1
- package/dist/cjs/drawingSvg/drawEllipseByCoordinates.js.map +1 -1
- package/dist/cjs/drawingSvg/drawHandle.js +1 -1
- package/dist/cjs/drawingSvg/drawHandle.js.map +1 -1
- package/dist/cjs/drawingSvg/drawLine.js +1 -1
- package/dist/cjs/drawingSvg/drawLine.js.map +1 -1
- package/dist/cjs/drawingSvg/drawPath.js +1 -1
- package/dist/cjs/drawingSvg/drawPath.js.map +1 -1
- package/dist/cjs/drawingSvg/drawPolyline.js +1 -1
- package/dist/cjs/drawingSvg/drawPolyline.js.map +1 -1
- package/dist/cjs/drawingSvg/drawRect.js +1 -1
- package/dist/cjs/drawingSvg/drawRect.js.map +1 -1
- package/dist/cjs/drawingSvg/drawRedactionRect.js +1 -1
- package/dist/cjs/drawingSvg/drawRedactionRect.js.map +1 -1
- package/dist/cjs/tools/MIPJumpToClickTool.js +2 -2
- package/dist/cjs/tools/MIPJumpToClickTool.js.map +1 -1
- package/dist/cjs/tools/StackScrollToolMouseWheelTool.js +1 -2
- package/dist/cjs/tools/StackScrollToolMouseWheelTool.js.map +1 -1
- package/dist/cjs/tools/WindowLevelTool.js +1 -2
- package/dist/cjs/tools/WindowLevelTool.js.map +1 -1
- package/dist/cjs/tools/base/AnnotationDisplayTool.js +1 -2
- package/dist/cjs/tools/base/AnnotationDisplayTool.js.map +1 -1
- package/dist/cjs/tools/base/AnnotationTool.js +1 -2
- package/dist/cjs/tools/base/AnnotationTool.js.map +1 -1
- package/dist/cjs/tools/base/BaseTool.js +1 -2
- package/dist/cjs/tools/base/BaseTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/CircleROIStartEndThresholdTool.js +1 -3
- package/dist/cjs/tools/segmentation/CircleROIStartEndThresholdTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/RectangleROIStartEndThresholdTool.js +1 -2
- package/dist/cjs/tools/segmentation/RectangleROIStartEndThresholdTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/RectangleROIThresholdTool.js +1 -2
- package/dist/cjs/tools/segmentation/RectangleROIThresholdTool.js.map +1 -1
- package/dist/cjs/utilities/index.d.ts +1 -2
- package/dist/cjs/utilities/index.js +1 -3
- package/dist/cjs/utilities/index.js.map +1 -1
- package/dist/esm/drawingSvg/drawArrow.js +1 -1
- package/dist/esm/drawingSvg/drawArrow.js.map +1 -1
- package/dist/esm/drawingSvg/drawCircle.js +1 -1
- package/dist/esm/drawingSvg/drawCircle.js.map +1 -1
- package/dist/esm/drawingSvg/drawEllipseByCoordinates.js +1 -1
- package/dist/esm/drawingSvg/drawEllipseByCoordinates.js.map +1 -1
- package/dist/esm/drawingSvg/drawHandle.js +1 -1
- package/dist/esm/drawingSvg/drawHandle.js.map +1 -1
- package/dist/esm/drawingSvg/drawLine.js +1 -1
- package/dist/esm/drawingSvg/drawLine.js.map +1 -1
- package/dist/esm/drawingSvg/drawPath.js +1 -1
- package/dist/esm/drawingSvg/drawPath.js.map +1 -1
- package/dist/esm/drawingSvg/drawPolyline.js +1 -1
- package/dist/esm/drawingSvg/drawPolyline.js.map +1 -1
- package/dist/esm/drawingSvg/drawRect.js +1 -1
- package/dist/esm/drawingSvg/drawRect.js.map +1 -1
- package/dist/esm/drawingSvg/drawRedactionRect.js +1 -1
- package/dist/esm/drawingSvg/drawRedactionRect.js.map +1 -1
- package/dist/esm/tools/MIPJumpToClickTool.js +2 -2
- package/dist/esm/tools/MIPJumpToClickTool.js.map +1 -1
- package/dist/esm/tools/StackScrollToolMouseWheelTool.js +2 -3
- package/dist/esm/tools/StackScrollToolMouseWheelTool.js.map +1 -1
- package/dist/esm/tools/WindowLevelTool.js +2 -3
- package/dist/esm/tools/WindowLevelTool.js.map +1 -1
- package/dist/esm/tools/base/AnnotationDisplayTool.js +1 -2
- package/dist/esm/tools/base/AnnotationDisplayTool.js.map +1 -1
- package/dist/esm/tools/base/AnnotationTool.js +1 -2
- package/dist/esm/tools/base/AnnotationTool.js.map +1 -1
- package/dist/esm/tools/base/BaseTool.js +1 -2
- package/dist/esm/tools/base/BaseTool.js.map +1 -1
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.js +1 -3
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.js.map +1 -1
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js +1 -2
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js.map +1 -1
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.js +1 -2
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.js.map +1 -1
- package/dist/esm/utilities/index.js +1 -2
- package/dist/esm/utilities/index.js.map +1 -1
- package/dist/types/tools/MIPJumpToClickTool.d.ts.map +1 -1
- package/dist/types/tools/StackScrollToolMouseWheelTool.d.ts.map +1 -1
- package/dist/types/tools/WindowLevelTool.d.ts.map +1 -1
- package/dist/types/tools/base/AnnotationDisplayTool.d.ts.map +1 -1
- package/dist/types/tools/base/AnnotationTool.d.ts.map +1 -1
- package/dist/types/tools/base/BaseTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/CircleROIStartEndThresholdTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/RectangleROIStartEndThresholdTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/RectangleROIThresholdTool.d.ts.map +1 -1
- package/dist/types/utilities/index.d.ts +1 -2
- package/dist/types/utilities/index.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
- package/src/drawingSvg/drawArrow.ts +1 -1
- package/src/drawingSvg/drawCircle.ts +1 -1
- package/src/drawingSvg/drawEllipseByCoordinates.ts +1 -1
- package/src/drawingSvg/drawHandle.ts +1 -1
- package/src/drawingSvg/drawLine.ts +1 -1
- package/src/drawingSvg/drawPath.ts +1 -1
- package/src/drawingSvg/drawPolyline.ts +1 -1
- package/src/drawingSvg/drawRect.ts +1 -1
- package/src/drawingSvg/drawRedactionRect.ts +1 -1
- package/src/tools/MIPJumpToClickTool.ts +2 -3
- package/src/tools/StackScrollToolMouseWheelTool.ts +2 -3
- package/src/tools/WindowLevelTool.ts +2 -4
- package/src/tools/base/AnnotationDisplayTool.ts +1 -2
- package/src/tools/base/AnnotationTool.ts +1 -2
- package/src/tools/base/BaseTool.ts +1 -2
- package/src/tools/segmentation/CircleROIStartEndThresholdTool.ts +1 -3
- package/src/tools/segmentation/RectangleROIStartEndThresholdTool.ts +1 -2
- package/src/tools/segmentation/RectangleROIThresholdTool.ts +1 -2
- package/src/utilities/index.ts +0 -2
- package/dist/cjs/utilities/getVolumeId.d.ts +0 -1
- package/dist/cjs/utilities/getVolumeId.js +0 -16
- package/dist/cjs/utilities/getVolumeId.js.map +0 -1
- package/dist/esm/utilities/getVolumeId.js +0 -12
- package/dist/esm/utilities/getVolumeId.js.map +0 -1
- package/dist/types/utilities/getVolumeId.d.ts +0 -2
- package/dist/types/utilities/getVolumeId.d.ts.map +0 -1
- package/src/utilities/getVolumeId.ts +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.66.
|
|
3
|
+
"version": "1.66.7",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cornerstonejs/core": "^1.66.
|
|
32
|
+
"@cornerstonejs/core": "^1.66.7",
|
|
33
33
|
"@icr/polyseg-wasm": "0.4.0",
|
|
34
34
|
"@types/offscreencanvas": "2019.7.3",
|
|
35
35
|
"comlink": "^4.4.1",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"type": "individual",
|
|
60
60
|
"url": "https://ohif.org/donate"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "7e318e04ab84565f2365252b6dc5a78ca1f0bb52"
|
|
63
63
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { BaseTool } from './base';
|
|
2
2
|
import { getEnabledElement, VolumeViewport } from '@cornerstonejs/core';
|
|
3
|
-
import type
|
|
3
|
+
import { type Types, utilities } from '@cornerstonejs/core';
|
|
4
4
|
import { getPointInLineOfSightWithCriteria } from '../utilities/planar';
|
|
5
5
|
import jumpToWorld from '../utilities/viewport/jumpToWorld';
|
|
6
6
|
import { PublicToolProps, ToolProps } from '../types';
|
|
7
7
|
import { getToolGroupForViewport } from '../store/ToolGroupManager';
|
|
8
|
-
import { getVolumeId } from '../utilities/getVolumeId';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* On a Maximum Intensity Projection (MIP) viewport, MIPJumpToClickTool allows the
|
|
@@ -55,7 +54,7 @@ class MIPJumpToClickTool extends BaseTool {
|
|
|
55
54
|
);
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
const volumeId = getVolumeId(targetId);
|
|
57
|
+
const volumeId = utilities.getVolumeId(targetId);
|
|
59
58
|
|
|
60
59
|
// 3. Criteria function to search for the point (maximum intensity)
|
|
61
60
|
let maxIntensity = -Infinity;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { getEnabledElement } from '@cornerstonejs/core';
|
|
1
|
+
import { getEnabledElement, utilities } from '@cornerstonejs/core';
|
|
2
2
|
import { BaseTool } from './base';
|
|
3
3
|
import { MouseWheelEventType } from '../types/EventTypes';
|
|
4
4
|
import scroll from '../utilities/scroll';
|
|
5
|
-
import { getVolumeId } from '../utilities/getVolumeId';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* The StackScrollMouseWheelTool is a tool that allows the user to scroll through a
|
|
@@ -36,7 +35,7 @@ class StackScrollMouseWheelTool extends BaseTool {
|
|
|
36
35
|
const delta = direction * (invert ? -1 : 1);
|
|
37
36
|
|
|
38
37
|
const targetId = this.getTargetId(viewport);
|
|
39
|
-
const volumeId = getVolumeId(targetId);
|
|
38
|
+
const volumeId = utilities.getVolumeId(targetId);
|
|
40
39
|
|
|
41
40
|
scroll(viewport, {
|
|
42
41
|
delta,
|
|
@@ -2,13 +2,11 @@ import { BaseTool } from './base';
|
|
|
2
2
|
import {
|
|
3
3
|
getEnabledElement,
|
|
4
4
|
VolumeViewport,
|
|
5
|
-
StackViewport,
|
|
6
|
-
utilities,
|
|
7
5
|
cache,
|
|
8
6
|
Types,
|
|
7
|
+
utilities,
|
|
9
8
|
} from '@cornerstonejs/core';
|
|
10
9
|
import { EventTypes } from '../types';
|
|
11
|
-
import { getVolumeId } from '../utilities/getVolumeId';
|
|
12
10
|
|
|
13
11
|
// Todo: should move to configuration
|
|
14
12
|
const DEFAULT_MULTIPLIER = 4;
|
|
@@ -52,7 +50,7 @@ class WindowLevelTool extends BaseTool {
|
|
|
52
50
|
const properties = viewport.getProperties();
|
|
53
51
|
if (viewport instanceof VolumeViewport) {
|
|
54
52
|
const targetId = this.getTargetId(viewport as Types.IVolumeViewport);
|
|
55
|
-
volumeId = getVolumeId(targetId);
|
|
53
|
+
volumeId = utilities.getVolumeId(targetId);
|
|
56
54
|
viewportsContainingVolumeUID = utilities.getViewportsWithVolumeId(
|
|
57
55
|
volumeId,
|
|
58
56
|
renderingEngine.id
|
|
@@ -15,7 +15,6 @@ import filterAnnotationsForDisplay from '../../utilities/planar/filterAnnotation
|
|
|
15
15
|
import { getStyleProperty } from '../../stateManagement/annotation/config/helpers';
|
|
16
16
|
import { getState } from '../../stateManagement/annotation/config';
|
|
17
17
|
import { StyleSpecifier } from '../../types/AnnotationStyle';
|
|
18
|
-
import { getVolumeId } from '../../utilities/getVolumeId';
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* Abstract class for tools which create and display annotations on the
|
|
@@ -138,7 +137,7 @@ abstract class AnnotationDisplayTool extends BaseTool {
|
|
|
138
137
|
} else if (viewport instanceof VideoViewport) {
|
|
139
138
|
referencedImageId = targetId.split('videoId:')[1];
|
|
140
139
|
} else {
|
|
141
|
-
const volumeId = getVolumeId(targetId);
|
|
140
|
+
const volumeId = utilities.getVolumeId(targetId);
|
|
142
141
|
const imageVolume = cache.getVolume(volumeId);
|
|
143
142
|
|
|
144
143
|
referencedImageId = utilities.getClosestImageId(
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
import { addAnnotation } from '../../stateManagement/annotation/annotationState';
|
|
25
25
|
import { StyleSpecifier } from '../../types/AnnotationStyle';
|
|
26
26
|
import { triggerAnnotationModified } from '../../stateManagement/annotation/helpers/state';
|
|
27
|
-
import { getVolumeId } from '../../utilities/getVolumeId';
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* Abstract class for tools which create and display annotations on the
|
|
@@ -369,7 +368,7 @@ abstract class AnnotationTool extends AnnotationDisplayTool {
|
|
|
369
368
|
imageId?: string
|
|
370
369
|
): boolean {
|
|
371
370
|
if (viewport instanceof BaseVolumeViewport) {
|
|
372
|
-
const volumeId = getVolumeId(targetId);
|
|
371
|
+
const volumeId = csUtils.getVolumeId(targetId);
|
|
373
372
|
const volume = cache.getVolume(volumeId);
|
|
374
373
|
return volume.scaling?.PT !== undefined;
|
|
375
374
|
}
|
|
@@ -3,7 +3,6 @@ import { Types } from '@cornerstonejs/core';
|
|
|
3
3
|
import ToolModes from '../../enums/ToolModes';
|
|
4
4
|
import StrategyCallbacks from '../../enums/StrategyCallbacks';
|
|
5
5
|
import { InteractionTypes, ToolProps, PublicToolProps } from '../../types';
|
|
6
|
-
import { getVolumeId } from '../../utilities/getVolumeId';
|
|
7
6
|
|
|
8
7
|
export interface IBaseTool {
|
|
9
8
|
/** ToolGroup ID the tool instance belongs to */
|
|
@@ -209,7 +208,7 @@ abstract class BaseTool implements IBaseTool {
|
|
|
209
208
|
|
|
210
209
|
return viewports[0].getImageData();
|
|
211
210
|
} else if (targetId.startsWith('volumeId:')) {
|
|
212
|
-
const volumeId = getVolumeId(targetId);
|
|
211
|
+
const volumeId = utilities.getVolumeId(targetId);
|
|
213
212
|
const viewports = utilities.getViewportsWithVolumeId(
|
|
214
213
|
volumeId,
|
|
215
214
|
renderingEngine.id
|
|
@@ -46,7 +46,6 @@ import {
|
|
|
46
46
|
} from '../../utilities/math/circle';
|
|
47
47
|
import { pointInEllipse } from '../../utilities/math/ellipse';
|
|
48
48
|
import { pointInShapeCallback } from '../../utilities';
|
|
49
|
-
import { getVolumeId } from '../../utilities/getVolumeId';
|
|
50
49
|
|
|
51
50
|
const { transformWorldToIndex } = csUtils;
|
|
52
51
|
|
|
@@ -97,7 +96,6 @@ class CircleROIStartEndThresholdTool extends CircleROITool {
|
|
|
97
96
|
const eventDetail = evt.detail;
|
|
98
97
|
const { currentPoints, element } = eventDetail;
|
|
99
98
|
const worldPos = currentPoints.world;
|
|
100
|
-
const canvasPos = currentPoints.canvas;
|
|
101
99
|
|
|
102
100
|
const enabledElement = getEnabledElement(element);
|
|
103
101
|
const { viewport, renderingEngine } = enabledElement;
|
|
@@ -112,7 +110,7 @@ class CircleROIStartEndThresholdTool extends CircleROITool {
|
|
|
112
110
|
throw new Error('Stack Viewport Not implemented');
|
|
113
111
|
} else {
|
|
114
112
|
const targetId = this.getTargetId(viewport);
|
|
115
|
-
volumeId = getVolumeId(targetId);
|
|
113
|
+
volumeId = csUtils.getVolumeId(targetId);
|
|
116
114
|
imageVolume = cache.getVolume(volumeId);
|
|
117
115
|
|
|
118
116
|
referencedImageId = csUtils.getClosestImageId(
|
|
@@ -39,7 +39,6 @@ import { RectangleROIStartEndThresholdAnnotation } from '../../types/ToolSpecifi
|
|
|
39
39
|
import RectangleROITool from '../annotation/RectangleROITool';
|
|
40
40
|
import { StyleSpecifier } from '../../types/AnnotationStyle';
|
|
41
41
|
import { pointInShapeCallback } from '../../utilities/';
|
|
42
|
-
import { getVolumeId } from '../../utilities/getVolumeId';
|
|
43
42
|
|
|
44
43
|
const { transformWorldToIndex } = csUtils;
|
|
45
44
|
|
|
@@ -112,7 +111,7 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
112
111
|
throw new Error('Stack Viewport Not implemented');
|
|
113
112
|
} else {
|
|
114
113
|
const targetId = this.getTargetId(viewport);
|
|
115
|
-
volumeId = getVolumeId(targetId);
|
|
114
|
+
volumeId = csUtils.getVolumeId(targetId);
|
|
116
115
|
imageVolume = cache.getVolume(volumeId);
|
|
117
116
|
referencedImageId = csUtils.getClosestImageId(
|
|
118
117
|
imageVolume,
|
|
@@ -27,7 +27,6 @@ import {
|
|
|
27
27
|
import { RectangleROIThresholdAnnotation } from '../../types/ToolSpecificAnnotationTypes';
|
|
28
28
|
import RectangleROITool from '../annotation/RectangleROITool';
|
|
29
29
|
import { StyleSpecifier } from '../../types/AnnotationStyle';
|
|
30
|
-
import { getVolumeId } from '../../utilities/getVolumeId';
|
|
31
30
|
|
|
32
31
|
/**
|
|
33
32
|
* This tool is exactly the RectangleROITool but only draws a rectangle on the image,
|
|
@@ -88,7 +87,7 @@ class RectangleROIThresholdTool extends RectangleROITool {
|
|
|
88
87
|
if (viewport instanceof StackViewport) {
|
|
89
88
|
referencedImageId = targetId.split('imageId:')[1];
|
|
90
89
|
} else {
|
|
91
|
-
volumeId = getVolumeId(targetId);
|
|
90
|
+
volumeId = csUtils.getVolumeId(targetId);
|
|
92
91
|
const imageVolume = cache.getVolume(volumeId);
|
|
93
92
|
referencedImageId = csUtils.getClosestImageId(
|
|
94
93
|
imageVolume,
|
package/src/utilities/index.ts
CHANGED
|
@@ -48,7 +48,6 @@ import * as dynamicVolume from './dynamicVolume';
|
|
|
48
48
|
import * as polyDataUtils from './polyData/utils';
|
|
49
49
|
import * as voi from './voi';
|
|
50
50
|
import * as contourSegmentation from './contourSegmentation';
|
|
51
|
-
import { getVolumeId } from './getVolumeId';
|
|
52
51
|
|
|
53
52
|
const roundNumber = utilities.roundNumber;
|
|
54
53
|
|
|
@@ -71,7 +70,6 @@ export {
|
|
|
71
70
|
getCalibratedLengthUnits,
|
|
72
71
|
getCalibratedAreaUnits,
|
|
73
72
|
getCalibratedScale,
|
|
74
|
-
getVolumeId,
|
|
75
73
|
segmentation,
|
|
76
74
|
contours,
|
|
77
75
|
triggerAnnotationRenderForViewportIds,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getVolumeId: (targetId: string) => string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVolumeId = void 0;
|
|
4
|
-
const getVolumeId = (targetId) => {
|
|
5
|
-
const prefix = 'volumeId:';
|
|
6
|
-
const str = targetId.includes(prefix)
|
|
7
|
-
? targetId.substring(prefix.length)
|
|
8
|
-
: targetId;
|
|
9
|
-
if (str.startsWith('nifti:')) {
|
|
10
|
-
return str;
|
|
11
|
-
}
|
|
12
|
-
const index = str.indexOf('?');
|
|
13
|
-
return index === -1 ? str : str.substring(0, index);
|
|
14
|
-
};
|
|
15
|
-
exports.getVolumeId = getVolumeId;
|
|
16
|
-
//# sourceMappingURL=getVolumeId.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getVolumeId.js","sourceRoot":"","sources":["../../../src/utilities/getVolumeId.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC9C,MAAM,MAAM,GAAG,WAAW,CAAC;IAC3B,MAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QACnC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QACnC,CAAC,CAAC,QAAQ,CAAC;IAEb,IAAI,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,OAAO,GAAG,CAAC;KACZ;IAED,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC,CAAC;AAZW,QAAA,WAAW,eAYtB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const getVolumeId = (targetId) => {
|
|
2
|
-
const prefix = 'volumeId:';
|
|
3
|
-
const str = targetId.includes(prefix)
|
|
4
|
-
? targetId.substring(prefix.length)
|
|
5
|
-
: targetId;
|
|
6
|
-
if (str.startsWith('nifti:')) {
|
|
7
|
-
return str;
|
|
8
|
-
}
|
|
9
|
-
const index = str.indexOf('?');
|
|
10
|
-
return index === -1 ? str : str.substring(0, index);
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=getVolumeId.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getVolumeId.js","sourceRoot":"","sources":["../../../src/utilities/getVolumeId.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC9C,MAAM,MAAM,GAAG,WAAW,CAAC;IAC3B,MAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QACnC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QACnC,CAAC,CAAC,QAAQ,CAAC;IAEb,IAAI,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,OAAO,GAAG,CAAC;KACZ;IAED,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getVolumeId.d.ts","sourceRoot":"","sources":["../../../src/utilities/getVolumeId.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,aAAc,MAAM,WAY3C,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const getVolumeId = (targetId: string) => {
|
|
2
|
-
const prefix = 'volumeId:';
|
|
3
|
-
const str = targetId.includes(prefix)
|
|
4
|
-
? targetId.substring(prefix.length)
|
|
5
|
-
: targetId;
|
|
6
|
-
|
|
7
|
-
if (str.startsWith('nifti:')) {
|
|
8
|
-
return str;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const index = str.indexOf('?');
|
|
12
|
-
return index === -1 ? str : str.substring(0, index);
|
|
13
|
-
};
|