@cornerstonejs/tools 1.56.0 → 1.56.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "1.56.0",
3
+ "version": "1.56.1",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "main": "src/index.ts",
6
6
  "types": "dist/types/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
30
30
  },
31
31
  "dependencies": {
32
- "@cornerstonejs/core": "^1.56.0",
32
+ "@cornerstonejs/core": "^1.56.1",
33
33
  "@icr/polyseg-wasm": "0.4.0",
34
34
  "@types/offscreencanvas": "2019.7.3",
35
35
  "comlink": "^4.4.1",
@@ -59,5 +59,5 @@
59
59
  "type": "individual",
60
60
  "url": "https://ohif.org/donate"
61
61
  },
62
- "gitHead": "73863e2aac88c70974cf966ca4e0eae11c1e67dc"
62
+ "gitHead": "40ca5acdf263940c17768b36873e75d6616e8462"
63
63
  }
@@ -75,6 +75,7 @@ class CobbAngleTool extends AnnotationTool {
75
75
  shadow: true,
76
76
  preventHandleOutsideImage: false,
77
77
  getTextLines: defaultGetTextLines,
78
+ showArcLines: false,
78
79
  },
79
80
  }
80
81
  ) {
@@ -795,33 +796,36 @@ class CobbAngleTool extends AnnotationTool {
795
796
  data.cachedStats[targetId].points.canvas;
796
797
  const { arc1Angle, arc2Angle } = data.cachedStats[targetId];
797
798
 
798
- lineUID = 'arc1';
799
+ if (this.configuration.showArcLines){
800
+ lineUID = 'arc1';
799
801
 
800
- drawLineSvg(
801
- svgDrawingHelper,
802
- annotationUID,
803
- lineUID,
804
- arc1Start as Types.Point2,
805
- arc1End as Types.Point2,
806
- {
807
- color,
808
- lineWidth: '1',
809
- }
810
- );
802
+ drawLineSvg(
803
+ svgDrawingHelper,
804
+ annotationUID,
805
+ lineUID,
806
+ arc1Start as Types.Point2,
807
+ arc1End as Types.Point2,
808
+ {
809
+ color,
810
+ lineWidth: '1',
811
+ }
812
+ );
811
813
 
812
- lineUID = 'arc2';
814
+ lineUID = 'arc2';
815
+
816
+ drawLineSvg(
817
+ svgDrawingHelper,
818
+ annotationUID,
819
+ lineUID,
820
+ arc2Start as Types.Point2,
821
+ arc2End as Types.Point2,
822
+ {
823
+ color,
824
+ lineWidth: '1',
825
+ }
826
+ );
827
+ }
813
828
 
814
- drawLineSvg(
815
- svgDrawingHelper,
816
- annotationUID,
817
- lineUID,
818
- arc2Start as Types.Point2,
819
- arc2End as Types.Point2,
820
- {
821
- color,
822
- lineWidth: '1',
823
- }
824
- );
825
829
 
826
830
  if (!data.cachedStats[targetId]?.angle) {
827
831
  continue;
@@ -876,45 +880,47 @@ class CobbAngleTool extends AnnotationTool {
876
880
  bottomRight: viewport.canvasToWorld([left + width, top + height]),
877
881
  };
878
882
 
879
- const arc1TextBoxUID = 'arcAngle1';
883
+ if (this.configuration.showArcLines){
884
+ const arc1TextBoxUID = 'arcAngle1';
880
885
 
881
- const arc1TextLine = [
882
- `${arc1Angle.toFixed(2)} ${String.fromCharCode(176)}`,
883
- ];
886
+ const arc1TextLine = [
887
+ `${arc1Angle.toFixed(2)} ${String.fromCharCode(176)}`,
888
+ ];
884
889
 
885
- const arch1TextPosCanvas = midPoint2(arc1Start, arc1End);
890
+ const arch1TextPosCanvas = midPoint2(arc1Start, arc1End);
886
891
 
887
- drawTextBoxSvg(
888
- svgDrawingHelper,
889
- annotationUID,
890
- arc1TextBoxUID,
891
- arc1TextLine,
892
- arch1TextPosCanvas,
893
- {
894
- ...options,
895
- padding: 3,
896
- }
897
- );
892
+ drawTextBoxSvg(
893
+ svgDrawingHelper,
894
+ annotationUID,
895
+ arc1TextBoxUID,
896
+ arc1TextLine,
897
+ arch1TextPosCanvas,
898
+ {
899
+ ...options,
900
+ padding: 3,
901
+ }
902
+ );
898
903
 
899
- const arc2TextBoxUID = 'arcAngle2';
904
+ const arc2TextBoxUID = 'arcAngle2';
900
905
 
901
- const arc2TextLine = [
902
- `${arc2Angle.toFixed(2)} ${String.fromCharCode(176)}`,
903
- ];
906
+ const arc2TextLine = [
907
+ `${arc2Angle.toFixed(2)} ${String.fromCharCode(176)}`,
908
+ ];
904
909
 
905
- const arch2TextPosCanvas = midPoint2(arc2Start, arc2End);
910
+ const arch2TextPosCanvas = midPoint2(arc2Start, arc2End);
906
911
 
907
- drawTextBoxSvg(
908
- svgDrawingHelper,
909
- annotationUID,
910
- arc2TextBoxUID,
911
- arc2TextLine,
912
- arch2TextPosCanvas,
913
- {
914
- ...options,
915
- padding: 3,
916
- }
917
- );
912
+ drawTextBoxSvg(
913
+ svgDrawingHelper,
914
+ annotationUID,
915
+ arc2TextBoxUID,
916
+ arc2TextLine,
917
+ arch2TextPosCanvas,
918
+ {
919
+ ...options,
920
+ padding: 3,
921
+ }
922
+ );
923
+ }
918
924
  }
919
925
 
920
926
  return renderStatus;