File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ const CORNERSTONEFREETEXT = "CORNERSTONEFREETEXT";
88class ArrowAnnotate {
99 constructor ( ) { }
1010
11- // TODO: this function is required for all Cornerstone Tool Adapters, since it is called by MeasurementReport.
1211 static getMeasurementData ( MeasurementGroup ) {
1312 const {
1413 defaultState,
@@ -31,11 +30,17 @@ class ArrowAnnotate {
3130 highlight : true ,
3231 active : false
3332 } ,
34- // TODO: How do we choose where the end goes?
35- // Just put it pointing from the bottom right for now?
33+ // Use a generic offset if the stored data doesn't have the endpoint, otherwise
34+ // use the actual endpoint.
3635 end : {
37- x : GraphicData [ 0 ] + 20 ,
38- y : GraphicData [ 1 ] + 20 ,
36+ x :
37+ GraphicData . length == 4
38+ ? GraphicData [ 2 ]
39+ : GraphicData [ 0 ] + 20 ,
40+ y :
41+ GraphicData . length == 4
42+ ? GraphicData [ 3 ]
43+ : GraphicData [ 1 ] + 20 ,
3944 highlight : true ,
4045 active : false
4146 } ,
@@ -56,7 +61,7 @@ class ArrowAnnotate {
5661 }
5762
5863 static getTID300RepresentationArguments ( tool ) {
59- const points = [ tool . handles . start ] ;
64+ const points = [ tool . handles . start , tool . handles . end ] ;
6065
6166 let { finding, findingSites } = tool ;
6267
Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ export default class Point extends TID300Measurement {
1212 const GraphicData = use3DSpatialCoordinates
1313 ? [ points [ 0 ] . x , points [ 0 ] . y , points [ 0 ] . z ]
1414 : [ points [ 0 ] . x , points [ 0 ] . y ] ;
15-
15+ // Allow storing another point as part of an indicator showing a single point
16+ if ( points . length == 2 ) {
17+ GraphicData . push ( points [ 1 ] . x ) ;
18+ GraphicData . push ( points [ 1 ] . y ) ;
19+ if ( use3DSpatialCoordinates ) GraphicData . push ( points [ 1 ] . z ) ;
20+ }
1621 return this . getMeasurement ( [
1722 {
1823 RelationshipType : "CONTAINS" ,
You can’t perform that action at this time.
0 commit comments