@cornerstonejs/tools 2.12.1 → 2.12.3

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.
@@ -9,7 +9,8 @@ import * as cursors from './cursors';
9
9
  import * as Types from './types';
10
10
  import * as annotation from './stateManagement/annotation';
11
11
  import * as segmentation from './stateManagement/segmentation';
12
+ import * as splines from './tools/annotation/splines';
12
13
  import { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, 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, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, OverlayGridTool, SegmentationIntersectionTool, EraserTool, SculptorTool, SegmentSelectTool, WindowLevelRegionTool, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, WholeBodySegmentTool, LabelmapBaseTool } from './tools';
13
14
  import VideoRedactionTool from './tools/annotation/VideoRedactionTool';
14
15
  import * as Enums from './enums';
15
- export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, WindowLevelRegionTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, LengthTool, HeightTool, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ScaleOverlayTool, SculptorTool, EraserTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, SegmentSelectTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, };
16
+ export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, WindowLevelRegionTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, LengthTool, HeightTool, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ScaleOverlayTool, SculptorTool, EraserTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, SegmentSelectTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, splines, };
package/dist/esm/index.js CHANGED
@@ -9,7 +9,8 @@ import * as cursors from './cursors';
9
9
  import * as Types from './types';
10
10
  import * as annotation from './stateManagement/annotation';
11
11
  import * as segmentation from './stateManagement/segmentation';
12
+ import * as splines from './tools/annotation/splines';
12
13
  import { BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, 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, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, PaintFillTool, ScaleOverlayTool, OrientationMarkerTool, OverlayGridTool, SegmentationIntersectionTool, EraserTool, SculptorTool, SegmentSelectTool, WindowLevelRegionTool, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, } from './tools';
13
14
  import VideoRedactionTool from './tools/annotation/VideoRedactionTool';
14
15
  import * as Enums from './enums';
15
- export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, WindowLevelRegionTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, LengthTool, HeightTool, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ScaleOverlayTool, SculptorTool, EraserTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, SegmentSelectTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, };
16
+ export { VideoRedactionTool, init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, AnnotationDisplayTool, PanTool, TrackballRotateTool, DragProbeTool, WindowLevelTool, WindowLevelRegionTool, ZoomTool, StackScrollTool, PlanarRotateTool, MIPJumpToClickTool, LengthTool, HeightTool, CrosshairsTool, ReferenceLinesTool, OverlayGridTool, SegmentationIntersectionTool, ProbeTool, RectangleROITool, EllipticalROITool, CircleROITool, ETDRSGridTool, SplineROITool, SplineContourSegmentationTool, BidirectionalTool, PlanarFreehandROITool, PlanarFreehandContourSegmentationTool, LivewireContourTool, LivewireContourSegmentationTool, ArrowAnnotateTool, AngleTool, CobbAngleTool, UltrasoundDirectionalTool, KeyImageTool, MagnifyTool, AdvancedMagnifyTool, ReferenceCursors, ScaleOverlayTool, SculptorTool, EraserTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool, BrushTool, OrientationMarkerTool, SegmentSelectTool, synchronizers, Synchronizer, SynchronizerManager, PaintFillTool, Types, state, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, VolumeRotateTool, RegionSegmentPlusTool, RegionSegmentTool, WholeBodySegmentTool, LabelmapBaseTool, splines, };
@@ -0,0 +1,9 @@
1
+ import BSpline from './BSpline';
2
+ import CardinalSpline from './CardinalSpline';
3
+ import CatmullRomSpline from './CatmullRomSpline';
4
+ import CubicSpline from './CubicSpline';
5
+ import LinearSpline from './LinearSpline';
6
+ import QuadraticBezier from './QuadraticBezier';
7
+ import QuadraticSpline from './QuadraticSpline';
8
+ import Spline from './Spline';
9
+ export { BSpline, CardinalSpline, CatmullRomSpline, CubicSpline, LinearSpline, QuadraticBezier, QuadraticSpline, Spline, };
@@ -0,0 +1,9 @@
1
+ import BSpline from './BSpline';
2
+ import CardinalSpline from './CardinalSpline';
3
+ import CatmullRomSpline from './CatmullRomSpline';
4
+ import CubicSpline from './CubicSpline';
5
+ import LinearSpline from './LinearSpline';
6
+ import QuadraticBezier from './QuadraticBezier';
7
+ import QuadraticSpline from './QuadraticSpline';
8
+ import Spline from './Spline';
9
+ export { BSpline, CardinalSpline, CatmullRomSpline, CubicSpline, LinearSpline, QuadraticBezier, QuadraticSpline, Spline, };
@@ -156,7 +156,7 @@ class CircleROIStartEndThresholdTool extends CircleROITool {
156
156
  };
157
157
  for (let i = 0; i < annotations.length; i++) {
158
158
  const annotation = annotations[i];
159
- const { annotationUID, data } = annotation;
159
+ const { annotationUID, data, metadata } = annotation;
160
160
  const { startCoordinate, endCoordinate } = data;
161
161
  const { points, activeHandleIndex } = data.handles;
162
162
  styleSpecifier.annotationUID = annotationUID;
@@ -260,7 +260,7 @@ class CircleROIStartEndThresholdTool extends CircleROITool {
260
260
  };
261
261
  continue;
262
262
  }
263
- const textLines = this.configuration.getTextLines(data);
263
+ const textLines = this.configuration.getTextLines(data, { metadata });
264
264
  if (!textLines || textLines.length === 0) {
265
265
  continue;
266
266
  }
@@ -461,7 +461,7 @@ class CircleROIStartEndThresholdTool extends CircleROITool {
461
461
  return pos[indexOfDirection];
462
462
  }
463
463
  }
464
- function defaultGetTextLines(data) {
464
+ function defaultGetTextLines(data, _context = {}) {
465
465
  const cachedVolumeStats = data.cachedStats.statistics;
466
466
  const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats;
467
467
  if (mean === undefined) {
@@ -158,7 +158,7 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
158
158
  };
159
159
  for (let i = 0; i < annotations.length; i++) {
160
160
  const annotation = annotations[i];
161
- const { annotationUID, data } = annotation;
161
+ const { annotationUID, data, metadata } = annotation;
162
162
  const { startCoordinate, endCoordinate } = data;
163
163
  const { points, activeHandleIndex } = data.handles;
164
164
  const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
@@ -245,7 +245,7 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
245
245
  };
246
246
  continue;
247
247
  }
248
- const textLines = this.configuration.getTextLines(data);
248
+ const textLines = this.configuration.getTextLines(data, { metadata });
249
249
  if (!textLines || textLines.length === 0) {
250
250
  continue;
251
251
  }
@@ -420,7 +420,7 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool {
420
420
  return pos[indexOfDirection];
421
421
  }
422
422
  }
423
- function defaultGetTextLines(data) {
423
+ function defaultGetTextLines(data, _context = {}) {
424
424
  const cachedVolumeStats = data.cachedStats.statistics;
425
425
  const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats;
426
426
  if (mean === undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "2.12.1",
3
+ "version": "2.12.3",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -104,7 +104,7 @@
104
104
  "canvas": "^2.11.2"
105
105
  },
106
106
  "peerDependencies": {
107
- "@cornerstonejs/core": "^2.12.1",
107
+ "@cornerstonejs/core": "^2.12.3",
108
108
  "@kitware/vtk.js": "32.1.1",
109
109
  "@types/d3-array": "^3.0.4",
110
110
  "@types/d3-interpolate": "^3.0.1",
@@ -123,5 +123,5 @@
123
123
  "type": "individual",
124
124
  "url": "https://ohif.org/donate"
125
125
  },
126
- "gitHead": "0bb31a1b9c61111d2d94c100d8b5d4c699182c42"
126
+ "gitHead": "dcb9f773764b5937faa31932b84d18ec023587f7"
127
127
  }