@@ -105,7 +105,6 @@ class VolumeCroppingControlTool extends AnnotationTool {
105
105
toolCenter : Types . Point3 = [ 0 , 0 , 0 ] ; // NOTE: it is assumed that all the active/linked viewports share the same crosshair center.
106
106
toolCenterMin : Types . Point3 = [ 0 , 0 , 0 ] ;
107
107
toolCenterMax : Types . Point3 = [ 0 , 0 , 0 ] ;
108
- // This because the rotation operation rotates also all the other active/intersecting reference lines of the same angle
109
108
_getReferenceLineColor ?: ( viewportId : string ) => string ;
110
109
_getReferenceLineControllable ?: ( viewportId : string ) => boolean ;
111
110
constructor (
@@ -250,7 +249,6 @@ class VolumeCroppingControlTool extends AnnotationTool {
250
249
251
250
_getViewportsInfo = ( ) => {
252
251
const viewports = getToolGroup ( this . toolGroupId ) . viewportsInfo ;
253
-
254
252
return viewports ;
255
253
} ;
256
254
@@ -393,13 +391,12 @@ class VolumeCroppingControlTool extends AnnotationTool {
393
391
const secondPlane = csUtils . planar . planeEquation ( normal2 , point2 ) ;
394
392
const thirdPlane = csUtils . planar . planeEquation ( normal3 , point3 ) ;
395
393
396
- //viewport.render();
397
394
const toolCenter = csUtils . planar . threePlaneIntersection (
398
395
firstPlane ,
399
396
secondPlane ,
400
397
thirdPlane
401
398
) ;
402
-
399
+ //viewport.render();
403
400
// this.setToolCenter(toolCenter);
404
401
} ;
405
402
@@ -433,11 +430,11 @@ class VolumeCroppingControlTool extends AnnotationTool {
433
430
toolCenter : this . toolCenter ,
434
431
toolMin : this . toolCenterMin ,
435
432
toolMax : this . toolCenterMax ,
436
- handleType : this . editData ?. annotation ?. data ?. handles ?. activeType , // Pass activeType here
433
+ handleType : handleType , // Pass activeType here
437
434
viewportOrientation : [
438
435
viewportAnnotation . data . referenceLines [ 0 ] [ 0 ] . options . orientation ,
439
436
viewportAnnotation . data . referenceLines [ 1 ] [ 0 ] . options . orientation ,
440
- ] , // viewportId: data.viewportId,
437
+ ] ,
441
438
} ) ;
442
439
}
443
440
}
@@ -864,30 +861,6 @@ class VolumeCroppingControlTool extends AnnotationTool {
864
861
canvasUnitVectorFromCenter ,
865
862
canvasDiagonalLength * 100
866
863
) ;
867
- /*
868
- const refLinePointMinOne = vec2.create();
869
- const refLinePointMinTwo = vec2.create();
870
-
871
- let refLinesCenter = vec2.clone(crosshairCenterCanvas);
872
- if (!otherViewportControllable) {
873
- refLinesCenter = vec2.clone(otherViewportCenterCanvas);
874
- }
875
- vec2.add(refLinePointMinOne, refLinesCenter, canvasVectorFromCenterLong);
876
- vec2.subtract(
877
- refLinePointMinTwo,
878
- refLinesCenter,
879
- canvasVectorFromCenterLong
880
- );
881
-
882
- // Clipping lines to be only included in a box (canvas), we don't want
883
- // the lines goes beyond canvas
884
- liangBarksyClip(refLinePointMinOne, refLinePointMinTwo, canvasBox);
885
- referenceLines.push([
886
- otherViewport,
887
- refLinePointMinOne,
888
- refLinePointMinTwo,
889
- ]);
890
- */
891
864
// For min center
892
865
const refLinesCenterMin = otherViewportControllable
893
866
? vec2 . clone ( crosshairCenterCanvasMin )
@@ -970,10 +943,10 @@ class VolumeCroppingControlTool extends AnnotationTool {
970
943
lineWidth = 2.5 ;
971
944
}
972
945
973
- let lineUID = `${ lineIndex } ` ;
946
+ const lineUID = `${ lineIndex } ` ;
974
947
if ( viewportControllable ) {
975
- lineUID = `${ lineIndex } One` ;
976
- lineUID = `${ lineIndex } Two` ;
948
+ // lineUID = `${lineIndex}One`;
949
+ // lineUID = `${lineIndex}Two`;
977
950
drawLineSvg (
978
951
svgDrawingHelper ,
979
952
annotationUID ,
0 commit comments