@cornerstonejs/tools 1.62.0 → 1.63.0
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/index.d.ts +2 -2
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tools/index.d.ts +2 -1
- package/dist/cjs/tools/index.js +4 -1
- package/dist/cjs/tools/index.js.map +1 -1
- package/dist/cjs/tools/segmentation/CircleROIStartEndThresholdTool.d.ts +63 -0
- package/dist/cjs/tools/segmentation/CircleROIStartEndThresholdTool.js +347 -0
- package/dist/cjs/tools/segmentation/CircleROIStartEndThresholdTool.js.map +1 -0
- package/dist/cjs/tools/segmentation/RectangleROIStartEndThresholdTool.d.ts +3 -0
- package/dist/cjs/tools/segmentation/RectangleROIStartEndThresholdTool.js +73 -0
- package/dist/cjs/tools/segmentation/RectangleROIStartEndThresholdTool.js.map +1 -1
- package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +34 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tools/index.js +2 -1
- package/dist/esm/tools/index.js.map +1 -1
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.js +342 -0
- package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.js.map +1 -0
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js +75 -2
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/tools/index.d.ts +2 -1
- package/dist/types/tools/index.d.ts.map +1 -1
- package/dist/types/tools/segmentation/CircleROIStartEndThresholdTool.d.ts +64 -0
- package/dist/types/tools/segmentation/CircleROIStartEndThresholdTool.d.ts.map +1 -0
- package/dist/types/tools/segmentation/RectangleROIStartEndThresholdTool.d.ts +3 -0
- package/dist/types/tools/segmentation/RectangleROIStartEndThresholdTool.d.ts.map +1 -1
- package/dist/types/types/ToolSpecificAnnotationTypes.d.ts +34 -1
- package/dist/types/types/ToolSpecificAnnotationTypes.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/index.ts +2 -0
- package/src/tools/index.ts +2 -0
- package/src/tools/segmentation/CircleROIStartEndThresholdTool.ts +677 -0
- package/src/tools/segmentation/RectangleROIStartEndThresholdTool.ts +134 -2
- package/src/types/ToolSpecificAnnotationTypes.ts +43 -8
package/dist/cjs/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import * as cursors from './cursors';
|
|
|
8
8
|
import * as Types from './types';
|
|
9
9
|
import * as annotation from './stateManagement/annotation';
|
|
10
10
|
import * as segmentation from './stateManagement/segmentation';
|
|
11
|
-
import { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, KeyImageTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ReferenceLines, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, OverlayGridTool, SegmentationIntersectionTool, EraserTool, SegmentSelectTool } from './tools';
|
|
11
|
+
import { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, KeyImageTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ReferenceLines, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, OverlayGridTool, SegmentationIntersectionTool, EraserTool, SegmentSelectTool } from './tools';
|
|
12
12
|
import VideoRedactionTool from './tools/annotation/VideoRedactionTool';
|
|
13
13
|
import * as Enums from './enums';
|
|
14
|
-
export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ReferenceLines, ScaleOverlayTool, EraserTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, SegmentSelectTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
|
14
|
+
export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ReferenceLines, ScaleOverlayTool, EraserTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, SegmentSelectTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
package/dist/cjs/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.EraserTool = exports.ScaleOverlayTool = exports.ReferenceLines = exports.ReferenceCursors = exports.AdvancedMagnifyTool = exports.MagnifyTool = exports.KeyImageTool = exports.UltrasoundDirectionalTool = exports.CobbAngleTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.LivewireContourSegmentationTool = exports.LivewireContourTool = exports.PlanarFreehandContourSegmentationTool = exports.PlanarFreehandROITool = exports.BidirectionalTool = exports.SplineContourSegmentationTool = exports.SplineROITool = exports.CircleROITool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.SegmentationIntersectionTool = exports.OverlayGridTool = exports.ReferenceLinesTool = exports.CrosshairsTool = exports.LengthTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.StackScrollMouseWheelTool = exports.PlanarRotateTool = exports.StackScrollTool = exports.ZoomTool = exports.WindowLevelTool = exports.DragProbeTool = exports.TrackballRotateTool = exports.PanTool = exports.AnnotationDisplayTool = exports.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = exports.VideoRedactionTool = void 0;
|
|
30
|
-
exports.cursors = exports.utilities = exports.segmentation = exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.state = exports.Types = exports.PaintFillTool = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.SegmentSelectTool = exports.OrientationMarkerTool = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = void 0;
|
|
30
|
+
exports.cursors = exports.utilities = exports.segmentation = exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.state = exports.Types = exports.PaintFillTool = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.SegmentSelectTool = exports.OrientationMarkerTool = exports.BrushTool = exports.CircleROIStartEndThresholdTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = void 0;
|
|
31
31
|
const init_1 = require("./init");
|
|
32
32
|
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return init_1.init; } });
|
|
33
33
|
Object.defineProperty(exports, "destroy", { enumerable: true, get: function () { return init_1.destroy; } });
|
|
@@ -90,6 +90,7 @@ Object.defineProperty(exports, "CircleScissorsTool", { enumerable: true, get: fu
|
|
|
90
90
|
Object.defineProperty(exports, "SphereScissorsTool", { enumerable: true, get: function () { return tools_1.SphereScissorsTool; } });
|
|
91
91
|
Object.defineProperty(exports, "RectangleROIThresholdTool", { enumerable: true, get: function () { return tools_1.RectangleROIThresholdTool; } });
|
|
92
92
|
Object.defineProperty(exports, "RectangleROIStartEndThresholdTool", { enumerable: true, get: function () { return tools_1.RectangleROIStartEndThresholdTool; } });
|
|
93
|
+
Object.defineProperty(exports, "CircleROIStartEndThresholdTool", { enumerable: true, get: function () { return tools_1.CircleROIStartEndThresholdTool; } });
|
|
93
94
|
Object.defineProperty(exports, "SegmentationDisplayTool", { enumerable: true, get: function () { return tools_1.SegmentationDisplayTool; } });
|
|
94
95
|
Object.defineProperty(exports, "BrushTool", { enumerable: true, get: function () { return tools_1.BrushTool; } });
|
|
95
96
|
Object.defineProperty(exports, "AngleTool", { enumerable: true, get: function () { return tools_1.AngleTool; } });
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuC;AAmFrC,qFAnFO,WAAI,OAmFP;AACJ,wFApFa,cAAO,OAoFb;AAnFT,mCAQiB;AA4Ef,wFAnFA,eAAO,OAmFA;AACP,2FAnFA,kBAAU,OAmFA;AA+DV,sFAjJA,aAAK,OAiJA;AAEL,iGAlJA,wBAAgB,OAkJA;AALhB,oGA5IA,2BAAmB,OA4IA;AADnB,6FA1IA,oBAAY,OA0IA;AA1DZ,0GA/EA,iCAAyB,OA+EA;AA5E3B,uDAAyC;AAgJvC,8BAAS;AA7IX,+DAAiD;AAkI/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sCAA8B,OAkFA;AAP9B,wGA1EA,+BAAuB,OA0EA;AAQvB,0FAjFA,iBAAS,OAiFA;AAnBT,0FA7DA,iBAAS,OA6DA;AACT,8FA7DA,qBAAa,OA6DA;AACb,0GA7DA,iCAAyB,OA6DA;AAEzB,4FA9DA,mBAAW,OA8DA;AACX,oGA9DA,2BAAmB,OA8DA;AACnB,iGA9DA,wBAAgB,OA8DA;AAChB,+FA9DA,sBAAc,OA8DA;AAmBd,8FAhFA,qBAAa,OAgFA;AAlBb,iGA7DA,wBAAgB,OA6DA;AAYhB,sGAxEA,6BAAqB,OAwEA;AAlCrB,gGArCA,uBAAe,OAqCA;AACf,6GArCA,oCAA4B,OAqCA;AAsB5B,2FA1DA,kBAAU,OA0DA;AAYV,kGArEA,yBAAiB,OAqEA;AAlEnB,+FAAuE;AAKrE,6BALK,4BAAkB,CAKL;AAHpB,+CAAiC;AA2E/B,sBAAK"}
|
|
@@ -42,8 +42,9 @@ import CircleScissorsTool from './segmentation/CircleScissorsTool';
|
|
|
42
42
|
import SphereScissorsTool from './segmentation/SphereScissorsTool';
|
|
43
43
|
import RectangleROIThresholdTool from './segmentation/RectangleROIThresholdTool';
|
|
44
44
|
import RectangleROIStartEndThresholdTool from './segmentation/RectangleROIStartEndThresholdTool';
|
|
45
|
+
import CircleROIStartEndThresholdTool from './segmentation/CircleROIStartEndThresholdTool';
|
|
45
46
|
import BrushTool from './segmentation/BrushTool';
|
|
46
47
|
import PaintFillTool from './segmentation/PaintFillTool';
|
|
47
48
|
import OrientationMarkerTool from './OrientationMarkerTool';
|
|
48
49
|
import SegmentSelectTool from './segmentation/SegmentSelectTool';
|
|
49
|
-
export { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, ReferenceCursors, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, BidirectionalTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, SplineROITool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, KeyImageTool, AnnotationEraserTool as EraserTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SplineContourSegmentationTool, BrushTool, MagnifyTool, AdvancedMagnifyTool, ReferenceLines, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, SegmentSelectTool, };
|
|
50
|
+
export { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, ReferenceCursors, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, BidirectionalTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, SplineROITool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, KeyImageTool, AnnotationEraserTool as EraserTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, SplineContourSegmentationTool, BrushTool, MagnifyTool, AdvancedMagnifyTool, ReferenceLines, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, SegmentSelectTool, };
|
package/dist/cjs/tools/index.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.OrientationMarkerTool = exports.ScaleOverlayTool = exports.PaintFillTool = exports.ReferenceLines = exports.AdvancedMagnifyTool = exports.MagnifyTool = exports.BrushTool = exports.SplineContourSegmentationTool = exports.CircleROIStartEndThresholdTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.EraserTool = exports.KeyImageTool = exports.UltrasoundDirectionalTool = exports.CobbAngleTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.LivewireContourSegmentationTool = exports.LivewireContourTool = exports.PlanarFreehandContourSegmentationTool = exports.PlanarFreehandROITool = exports.SplineROITool = exports.CircleROITool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.LengthTool = exports.BidirectionalTool = exports.SegmentationIntersectionTool = exports.OverlayGridTool = exports.ReferenceLinesTool = exports.CrosshairsTool = exports.ReferenceCursors = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.ZoomTool = exports.StackScrollMouseWheelTool = exports.PlanarRotateTool = exports.StackScrollTool = exports.WindowLevelTool = exports.DragProbeTool = exports.TrackballRotateTool = exports.PanTool = exports.AnnotationDisplayTool = exports.AnnotationTool = exports.BaseTool = void 0;
|
|
7
|
+
exports.SegmentSelectTool = void 0;
|
|
7
8
|
const base_1 = require("./base");
|
|
8
9
|
Object.defineProperty(exports, "BaseTool", { enumerable: true, get: function () { return base_1.BaseTool; } });
|
|
9
10
|
Object.defineProperty(exports, "AnnotationTool", { enumerable: true, get: function () { return base_1.AnnotationTool; } });
|
|
@@ -94,6 +95,8 @@ const RectangleROIThresholdTool_1 = __importDefault(require("./segmentation/Rect
|
|
|
94
95
|
exports.RectangleROIThresholdTool = RectangleROIThresholdTool_1.default;
|
|
95
96
|
const RectangleROIStartEndThresholdTool_1 = __importDefault(require("./segmentation/RectangleROIStartEndThresholdTool"));
|
|
96
97
|
exports.RectangleROIStartEndThresholdTool = RectangleROIStartEndThresholdTool_1.default;
|
|
98
|
+
const CircleROIStartEndThresholdTool_1 = __importDefault(require("./segmentation/CircleROIStartEndThresholdTool"));
|
|
99
|
+
exports.CircleROIStartEndThresholdTool = CircleROIStartEndThresholdTool_1.default;
|
|
97
100
|
const BrushTool_1 = __importDefault(require("./segmentation/BrushTool"));
|
|
98
101
|
exports.BrushTool = BrushTool_1.default;
|
|
99
102
|
const PaintFillTool_1 = __importDefault(require("./segmentation/PaintFillTool"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":";;;;;;;AAAA,iCAAyE;AA0DvE,yFA1DO,eAAQ,OA0DP;AACR,+FA3DiB,qBAAc,OA2DjB;AACd,sGA5DiC,4BAAqB,OA4DjC;AA3DvB,wDAAgC;AA6D9B,kBA7DK,iBAAO,CA6DL;AA5DT,gFAAwD;AA6DtD,8BA7DK,6BAAmB,CA6DL;AA5DrB,wEAAgD;AA8D9C,0BA9DK,yBAAe,CA8DL;AA7DjB,wEAAgD;AA8D9C,0BA9DK,yBAAe,CA8DL;AA7DjB,0EAAkD;AA8DhD,2BA9DK,0BAAgB,CA8DL;AA7DlB,oGAAwE;AA8DtE,oCA9DK,uCAAyB,CA8DL;AA7D3B,0DAAkC;AA8DhC,mBA9DK,kBAAQ,CA8DL;AA7DV,8FAAsE;AA8DpE,qCA9DK,oCAA0B,CA8DL;AA7D5B,8EAAsD;AA8DpD,6BA9DK,4BAAkB,CA8DL;AA7DpB,sEAA8C;AAgE5C,yBAhEK,wBAAc,CAgEL;AA/DhB,gEAAwC;AA+FtC,sBA/FK,qBAAW,CA+FL;AA9Fb,gFAAwD;AA+FtD,8BA/FK,6BAAmB,CA+FL;AA9FrB,8EAAsD;AA8D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,CAsDL;AAnDzB,iGAAyE;AAqDvE,gCArDK,+BAAqB,CAqDL;AApDvB,2FAAmE;AAqDjE,6BArDK,4BAAkB,CAqDL;AApDpB,2FAAmE;AAqDjE,6BArDK,4BAAkB,CAqDL;AApDpB,yGAAiF;AAqD/E,oCArDK,mCAAyB,CAqDL;AApD3B,yHAAiG;AAqD/F,4CArDK,2CAAiC,CAqDL;AApDnC,mHAA2F;AAqDzF,yCArDK,wCAA8B,CAqDL;AApDhC,yEAAiD;AAsD/C,oBAtDK,mBAAS,CAsDL;AArDX,iFAAyD;AAyDvD,wBAzDK,uBAAa,CAyDL;AAxDf,oFAA4D;AA0D1D,gCA1DK,+BAAqB,CA0DL;AAzDvB,yFAAiE;AA0D/D,4BA1DK,2BAAiB,CA0DL"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Types } from '@cornerstonejs/core';
|
|
2
|
+
import { vec3 } from 'gl-matrix';
|
|
3
|
+
import { PublicToolProps, ToolProps, EventTypes, SVGDrawingHelper } from '../../types';
|
|
4
|
+
import { CircleROIStartEndThresholdAnnotation } from '../../types/ToolSpecificAnnotationTypes';
|
|
5
|
+
import CircleROITool from '../annotation/CircleROITool';
|
|
6
|
+
declare class CircleROIStartEndThresholdTool extends CircleROITool {
|
|
7
|
+
static toolName: any;
|
|
8
|
+
touchDragCallback: any;
|
|
9
|
+
mouseDragCallback: any;
|
|
10
|
+
_throttledCalculateCachedStats: any;
|
|
11
|
+
editData: {
|
|
12
|
+
annotation: any;
|
|
13
|
+
viewportIdsToRender: Array<string>;
|
|
14
|
+
handleIndex?: number;
|
|
15
|
+
newAnnotation?: boolean;
|
|
16
|
+
hasMoved?: boolean;
|
|
17
|
+
} | null;
|
|
18
|
+
isDrawing: boolean;
|
|
19
|
+
isHandleOutsideImage: boolean;
|
|
20
|
+
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
|
|
21
|
+
addNewAnnotation: (evt: EventTypes.InteractionEventType) => {
|
|
22
|
+
highlighted: boolean;
|
|
23
|
+
invalidated: boolean;
|
|
24
|
+
metadata: {
|
|
25
|
+
toolName: string;
|
|
26
|
+
viewPlaneNormal: Types.Point3;
|
|
27
|
+
viewUp: Types.Point3;
|
|
28
|
+
FrameOfReferenceUID: string;
|
|
29
|
+
referencedImageId: any;
|
|
30
|
+
volumeId: any;
|
|
31
|
+
spacingInNormal: number;
|
|
32
|
+
enabledElement: Types.IEnabledElement;
|
|
33
|
+
};
|
|
34
|
+
data: {
|
|
35
|
+
label: string;
|
|
36
|
+
startSlice: number;
|
|
37
|
+
endSlice: number;
|
|
38
|
+
handles: {
|
|
39
|
+
textBox: {
|
|
40
|
+
hasMoved: boolean;
|
|
41
|
+
worldPosition: any;
|
|
42
|
+
worldBoundingBox: any;
|
|
43
|
+
};
|
|
44
|
+
points: [Types.Point3, Types.Point3];
|
|
45
|
+
activeHandleIndex: any;
|
|
46
|
+
};
|
|
47
|
+
cachedStats: {
|
|
48
|
+
pointsInVolume: any[];
|
|
49
|
+
projectionPoints: any[];
|
|
50
|
+
};
|
|
51
|
+
labelmapUID: any;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
_endCallback: (evt: EventTypes.InteractionEventType) => void;
|
|
55
|
+
renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
|
|
56
|
+
_computeProjectionPoints(annotation: CircleROIStartEndThresholdAnnotation, imageVolume: Types.IImageVolume): void;
|
|
57
|
+
_computePointsInsideVolume(annotation: any, imageVolume: any, enabledElement: any): void;
|
|
58
|
+
_calculateCachedStatsTool(annotation: any, enabledElement: any): any;
|
|
59
|
+
_getStartSliceIndex(imageVolume: Types.IImageVolume, worldPos: Types.Point3, spacingInNormal: number, viewPlaneNormal: Types.Point3): number | undefined;
|
|
60
|
+
_getEndSliceIndex(imageVolume: Types.IImageVolume, worldPos: Types.Point3, spacingInNormal: number, viewPlaneNormal: Types.Point3): number | undefined;
|
|
61
|
+
_getImageIdIndex(imageVolume: Types.IImageVolume, pos: vec3, spacingInNormal: number, viewPlaneNormal: Types.Point3): number | undefined;
|
|
62
|
+
}
|
|
63
|
+
export default CircleROIStartEndThresholdTool;
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@cornerstonejs/core");
|
|
7
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
8
|
+
const enums_1 = require("../../enums");
|
|
9
|
+
const annotationState_1 = require("../../stateManagement/annotation/annotationState");
|
|
10
|
+
const annotationLocking_1 = require("../../stateManagement/annotation/annotationLocking");
|
|
11
|
+
const drawingSvg_1 = require("../../drawingSvg");
|
|
12
|
+
const viewportFilters_1 = require("../../utilities/viewportFilters");
|
|
13
|
+
const throttle_1 = __importDefault(require("../../utilities/throttle"));
|
|
14
|
+
const annotationVisibility_1 = require("../../stateManagement/annotation/annotationVisibility");
|
|
15
|
+
const elementCursor_1 = require("../../cursors/elementCursor");
|
|
16
|
+
const triggerAnnotationRenderForViewportIds_1 = __importDefault(require("../../utilities/triggerAnnotationRenderForViewportIds"));
|
|
17
|
+
const state_1 = require("../../stateManagement/annotation/helpers/state");
|
|
18
|
+
const CircleROITool_1 = __importDefault(require("../annotation/CircleROITool"));
|
|
19
|
+
const circle_1 = require("../../utilities/math/circle");
|
|
20
|
+
const ellipse_1 = require("../../utilities/math/ellipse");
|
|
21
|
+
const utilities_1 = require("../../utilities");
|
|
22
|
+
const { transformWorldToIndex } = core_1.utilities;
|
|
23
|
+
class CircleROIStartEndThresholdTool extends CircleROITool_1.default {
|
|
24
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
25
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
26
|
+
configuration: {
|
|
27
|
+
numSlicesToPropagate: 10,
|
|
28
|
+
calculatePointsInsideVolume: false,
|
|
29
|
+
},
|
|
30
|
+
}) {
|
|
31
|
+
super(toolProps, defaultToolProps);
|
|
32
|
+
this.isHandleOutsideImage = false;
|
|
33
|
+
this.addNewAnnotation = (evt) => {
|
|
34
|
+
const eventDetail = evt.detail;
|
|
35
|
+
const { currentPoints, element } = eventDetail;
|
|
36
|
+
const worldPos = currentPoints.world;
|
|
37
|
+
const canvasPos = currentPoints.canvas;
|
|
38
|
+
const enabledElement = (0, core_1.getEnabledElement)(element);
|
|
39
|
+
const { viewport, renderingEngine } = enabledElement;
|
|
40
|
+
this.isDrawing = true;
|
|
41
|
+
const camera = viewport.getCamera();
|
|
42
|
+
const { viewPlaneNormal, viewUp } = camera;
|
|
43
|
+
let referencedImageId, imageVolume, volumeId;
|
|
44
|
+
if (viewport instanceof core_1.StackViewport) {
|
|
45
|
+
throw new Error('Stack Viewport Not implemented');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
const targetId = this.getTargetId(viewport);
|
|
49
|
+
volumeId = targetId.split(/volumeId:|\?/)[1];
|
|
50
|
+
imageVolume = core_1.cache.getVolume(volumeId);
|
|
51
|
+
referencedImageId = core_1.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
|
|
52
|
+
}
|
|
53
|
+
const spacingInNormal = core_1.utilities.getSpacingInNormalDirection(imageVolume, viewPlaneNormal);
|
|
54
|
+
const newStartIndex = this._getStartSliceIndex(imageVolume, worldPos, spacingInNormal, viewPlaneNormal);
|
|
55
|
+
const endIndex = this._getEndSliceIndex(imageVolume, worldPos, spacingInNormal, viewPlaneNormal);
|
|
56
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
57
|
+
const annotation = {
|
|
58
|
+
highlighted: true,
|
|
59
|
+
invalidated: true,
|
|
60
|
+
metadata: {
|
|
61
|
+
toolName: this.getToolName(),
|
|
62
|
+
viewPlaneNormal: [...viewPlaneNormal],
|
|
63
|
+
viewUp: [...viewUp],
|
|
64
|
+
FrameOfReferenceUID,
|
|
65
|
+
referencedImageId,
|
|
66
|
+
volumeId,
|
|
67
|
+
spacingInNormal,
|
|
68
|
+
enabledElement,
|
|
69
|
+
},
|
|
70
|
+
data: {
|
|
71
|
+
label: '',
|
|
72
|
+
startSlice: newStartIndex,
|
|
73
|
+
endSlice: endIndex,
|
|
74
|
+
handles: {
|
|
75
|
+
textBox: {
|
|
76
|
+
hasMoved: false,
|
|
77
|
+
worldPosition: null,
|
|
78
|
+
worldBoundingBox: null,
|
|
79
|
+
},
|
|
80
|
+
points: [[...worldPos], [...worldPos]],
|
|
81
|
+
activeHandleIndex: null,
|
|
82
|
+
},
|
|
83
|
+
cachedStats: {
|
|
84
|
+
pointsInVolume: [],
|
|
85
|
+
projectionPoints: [],
|
|
86
|
+
},
|
|
87
|
+
labelmapUID: null,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
(0, annotationState_1.addAnnotation)(annotation, element);
|
|
91
|
+
const viewportIdsToRender = (0, viewportFilters_1.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
92
|
+
this.editData = {
|
|
93
|
+
annotation,
|
|
94
|
+
viewportIdsToRender,
|
|
95
|
+
newAnnotation: true,
|
|
96
|
+
hasMoved: false,
|
|
97
|
+
};
|
|
98
|
+
this._activateDraw(element);
|
|
99
|
+
(0, elementCursor_1.hideElementCursor)(element);
|
|
100
|
+
evt.preventDefault();
|
|
101
|
+
(0, triggerAnnotationRenderForViewportIds_1.default)(renderingEngine, viewportIdsToRender);
|
|
102
|
+
return annotation;
|
|
103
|
+
};
|
|
104
|
+
this._endCallback = (evt) => {
|
|
105
|
+
const eventDetail = evt.detail;
|
|
106
|
+
const { element } = eventDetail;
|
|
107
|
+
const { annotation, viewportIdsToRender, newAnnotation, hasMoved } = this.editData;
|
|
108
|
+
const { data } = annotation;
|
|
109
|
+
if (newAnnotation && !hasMoved) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
annotation.highlighted = false;
|
|
113
|
+
data.handles.activeHandleIndex = null;
|
|
114
|
+
this._deactivateModify(element);
|
|
115
|
+
this._deactivateDraw(element);
|
|
116
|
+
(0, elementCursor_1.resetElementCursor)(element);
|
|
117
|
+
const enabledElement = (0, core_1.getEnabledElement)(element);
|
|
118
|
+
this.editData = null;
|
|
119
|
+
this.isDrawing = false;
|
|
120
|
+
if (this.isHandleOutsideImage &&
|
|
121
|
+
this.configuration.preventHandleOutsideImage) {
|
|
122
|
+
(0, annotationState_1.removeAnnotation)(annotation.annotationUID);
|
|
123
|
+
}
|
|
124
|
+
const targetId = this.getTargetId(enabledElement.viewport);
|
|
125
|
+
const imageVolume = core_1.cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
|
|
126
|
+
if (this.configuration.calculatePointsInsideVolume) {
|
|
127
|
+
this._computePointsInsideVolume(annotation, imageVolume, enabledElement);
|
|
128
|
+
}
|
|
129
|
+
(0, triggerAnnotationRenderForViewportIds_1.default)(enabledElement.renderingEngine, viewportIdsToRender);
|
|
130
|
+
if (newAnnotation) {
|
|
131
|
+
(0, state_1.triggerAnnotationCompleted)(annotation);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
135
|
+
let renderStatus = false;
|
|
136
|
+
const { viewport } = enabledElement;
|
|
137
|
+
const annotations = (0, annotationState_1.getAnnotations)(this.getToolName(), viewport.element);
|
|
138
|
+
if (!(annotations === null || annotations === void 0 ? void 0 : annotations.length)) {
|
|
139
|
+
return renderStatus;
|
|
140
|
+
}
|
|
141
|
+
const sliceIndex = viewport.getCurrentImageIdIndex();
|
|
142
|
+
const styleSpecifier = {
|
|
143
|
+
toolGroupId: this.toolGroupId,
|
|
144
|
+
toolName: this.getToolName(),
|
|
145
|
+
viewportId: enabledElement.viewport.id,
|
|
146
|
+
};
|
|
147
|
+
for (let i = 0; i < annotations.length; i++) {
|
|
148
|
+
const annotation = annotations[i];
|
|
149
|
+
const { annotationUID, data } = annotation;
|
|
150
|
+
const { startSlice, endSlice } = data;
|
|
151
|
+
const { points, activeHandleIndex } = data.handles;
|
|
152
|
+
styleSpecifier.annotationUID = annotationUID;
|
|
153
|
+
const lineWidth = this.getStyle('lineWidth', styleSpecifier, annotation);
|
|
154
|
+
const lineDash = this.getStyle('lineDash', styleSpecifier, annotation);
|
|
155
|
+
const color = this.getStyle('color', styleSpecifier, annotation);
|
|
156
|
+
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
157
|
+
const center = canvasCoordinates[0];
|
|
158
|
+
const radius = (0, circle_1.getCanvasCircleRadius)(canvasCoordinates);
|
|
159
|
+
const { centerPointRadius } = this.configuration;
|
|
160
|
+
if (sliceIndex < Math.min(startSlice, endSlice) ||
|
|
161
|
+
sliceIndex > Math.max(startSlice, endSlice)) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (annotation.invalidated) {
|
|
165
|
+
this._throttledCalculateCachedStats(annotation, enabledElement);
|
|
166
|
+
}
|
|
167
|
+
const middleSlice = Math.round((startSlice + endSlice) / 2);
|
|
168
|
+
let isMiddleSlice = false;
|
|
169
|
+
if (sliceIndex === middleSlice) {
|
|
170
|
+
isMiddleSlice = true;
|
|
171
|
+
}
|
|
172
|
+
if (!viewport.getRenderingEngine()) {
|
|
173
|
+
console.warn('Rendering Engine has been destroyed');
|
|
174
|
+
return renderStatus;
|
|
175
|
+
}
|
|
176
|
+
let activeHandleCanvasCoords;
|
|
177
|
+
if (!(0, annotationVisibility_1.isAnnotationVisible)(annotationUID)) {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (!(0, annotationLocking_1.isAnnotationLocked)(annotation) &&
|
|
181
|
+
!this.editData &&
|
|
182
|
+
activeHandleIndex !== null &&
|
|
183
|
+
isMiddleSlice) {
|
|
184
|
+
activeHandleCanvasCoords = [canvasCoordinates[activeHandleIndex]];
|
|
185
|
+
}
|
|
186
|
+
if (activeHandleCanvasCoords) {
|
|
187
|
+
const handleGroupUID = '0';
|
|
188
|
+
(0, drawingSvg_1.drawHandles)(svgDrawingHelper, annotationUID, handleGroupUID, activeHandleCanvasCoords, {
|
|
189
|
+
color,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
let lineWidthToUse = lineWidth;
|
|
193
|
+
if (isMiddleSlice) {
|
|
194
|
+
lineWidthToUse = 3;
|
|
195
|
+
}
|
|
196
|
+
const circleUID = '0';
|
|
197
|
+
(0, drawingSvg_1.drawCircle)(svgDrawingHelper, annotationUID, circleUID, center, radius, {
|
|
198
|
+
color,
|
|
199
|
+
lineDash,
|
|
200
|
+
lineWidth: lineWidthToUse,
|
|
201
|
+
});
|
|
202
|
+
if (centerPointRadius > 0) {
|
|
203
|
+
if (radius > 3 * centerPointRadius) {
|
|
204
|
+
(0, drawingSvg_1.drawCircle)(svgDrawingHelper, annotationUID, `${circleUID}-center`, center, centerPointRadius, {
|
|
205
|
+
color,
|
|
206
|
+
lineDash,
|
|
207
|
+
lineWidth,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
renderStatus = true;
|
|
212
|
+
}
|
|
213
|
+
return renderStatus;
|
|
214
|
+
};
|
|
215
|
+
this._throttledCalculateCachedStats = (0, throttle_1.default)(this._calculateCachedStatsTool, 100, { trailing: true });
|
|
216
|
+
}
|
|
217
|
+
_computeProjectionPoints(annotation, imageVolume) {
|
|
218
|
+
const { data, metadata } = annotation;
|
|
219
|
+
const { viewPlaneNormal, spacingInNormal } = metadata;
|
|
220
|
+
const { imageData } = imageVolume;
|
|
221
|
+
const { startSlice, endSlice } = data;
|
|
222
|
+
const { points } = data.handles;
|
|
223
|
+
const startIJK = transformWorldToIndex(imageData, points[0]);
|
|
224
|
+
startIJK[2] = startSlice;
|
|
225
|
+
if (startIJK[2] !== startSlice) {
|
|
226
|
+
throw new Error('Start slice does not match');
|
|
227
|
+
}
|
|
228
|
+
const endIJK = gl_matrix_1.vec3.fromValues(startIJK[0], startIJK[1], endSlice);
|
|
229
|
+
const startWorld = gl_matrix_1.vec3.create();
|
|
230
|
+
imageData.indexToWorldVec3(startIJK, startWorld);
|
|
231
|
+
const endWorld = gl_matrix_1.vec3.create();
|
|
232
|
+
imageData.indexToWorldVec3(endIJK, endWorld);
|
|
233
|
+
const distance = gl_matrix_1.vec3.distance(startWorld, endWorld);
|
|
234
|
+
const newProjectionPoints = [];
|
|
235
|
+
for (let dist = 0; dist < distance; dist += spacingInNormal) {
|
|
236
|
+
newProjectionPoints.push(points.map((point) => {
|
|
237
|
+
const newPoint = gl_matrix_1.vec3.create();
|
|
238
|
+
gl_matrix_1.vec3.scaleAndAdd(newPoint, point, viewPlaneNormal, dist);
|
|
239
|
+
return Array.from(newPoint);
|
|
240
|
+
}));
|
|
241
|
+
}
|
|
242
|
+
data.cachedStats.projectionPoints = newProjectionPoints;
|
|
243
|
+
}
|
|
244
|
+
_computePointsInsideVolume(annotation, imageVolume, enabledElement) {
|
|
245
|
+
const { data } = annotation;
|
|
246
|
+
const { viewport } = enabledElement;
|
|
247
|
+
const projectionPoints = data.cachedStats.projectionPoints;
|
|
248
|
+
const pointsInsideVolume = [[]];
|
|
249
|
+
for (let i = 0; i < projectionPoints.length; i++) {
|
|
250
|
+
if (!imageVolume) {
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
const centerWorld = projectionPoints[i][0];
|
|
254
|
+
const canvasCoordinates = projectionPoints[i].map((p) => viewport.worldToCanvas(p));
|
|
255
|
+
const [topLeftCanvas, bottomRightCanvas] = ((0, circle_1.getCanvasCircleCorners)(canvasCoordinates));
|
|
256
|
+
const topLeftWorld = viewport.canvasToWorld(topLeftCanvas);
|
|
257
|
+
const bottomRightWorld = viewport.canvasToWorld(bottomRightCanvas);
|
|
258
|
+
const worldPos1 = topLeftWorld;
|
|
259
|
+
const worldPos2 = bottomRightWorld;
|
|
260
|
+
const { dimensions, imageData } = imageVolume;
|
|
261
|
+
const worldPos1Index = transformWorldToIndex(imageData, worldPos1);
|
|
262
|
+
const worldCenterIndex = transformWorldToIndex(imageData, centerWorld);
|
|
263
|
+
worldPos1Index[0] = Math.floor(worldPos1Index[0]);
|
|
264
|
+
worldPos1Index[1] = Math.floor(worldPos1Index[1]);
|
|
265
|
+
worldPos1Index[2] = Math.floor(worldCenterIndex[2]);
|
|
266
|
+
const worldPos2Index = transformWorldToIndex(imageData, worldPos2);
|
|
267
|
+
worldPos2Index[0] = Math.floor(worldPos2Index[0]);
|
|
268
|
+
worldPos2Index[1] = Math.floor(worldPos2Index[1]);
|
|
269
|
+
worldPos2Index[2] = Math.floor(worldCenterIndex[2]);
|
|
270
|
+
if (this._isInsideVolume(worldPos1Index, worldPos2Index, dimensions)) {
|
|
271
|
+
const iMin = Math.min(worldPos1Index[0], worldPos2Index[0]);
|
|
272
|
+
const iMax = Math.max(worldPos1Index[0], worldPos2Index[0]);
|
|
273
|
+
const jMin = Math.min(worldPos1Index[1], worldPos2Index[1]);
|
|
274
|
+
const jMax = Math.max(worldPos1Index[1], worldPos2Index[1]);
|
|
275
|
+
const kMin = Math.min(worldPos1Index[2], worldPos2Index[2]);
|
|
276
|
+
const kMax = Math.max(worldPos1Index[2], worldPos2Index[2]);
|
|
277
|
+
const boundsIJK = [
|
|
278
|
+
[iMin, iMax],
|
|
279
|
+
[jMin, jMax],
|
|
280
|
+
[kMin, kMax],
|
|
281
|
+
];
|
|
282
|
+
const center = centerWorld;
|
|
283
|
+
const ellipseObj = {
|
|
284
|
+
center,
|
|
285
|
+
xRadius: Math.abs(topLeftWorld[0] - bottomRightWorld[0]) / 2,
|
|
286
|
+
yRadius: Math.abs(topLeftWorld[1] - bottomRightWorld[1]) / 2,
|
|
287
|
+
zRadius: Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2,
|
|
288
|
+
};
|
|
289
|
+
const pointsInShape = (0, utilities_1.pointInShapeCallback)(imageData, (pointLPS) => (0, ellipse_1.pointInEllipse)(ellipseObj, pointLPS), null, boundsIJK);
|
|
290
|
+
pointsInsideVolume.push(pointsInShape);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
data.cachedStats.pointsInVolume = pointsInsideVolume;
|
|
294
|
+
}
|
|
295
|
+
_calculateCachedStatsTool(annotation, enabledElement) {
|
|
296
|
+
const data = annotation.data;
|
|
297
|
+
const { viewportId, renderingEngineId, viewport } = enabledElement;
|
|
298
|
+
const { cachedStats } = data;
|
|
299
|
+
const targetId = this.getTargetId(viewport);
|
|
300
|
+
const imageVolume = core_1.cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
|
|
301
|
+
this._computeProjectionPoints(annotation, imageVolume);
|
|
302
|
+
annotation.invalidated = false;
|
|
303
|
+
const eventType = enums_1.Events.ANNOTATION_MODIFIED;
|
|
304
|
+
const eventDetail = {
|
|
305
|
+
annotation,
|
|
306
|
+
viewportId,
|
|
307
|
+
renderingEngineId,
|
|
308
|
+
};
|
|
309
|
+
(0, core_1.triggerEvent)(core_1.eventTarget, eventType, eventDetail);
|
|
310
|
+
return cachedStats;
|
|
311
|
+
}
|
|
312
|
+
_getStartSliceIndex(imageVolume, worldPos, spacingInNormal, viewPlaneNormal) {
|
|
313
|
+
const numSlicesToPropagate = this.configuration.numSlicesToPropagate;
|
|
314
|
+
const numSlicesToPropagateFromStart = Math.round(numSlicesToPropagate / 2);
|
|
315
|
+
const startPos = gl_matrix_1.vec3.create();
|
|
316
|
+
gl_matrix_1.vec3.scaleAndAdd(startPos, worldPos, viewPlaneNormal, numSlicesToPropagateFromStart * -spacingInNormal);
|
|
317
|
+
const imageIdIndex = this._getImageIdIndex(imageVolume, startPos, spacingInNormal, viewPlaneNormal);
|
|
318
|
+
return imageIdIndex;
|
|
319
|
+
}
|
|
320
|
+
_getEndSliceIndex(imageVolume, worldPos, spacingInNormal, viewPlaneNormal) {
|
|
321
|
+
const numSlicesToPropagate = this.configuration.numSlicesToPropagate;
|
|
322
|
+
const numSlicesToPropagateFromStart = Math.round(numSlicesToPropagate / 2);
|
|
323
|
+
const endPos = gl_matrix_1.vec3.create();
|
|
324
|
+
gl_matrix_1.vec3.scaleAndAdd(endPos, worldPos, viewPlaneNormal, numSlicesToPropagateFromStart * spacingInNormal);
|
|
325
|
+
const imageIdIndex = this._getImageIdIndex(imageVolume, endPos, spacingInNormal, viewPlaneNormal);
|
|
326
|
+
return imageIdIndex;
|
|
327
|
+
}
|
|
328
|
+
_getImageIdIndex(imageVolume, pos, spacingInNormal, viewPlaneNormal) {
|
|
329
|
+
const halfSpacingInNormalDirection = spacingInNormal / 2;
|
|
330
|
+
const { imageIds } = imageVolume;
|
|
331
|
+
let imageIdIndex;
|
|
332
|
+
for (let i = 0; i < imageIds.length; i++) {
|
|
333
|
+
const imageId = imageIds[i];
|
|
334
|
+
const { imagePositionPatient } = core_1.metaData.get('imagePlaneModule', imageId);
|
|
335
|
+
const dir = gl_matrix_1.vec3.create();
|
|
336
|
+
gl_matrix_1.vec3.sub(dir, pos, imagePositionPatient);
|
|
337
|
+
const dot = gl_matrix_1.vec3.dot(dir, viewPlaneNormal);
|
|
338
|
+
if (Math.abs(dot) < halfSpacingInNormalDirection) {
|
|
339
|
+
imageIdIndex = i;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return imageIdIndex;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
CircleROIStartEndThresholdTool.toolName = 'CircleROIStartEndThreshold';
|
|
346
|
+
exports.default = CircleROIStartEndThresholdTool;
|
|
347
|
+
//# sourceMappingURL=CircleROIStartEndThresholdTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircleROIStartEndThresholdTool.js","sourceRoot":"","sources":["../../../../src/tools/segmentation/CircleROIStartEndThresholdTool.ts"],"names":[],"mappings":";;;;;AAAA,8CAS6B;AAE7B,yCAAiC;AACjC,uCAAqC;AACrC,sFAI0D;AAC1D,0FAAwF;AACxF,iDAG0B;AAC1B,qEAAiF;AACjF,wEAAgD;AAEhD,gGAA4F;AAC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AED,gBAAgB,CACd,WAA+B,EAC/B,GAAS,EACT,eAAuB,EACvB,eAA6B;QAE7B,MAAM,4BAA4B,GAAG,eAAe,GAAG,CAAC,CAAC;QAEzD,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;QACjC,IAAI,YAAY,CAAC;QACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAE5B,MAAM,EAAE,oBAAoB,EAAE,GAAG,eAAQ,CAAC,GAAG,CAC3C,kBAAkB,EAClB,OAAO,CACR,CAAC;YAEF,MAAM,GAAG,GAAG,gBAAI,CAAC,MAAM,EAAE,CAAC;YAC1B,gBAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,oBAAoB,CAAC,CAAC;YAEzC,MAAM,GAAG,GAAG,gBAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;YAE3C,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,4BAA4B,EAAE;gBAChD,YAAY,GAAG,CAAC,CAAC;aAClB;SACF;QAED,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAED,8BAA8B,CAAC,QAAQ,GAAG,4BAA4B,CAAC;AACvE,kBAAe,8BAA8B,CAAC"}
|
|
@@ -33,6 +33,7 @@ declare class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
33
33
|
startSlice: number;
|
|
34
34
|
endSlice: number;
|
|
35
35
|
cachedStats: {
|
|
36
|
+
pointsInVolume: any[];
|
|
36
37
|
projectionPoints: any[];
|
|
37
38
|
projectionPointsImageIds: any[];
|
|
38
39
|
};
|
|
@@ -48,7 +49,9 @@ declare class RectangleROIStartEndThresholdTool extends RectangleROITool {
|
|
|
48
49
|
labelmapUID: any;
|
|
49
50
|
};
|
|
50
51
|
};
|
|
52
|
+
_endCallback: (evt: EventTypes.InteractionEventType) => void;
|
|
51
53
|
_computeProjectionPoints(annotation: RectangleROIStartEndThresholdAnnotation, imageVolume: Types.IImageVolume): void;
|
|
54
|
+
_computePointsInsideVolume(annotation: any, imageVolume: any, enabledElement: any): void;
|
|
52
55
|
_calculateCachedStatsTool(annotation: any, enabledElement: any): any;
|
|
53
56
|
renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
|
|
54
57
|
_getEndSliceIndex(imageVolume: Types.IImageVolume, worldPos: Types.Point3, spacingInNormal: number, viewPlaneNormal: Types.Point3): number | undefined;
|