@cornerstonejs/tools 5.4.17 → 5.5.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/dist/esm/enums/Events.d.ts +7 -0
- package/dist/esm/enums/Events.js +7 -0
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/tools/SliceIntersectionTool.d.ts +150 -0
- package/dist/esm/tools/SliceIntersectionTool.js +1065 -0
- package/dist/esm/tools/WorldCrosshairTool.d.ts +118 -0
- package/dist/esm/tools/WorldCrosshairTool.js +749 -0
- package/dist/esm/tools/annotation/LivewireContourTool.d.ts +1 -3
- package/dist/esm/tools/annotation/LivewireContourTool.js +0 -18
- package/dist/esm/tools/annotation/RectangleROITool.js +8 -8
- package/dist/esm/tools/annotation/SplineROITool.d.ts +1 -3
- package/dist/esm/tools/annotation/SplineROITool.js +0 -18
- package/dist/esm/tools/annotation/UltrasoundDirectionalTool.js +3 -3
- package/dist/esm/tools/base/AnnotationTool.d.ts +4 -0
- package/dist/esm/tools/base/AnnotationTool.js +20 -0
- package/dist/esm/tools/index.d.ts +3 -1
- package/dist/esm/tools/index.js +3 -1
- package/dist/esm/tools/worldCrosshair/WorldCrosshairLines3D.d.ts +8 -0
- package/dist/esm/tools/worldCrosshair/WorldCrosshairLines3D.js +81 -0
- package/dist/esm/utilities/genericViewportToolHelpers.d.ts +1 -0
- package/dist/esm/utilities/genericViewportToolHelpers.js +31 -0
- package/dist/esm/utilities/index.d.ts +3 -1
- package/dist/esm/utilities/index.js +3 -1
- package/dist/esm/utilities/pickIntensityPointInSlab.d.ts +7 -0
- package/dist/esm/utilities/pickIntensityPointInSlab.js +106 -0
- package/dist/esm/utilities/spatial/areViewportsSpatiallyLinked.d.ts +3 -0
- package/dist/esm/utilities/spatial/areViewportsSpatiallyLinked.js +48 -0
- package/dist/esm/utilities/spatial/clipWorldLineToViewportCanvas.d.ts +3 -0
- package/dist/esm/utilities/spatial/clipWorldLineToViewportCanvas.js +58 -0
- package/dist/esm/utilities/spatial/distancePointToPlane.d.ts +3 -0
- package/dist/esm/utilities/spatial/distancePointToPlane.js +6 -0
- package/dist/esm/utilities/spatial/getDisplayedCanvasSize.d.ts +5 -0
- package/dist/esm/utilities/spatial/getDisplayedCanvasSize.js +12 -0
- package/dist/esm/utilities/spatial/getViewportPlane.d.ts +3 -0
- package/dist/esm/utilities/spatial/getViewportPlane.js +33 -0
- package/dist/esm/utilities/spatial/index.d.ts +11 -0
- package/dist/esm/utilities/spatial/index.js +10 -0
- package/dist/esm/utilities/spatial/intersectPlanes.d.ts +2 -0
- package/dist/esm/utilities/spatial/intersectPlanes.js +30 -0
- package/dist/esm/utilities/spatial/projectPointToPlane.d.ts +3 -0
- package/dist/esm/utilities/spatial/projectPointToPlane.js +11 -0
- package/dist/esm/utilities/spatial/rotateViewportAroundWorldPoint.d.ts +2 -0
- package/dist/esm/utilities/spatial/rotateViewportAroundWorldPoint.js +34 -0
- package/dist/esm/utilities/spatial/translateViewportAlongNormal.d.ts +2 -0
- package/dist/esm/utilities/spatial/translateViewportAlongNormal.js +36 -0
- package/dist/esm/utilities/spatial/types.d.ts +19 -0
- package/dist/esm/utilities/spatial/types.js +0 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +4 -4
|
@@ -4,6 +4,13 @@ declare enum Events {
|
|
|
4
4
|
TOOLGROUP_VIEWPORT_REMOVED = "CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_REMOVED",
|
|
5
5
|
TOOL_MODE_CHANGED = "CORNERSTONE_TOOLS_TOOL_MODE_CHANGED",
|
|
6
6
|
CROSSHAIR_TOOL_CENTER_CHANGED = "CORNERSTONE_TOOLS_CROSSHAIR_TOOL_CENTER_CHANGED",
|
|
7
|
+
WORLD_CROSSHAIR_POINT_CHANGED = "CORNERSTONE_TOOLS_WORLD_CROSSHAIR_POINT_CHANGED",
|
|
8
|
+
WORLD_CROSSHAIR_POINT_CLEARED = "CORNERSTONE_TOOLS_WORLD_CROSSHAIR_POINT_CLEARED",
|
|
9
|
+
WORLD_CROSSHAIR_JUMPED_TO_POINT = "CORNERSTONE_TOOLS_WORLD_CROSSHAIR_JUMPED_TO_POINT",
|
|
10
|
+
SLICE_INTERSECTION_LINE_SELECTED = "CORNERSTONE_TOOLS_SLICE_INTERSECTION_LINE_SELECTED",
|
|
11
|
+
SLICE_INTERSECTION_MANIPULATION_STARTED = "CORNERSTONE_TOOLS_SLICE_INTERSECTION_MANIPULATION_STARTED",
|
|
12
|
+
SLICE_INTERSECTION_MANIPULATION_ENDED = "CORNERSTONE_TOOLS_SLICE_INTERSECTION_MANIPULATION_ENDED",
|
|
13
|
+
SLICE_INTERSECTION_SLAB_THICKNESS_CHANGED = "CORNERSTONE_TOOLS_SLICE_INTERSECTION_SLAB_THICKNESS_CHANGED",
|
|
7
14
|
VOLUMECROPPINGCONTROL_TOOL_CHANGED = "CORNERSTONE_TOOLS_VOLUMECROPPINGCONTROL_TOOL_CHANGED",
|
|
8
15
|
VOLUMECROPPING_TOOL_CHANGED = "CORNERSTONE_TOOLS_VOLUMECROPPING_TOOL_CHANGED",
|
|
9
16
|
STACK_PREFETCH_COMPLETE = "CORNERSTONE_TOOLS_STACK_PREFETCH_COMPLETE",
|
package/dist/esm/enums/Events.js
CHANGED
|
@@ -5,6 +5,13 @@ var Events;
|
|
|
5
5
|
Events["TOOLGROUP_VIEWPORT_REMOVED"] = "CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_REMOVED";
|
|
6
6
|
Events["TOOL_MODE_CHANGED"] = "CORNERSTONE_TOOLS_TOOL_MODE_CHANGED";
|
|
7
7
|
Events["CROSSHAIR_TOOL_CENTER_CHANGED"] = "CORNERSTONE_TOOLS_CROSSHAIR_TOOL_CENTER_CHANGED";
|
|
8
|
+
Events["WORLD_CROSSHAIR_POINT_CHANGED"] = "CORNERSTONE_TOOLS_WORLD_CROSSHAIR_POINT_CHANGED";
|
|
9
|
+
Events["WORLD_CROSSHAIR_POINT_CLEARED"] = "CORNERSTONE_TOOLS_WORLD_CROSSHAIR_POINT_CLEARED";
|
|
10
|
+
Events["WORLD_CROSSHAIR_JUMPED_TO_POINT"] = "CORNERSTONE_TOOLS_WORLD_CROSSHAIR_JUMPED_TO_POINT";
|
|
11
|
+
Events["SLICE_INTERSECTION_LINE_SELECTED"] = "CORNERSTONE_TOOLS_SLICE_INTERSECTION_LINE_SELECTED";
|
|
12
|
+
Events["SLICE_INTERSECTION_MANIPULATION_STARTED"] = "CORNERSTONE_TOOLS_SLICE_INTERSECTION_MANIPULATION_STARTED";
|
|
13
|
+
Events["SLICE_INTERSECTION_MANIPULATION_ENDED"] = "CORNERSTONE_TOOLS_SLICE_INTERSECTION_MANIPULATION_ENDED";
|
|
14
|
+
Events["SLICE_INTERSECTION_SLAB_THICKNESS_CHANGED"] = "CORNERSTONE_TOOLS_SLICE_INTERSECTION_SLAB_THICKNESS_CHANGED";
|
|
8
15
|
Events["VOLUMECROPPINGCONTROL_TOOL_CHANGED"] = "CORNERSTONE_TOOLS_VOLUMECROPPINGCONTROL_TOOL_CHANGED";
|
|
9
16
|
Events["VOLUMECROPPING_TOOL_CHANGED"] = "CORNERSTONE_TOOLS_VOLUMECROPPING_TOOL_CHANGED";
|
|
10
17
|
Events["STACK_PREFETCH_COMPLETE"] = "CORNERSTONE_TOOLS_STACK_PREFETCH_COMPLETE";
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import * as Types from './types/index.js';
|
|
|
12
12
|
import * as annotation from './stateManagement/annotation/index.js';
|
|
13
13
|
import * as segmentation from './stateManagement/segmentation/index.js';
|
|
14
14
|
import * as splines from './tools/annotation/splines/index.js';
|
|
15
|
-
import { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, VolumeCroppingTool, VolumeCroppingControlTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, SegmentBidirectionalTool, PlanarRotateTool, MIPJumpToClickTool, LabelTool, LengthTool, HeightTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, KeyImageTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, UltrasoundPleuraBLineTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, OrientationControllerTool, OverlayGridTool, SegmentationIntersectionTool, EraserTool, SculptorTool, SegmentSelectTool, WindowLevelRegionTool, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, ClickSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, SegmentLabelTool, LabelMapEditWithContourTool } from './tools/index.js';
|
|
15
|
+
import { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, VolumeCroppingTool, VolumeCroppingControlTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, SegmentBidirectionalTool, PlanarRotateTool, MIPJumpToClickTool, LabelTool, LengthTool, HeightTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, KeyImageTool, CrosshairsTool, WorldCrosshairTool, SliceIntersectionTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, UltrasoundPleuraBLineTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, OrientationControllerTool, OverlayGridTool, SegmentationIntersectionTool, EraserTool, SculptorTool, SegmentSelectTool, WindowLevelRegionTool, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, ClickSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, SegmentLabelTool, LabelMapEditWithContourTool } from './tools/index.js';
|
|
16
16
|
import VideoRedactionTool from './tools/annotation/VideoRedactionTool.js';
|
|
17
17
|
import * as Enums from './enums/index.js';
|
|
18
|
-
export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, SegmentBidirectionalTool, TrackballRotateTool, VolumeCroppingTool, VolumeCroppingControlTool, DragProbeTool, WindowLevelTool, WindowLevelRegionTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, LabelTool, LengthTool, HeightTool, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, UltrasoundPleuraBLineTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ScaleOverlayTool, SculptorTool, EraserTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, OrientationControllerTool, SegmentSelectTool, SegmentLabelTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, store, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, ClickSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, LabelMapEditWithContourTool, splines, version, };
|
|
18
|
+
export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, SegmentBidirectionalTool, TrackballRotateTool, VolumeCroppingTool, VolumeCroppingControlTool, DragProbeTool, WindowLevelTool, WindowLevelRegionTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, LabelTool, LengthTool, HeightTool, CrosshairsTool, WorldCrosshairTool, SliceIntersectionTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, UltrasoundPleuraBLineTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ScaleOverlayTool, SculptorTool, EraserTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, OrientationControllerTool, SegmentSelectTool, SegmentLabelTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, store, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, ClickSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, LabelMapEditWithContourTool, splines, version, };
|
package/dist/esm/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as Types from './types/index.js';
|
|
|
12
12
|
import * as annotation from './stateManagement/annotation/index.js';
|
|
13
13
|
import * as segmentation from './stateManagement/segmentation/index.js';
|
|
14
14
|
import * as splines from './tools/annotation/splines/index.js';
|
|
15
|
-
import { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, VolumeCroppingTool, VolumeCroppingControlTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, SegmentBidirectionalTool, PlanarRotateTool, MIPJumpToClickTool, LabelTool, LengthTool, HeightTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, KeyImageTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, UltrasoundPleuraBLineTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, OrientationControllerTool, OverlayGridTool, SegmentationIntersectionTool, EraserTool, SculptorTool, SegmentSelectTool, WindowLevelRegionTool, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, ClickSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, SegmentLabelTool, LabelMapEditWithContourTool, } from './tools/index.js';
|
|
15
|
+
import { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, VolumeCroppingTool, VolumeCroppingControlTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, SegmentBidirectionalTool, PlanarRotateTool, MIPJumpToClickTool, LabelTool, LengthTool, HeightTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, KeyImageTool, CrosshairsTool, WorldCrosshairTool, SliceIntersectionTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, UltrasoundPleuraBLineTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, OrientationControllerTool, OverlayGridTool, SegmentationIntersectionTool, EraserTool, SculptorTool, SegmentSelectTool, WindowLevelRegionTool, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, ClickSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, SegmentLabelTool, LabelMapEditWithContourTool, } from './tools/index.js';
|
|
16
16
|
import VideoRedactionTool from './tools/annotation/VideoRedactionTool.js';
|
|
17
17
|
import * as Enums from './enums/index.js';
|
|
18
|
-
export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, SegmentBidirectionalTool, TrackballRotateTool, VolumeCroppingTool, VolumeCroppingControlTool, DragProbeTool, WindowLevelTool, WindowLevelRegionTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, LabelTool, LengthTool, HeightTool, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, UltrasoundPleuraBLineTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ScaleOverlayTool, SculptorTool, EraserTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, OrientationControllerTool, SegmentSelectTool, SegmentLabelTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, store, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, ClickSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, LabelMapEditWithContourTool, splines, version, };
|
|
18
|
+
export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, SegmentBidirectionalTool, TrackballRotateTool, VolumeCroppingTool, VolumeCroppingControlTool, DragProbeTool, WindowLevelTool, WindowLevelRegionTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, LabelTool, LengthTool, HeightTool, CrosshairsTool, WorldCrosshairTool, SliceIntersectionTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, UltrasoundPleuraBLineTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ScaleOverlayTool, SculptorTool, EraserTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, OrientationControllerTool, SegmentSelectTool, SegmentLabelTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, store, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, ClickSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, LabelMapEditWithContourTool, splines, version, };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Enums } from '@cornerstonejs/core';
|
|
2
|
+
import type { Types } from '@cornerstonejs/core';
|
|
3
|
+
import { AnnotationTool } from './base/index.js';
|
|
4
|
+
import type { Plane, WorldLine } from '../utilities/spatial/index.js';
|
|
5
|
+
import type { Annotation, Annotations, EventTypes, InteractionTypes, PublicToolProps, SVGDrawingHelper, ToolHandle, ToolProps } from '../types/index.js';
|
|
6
|
+
export type MprPlaneFamily = 'axial' | 'sagittal' | 'coronal';
|
|
7
|
+
export type SliceIntersectionOperation = 'translate' | 'rotate' | 'slabThickness';
|
|
8
|
+
export type SliceIntersectionPlaneGroup = {
|
|
9
|
+
id: string;
|
|
10
|
+
family: MprPlaneFamily;
|
|
11
|
+
frameOfReferenceUID: string;
|
|
12
|
+
viewportIds: string[];
|
|
13
|
+
leaderViewportId: string;
|
|
14
|
+
};
|
|
15
|
+
export type SliceIntersectionState = {
|
|
16
|
+
toolGroupId: string;
|
|
17
|
+
activeGroupId?: string;
|
|
18
|
+
activeTargetViewportId?: string;
|
|
19
|
+
activeOperation?: SliceIntersectionOperation | null;
|
|
20
|
+
};
|
|
21
|
+
export type SliceIntersectionRotationPivotPolicy = 'currentIntersection' | 'viewportCenter' | 'worldCrosshairPointIfAvailable';
|
|
22
|
+
export type SliceIntersectionToolConfiguration = {
|
|
23
|
+
showCurrentSliceLine: boolean;
|
|
24
|
+
showSlabThickness: boolean;
|
|
25
|
+
showBoundaryLines: boolean;
|
|
26
|
+
showIntermediateLines: boolean;
|
|
27
|
+
draggable: boolean;
|
|
28
|
+
rotatable: boolean;
|
|
29
|
+
slabThicknessControls: boolean;
|
|
30
|
+
lineWidth: number;
|
|
31
|
+
activeLineWidth: number;
|
|
32
|
+
handleRadius: number;
|
|
33
|
+
alignGroupsOnEnable: boolean;
|
|
34
|
+
rotationPivotPolicy: SliceIntersectionRotationPivotPolicy;
|
|
35
|
+
familyColors: Record<MprPlaneFamily, string>;
|
|
36
|
+
getLineColor?: (family: MprPlaneFamily, groupId: string, targetViewportId: string) => string;
|
|
37
|
+
setWorldCrosshairOnIntersectionDoubleClick: boolean;
|
|
38
|
+
jumpToIntersectionOnDoubleClick: boolean;
|
|
39
|
+
slabThicknessBlendMode: Enums.BlendModes;
|
|
40
|
+
perViewportLines: boolean;
|
|
41
|
+
};
|
|
42
|
+
export type SliceIntersectionManipulationEventDetail = {
|
|
43
|
+
toolGroupId: string;
|
|
44
|
+
groupId: string;
|
|
45
|
+
family?: MprPlaneFamily;
|
|
46
|
+
viewportIds: string[];
|
|
47
|
+
targetViewportId: string;
|
|
48
|
+
operation: SliceIntersectionOperation;
|
|
49
|
+
};
|
|
50
|
+
export type SliceIntersectionLineSelectedEventDetail = {
|
|
51
|
+
toolGroupId: string;
|
|
52
|
+
groupId: string;
|
|
53
|
+
targetViewportId: string;
|
|
54
|
+
};
|
|
55
|
+
export type SliceIntersectionAnnotation = Annotation & {
|
|
56
|
+
data: {
|
|
57
|
+
viewportId: string;
|
|
58
|
+
handles: {
|
|
59
|
+
points: Types.Point3[];
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export type RenderedIntersectionLine = {
|
|
64
|
+
groupId: string;
|
|
65
|
+
family: MprPlaneFamily;
|
|
66
|
+
leaderViewportId: string;
|
|
67
|
+
memberViewportIds: string[];
|
|
68
|
+
targetViewportId: string;
|
|
69
|
+
line: WorldLine;
|
|
70
|
+
leaderPlane: Plane;
|
|
71
|
+
canvasPoints: [Types.Point2, Types.Point2];
|
|
72
|
+
slabLineSegments: Array<[Types.Point2, Types.Point2]>;
|
|
73
|
+
boundaryLineSegments: Array<[Types.Point2, Types.Point2]>;
|
|
74
|
+
rotateHandles: Types.Point2[];
|
|
75
|
+
slabHandles: Types.Point2[];
|
|
76
|
+
color: string;
|
|
77
|
+
isActive: boolean;
|
|
78
|
+
};
|
|
79
|
+
declare class SliceIntersectionTool extends AnnotationTool {
|
|
80
|
+
static toolName: any;
|
|
81
|
+
static toolLabel: string;
|
|
82
|
+
private _activeGroupId?;
|
|
83
|
+
private _activeTargetViewportId?;
|
|
84
|
+
private _activeOperation;
|
|
85
|
+
private _renderedLines;
|
|
86
|
+
private _pendingHandle;
|
|
87
|
+
private _editData;
|
|
88
|
+
private _mprFamilyByViewportId;
|
|
89
|
+
private _passViewportsById;
|
|
90
|
+
private _passPlaneGroups;
|
|
91
|
+
private _passCacheClearScheduled;
|
|
92
|
+
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
|
|
93
|
+
getState(): SliceIntersectionState;
|
|
94
|
+
getPlaneGroups(): SliceIntersectionPlaneGroup[];
|
|
95
|
+
refreshPlaneFamilies(): void;
|
|
96
|
+
onSetToolEnabled(): void;
|
|
97
|
+
onSetToolActive(): void;
|
|
98
|
+
onSetToolPassive(): void;
|
|
99
|
+
onSetToolDisabled(): void;
|
|
100
|
+
onCameraModified: (evt: Types.EventTypes.CameraModifiedEvent) => void;
|
|
101
|
+
protected _getMprFamily(viewport: Types.IViewport): MprPlaneFamily | null;
|
|
102
|
+
protected _getPlaneGroups(): SliceIntersectionPlaneGroup[];
|
|
103
|
+
private _computePlaneGroups;
|
|
104
|
+
protected _alignPlaneGroups(): void;
|
|
105
|
+
renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
|
|
106
|
+
protected _computeLinesForTarget(targetViewport: Types.IViewport): RenderedIntersectionLine[];
|
|
107
|
+
private _computeLineForGroup;
|
|
108
|
+
private _clipOffsetPlaneIntersection;
|
|
109
|
+
private _appendSlabGeometry;
|
|
110
|
+
private _appendBoundaryGeometry;
|
|
111
|
+
private _getSourceExtentAlongNormal;
|
|
112
|
+
private _appendHandles;
|
|
113
|
+
private _computeSlabHandles;
|
|
114
|
+
addNewAnnotation: (evt: EventTypes.InteractionEventType) => SliceIntersectionAnnotation;
|
|
115
|
+
isPointNearTool: (element: HTMLDivElement, _annotation: SliceIntersectionAnnotation, canvasCoords: Types.Point2, _proximity: number, _interactionType?: string) => boolean;
|
|
116
|
+
getHandleNearImagePoint(element: HTMLDivElement, _annotation: Annotation, canvasCoords: Types.Point2, proximity: number): ToolHandle | undefined;
|
|
117
|
+
toolSelectedCallback: (evt: EventTypes.InteractionEventType, _annotation: Annotation) => void;
|
|
118
|
+
handleSelectedCallback: (evt: EventTypes.InteractionEventType, _annotation: Annotation, _handle: ToolHandle, _interactionType?: InteractionTypes) => void;
|
|
119
|
+
doubleClickCallback: (evt: EventTypes.MouseDoubleClickEventType) => void;
|
|
120
|
+
mouseMoveCallback: (evt: EventTypes.MouseMoveEventType, _filteredToolAnnotations?: Annotations) => boolean;
|
|
121
|
+
filterInteractableAnnotationsForElement: (element: HTMLDivElement, annotations: Annotations) => Annotations;
|
|
122
|
+
cancel: (element: HTMLDivElement) => void;
|
|
123
|
+
private _startManipulation;
|
|
124
|
+
private _endManipulation;
|
|
125
|
+
_endCallback: (evt: EventTypes.InteractionEventType) => void;
|
|
126
|
+
_dragCallback: (evt: EventTypes.InteractionEventType) => void;
|
|
127
|
+
private _applyTranslate;
|
|
128
|
+
private _applyRotate;
|
|
129
|
+
private _applySlabThickness;
|
|
130
|
+
private _setViewportSlabThickness;
|
|
131
|
+
private _isPlanarViewport;
|
|
132
|
+
private _isVolumeModeViewport;
|
|
133
|
+
private _getSourceDataId;
|
|
134
|
+
private _getSourceSlabThickness;
|
|
135
|
+
private _resolveRotationPivot;
|
|
136
|
+
private _closestPointOnLine;
|
|
137
|
+
private _centerViewportOnPoint;
|
|
138
|
+
private _selectLine;
|
|
139
|
+
private _findLineNear;
|
|
140
|
+
protected _getViewportsInfo(): Types.IViewportId[];
|
|
141
|
+
protected _getToolGroupViewports(): Types.IViewport[];
|
|
142
|
+
private _getViewportById;
|
|
143
|
+
private _clearPassCaches;
|
|
144
|
+
private _schedulePassCacheClear;
|
|
145
|
+
private _renderToolViewports;
|
|
146
|
+
private _getOrCreateViewportAnnotation;
|
|
147
|
+
private _createDetachedAnnotation;
|
|
148
|
+
private _getManipulationDetail;
|
|
149
|
+
}
|
|
150
|
+
export default SliceIntersectionTool;
|