Skip to content

Commit

Permalink
fix some bugs for add plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
birdeggb2777 committed Mar 16, 2023
1 parent a7f039a commit 0f23166
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 47 deletions.
24 changes: 0 additions & 24 deletions bluelight/scripts/mark.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,30 +282,6 @@ function drawPOLYLINE(canvas, mark, viewport) {
console.log(x1, y1, x2, y2)
};
ctx.closePath();

if (openWriteGraphic == true || (getByid("GspsPOLYLINE").selected == true && openWriteGSPS == true)) {
if (mark.RotationAngle && mark.RotationPoint) {
[x1, y1] = rotatePoint([x1, y1], -mark.RotationAngle, mark.RotationPoint);
[x2, y2] = rotatePoint([x2, y2], -mark.RotationAngle, mark.RotationPoint);
}
ctx.lineWidth = "" + parseInt(ctx.lineWidth) * 2;
var fillstyle = ctx.fillStyle;

if (Graphic_now_choose && Graphic_now_choose.mark == mark) ctx.strokeStyle = getRGBFrom0xFF(ctx.strokeStyle, false, true);
ctx.beginPath();
ctx.arc(x1 / 2 + x2 / 2, y1 / 2 + y2 / 2, parseInt(ctx.lineWidth), 0, 2 * Math.PI);
ctx.stroke();
ctx.closePath();

for (var fil = 0; fil < 2; fil++) {
ctx.fillStyle = fillstyle;
ctx.beginPath();
ctx.arc(x1 / 2 + x2 / 2, y1 / 2 + y2 / 2, parseInt(ctx.lineWidth), 0, 2 * Math.PI);
ctx.fill();
ctx.closePath();
}
ctx.lineWidth = "" + parseInt(ctx.lineWidth) / 2;
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions bluelight/scripts/newscript/angle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

//存放量角器
var AngleXY0 = [];
var AngleXY1 = [];
var AngleXY2 = [];

function angle() {
if (BL_mode == 'angle') {
DeleteMouseEvent();
Expand Down
3 changes: 3 additions & 0 deletions bluelight/scripts/newscript/windowlevel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

//表示現在正在調整WindowLevel
var WindowOpen = false;

function windowlevel() {
if (BL_mode == 'windowlevel') {
DeleteMouseEvent();
Expand Down
2 changes: 2 additions & 0 deletions bluelight/scripts/plugin/graphic_annotation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//代表GSPS標記模式為開啟狀態
var openWriteGSPS = false;
//代表Graphic Annotation標記模式為開啟狀態
var openWriteGraphic = false;

function loadWriteGraphic() {
var span = document.createElement("SPAN")
Expand Down
12 changes: 11 additions & 1 deletion bluelight/scripts/plugin/vr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ var openVR = false;
var openRendering = false;
//VR橫切片與縱切片數量
var o3Dcount = 0;

//3D VR的貼皮數量
var o3d_3degree = -1;
//3D VR的切片數量
var o3DListLength = 0;

//3D VR模型的透明度百分比
var o3DAlphaValue = 100;
//代表3D挖掘模式為開啟狀態
var openCave = false;
//代表切片厚度
var Thickness = 1;

var degerrX = 0;
var degerrY = 0;
Expand Down
22 changes: 0 additions & 22 deletions bluelight/scripts/variable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,10 @@ const Viewport_Total = 16;
let Viewport_row = 1;
let Viewport_col = 1;

//3D VR的貼皮數量
var o3d_3degree = -1;
//暫時用的Pixeldata
var tempPixeldata;
//3D VR的切片數量
var o3DListLength = 0;
//當前選擇的Viewport的canvas
//var canvas;
//var ctx;

//存放量角器
var AngleXY0 = [];
var AngleXY1 = [];
var AngleXY2 = [];

//表示按住了滑鼠左鍵
var MouseDownCheck = false;
//表示按住了滑鼠右鍵
Expand All @@ -36,8 +25,6 @@ var openWindow = false;
var openZoom = false;
//表示Viewport為連接狀態
var openLink = false;
//表示現在正在調整WindowLevel
var WindowOpen = false;
//表示左側的影像可以點擊
var openLeftImgClick = true;

Expand All @@ -47,13 +34,6 @@ var openPenDraw = false;
var openAngle = 0;
//表示目前icon圖示的RWD收合功能為開啟狀態
var openRWD = true;
//3D VR模型的透明度百分比
var o3DAlphaValue = 100;
//代表3D挖掘模式為開啟狀態
var openCave = false;

//代表Graphic Annotation標記模式為開啟狀態
var openWriteGraphic = false;

//紀錄滑鼠座標
var windowMouseX = 0,
Expand Down Expand Up @@ -84,8 +64,6 @@ var openRotate = false;

//代表目前從左側面板拖曳中的影像的Series UID
var dragseries = "";
//代表切片厚度
var Thickness = 1;
//代表原始影像,通常被用於放大鏡的參考
var originalCanvas;
var originalCtx;
Expand Down
2 changes: 2 additions & 0 deletions bluelight/scripts/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ function parseDicom(image, pixelData, viewportNum0) {
DicomCanvas.height = image.height
var ctx2 = DicomCanvas.getContext("2d");
var imgData2 = ctx2.createImageData(image.width, image.height);
if (element.SeriesInstanceUID && element.SeriesInstanceUID != image.data.string("x0020000e"))
element.windowCenterList = element.windowWidthList = null;
var windowCenter = element.windowCenterList ? element.windowCenterList : image.windowCenter;
var windowWidth = element.windowWidthList ? element.windowWidthList : image.windowWidth;
var high = windowCenter + (windowWidth / 2);
Expand Down

0 comments on commit 0f23166

Please sign in to comment.