@cornerstonejs/tools 0.55.2 → 0.56.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.
Files changed (61) hide show
  1. package/dist/cjs/drawingSvg/drawCircle.d.ts +1 -1
  2. package/dist/cjs/drawingSvg/drawCircle.js +4 -1
  3. package/dist/cjs/drawingSvg/drawCircle.js.map +1 -1
  4. package/dist/cjs/index.d.ts +2 -2
  5. package/dist/cjs/index.js +3 -2
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/tools/annotation/CircleROITool.d.ts +39 -0
  8. package/dist/cjs/tools/annotation/CircleROITool.js +593 -0
  9. package/dist/cjs/tools/annotation/CircleROITool.js.map +1 -0
  10. package/dist/cjs/tools/annotation/EllipticalROITool.js +2 -2
  11. package/dist/cjs/tools/annotation/EllipticalROITool.js.map +1 -1
  12. package/dist/cjs/tools/annotation/RectangleROITool.js +1 -1
  13. package/dist/cjs/tools/annotation/RectangleROITool.js.map +1 -1
  14. package/dist/cjs/tools/index.d.ts +2 -1
  15. package/dist/cjs/tools/index.js +3 -1
  16. package/dist/cjs/tools/index.js.map +1 -1
  17. package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +26 -0
  18. package/dist/cjs/utilities/math/circle/_types.d.ts +5 -0
  19. package/dist/cjs/utilities/math/circle/_types.js +3 -0
  20. package/dist/cjs/utilities/math/circle/_types.js.map +1 -0
  21. package/dist/cjs/utilities/math/circle/getCanvasCircleCorners.d.ts +3 -0
  22. package/dist/cjs/utilities/math/circle/getCanvasCircleCorners.js +12 -0
  23. package/dist/cjs/utilities/math/circle/getCanvasCircleCorners.js.map +1 -0
  24. package/dist/cjs/utilities/math/circle/getCanvasCircleRadius.d.ts +2 -0
  25. package/dist/cjs/utilities/math/circle/getCanvasCircleRadius.js +9 -0
  26. package/dist/cjs/utilities/math/circle/getCanvasCircleRadius.js.map +1 -0
  27. package/dist/cjs/utilities/math/circle/index.d.ts +3 -0
  28. package/dist/cjs/utilities/math/circle/index.js +11 -0
  29. package/dist/cjs/utilities/math/circle/index.js.map +1 -0
  30. package/dist/esm/drawingSvg/drawCircle.d.ts +1 -1
  31. package/dist/esm/drawingSvg/drawCircle.js +4 -1
  32. package/dist/esm/drawingSvg/drawCircle.js.map +1 -1
  33. package/dist/esm/index.d.ts +2 -2
  34. package/dist/esm/index.js +2 -2
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm/tools/annotation/CircleROITool.d.ts +39 -0
  37. package/dist/esm/tools/annotation/CircleROITool.js +588 -0
  38. package/dist/esm/tools/annotation/CircleROITool.js.map +1 -0
  39. package/dist/esm/tools/annotation/EllipticalROITool.js +2 -2
  40. package/dist/esm/tools/annotation/EllipticalROITool.js.map +1 -1
  41. package/dist/esm/tools/annotation/RectangleROITool.js +1 -1
  42. package/dist/esm/tools/annotation/RectangleROITool.js.map +1 -1
  43. package/dist/esm/tools/index.d.ts +2 -1
  44. package/dist/esm/tools/index.js +2 -1
  45. package/dist/esm/tools/index.js.map +1 -1
  46. package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +26 -0
  47. package/dist/esm/utilities/math/circle/_types.d.ts +5 -0
  48. package/dist/esm/utilities/math/circle/_types.js +2 -0
  49. package/dist/esm/utilities/math/circle/_types.js.map +1 -0
  50. package/dist/esm/utilities/math/circle/getCanvasCircleCorners.d.ts +3 -0
  51. package/dist/esm/utilities/math/circle/getCanvasCircleCorners.js +9 -0
  52. package/dist/esm/utilities/math/circle/getCanvasCircleCorners.js.map +1 -0
  53. package/dist/esm/utilities/math/circle/getCanvasCircleRadius.d.ts +2 -0
  54. package/dist/esm/utilities/math/circle/getCanvasCircleRadius.js +6 -0
  55. package/dist/esm/utilities/math/circle/getCanvasCircleRadius.js.map +1 -0
  56. package/dist/esm/utilities/math/circle/index.d.ts +3 -0
  57. package/dist/esm/utilities/math/circle/index.js +4 -0
  58. package/dist/esm/utilities/math/circle/index.js.map +1 -0
  59. package/dist/umd/index.js +1 -1
  60. package/dist/umd/index.js.map +1 -1
  61. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { SVGDrawingHelper } from '../types';
3
- declare function drawCircle(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, circleUID: string, center: Types.Point2, radius: number, options?: {}): void;
3
+ declare function drawCircle(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, circleUID: string, center: Types.Point2, radius: number, options?: {}, dataId?: string): void;
4
4
  export default drawCircle;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const _getHash_1 = __importDefault(require("./_getHash"));
7
7
  const _setAttributesIfNecessary_1 = __importDefault(require("./_setAttributesIfNecessary"));
8
8
  const _setNewAttributesIfValid_1 = __importDefault(require("./_setNewAttributesIfValid"));
9
- function drawCircle(svgDrawingHelper, annotationUID, circleUID, center, radius, options = {}) {
9
+ function drawCircle(svgDrawingHelper, annotationUID, circleUID, center, radius, options = {}, dataId = '') {
10
10
  const { color, fill, width, lineWidth } = Object.assign({
11
11
  color: 'dodgerblue',
12
12
  fill: 'transparent',
@@ -31,6 +31,9 @@ function drawCircle(svgDrawingHelper, annotationUID, circleUID, center, radius,
31
31
  }
32
32
  else {
33
33
  const newCircleElement = document.createElementNS(svgns, 'circle');
34
+ if (dataId !== '') {
35
+ newCircleElement.setAttribute('data-id', dataId);
36
+ }
34
37
  (0, _setNewAttributesIfValid_1.default)(attributes, newCircleElement);
35
38
  svgDrawingHelper.appendNode(newCircleElement, svgNodeHash);
36
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"drawCircle.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawCircle.ts"],"names":[],"mappings":";;;;;AAGA,0DAAkC;AAElC,4FAAoE;AACpE,0FAAkE;AAElE,SAAS,UAAU,CACjB,gBAAkC,EAClC,aAAqB,EACrB,SAAiB,EACjB,MAAoB,EACpB,MAAc,EACd,OAAO,GAAG,EAAE;IAEZ,MAAM,EA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,gBAAgB,CAAC,UAAU,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;KAC5D;AACH,CAAC;AAED,kBAAe,UAAU,CAAC"}
@@ -8,6 +8,6 @@ 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, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, CobbAngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, PaintFillTool, ScaleOverlayTool } from './tools';
11
+ import { BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, ReferenceLinesTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool, AngleTool, CobbAngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, PaintFillTool, ScaleOverlayTool } from './tools';
12
12
  import * as Enums from './enums';
13
- export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, CobbAngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, ScaleOverlayTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
13
+ export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ReferenceLinesTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, AngleTool, CobbAngleTool, MagnifyTool, ReferenceCursors, ReferenceLines, ScaleOverlayTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
package/dist/cjs/index.js CHANGED
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.state = exports.Types = exports.PaintFillTool = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.ScaleOverlayTool = exports.ReferenceLines = exports.ReferenceCursors = exports.MagnifyTool = exports.CobbAngleTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.BidirectionalTool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = 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.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = void 0;
27
- exports.cursors = exports.utilities = exports.segmentation = void 0;
26
+ exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.state = exports.Types = exports.PaintFillTool = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.ScaleOverlayTool = exports.ReferenceLines = exports.ReferenceCursors = exports.MagnifyTool = exports.CobbAngleTool = exports.AngleTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.BidirectionalTool = exports.CircleROITool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = 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.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = void 0;
27
+ exports.cursors = exports.utilities = exports.segmentation = exports.annotation = void 0;
28
28
  const init_1 = require("./init");
29
29
  Object.defineProperty(exports, "init", { enumerable: true, get: function () { return init_1.init; } });
30
30
  Object.defineProperty(exports, "destroy", { enumerable: true, get: function () { return init_1.destroy; } });
@@ -69,6 +69,7 @@ Object.defineProperty(exports, "LengthTool", { enumerable: true, get: function (
69
69
  Object.defineProperty(exports, "ProbeTool", { enumerable: true, get: function () { return tools_1.ProbeTool; } });
70
70
  Object.defineProperty(exports, "RectangleROITool", { enumerable: true, get: function () { return tools_1.RectangleROITool; } });
71
71
  Object.defineProperty(exports, "EllipticalROITool", { enumerable: true, get: function () { return tools_1.EllipticalROITool; } });
72
+ Object.defineProperty(exports, "CircleROITool", { enumerable: true, get: function () { return tools_1.CircleROITool; } });
72
73
  Object.defineProperty(exports, "BidirectionalTool", { enumerable: true, get: function () { return tools_1.BidirectionalTool; } });
73
74
  Object.defineProperty(exports, "PlanarFreehandROITool", { enumerable: true, get: function () { return tools_1.PlanarFreehandROITool; } });
74
75
  Object.defineProperty(exports, "ArrowAnnotateTool", { enumerable: true, get: function () { return tools_1.ArrowAnnotateTool; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuC;AAgErC,qFAhEO,WAAI,OAgEP;AACJ,wFAjEa,cAAO,OAiEb;AAhET,mCAQiB;AAyDf,wFAhEA,eAAO,OAgEA;AACP,2FAhEA,kBAAU,OAgEA;AA+CV,sFA9GA,aAAK,OA8GA;AAEL,iGA/GA,wBAAgB,OA+GA;AALhB,oGAzGA,2BAAmB,OAyGA;AADnB,6FAvGA,oBAAY,OAuGA;AA1CZ,0GA5DA,iCAAyB,OA4DA;AAzD3B,uDAAyC;AA6GvC,8BAAS;AA1GX,+DAAiD;AA+F/C,sCAAa;AA9Ff,sDAAwC;AA2GtC,0BAAO;AA1GT,uDAAyC;AAgHvC,8BA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A;AACd,mGA3CA,0BAAkB,OA2CA;AAiBlB,sGA3DA,6BAAqB,OA2DA;AACrB,mGA3DA,0BAAkB,OA2DA;AAClB,mGA3DA,0BAAkB,OA2DA;AAClB,0GA3DA,iCAAyB,OA2DA;AACzB,kHA3DA,yCAAiC,OA2DA;AANjC,wGApDA,+BAAuB,OAoDA;AAOvB,0FA1DA,iBAAS,OA0DA;AAdT,0FA3CA,iBAAS,OA2CA;AACT,8FA3CA,qBAAa,OA2CA;AACb,4FA3CA,mBAAW,OA2CA;AACX,iGA3CA,wBAAgB,OA2CA;AAChB,+FA3CA,sBAAc,OA2CA;AAed,8FAzDA,qBAAa,OAyDA;AAdb,iGA1CA,wBAAgB,OA0CA;AAvClB,+CAAiC;AA2D/B,sBAAK"}
@@ -0,0 +1,39 @@
1
+ import { AnnotationTool } from '../base';
2
+ import type { Types } from '@cornerstonejs/core';
3
+ import { EventTypes, ToolHandle, PublicToolProps, ToolProps, SVGDrawingHelper } from '../../types';
4
+ import { CircleROIAnnotation } from '../../types/ToolSpecificAnnotationTypes';
5
+ declare class CircleROITool extends AnnotationTool {
6
+ static toolName: any;
7
+ touchDragCallback: any;
8
+ mouseDragCallback: any;
9
+ _throttledCalculateCachedStats: any;
10
+ editData: {
11
+ annotation: any;
12
+ viewportIdsToRender: Array<string>;
13
+ handleIndex?: number;
14
+ movingTextBox?: boolean;
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) => CircleROIAnnotation;
22
+ isPointNearTool: (element: HTMLDivElement, annotation: CircleROIAnnotation, canvasCoords: Types.Point2, proximity: number) => boolean;
23
+ toolSelectedCallback: (evt: EventTypes.InteractionEventType, annotation: CircleROIAnnotation) => void;
24
+ handleSelectedCallback: (evt: EventTypes.InteractionEventType, annotation: CircleROIAnnotation, handle: ToolHandle) => void;
25
+ _endCallback: (evt: EventTypes.InteractionEventType) => void;
26
+ _dragDrawCallback: (evt: EventTypes.InteractionEventType) => void;
27
+ _dragModifyCallback: (evt: EventTypes.InteractionEventType) => void;
28
+ _dragHandle: (evt: EventTypes.InteractionEventType) => void;
29
+ cancel: (element: HTMLDivElement) => any;
30
+ _activateModify: (element: any) => void;
31
+ _deactivateModify: (element: any) => void;
32
+ _activateDraw: (element: any) => void;
33
+ _deactivateDraw: (element: any) => void;
34
+ renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
35
+ _getTextLines: (data: any, targetId: string, isPreScaled: boolean) => string[];
36
+ _calculateCachedStats: (annotation: any, viewport: any, renderingEngine: any, enabledElement: any) => any;
37
+ _isInsideVolume: (index1: any, index2: any, dimensions: any) => boolean;
38
+ }
39
+ export default CircleROITool;