diff --git a/src/Combinear.css b/src/Combinear.css index 5835a05..5d0852d 100644 --- a/src/Combinear.css +++ b/src/Combinear.css @@ -284,3 +284,14 @@ QProgressBar::chunk { ConfigurationDialog#PacsConfigurationDialog{ border:1px solid #5a5a5a; } + + +QLabel#VolumeMeasure{ + color: white; + margin-left: 3px; + margin-right: 3px; + border: 1px solid #aaa; + border-radius: 3px; + margin-top: 3px; + margin-bottom: 3px; +} \ No newline at end of file diff --git a/src/src/UI/Widget/ToolBar/DefaultToolBar.cpp b/src/src/UI/Widget/ToolBar/DefaultToolBar.cpp index 6072bdb..12f5897 100644 --- a/src/src/UI/Widget/ToolBar/DefaultToolBar.cpp +++ b/src/src/UI/Widget/ToolBar/DefaultToolBar.cpp @@ -2,6 +2,7 @@ #include "DefaultToolBar.h" #include +#include #include #include #include @@ -45,6 +46,7 @@ DefaultToolBar::DefaultToolBar(QWidget *parent) : QToolBar(parent) , mBtnPan(new QToolButton(this)) , mBtnZoom(new QToolButton(this)) , mBtnMeasure(new QToolButton(this)) + , mLblMeasure(new QLabel(this)) , mBtnClear(new QToolButton(this)) , mBtnFlip(new QToolButton(this)) , mBtnCine(new QToolButton(this)) @@ -60,6 +62,11 @@ DefaultToolBar::DefaultToolBar(QWidget *parent) : QToolBar(parent) , mActionMaximize(nullptr) , mActionClose(nullptr) , mActionFullScreen(nullptr) + , mActionHideAnnotations(nullptr) + , mActionHideReferenceLine(nullptr) + , mActionHideMeasure(nullptr) + , mActionHidePatData(nullptr) + , mActionVolumeDetail(nullptr) { //init icons mManualIcon.addFile(SYNC_MANUAL_URL); @@ -87,7 +94,15 @@ void DefaultToolBar::changePseudoColor(bool on) void DefaultToolBar::resetToolbarMode(bool aHasSeries) { - if (aHasSeries)mBtnSlice->click(); + if (aHasSeries){ + + mActionVolumeDetail->setVisible(false); + QPixmap map(std::get<0>(MEASURE_ACTIIONS[0])); + mBtnMeasure->setIcon(QIcon(map)); + MeasureHelper::setMeasureType(std::get<1>(MEASURE_ACTIIONS[0])); + mBtnSlice->click(); + mBtnSlice->setChecked(true); + } } QAction* DefaultToolBar::addButton(QToolButton* button, const char* objectName) { @@ -191,6 +206,9 @@ void DefaultToolBar::initToolBarButtons() { icon.addFile(":/InfiniteViewer/Icon/distanced.png", QSize(), QIcon::Disabled); mBtnMeasure->setIcon(icon); } + mActionVolumeDetail = addWidget(mLblMeasure); + mLblMeasure->setObjectName("VolumeMeasure"); + mActionVolumeDetail->setVisible(false); auto actionClear= addButton(mBtnClear, "clear"); mBtnClear->setEnabled(false); @@ -471,11 +489,13 @@ void DefaultToolBar::initMeasureButton() { mBtnMeasure->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); mBtnMeasure->setToolTip(tr("Measuring tool")); + mBtnMeasure->setProperty("mode",36); connect(mBtnMeasure, &QToolButton::clicked, [=](){ - if (mBtnMeasure->property("mode").toInt() == 38) + int mode = mBtnMeasure->property("mode").toInt(); + if (mode != 36) { - emit modeChanged(38); + emit modeChanged(mode); } else{ emit modeChanged(36); @@ -493,7 +513,8 @@ void DefaultToolBar::initMeasureButton() { mBtnMeasure->setIcon(QIcon(map)); emit modeChanged(36); MeasureHelper::setMeasureType(std::get<1>(MEASURE_ACTIIONS[j])); - mBtnMeasure->setProperty("mode",0); + mBtnMeasure->setProperty("mode",36); + mActionVolumeDetail->setVisible(false); }); } @@ -504,6 +525,13 @@ void DefaultToolBar::initMeasureButton() { mBtnMeasure->setProperty("mode",38); emit modeChanged(38); }); + m->addAction(tr("Volume Measure"), this,[=](){ + mBtnMeasure->setChecked(true); + QPixmap map(":/InfiniteViewer/Icon/volmeasure.png"); + mBtnMeasure->setIcon(QIcon(map)); + mBtnMeasure->setProperty("mode",39); + emit modeChanged(39); + }); m->addSeparator(); ADD_DEL_ACTION(tr("Delete selected"), AnnotationDeleteType::DeleteSelectedAnn); ADD_DEL_ACTION(tr("Delete all in current slice"), AnnotationDeleteType::DeleteSliceAnn); @@ -511,9 +539,59 @@ void DefaultToolBar::initMeasureButton() { mBtnMeasure->setPopupMode(QToolButton::MenuButtonPopup); mBtnMeasure->setMenu(m); + connect(EventsCenter::Default(), &EventsCenter::VolumeMeasured, this, &DefaultToolBar::volumeMeasured, Qt::QueuedConnection); } +void DefaultToolBar::volumeMeasured(EventObject* aEventDetail) +{ + auto map = aEventDetail->Detail; + if (!map.contains("dis1")) + { + mLblMeasure->setText(""); + mActionVolumeDetail->setVisible(false); + return; + } + QString cm = tr("cm"); + QString mm = tr("mm"); + QString cm3= tr("cm³"); + QString mm3 = tr("mm³"); + QString Distance1Name = tr("Distance1"); + QString Distance2Name = tr("Distance2"); + QString Distance3Name= tr("Distance3"); + QString VolumeName = tr("Volume"); + + double dis1 = map.contains("dis1")?map["dis1"].toDouble():0.0; + QString unit1 = dis1>100?cm:mm; + dis1 = dis1>100.0?(dis1/10):(dis1); + double dis2 = map.contains("dis2")?map["dis2"].toDouble():0.0; + QString unit2 = dis2>100?cm:mm; + dis2 = dis2>100.0?(dis2/10):(dis2); + double dis3 = map.contains("dis3")?map["dis3"].toDouble():0.0; + QString unit3 = dis3>100?cm:mm; + dis3 = dis3>100.0?(dis3/10):(dis3); + double volume = map.contains("Volume")?map["Volume"].toDouble():0.0; + QString unit4 = volume>10000?cm3:mm3; + volume = volume>10000.0?(volume/1000):(volume); + + QString message = QString("%1: %2 %3, %4: %5 %6\n%7: %8 %9, %11: %12 %13") + .arg(Distance1Name) + .arg(dis1,0,'f',2) + .arg(unit1) + .arg(Distance2Name) + .arg(dis2,0,'f',2) + .arg(unit2) + .arg(Distance3Name) + .arg(dis3,0,'f',2) + .arg(unit3) + .arg(VolumeName) + .arg(volume,0,'f',2) + .arg(unit4); + mLblMeasure->setText(message); + mActionVolumeDetail->setVisible(true); + delete aEventDetail; +} + void DefaultToolBar::initFusionButton() { mBtnFusion->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); mBtnFusion->setToolTip(tr("Fusion")); @@ -610,8 +688,6 @@ void DefaultToolBar::resetNeedCheckFunctionButtons(){ break; } } -// SyncHelper::setSyncState(DIS_SYNC); -// syncStateChanged(); } void DefaultToolBar::updateNeedCheckFunctionButtons(ViewFunctionState state) @@ -662,8 +738,6 @@ void DefaultToolBar::updateNeedCheckFunctionButtons(ViewFunctionState state) } mBtnFusion->setEnabled(state.canFusion); } -// SyncHelper::setSyncState((SyncState)state.canSync); -// syncStateChanged(); } void DefaultToolBar::initScreenButtons() { diff --git a/src/src/UI/Widget/ToolBar/DefaultToolBar.h b/src/src/UI/Widget/ToolBar/DefaultToolBar.h index a0f8b77..0115d24 100644 --- a/src/src/UI/Widget/ToolBar/DefaultToolBar.h +++ b/src/src/UI/Widget/ToolBar/DefaultToolBar.h @@ -8,6 +8,7 @@ #include "UI/Manager/ImageViewStateCheckWorker.h" class QButtonGroup; +class QLabel; class ExportToolButton; class DefaultToolBar : public QToolBar { @@ -50,6 +51,7 @@ private: void initToolBarButtons(); void syncStateChanged() const; + void volumeMeasured(EventObject* aEventDetail); void initFileButton(); void initImportButton(); @@ -82,6 +84,7 @@ private: QToolButton *mBtnPan; QToolButton *mBtnZoom; QToolButton *mBtnMeasure; + QLabel* mLblMeasure; QToolButton *mBtnClear; QToolButton *mBtnFlip; QToolButton *mBtnCine; @@ -101,6 +104,7 @@ private: QAction *mActionHideReferenceLine; QAction *mActionHideMeasure; QAction *mActionHidePatData; + QAction *mActionVolumeDetail; QAction* mSyncActions[3]={nullptr,nullptr,nullptr}; QAction* mMPRActions[3]={nullptr,nullptr,nullptr}; QActionGroup *mPseudocolorGroup; diff --git a/src/translations/zh_CN.ts b/src/translations/zh_CN.ts index 9770fb7..6e10fc5 100644 --- a/src/translations/zh_CN.ts +++ b/src/translations/zh_CN.ts @@ -1,86 +1,106 @@ - + ConfigurationDialog - - Listening port: - + Listener port: + 监听端口: - - Local AE title: - + My AE title: + 本地AETitle: Advanced settings - + 高级设置 PACS location - + PACS位置 + + + Retrive Protocol + 检索协议 + + + + Listening port: + 监听端口: + + + + Local AE title: + 本地AETitle Retrieval Protocol - + 检索协议 IP address - + IP地址 Port - + 端口 AE title - + Description - + 描述 Save - + 保存 Cancel - + 取消 Retrieval protocol - + 检索协议 Maximum active downloads Number - + 最大可同时下载数 + + + Retrieve protocol + 检索协议 + + + Maximum active downloads + 最大可同时下载数 Preferred transfer syntax - + 首选传输语法 Character set - + 字符集 @@ -88,7 +108,7 @@ PACS configuration - + PACS配置 @@ -96,349 +116,414 @@ Customwindow - + 自定义窗宽窗位 Window level - + 窗位 Window width - + 窗宽 OK - + 确定 Cancel - + 取消 DefaultToolBar - - - Open Dicom series from directory - - - - - Open DICOM folder - - - - - Open DICOM file - - - - - Change Language - - - - - Quit - - - - - Search and download studies from PACS locations - - - Export images - + Open DICOM folder + 打开文件夹 + + + + Open DICOM file + 打开文件 - Layout - + Quit + 退出 - Toggle series synchronization - + Search and download studies from PACS locations + 从PACS获取 + + + + Export images + + Layout + 动态布局 + + + + Toggle series synchronization + 激活图像同步 + + + CUR STATE: %1 + 当前状态: %1 + + + + Open Dicom series from directory + 打开DICOM + + + + Change Language + Language: English + + + Sychronize slice - + 同步翻页 - + Sychronize zoom & pan - + 同步缩放&移动 - + Sychronize window level & width - + 同步窗宽窗位 - + Adjust window level - + 调窗 - - Custom window width and level - - - - - gray - - - - - Negative - - - - - Jet - - - - - Pan image - + Custom Window + 自定义窗宽窗位 + Negative + 负相 + + + + Pan image + 移动 + + + Zoom image - - - - - Browse series - - - - - Toggle annotations - - - - - Annotations - + 缩放 + Browse series + 翻页 + + + + Toggle annotations + 四角标记 + + + + Annotations + 四角标记 + + + Cross Reference Line - + 参考线 - + Hide all measurements - + 隐藏所有测量 - + Hide patient data - - - - - Show Dicom tags - - - - - Ruler - - - - - Angle gauge - - - - - Closed polygon - - - - - Open polygon - - - - - Arrow - + 隐藏患者信息 - Ellipse - + Show Dicom tags + 显示DICOM标记 - - Round - + Length + 直尺 - - Text - + Angle + 量角器 + + + + Closed polygon + 闭合多边形 - Measuring tool - + Open polygon + 开放多边形 + + + + Arrow + 箭头 + + + + Ellipse + 椭圆 + + + + Round + 正圆直径测量 + + + + Text + 文字 + + + Measurements + 测量工具 + + + + Custom window width and level + 自定义窗宽窗位 + + + + gray + 灰度 + + + + Jet + 伪彩色(Jet) + + + + Ruler + 直尺 + + + + Angle gauge + 量角器 - Location Point - - - - - Delete selected - - - - - Delete all in current slice - - - - - Delete all in current series - - - - - Fusion - - - - - Cine - - - - - Delete current series - - - - - Transformations - - - - - Rotate 90 CCW - + Measuring tool + 测量工具 - Rotate 90 CW - + Delete selected + 删除选中 - Rotate 180 - + Delete all in current slice + 删除当前图像中所有测量 - - Flip horizontal - + + Delete all in current series + 删除当前序列所有图像 - - Flip vertical - + + Location Point + 病灶定位 - - Clear transformations - - - - - MPR - + + Volume Measure + 体积测量 - 3D MPR - + cm + 厘米 + + + + mm + 毫米 + + + + cm³ + 立方厘米 - Coronal - + mm³ + 立方毫米 - Sagittal - + Distance1 + 距离1 + Distance2 + 距离2 + + + + Distance3 + 距离3 + + + + Volume + 体积 + + + + Fusion + + + + + Cine + + + + + Delete current series + 删除当前序列所有测量 + + + + Transformations + 翻页&旋转 + + + + Rotate 90 CCW + 逆时针旋转90度 + + + + Rotate 90 CW + 顺时针旋转90度 + + + + Rotate 180 + 旋转180度 + + + + Flip horizontal + 水平翻转 + + + + Flip vertical + 垂直翻转 + + + + Clear transformations + 清除变换 + + + + MPR + 多平面重建 + + + + 3D MPR + + + + + Coronal + 冠状面 + + + + Sagittal + 矢状面 + + + Axial - + 横断面 - + Full screen - + 全屏 - + Exit full screen mode - + 退出全屏 - + Minimize - + 最小化 - + Close - + 关闭 - + About - + 关于 - + Built with Qt 5.12.0 and VTK 9.2. - + 基于 Qt 5.12.0 和 VTK 9.2 构建 - + Copyright © %1 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reserved - + 版权所有 © 2025浙江衡玖医疗器械有限公司 DicomImageView - + Error - + 错误 - + Unable to read file %1 - + 无法读取文件 %1 @@ -461,12 +546,12 @@ All Rights Reserved Length - + Description - + @@ -476,27 +561,29 @@ All Rights Reserved EllipseAnnotationActor - - - mm² - - - cm² - + mm² + 平方毫米 - Area - + cm² + 平方厘米 - + + Area + 面积 + + + Area:%1 %7, Pixel:%2, Max:%3, Min:%4, Avg:%5, SD:%6 - + 面积:%1 %7, 像素:%2, +最大值:%3, 最小值:%4, +平均值:%5, 标准差:%6 @@ -594,7 +681,7 @@ Avg:%5, SD:%6 Annotations - + 四角标记 @@ -619,7 +706,7 @@ Avg:%5, SD:%6 Close - + 关闭 @@ -656,7 +743,7 @@ Avg:%5, SD:%6 Text Property - + 文字属性 @@ -666,12 +753,16 @@ Avg:%5, SD:%6 Apply - + 应用 Cancel - + 取消 + + + Delete + 删除 @@ -687,119 +778,55 @@ Avg:%5, SD:%6 Search and downlod studies from PACS locations - + 从PACS查找获取检查 ImportWidget - - - PACS Configuration - - Search - + 搜索 Clear - + 清除 - - All modalities - - - - - - - - - All dates - - - - - - Today - - - - - - Yesterday - - - - - - This week - - - - - - This month - - - - - - - Custom date - - - - - - - Custom date range - + + Study date + 检查日期 Patient name - + 患者姓名 + + + + Date of birth + 出生日期 Patient ID - - - - - - - Accession number - + 患者编码 Device name - - - - - Study date - - - - - Date of birth - + 设备名称 Modality - + 模态 @@ -811,35 +838,119 @@ Avg:%5, SD:%6 Study Instance Uid + + Study description + 检查描述 + + + + + + Accession number + 检查单号 + + + + PACS Configuration + PACS配置 + + + + All modalities + 所有模态 + + + + + + + + All dates + 所有日期 + + + + + Today + 今天 + + + + + Yesterday + 昨天 + + + + + This week + 本周 + + + + + This month + 本月 + + + + + + Custom date + 自定义日期 + + + + + + Custom date range + 自定义时间段 + + + Exam ID + 检查编码 + Referring physician - + 转诊医生 Performing physician - + 检查医生 Reading physician - + 阅片医生 Institution name - + 机构名称 Images - + 图像数量 Source - + 数据源 + + + Number + 序列号 + + + Description + 描述 + + + #Images + 数量 @@ -847,45 +958,49 @@ Avg:%5, SD:%6 maximize - + 最大化 shut down - + 关闭 OpenPolyAnnotationActor - - - mm - - - - - cm - - - - - mm² - - - - - cm² - - - Distance - + mm + 毫米 + cm + 厘米 + + + + mm² + 平方毫米 + + + + cm² + 平方厘米 + + + + Distance + 周长 + + + Perimeter + 直径 + + + Area - + 面积 @@ -893,7 +1008,7 @@ Avg:%5, SD:%6 OK - + 确定 @@ -901,55 +1016,56 @@ Avg:%5, SD:%6 Message - + 信息 QDicomViewer - + + Ready - + 就绪 - + Open dicom directory - + 打开文件夹 - + Open dicom files - + 打开文件 - + confirm - + 确认 - + Change Language will reload the application, please confirm to do this! - + 更改语言会重载整个程序,请确认是否要如此操作! - + Ok - + 确认 - + Cancel - + 取消 - + Warning - + 警告 - + open DICOM Images From PACS Fail - + 从PACS打开 @@ -957,12 +1073,19 @@ Avg:%5, SD:%6 QDicomViewer - + toolBar - + + + + + QObject + + Perimeter + 直径 @@ -986,37 +1109,61 @@ Avg:%5, SD:%6 RoundAnnotationActor - - mm - + mm² + 平方毫米 + + + cm² + 平方厘米 + + + Area + 面积 + + + cm³ + 立方厘米 + + + mm³ + 立方毫米 + + + Volume + 体积 - cm - + mm + 毫米 + cm + 厘米 + + + Diameter - + 直径 RulerAnnotationActor - + mm - + 毫米 - + cm - + 厘米 - + Distance - + 距离 @@ -1024,7 +1171,7 @@ Avg:%5, SD:%6 Cancel - + 取消 @@ -1110,12 +1257,16 @@ Avg:%5, SD:%6 Ruler - + 直尺 Arrow - + 箭头 + + + Measurements + 测量工具 @@ -1133,17 +1284,17 @@ Avg:%5, SD:%6 mm - + 毫米 OK - + 确定 Cancel - + 取消