修改影像模版

This commit is contained in:
lxd 2024-08-27 18:38:22 +08:00
parent 9dc798ea39
commit f42d9fbba2
36 changed files with 38579 additions and 43 deletions

BIN
public/static/1.1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
public/static/1.2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
public/static/2.1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
public/static/2.2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
public/static/2.3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
public/static/3.2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
public/static/3.3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -10,7 +10,7 @@
<script src="https://unpkg.com/cornerstone-math@0.1.10/dist/cornerstoneMath.min.js"></script>
<script src="https://unpkg.com/cornerstone-wado-image-loader@4.1.3/dist/cornerstoneWADOImageLoader.bundle.min.js"></script>
<script src="https://unpkg.com/cornerstone-web-image-loader@2.1.1/dist/cornerstoneWebImageLoader.min.js"></script>
<script src="https://unpkg.com/cornerstone-tools@6.0.7/dist/cornerstoneTools.js"></script>
<script src="./js/cornerstoneTools.js"></script><!-- https://unpkg.com/cornerstone-tools@6.0.7/dist/cornerstoneTools.js -->
<script src="https://unpkg.com/dicom-parser@1.8.13/dist/dicomParser.min.js"></script>
<script src="http://code.jquery.com/jquery-1.12.2.min.js"></script>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
@ -56,13 +56,14 @@
}
#top-menu {
background-color: black;
background-color: rgb(54, 54, 54);
/*height: 180px;
display: flex;
flex-direction: row;*/
border: 0px solid red;
overflow-x: hidden;
overflow-y: hidden;
/* overflow-x: hidden;
overflow-y: hidden; */
position: relative; /* 确保下拉菜单相对于这个元素定位 */
}
#body-part {
@ -325,43 +326,105 @@
height:151px;
}
.icon-img-box > canvas {
height:149px;
width:149px;
height:149px !important;
width:149px !important;
}
/* 为图片设置过渡效果 */
.img-checkbox {
transition: transform 0.3s ease;
cursor: pointer;
}
/* 点击时的效果 */
.img-checkbox:active {
transform: scale(0.95);
opacity: 0.8;
}
.img-checkbox.active {
border: 1px solid rgb(73, 121, 243); /* 添加边框 */
}
/* 下拉样式 */
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
list-style-type: none; /* 去掉前面的点 */
display: none; /* 默认隐藏 */
position: absolute;
background-color: #f9f9f9;
min-width: 61px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1000; /* 确保在最上层 */
padding:5px; /* 去掉内边距 */
margin: 0; /* 去掉外边距 */
}
.dropdown-content a {
color: black;
padding: 5px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color:rgb(196, 213, 255);
}
.dropdown:hover .dropdown-content {
display: block; /* 悬停显示下拉内容 */
}
.dropdown:hover .dropbtn {
background-color: #3e8e41; /* 悬停时的按钮颜色 */
}
</style>
</head>
<body>
<div id="container">
<div id="top-menu" class="btn-group">
<button type="button" id="Magnify" class="btn btn-default" onclick="switchAction('Magnify',1,this)">放大镜</button>
<button type="button" id="Pan" class="btn btn-default" onclick="switchAction('Pan',1,this)">平移</button>
<button type="button" id="Zoom" class="btn btn-default" onclick="switchAction('Zoom',1,this)">缩放</button>
<button type="button" id="ZoomMouseWheel" class="btn btn-default" onclick="switchAction('ZoomMouseWheel',1,this)">滚轮缩放</button>
<button type="button" id="Wwwc" class="btn btn-default" onclick="switchAction('Wwwc',1,this)">对比度</button>
<button type="button" id="WwwcRegion" class="btn btn-default" onclick="switchAction('WwwcRegion',1,this)">选区对比度</button>
<button type="button" id="ScaleOverlay" class="btn btn-default" onclick="switchAction('ScaleOverlay',1,this)">比例尺</button>
<button type="button" id="Rotate" class="btn btn-default" onclick="switchAction('Rotate',1,this)">旋转</button>
<button type="button" id="OrientationMarkers" class="btn btn-default" onclick="switchAction('OrientationMarkers',1,this)">方向标记</button>
<button type="button" id="Angle" class="btn btn-default" onclick="switchAction('Angle',1,this)">角度</button>
<button type="button" id="ArrowAnnotate" class="btn btn-default" onclick="switchAction('ArrowAnnotate',1,this)">箭头注释</button>
<button type="button" id="Bidirectional" class="btn btn-default" onclick="switchAction('Bidirectional',1,this)">长宽尺</button>
<button type="button" id="CobbAngle" class="btn btn-default" onclick="switchAction('CobbAngle',1,this)">科布角</button>
<button type="button" id="EllipticalRoi" class="btn btn-default" onclick="switchAction('EllipticalRoi',1,this)">椭圆选区</button>
<button type="button" id="FreehandRoi" class="btn btn-default" onclick="switchAction('FreehandRoi',1,this)">自由选区</button>
<button type="button" id="Length" class="btn btn-default" onclick="switchAction('Length',1,this)">长度尺</button>
<button type="button" id="Probe" class="btn btn-default" onclick="switchAction('Probe',1,this)">探针</button>
<button type="button" id="RectangleRoi" class="btn btn-default" onclick="switchAction('RectangleRoi',1,this)">矩形选区</button>
<button type="button" id="TextMarker" class="btn btn-default" onclick="switchAction('TextMarker',1,this)">文本标记</button>
<button type="button" id="StackScroll" class="btn btn-default" onclick="switchAction('StackScroll',1,this)">左键翻页</button>
<button type="button" id="StackScrollMouseWheel" class="btn btn-default" onclick="switchAction('StackScrollMouseWheel',1,this)">滚轮翻页</button>
<button type="button" id="invert" class="btn btn-default" onclick="invert(1,this)">反转色</button>
<button type="button" id="changeColorx" class="btn btn-default" onclick="changColor(1,this)">彩色对比</button>
<button type="button" class="btn btn-default" onclick="resetTool()">重置</button>
<input type="text" id='row-count' placeholder="行数" value='1' /> x <input type="text" id='column-count' placeholder="列数" value='1' /> <input type='button' onclick="doCreate()" value="生成" />
</div>
<div id="top-menu" >
<img title="放大镜" style="width: 40px;height: 40px; margin-left: 5px;" id="Magnify" class="img-checkbox" onclick="switchAction('Magnify',1,this)" src="/static/放大镜.jpg"/>
<img title="平移" style="width: 50px;height: 50px;" id="Pan" class="img-checkbox" onclick="switchAction('Pan',1,this)" src="/static/平移.jpg"/>
<img title="左键缩放" style="width: 50px;height: 50px;" id="Zoom" class="img-checkbox" onclick="switchAction('Zoom',1,this)" src="/static/缩放.jpg"/>
<img title="滚轮缩放" style="width: 50px;height: 50px;" id="ZoomMouseWheel" class="img-checkbox" onclick="switchAction('ZoomMouseWheel',1,this)" src="/static/滚轮缩放.jpg" />
<img title="对比度" style="width: 50px;height: 50px;" id="Wwwc" class="img-checkbox" onclick="switchAction('Wwwc',1,this)" src="/static/对比度.jpg"/>
<img title="选区对比度" style="width: 50px;height: 50px;" id="WwwcRegion" class="img-checkbox" onclick="switchAction('WwwcRegion',1,this)" src="/static/选区对比度.jpg"/>
<img title="比例尺" style="width: 50px;height: 50px;" id="ScaleOverlay" class="img-checkbox" onclick="switchAction('ScaleOverlay',1,this)" src="/static/比例尺.jpg"/>
<img title="旋转" style="width: 50px;height: 50px;" id="Rotate" class="img-checkbox" onclick="switchAction('Rotate',1,this)" src="/static/旋转.jpg"/>
<img title="方向标记" style="width: 50px;height: 50px;" id="OrientationMarkers" class="img-checkbox" onclick="switchAction('OrientationMarkers',1,this)" src="/static/方向标记.jpg"/>
<img title="角度" style="width: 50px;height: 50px;" id="Angle" class="img-checkbox" onclick="switchAction('Angle',1,this)" src="/static/角度.jpg"/>
<img title="箭头注释" style="width: 50px;height: 50px;" id="ArrowAnnotate" class="img-checkbox" onclick="switchAction('ArrowAnnotate',1,this)" src="/static/箭头注释.jpg"/>
<img title="长宽尺" style="width: 50px;height: 50px;" id="Bidirectional" class="img-checkbox" onclick="switchAction('Bidirectional',1,this)" src="/static/长宽尺.jpg"/>
<img title="科布角" style="width: 50px;height: 50px;" id="CobbAngle" class="img-checkbox" onclick="switchAction('CobbAngle',1,this)" src="/static/科布角.jpg"/>
<img title="椭圆选区" style="width: 50px;height: 50px;" id="EllipticalRoi" class="img-checkbox" onclick="switchAction('EllipticalRoi',1,this)" src="/static/椭圆选区.jpg"/>
<img title="自由选区" style="width: 50px;height: 50px;" id="FreehandRoi" class="img-checkbox" onclick="switchAction('FreehandRoi',1,this)" src="/static/自由选区.jpg"/>
<img title="长度尺" style="width: 50px;height: 50px;" id="Length" class="img-checkbox" onclick="switchAction('Length',1,this)" src="/static/长度尺.jpg"/>
<img title="探针" style="width: 50px;height: 50px;" id="Probe" class="img-checkbox" onclick="switchAction('Probe',1,this)" src="/static/探针.jpg"/>
<img title="矩形选区" style="width: 50px;height: 50px;" id="RectangleRoi" class="img-checkbox" onclick="switchAction('RectangleRoi',1,this)" src="/static/矩形选区.jpg"/>
<img title="文本标记" style="width: 50px;height: 50px;" id="TextMarker" class="img-checkbox" onclick="switchAction('TextMarker',1,this)" src="/static/箭头注释.jpg"/>
<img title="左键翻页" style="width: 50px;height: 50px;" id="StackScroll" class="img-checkbox" onclick="switchAction('StackScroll',1,this)" src="/static/左键翻页.jpg"/>
<img title="滚轮翻页" style="width: 50px;height: 50px;" id="StackScrollMouseWheel" class="img-checkbox" onclick="switchAction('StackScrollMouseWheel',1,this)" src="/static/鼠标翻页.jpg"/>
<img title="反转色" style="width: 50px;height: 50px;" id="invert" class="img-checkbox" onclick="invert(1,this)" src="/static/反转色.jpg"/>
<img title="色彩对比" style="width: 50px;height: 50px;" id="changeColorx" class="img-checkbox" onclick="changColor(1,this)" src="/static/色彩对比.jpg"/>
<img title="重置" id="reset" style="width: 50px;height: 50px;" onclick="resetTool()" class="img-checkbox" src="/static/重置.jpg"/>
<div class="dropdown">
<img style="width: 42px;height: 42px;" class="dropbtn" src="/static/布局2x.jpg"/>
<ul class="dropdown-content">
<li><a data-value="1x1"><img src="/static/1.1.jpg"/>1x1</a></li>
<li><a data-value="1x2"><img src="/static/1.2.jpg"/>1x2</a></li>
<li><a data-value="2x1"><img src="/static/2.1.jpg"/>2x1</a></li>
<li><a data-value="2x2"><img src="/static/2.2.jpg"/>2x2</a></li>
<li><a data-value="2x3"><img src="/static/2.3.jpg"/>2x3</a></li>
<li><a data-value="3x2"><img src="/static/3.2.jpg"/>3x2</a></li>
<li><a data-value="3x3"><img src="/static/3.3.jpg"/>3x3</a></li>
</ul>
</div>
<input style="display: none;" type="text" id='row-count' placeholder="行数" value='1' /> x <input style="display: none;" type="text" id='column-count' placeholder="列数" value='1' /> <input style="display: none;" type='button' onclick="doCreate()" value="生成" />
</div>
<div id="body-part">
<div id="dicom-continer">
</div>
@ -369,5 +432,57 @@
</div>
</div>
</div>
<script>
// 获取下拉菜单的父元素
var dropdownMenu = document.querySelector('.dropdown-content');
dropdownMenu.addEventListener('click', function(event) {
var target = event.target;
while (target != dropdownMenu) {
if (target.tagName === 'A') {
var value = target.getAttribute('data-value');
var parts = value.split('x');
// 更新输入框的值
document.getElementById('row-count').value = parts[0].trim();
document.getElementById('column-count').value = parts[1].trim();
console.log('Clicked item value:', value);
doCreate();
break;
}
target = target.parentElement;
}
});
// 获取容器元素
var container = document.getElementById('top-menu');
var activeImg = null; // 存储当前激活的图片元素
container.addEventListener('click', function(event) {
var target = event.target;
var excludeId = 'reset'; // 要排除的图片元素的id
if (target.id === excludeId) {
// 如果点击的是排除的图片,直接返回不执行任何操作
return;
}
// 检查点击的是否是图片元素
if (target.classList.contains('img-checkbox')) {
if (activeImg === target) {
// 如果当前点击的图片已经是激活状态,则移除边框
target.classList.remove('active');
activeImg = null; // 重置当前激活的图片引用
} else {
// 如果当前点击的图片不是激活状态
if (activeImg) {
// 移除之前激活的图片的边框
activeImg.classList.remove('active');
}
// 给当前点击的图片添加边框,并更新激活图片的引用
target.classList.add('active');
activeImg = target;
}
}
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -366,8 +366,8 @@ function initConerstone(element) {
const TextMarkerTool = cornerstoneTools.TextMarkerTool
// set up the markers configuration
const configuration = {
markers: ['F5', 'F4', 'F3', 'F2', 'F1'],
current: 'F5',
markers: ['双击修改注释'],
current: '双击修改注释',
ascending: true,
loop: true,
}
@ -443,7 +443,8 @@ function initImgList(data) {
//$("#dicom-list").append('<img id="img_' + i + '" onclick="changeIndex(' + i + ')" class="' + className + '" src="' + data.seriesList[i].thumbUrl + '"/>');
//$("#dicom-list").append('<div class="icon-img-box" onclick="changeIndex(' + i + ')"><img id="img_' + i + '" class="' + className + '" src="' + data.seriesList[i].thumbUrl + '"/><div class="process-div" id="process-' + i + '"></div></div>');
//$("#dicom-list").append('<div class="icon-img-box" id="icon-img-box-'+i+'" onclick="changeIndex(' + i + ')"><img id="img_' + i + '" class="' + className + '"/><div class="process-div" id="process-' + i + '"></div></div>');
$("#dicom-list").append('<div class="icon-img-box ' + className + '" id="icon-img-box-' + i + '" onclick="changeIndex(' + i + ')"><div class="process-div" id="process-' + i + '"></div></div>');
// $("#dicom-list").append('<div style="height: 200px;" class="icon-img-box ' + className + '" id="icon-img-box-' + i + '" onclick="changeIndex(' + i + ')"> <img style=" width: 130px;height: 130px;" src="' + data.seriesList[i].thumbUrl + '"/> <h4 style="color: white; id="h_' + i + '" >"'+data.seriesList[i].SeriesDesc+'"</h4></div>');
$("#dicom-list").append('<div style="height: 220px;" class="icon-img-box ' + className + '" id="icon-img-box-' + i + '" onclick="changeIndex(' + i + ')"><div class="process-div" id="process-' + i + '"></div><span style="color: white;word-wrap: break-word;font-size: 16px; id="h_' + i + '" >'+data.seriesList[i].SeriesDesc+'</span></div>');
}
}

BIN
public/static/反转色.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
public/static/对比度.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
public/static/布局.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
public/static/布局2x.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
public/static/平移.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
public/static/探针.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
public/static/放大镜.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
public/static/旋转.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
public/static/比例尺.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
public/static/科布角.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
public/static/缩放.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
public/static/角度.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
public/static/重置.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
public/static/长宽尺.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
public/static/长度尺.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -503,9 +503,7 @@ const open = async (
examId: string
) => {
resetForm()
const Src = `/static/dicom/dicomViewPc1.html?t=${new Date().getTime()}`
// const Src="D:\pacs\vue\FlowVue-1\dist-prod\dicom\dicomViewPc1.html"+"?"+new Date().getTime()
newSrc.value = Src
console.log('orgid' + orgid)
console.log('regid' + regid)
@ -537,6 +535,10 @@ const open = async (
//
getlogininfo()
iframeData()
// 1iframe
setTimeout(() => {
dataLoaded.value= true; // iframe
}, 800);
} finally {
formLoading.value = false
}
@ -554,18 +556,20 @@ const iframeData = async () => {
}
// 'data'
localStorage.removeItem('data')
localStorage.removeItem("data");
// JSON
var localStorageData = JSON.stringify(localData)
localStorage.setItem('data', localStorageData)
const Src = `/static/dicom/dicomViewPc1.html?t=${new Date().getTime()}`
newSrc.value = Src
} else {
// statussuccess
console.error('Request did not succeed:', response.data)
}
dataLoaded.value = true // dataLoadedtrue
// dataLoaded.value = true // dataLoadedtrue
} catch (error) {
console.error('Error fetching data:', error)
dataLoaded.value = true // 使dataLoadedtrue便
// dataLoaded.value = true // 使dataLoadedtrue便
}
}