diff --git a/src/src/Common/QGlobals.cpp b/src/src/Common/QGlobals.cpp index f5d89e8..8533508 100644 --- a/src/src/Common/QGlobals.cpp +++ b/src/src/Common/QGlobals.cpp @@ -21,4 +21,5 @@ SyncState SyncHelper::_syc_state = SyncState::DIS_SYNC; bool SyncHelper::_syc_item[SYNC_STATE_NUM][SYNC_ITEM_NUM] = {true,true,true,true,true,true,false,false,false}; bool SyncHelper::_sync_flag =false; //for just zoom and pan const QString SyncHelper::SyncStateName[SYNC_STATE_NUM] = { "AUTO_SYNC","MANUAL_SYNC","DIS_SYNC" }; -const QString SyncHelper::SyncItemName[SYNC_ITEM_NUM] = { "SLICE_LOC","ZOOM_PAN","WIDTH_LEVEL" }; \ No newline at end of file +const QString SyncHelper::SyncItemName[SYNC_ITEM_NUM] = { "SLICE_LOC","ZOOM_PAN","WIDTH_LEVEL" }; +LanguageOption LanguageHelper::lang = English; \ No newline at end of file diff --git a/src/src/Common/QGlobals.h b/src/src/Common/QGlobals.h index 3bcaace..bb546be 100644 --- a/src/src/Common/QGlobals.h +++ b/src/src/Common/QGlobals.h @@ -340,5 +340,25 @@ private: }; +enum LanguageOption +{ + English, + ChineseSimple +}; +class LanguageHelper +{ + +public: + static LanguageOption getLanguage() + { + return lang; + } + static void setLanguage(LanguageOption aOption) + { + lang = aOption; + } +private: + static LanguageOption lang; +}; #endif OMEGAV_QGLOBALS_H diff --git a/src/src/PACS/Widget/importwidget.cpp b/src/src/PACS/Widget/importwidget.cpp index 1cd2349..d092fbd 100644 --- a/src/src/PACS/Widget/importwidget.cpp +++ b/src/src/PACS/Widget/importwidget.cpp @@ -97,7 +97,7 @@ ImportWidget::~ImportWidget() void ImportWidget::initUi() { //this->setWindowFlags(Qt::FramelessWindowHint); - this->setWindowTitle("PACS Configuration"); + this->setWindowTitle(tr("PACS Configuration")); this->resize(780, 470); this->setMinimumSize(QSize(780, 470)); @@ -204,7 +204,7 @@ void ImportWidget::initFilterPacs() void ImportWidget::initFilterModality() { - m_pModalityComboBox->addItem("All modalities"); + m_pModalityComboBox->addItem(tr("All modalities")); m_pModalityComboBox->addItem("CT"); m_pModalityComboBox->addItem("US"); m_pModalityComboBox->addItem("MR"); @@ -214,23 +214,23 @@ void ImportWidget::initFilterModality() void ImportWidget::initFilterDate() { - m_pDateComboBox->addItem("All dates"); + m_pDateComboBox->addItem(tr("All dates")); m_pDateComboBox->addItem("-----------"); - m_pDateComboBox->addItem("Today"); - m_pDateComboBox->addItem("Yesterday"); - m_pDateComboBox->addItem("This week"); - m_pDateComboBox->addItem("This month"); - m_pDateComboBox->addItem("Custom date"); - m_pDateComboBox->addItem("Custom date range"); + m_pDateComboBox->addItem(tr("Today")); + m_pDateComboBox->addItem(tr("Yesterday")); + m_pDateComboBox->addItem(tr("This week")); + m_pDateComboBox->addItem(tr("This month")); + m_pDateComboBox->addItem(tr("Custom date")); + m_pDateComboBox->addItem(tr("Custom date range")); m_pStartDate->setEnabled(false); m_pEndDate->setEnabled(false); } void ImportWidget::initFilterDicom() { - m_pDicomComboBox->addItem("Patient name"); - m_pDicomComboBox->addItem("Patient ID"); - m_pDicomComboBox->addItem("Accession number"); + m_pDicomComboBox->addItem(tr("Patient name")); + m_pDicomComboBox->addItem(tr("Patient ID")); + m_pDicomComboBox->addItem(tr("Accession number")); //m_pDicomComboBox->addItem("Study description"); //m_pDicomComboBox->addItem("Referring physician"); //m_pDicomComboBox->addItem("Performing physician"); @@ -374,27 +374,27 @@ void ImportWidget::getDateIntervalForQuery(QString& startDate, QString& endDate) startDate.clear(); endDate.clear(); QDate startDate_, endDate_, date = QDate::currentDate(); - if (m_pDateComboBox->currentText() == "Today") + if (m_pDateComboBox->currentText() == tr("Today")) { startDate_ = date; } - else if(m_pDateComboBox->currentText() == "Yesterday") + else if(m_pDateComboBox->currentText() == tr("Yesterday")) { startDate_ = date.addDays(-1); } - else if (m_pDateComboBox->currentText() == "This week") + else if (m_pDateComboBox->currentText() == tr("This week")) { startDate_ = date.addDays(-date.dayOfWeek() + 1); } - else if (m_pDateComboBox->currentText() == "This month") + else if (m_pDateComboBox->currentText() == tr("This month")) { startDate_ = QDate(date.year(), date.month(), 1); } - else if (m_pDateComboBox->currentText() == "Custom date") + else if (m_pDateComboBox->currentText() == tr("Custom date")) { startDate_ = m_pStartDate->date(); } - else if (m_pDateComboBox->currentText() == "Custom date range") + else if (m_pDateComboBox->currentText() == tr("Custom date range")) { startDate_ = m_pStartDate->date(); endDate_ = m_pEndDate->date(); @@ -470,23 +470,23 @@ void ImportWidget::query() QString studyStartDate, studyEndDate; getDateIntervalForQuery(studyStartDate, studyEndDate); - if (m_pDicomComboBox->currentText() == "Patient ID") + if (m_pDicomComboBox->currentText() == tr("Patient ID")) { - if(m_pDateComboBox->currentText() == "All dates" || m_pDateComboBox->currentText() == "-----------") + if(m_pDateComboBox->currentText() == tr("All dates") || m_pDateComboBox->currentText() == "-----------") QMetaObject::invokeMethod(mQueryWorker, "queryByPatientID", Qt::QueuedConnection, Q_ARG(QString, m_pDicomEdit->text())); else QMetaObject::invokeMethod(mQueryWorker, "queryByPatientIDAndDate", Qt::QueuedConnection, Q_ARG(QString, m_pDicomEdit->text()), Q_ARG(QString, studyStartDate), Q_ARG(QString, studyEndDate)); } - else if (m_pDicomComboBox->currentText() == "Patient name") + else if (m_pDicomComboBox->currentText() == tr("Patient name")) { - if (m_pDateComboBox->currentText() == "All dates" || m_pDateComboBox->currentText() == "-----------") + if (m_pDateComboBox->currentText() == tr("All dates") || m_pDateComboBox->currentText() == "-----------") QMetaObject::invokeMethod(mQueryWorker, "queryByPatientName", Qt::QueuedConnection, Q_ARG(QString, m_pDicomEdit->text())); else QMetaObject::invokeMethod(mQueryWorker, "queryByPatientNameAndDate", Qt::QueuedConnection, Q_ARG(QString, m_pDicomEdit->text()), Q_ARG(QString, studyStartDate), Q_ARG(QString, studyEndDate)); } - else if (m_pDicomComboBox->currentText() == "Accession number") + else if (m_pDicomComboBox->currentText() == tr("Accession number")) { - if (m_pDateComboBox->currentText() == "All dates" || m_pDateComboBox->currentText() == "-----------") + if (m_pDateComboBox->currentText() == tr("All dates") || m_pDateComboBox->currentText() == "-----------") QMetaObject::invokeMethod(mQueryWorker, "queryByAccessNo", Qt::QueuedConnection, Q_ARG(QString, m_pDicomEdit->text())); else QMetaObject::invokeMethod(mQueryWorker, "queryByAccessNoAndDate", Qt::QueuedConnection, Q_ARG(QString, m_pDicomEdit->text()), Q_ARG(QString, studyStartDate), Q_ARG(QString, studyEndDate)); @@ -847,12 +847,12 @@ void ImportWidget::onPacsInfoUpdated() void ImportWidget::onDateFilterChanged(const QString &text) { - if (text == "Custom date") + if (text == tr("Custom date")) { m_pStartDate->setEnabled(true); m_pEndDate->setEnabled(false); } - else if (text == "Custom date range") + else if (text == tr("Custom date range")) { m_pStartDate->setEnabled(true); m_pEndDate->setEnabled(true); diff --git a/src/src/Rendering/Measure/AngleAnnotationActor.cpp b/src/src/Rendering/Measure/AngleAnnotationActor.cpp index e0150ea..5b57f59 100644 --- a/src/src/Rendering/Measure/AngleAnnotationActor.cpp +++ b/src/src/Rendering/Measure/AngleAnnotationActor.cpp @@ -91,7 +91,7 @@ void AngleAnnotationActor::BuildShape() { double v2[3] = {p3[0] - p2[0], p3[1] - p2[1], 0.0}; double angle = vtkMath::DegreesFromRadians(vtkMath::AngleBetweenVectors(v1, v2)); char str[100]; - sprintf_s(str, "%.0f", angle); + sprintf_s(str, "%.0f°", angle); vtkTextMapper::SafeDownCast(text->GetMapper())->SetInput(str); text->SetDisplayPosition(p2[0] + 10, p2[1] - 20); vtkNew source; diff --git a/src/src/Rendering/Measure/EllipseAnnotationActor.cpp b/src/src/Rendering/Measure/EllipseAnnotationActor.cpp index de07096..5a8135b 100644 --- a/src/src/Rendering/Measure/EllipseAnnotationActor.cpp +++ b/src/src/Rendering/Measure/EllipseAnnotationActor.cpp @@ -13,8 +13,9 @@ #include #include #include - +#include #include "Rendering/Core/ControlPointActor.h" +#include "Common/QGlobals.h" vtkStandardNewMacro(EllipseAnnotationActor) @@ -29,11 +30,19 @@ void EllipseAnnotationActor::BuildShape() { double *p_lt = controlP_lt->GetWorldPosition(); double *p_rb = controlP_rb->GetWorldPosition(); + if (!transforming) + { double area = abs((p_lt[0] - p_rb[0]) * (p_lt[1] - p_rb[1])) * vtkMath::Pi() * 0.25; + bool unitFlag2 = area>1000; QString num = QString::number(area, 'f', 2); - QString str = QString("Area = %1 cm2").arg(num); + QString textValue = QString("%1: %2 %3") + .arg(mAreaName) + .arg(unitFlag2?area/100:area,0,'f',2).arg(unitFlag2?mUnitcm2:mUnitmm2); + vtkTextMapper::SafeDownCast(text->GetMapper())->SetInput(textValue.toUtf8().constData()); + + } double *rp = renderPoints->GetPoint(0); - vtkTextMapper::SafeDownCast(text->GetMapper())->SetInput(str.toStdString().c_str()); + text->SetDisplayPosition(rp[0] + 10, rp[1] - 20); @@ -42,6 +51,7 @@ void EllipseAnnotationActor::BuildShape() { source->Update(); renderData->DeepCopy(source->GetOutput()); + if (Measure::Hidden) { this->Hide(); controlP_rt->Hide(); @@ -94,8 +104,15 @@ EllipseAnnotationActor::EllipseAnnotationActor() { textMapper->SetInput("0"); text->SetMapper(textMapper); textProperty = textMapper->GetTextProperty(); - textProperty->SetBold(true); + if (LanguageHelper::getLanguage() == ChineseSimple && QFile::exists(FONT_FILE_PATH)) + { + textProperty->SetFontFamily(VTK_FONT_FILE); + textProperty->SetFontFile(FONT_FILE_PATH); + } + else{ textProperty->SetFontFamilyToArial(); + textProperty->SetBold(1); + } textProperty->SetFontSize(16); textProperty->SetColor(0.8, 0.8, 0.0); textProperty->SetOpacity(0.75); @@ -103,6 +120,10 @@ EllipseAnnotationActor::EllipseAnnotationActor() { //textProperty->SetFrameColor(1.0,0.0,0.0); textProperty->SetBackgroundColor(1.0, 0.0, 0.0); textProperty->SetBackgroundOpacity(0.3); + + mUnitmm2 = QCoreApplication::translate("EllipseAnnotationActor","mm²"); + mUnitcm2 = QCoreApplication::translate("EllipseAnnotationActor","cm²"); + mAreaName = QCoreApplication::translate("EllipseAnnotationActor", "Area"); } EllipseAnnotationActor::~EllipseAnnotationActor() { @@ -115,8 +136,6 @@ EllipseAnnotationActor::~EllipseAnnotationActor() { controlP_rt = nullptr; controlP_lb = nullptr; controlP_rb = nullptr; - - } void EllipseAnnotationActor::SetRenderer(vtkRenderer *ren) { diff --git a/src/src/Rendering/Measure/EllipseAnnotationActor.h b/src/src/Rendering/Measure/EllipseAnnotationActor.h index cea3e8c..7e41f9f 100644 --- a/src/src/Rendering/Measure/EllipseAnnotationActor.h +++ b/src/src/Rendering/Measure/EllipseAnnotationActor.h @@ -57,6 +57,9 @@ private: void drawCircle(double *p1, double *p2); vtkTextProperty *textProperty; + QString mUnitmm2 ; + QString mUnitcm2 ; + QString mAreaName; }; diff --git a/src/src/Rendering/Measure/Measure.h b/src/src/Rendering/Measure/Measure.h index 4985e7f..dd32d0a 100644 --- a/src/src/Rendering/Measure/Measure.h +++ b/src/src/Rendering/Measure/Measure.h @@ -15,6 +15,10 @@ Measure* GetNextMeasure() override\ class vtkRenderWindowInteractor; class vtkProp; +namespace{ + const char* FONT_FILE_PATH = "C:/Windows/Fonts/simhei.ttf"; +} + class Measure { public: virtual bool onMeasureDoubleClick(vtkRenderWindowInteractor *) { return this->Placing; }; diff --git a/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp b/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp index f4a037b..78e9363 100644 --- a/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp +++ b/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp @@ -5,8 +5,17 @@ #include #include #include +#include +#include +#include + +#include +#include +#include #include "Rendering/Core/ControlPointRActor.h" +#include "Common/QGlobals.h" + vtkStandardNewMacro(OpenPolyAnnotationActor) @@ -31,12 +40,19 @@ void OpenPolyAnnotationActor::BuildShape() { std::for_each(controlPointList.begin(), controlPointList.end(),[=](ControlPointRActor* p){ p->Hide(); }); + if (text)text->SetVisibility(0); } else{ this->Show(); std::for_each(controlPointList.begin(), controlPointList.end(),[=](ControlPointRActor* p){ p->Show(); }); + if (text && measured)text->SetVisibility(1); + } + if (text && measured) + { + double *rp = renderPoints->GetPoint(0); + text->SetDisplayPosition(rp[0] + 10, rp[1] - 20); } } @@ -75,12 +91,43 @@ bool OpenPolyAnnotationActor::onMeasureLeftButtonUp(vtkRenderWindowInteractor * return true; } -OpenPolyAnnotationActor::OpenPolyAnnotationActor() { +OpenPolyAnnotationActor::OpenPolyAnnotationActor(): + Closed(0), + measured(false) +{ //auto controlP1 = ControlPointRActor::New(); - + text = vtkActor2D::New(); + vtkNew textMapper; + textMapper->SetInput("0"); + text->SetMapper(textMapper); + textProperty = textMapper->GetTextProperty(); + textProperty->SetBold(true); + if (LanguageHelper::getLanguage() == ChineseSimple && QFile::exists(FONT_FILE_PATH)) + { + textProperty->SetFontFamily(VTK_FONT_FILE); + textProperty->SetFontFile(FONT_FILE_PATH); + } + else{ + textProperty->SetFontFamilyToArial(); + textProperty->SetBold(1); + } + textProperty->SetFontSize(16); + textProperty->SetColor(0.8, 0.8, 0.0); + textProperty->SetOpacity(0.75); + textProperty->SetFrame(false); + //textProperty->SetFrameColor(1.0,0.0,0.0); + textProperty->SetBackgroundColor(1.0, 0.0, 0.0); + textProperty->SetBackgroundOpacity(0.3); + text->SetVisibility(0); BaseDataPoints->SetNumberOfPoints(0); renderPoints->SetNumberOfPoints(0); this->AddObserver(DraggableActorEvents::DragEvent, this, &OpenPolyAnnotationActor::selfDragCb); + mUnitmm = QCoreApplication::translate("OpenPolyAnnotationActor","mm"); + mUnitcm = QCoreApplication::translate("OpenPolyAnnotationActor","cm"); + mUnitmm2 = QCoreApplication::translate("OpenPolyAnnotationActor","mm²"); + mUnitcm2 = QCoreApplication::translate("OpenPolyAnnotationActor","cm²"); + mDistanceName = QCoreApplication::translate("OpenPolyAnnotationActor", "Distance"); + mAreaName = QCoreApplication::translate("OpenPolyAnnotationActor", "Area"); } OpenPolyAnnotationActor::~OpenPolyAnnotationActor() { diff --git a/src/src/Rendering/Measure/OpenPolyAnnotationActor.h b/src/src/Rendering/Measure/OpenPolyAnnotationActor.h index e1c650b..17b179c 100644 --- a/src/src/Rendering/Measure/OpenPolyAnnotationActor.h +++ b/src/src/Rendering/Measure/OpenPolyAnnotationActor.h @@ -7,6 +7,8 @@ class ControlPointRActor; +class vtkTextProperty; + class OpenPolyAnnotationActor : public DraggableActor, public Measure { public: //@{ @@ -69,11 +71,20 @@ protected: } std::vector controlPointList; - vtkTypeBool Closed = 0; + vtkTypeBool Closed; void selfDragCb(vtkObject *, unsigned long event, void *data); void controlPointCb(vtkObject *sender, unsigned long event, void *data); + + vtkTextProperty *textProperty; + bool measured; + QString mUnitmm ; + QString mUnitcm ; + QString mUnitmm2; + QString mUnitcm2; + QString mDistanceName; + QString mAreaName; }; #endif //OMEGAV_OPENPOLYANNOTATIONACTOR_H diff --git a/src/src/Rendering/Measure/RulerAnnotationActor.cpp b/src/src/Rendering/Measure/RulerAnnotationActor.cpp index 11b3b63..ba66ec7 100644 --- a/src/src/Rendering/Measure/RulerAnnotationActor.cpp +++ b/src/src/Rendering/Measure/RulerAnnotationActor.cpp @@ -11,6 +11,9 @@ #include #include +#include +#include "Common/QGlobals.h" + #include "Interaction/ActorDraggableInteractorStyle.h" #include "Rendering/Core/ControlPointActor.h" #include "UI/Widget/Measure/calibrationWidget.h" @@ -23,8 +26,15 @@ RulerAnnotationActor::RulerAnnotationActor() { textMapper->SetInput("0"); text->SetMapper(textMapper); textProperty = textMapper->GetTextProperty(); - textProperty->SetBold(true); + if (LanguageHelper::getLanguage() == ChineseSimple && QFile::exists(FONT_FILE_PATH)) + { + textProperty->SetFontFamily(VTK_FONT_FILE); + textProperty->SetFontFile(FONT_FILE_PATH); + } + else{ textProperty->SetFontFamilyToArial(); + textProperty->SetBold(1); + } textProperty->SetFontSize(16); textProperty->SetColor(0.8, 0.8, 0.0); textProperty->SetOpacity(0.75); @@ -34,6 +44,9 @@ RulerAnnotationActor::RulerAnnotationActor() { textProperty->SetBackgroundOpacity(0.3); this->AddObserver(DraggableStyleEvents::RightButtonClickEvent, this, &RulerAnnotationActor::selfCalibCb); + mUnitmm = QCoreApplication::translate("RulerAnnotationActor","mm"); + mUnitcm = QCoreApplication::translate("RulerAnnotationActor","cm"); + mDistance = QCoreApplication::translate("RulerAnnotationActor","Distance"); } RulerAnnotationActor::~RulerAnnotationActor() { @@ -58,13 +71,15 @@ void RulerAnnotationActor::BuildShape() { } else { dis = realDistance; } - char str[100]; - sprintf_s(str, "Distance:%.2f mm", dis); + bool unitFlag = dis>100; + QString textValue = QString("%1: %2 %3").arg(mDistance) + .arg(unitFlag?dis/10:dis,0,'f',2).arg(unitFlag?mUnitcm:mUnitmm); double *rp = renderPoints->GetPoint(0); if (isCalibration) { textProperty->SetBackgroundColor(0.0, 1.0, 0.0); } - vtkTextMapper::SafeDownCast(text->GetMapper())->SetInput(str); + // vtkTextMapper::SafeDownCast(text->GetMapper())->SetInput(str); + vtkTextMapper::SafeDownCast(text->GetMapper())->SetInput(textValue.toUtf8().constData()); text->SetDisplayPosition(rp[0] + 10, rp[1] - 20); } diff --git a/src/src/Rendering/Measure/RulerAnnotationActor.h b/src/src/Rendering/Measure/RulerAnnotationActor.h index e7091b5..cb7c959 100644 --- a/src/src/Rendering/Measure/RulerAnnotationActor.h +++ b/src/src/Rendering/Measure/RulerAnnotationActor.h @@ -44,6 +44,9 @@ private: double realDistance; double calibDistance; bool isCalibration = false; + QString mUnitmm; + QString mUnitcm; + QString mDistance; }; diff --git a/src/src/Rendering/Measure/TextAnnotationActor.cpp b/src/src/Rendering/Measure/TextAnnotationActor.cpp index a8021db..42adada 100644 --- a/src/src/Rendering/Measure/TextAnnotationActor.cpp +++ b/src/src/Rendering/Measure/TextAnnotationActor.cpp @@ -9,6 +9,8 @@ #include #include +#include + #include "UI/Widget/Measure/pqFontPropertyWidget.h" #include "Interaction/ActorDraggableInteractorStyle.h" @@ -48,8 +50,15 @@ void TextAnnotationActor::ResetTextProp() { mTextProperty->SetBold(true); mTextProperty->SetItalic(false); mTextProperty->SetShadow(false); - + if (QFile::exists(FONT_FILE_PATH)) + { + mTextProperty->SetFontFamily(VTK_FONT_FILE); + mTextProperty->SetFontFile(FONT_FILE_PATH); + } + else{ mTextProperty->SetFontFamilyToArial(); + } + mTextProperty->SetFontSize(16); mTextProperty->SetColor(0.8, 0.8, 0.0); mTextProperty->SetOpacity(0.75); diff --git a/src/src/UI/Widget/Component/mytitlebar.cpp b/src/src/UI/Widget/Component/mytitlebar.cpp index 0a8c7b6..0404195 100644 --- a/src/src/UI/Widget/Component/mytitlebar.cpp +++ b/src/src/UI/Widget/Component/mytitlebar.cpp @@ -63,8 +63,8 @@ void MyTitleBar::initControl() // m_pButtonMin->setToolTip(QStringLiteral("minimize")); // m_pButtonRestore->setToolTip(QStringLiteral("reduction")); - m_pButtonMax->setToolTip(QStringLiteral("maximize")); - m_pButtonClose->setToolTip(QStringLiteral("shut down")); + m_pButtonMax->setToolTip(tr("maximize")); + m_pButtonClose->setToolTip(tr("shut down")); QHBoxLayout* mylayout = new QHBoxLayout(this); diff --git a/src/src/UI/Widget/Measure/pqFontPropertyWidget.cpp b/src/src/UI/Widget/Measure/pqFontPropertyWidget.cpp index a045bc4..b61da85 100644 --- a/src/src/UI/Widget/Measure/pqFontPropertyWidget.cpp +++ b/src/src/UI/Widget/Measure/pqFontPropertyWidget.cpp @@ -2,7 +2,6 @@ #include "UI/Widget/ImageView/dicomimageview.h" #include #include "qcolordialog.h" -//#include "QFontDialog.h" //pqFontPropertyWidget* pqFontPropertyWidget::instance = nullptr; //pqFontPropertyWidget* pqFontPropertyWidget::GetInstance() { @@ -73,8 +72,9 @@ void pqFontPropertyWidget::SetTextInput() if (this->textActor) { QString qstr = ui.led_TextInput->text(); - QByteArray ba = qstr.toLatin1(); - this->textActor->SetTextInput(ba.data()); + QByteArray ba = qstr.toUtf8(); + + this->textActor->SetTextInput(ba.constData()); this->tRender->Render(); } @@ -148,7 +148,6 @@ void pqFontPropertyWidget::reloadProperties() //char * str = vtkTextMapper::SafeDownCast(this->textActor->GetTextProp())->GetInput(); ui.led_TextInput->setText(this->textActor->GetTextInput()); - ui.cbx_FontFamily->setCurrentIndex(tprop->GetFontFamily()); ui.spx_FontSize->setValue(tprop->GetFontSize()); ui.dspx_Opacity->setValue(tprop->GetOpacity()); diff --git a/src/src/UI/Widget/ToolBar/DefaultToolBar.cpp b/src/src/UI/Widget/ToolBar/DefaultToolBar.cpp index 50e580a..1b27591 100644 --- a/src/src/UI/Widget/ToolBar/DefaultToolBar.cpp +++ b/src/src/UI/Widget/ToolBar/DefaultToolBar.cpp @@ -9,20 +9,20 @@ #include "Common/QGlobals.h" #include "ExportToolButton.h" -typedef tuple ActionProperty; +typedef tuple< const char *, int> ActionProperty; namespace { const char *SYNC_MANUAL_URL = ":/InfiniteViewer/Icon/sync/sync_manual.png"; const char *SYNC_AUTO_URL = ":/InfiniteViewer/Icon/sync/sync_auto.png"; const char *SYNC_DIS_URL = ":/InfiniteViewer/Icon/sync/sync_dis.png"; const int ACTION_COUNT = 7; const ActionProperty MEASURE_ACTIIONS[ACTION_COUNT] = { - {"Length", ":/InfiniteViewer/Icon/distance.png", AnnotationActorType::RulerAnn}, - {"Angle", ":/InfiniteViewer/Icon/angle.png", AnnotationActorType::AngleAnn}, - {"Closed polygon", ":/InfiniteViewer/Icon/polygon.png", AnnotationActorType::ClosedPolygonAnn}, - {"Open polygon", ":/InfiniteViewer/Icon/polyline.png", AnnotationActorType::OpenPolygonAnn}, - {"Arrow", ":/InfiniteViewer/Icon/arrow.png", AnnotationActorType::ArrowAnn}, - {"Ellipse", ":/InfiniteViewer/Icon/ellipse.png", AnnotationActorType::EllipseAnn}, - {"Text", ":/InfiniteViewer/Icon/text.png", AnnotationActorType::TextAnn} + { ":/InfiniteViewer/Icon/distance.png", AnnotationActorType::RulerAnn}, + { ":/InfiniteViewer/Icon/angle.png", AnnotationActorType::AngleAnn}, + { ":/InfiniteViewer/Icon/polygon.png", AnnotationActorType::ClosedPolygonAnn}, + { ":/InfiniteViewer/Icon/polyline.png", AnnotationActorType::OpenPolygonAnn}, + { ":/InfiniteViewer/Icon/arrow.png", AnnotationActorType::ArrowAnn}, + { ":/InfiniteViewer/Icon/ellipse.png", AnnotationActorType::EllipseAnn}, + { ":/InfiniteViewer/Icon/text.png", AnnotationActorType::TextAnn} }; } @@ -184,13 +184,14 @@ void DefaultToolBar::initToolBarButtons() { void DefaultToolBar::initFileButton() { mBtnFile->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); // Menu - mBtnFile->setToolTip(QString("Open Dicom series from directory")); + mBtnFile->setToolTip(tr("Open Dicom series from directory")); QMenu *m; m = new QMenu(this); m->addAction(tr("Open DICOM folder"), this, &DefaultToolBar::openFolder); m->addAction(tr("Open DICOM file"), this, &DefaultToolBar::openFile); - + m->addSeparator(); + m->addAction(tr("Change Language"), this, &DefaultToolBar::parentWindowLanguageChange); m->addSeparator(); m->addAction(tr("Quit"), this, &DefaultToolBar::parentWindowClose); mBtnFile->setPopupMode(QToolButton::MenuButtonPopup); @@ -201,19 +202,19 @@ void DefaultToolBar::initFileButton() { } void DefaultToolBar::initImportButton() { - mBtnImport->setToolTip(QString("Search and download studies from PACS locations")); + mBtnImport->setToolTip(tr("Search and download studies from PACS locations")); connect(mBtnImport, &QToolButton::clicked, this, &DefaultToolBar::import); } void DefaultToolBar::initExportButton() { mBtnSave->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnSave->setToolTip(QString("Export images")); + mBtnSave->setToolTip(tr("Export images")); connect(mBtnSave, &QToolButton::clicked, this, &DefaultToolBar::save); } void DefaultToolBar::initGridButton() { mBtnGrid->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnGrid->setToolTip(QString("Layout")); + mBtnGrid->setToolTip(tr("Layout")); // connect connect(mBtnGrid, &QToolButton::clicked, this, [=](){ emit showGrid(mBtnGrid); @@ -222,26 +223,26 @@ void DefaultToolBar::initGridButton() { void DefaultToolBar::initSyncButton() { mBtnSync->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnSync->setToolTip(QString("Toggle series synchronization")); + mBtnSync->setToolTip(tr("Toggle series synchronization")); // Menu QMenu * m = new QMenu(this); - SyncState curst = SyncHelper::getSyncState(); - mActionSyncState = m->addAction(QString(tr("CUR STATE: %1")).arg(SyncHelper::SyncStateName[curst])); - mActionSyncState->setCheckable(false); - addSeparator(); + // SyncState curst = SyncHelper::getSyncState(); + // mActionSyncState = m->addAction(QString(tr("CUR STATE: %1")).arg(SyncHelper::SyncStateName[curst])); + // mActionSyncState->setCheckable(false); + // addSeparator(); #define ADD_SYNC_ITEM(index,text,type)\ - mSyncActions[index] = m->addAction(tr(text), this, [&](bool value) {\ + mSyncActions[index] = m->addAction(text, this, [&](bool value) {\ SyncHelper::setSyncItem(type, value);\ });\ mSyncActions[index]->setCheckable(true);\ mSyncActions[index]->setChecked(false);\ mSyncActions[index]->setDisabled(true); - ADD_SYNC_ITEM(0,"Sychronize slice",SyncItem::SLICE_POS) - ADD_SYNC_ITEM(1,"Sychronize zoom & pan",SyncItem::ZOOM_PAN) - ADD_SYNC_ITEM(2,"Sychronize window level & width",SyncItem::WIDTH_LEVEL) + ADD_SYNC_ITEM(0,tr("Sychronize slice"),SyncItem::SLICE_POS) + ADD_SYNC_ITEM(1,tr("Sychronize zoom & pan"),SyncItem::ZOOM_PAN) + ADD_SYNC_ITEM(2,tr("Sychronize window level & width"),SyncItem::WIDTH_LEVEL) //hide zoom& pan action mSyncActions[1]->setVisible(false); @@ -290,7 +291,7 @@ void DefaultToolBar::syncStateChanged() const { void DefaultToolBar::initModeButtons() { mBtnWindow->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnWindow->setToolTip(QString("Adjust window level")); + mBtnWindow->setToolTip(tr("Adjust window level")); connect(mBtnWindow, &QToolButton::clicked, this, [=]() { emit modeChanged(7); }); @@ -306,17 +307,17 @@ void DefaultToolBar::initModeButtons() { mBtnWindow->setPopupMode(QToolButton::MenuButtonPopup); mBtnWindow->setMenu(m); - mBtnPan->setToolTip(QString("Pan image")); + mBtnPan->setToolTip(tr("Pan image")); connect(mBtnPan, &QToolButton::clicked, this, [=]() { emit modeChanged(5); }); - mBtnZoom->setToolTip(QString("Zoom image")); + mBtnZoom->setToolTip(tr("Zoom image")); connect(mBtnZoom, &QToolButton::clicked, this, [=]() { emit modeChanged(6); }); - mBtnSlice->setToolTip(QString("Browse series")); + mBtnSlice->setToolTip(tr("Browse series")); connect(mBtnSlice, &QToolButton::clicked, this, [=]() { emit modeChanged(4); }); @@ -326,7 +327,7 @@ void DefaultToolBar::initModeButtons() { void DefaultToolBar::initAnonymizeButton() { mBtnAnonymize->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnAnonymize->setToolTip(QString("Toggle annotations")); + mBtnAnonymize->setToolTip(tr("Toggle annotations")); mBtnAnonymize->setCheckable(true); QMenu *m; m = new QMenu(this); @@ -375,22 +376,31 @@ void DefaultToolBar::initAnonymizeButton() { } void DefaultToolBar::initMeasureButton() { + + QStringList measures={tr("Length"), + tr("Angle"), + tr("Closed polygon"), + tr("Open polygon"), + tr("Arrow"), + tr("Ellipse"), + tr("Text")}; + #define ADD_MEASURE_ACTION(index)\ - m->addAction(tr(std::get<0>(MEASURE_ACTIIONS[index])), this, [=] {\ + m->addAction(measures[index], this, [=] {\ mBtnMeasure->setChecked(true);\ - QPixmap map(std::get<1>(MEASURE_ACTIIONS[index]));\ + QPixmap map(std::get<0>(MEASURE_ACTIIONS[index]));\ mBtnMeasure->setIcon(QIcon(map));\ - MeasureHelper::setMeasureType(std::get<2>(MEASURE_ACTIIONS[index]));\ + MeasureHelper::setMeasureType(std::get<1>(MEASURE_ACTIIONS[index]));\ }) #define ADD_DEL_ACTION(text, type)\ - m->addAction(tr(text),this,[]{\ + m->addAction(text,this,[]{\ MeasureHelper::deleteMeasure(type);\ }); mBtnMeasure->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnMeasure->setToolTip(QString("Measurements")); + mBtnMeasure->setToolTip(tr("Measurements")); connect(mBtnMeasure, &QToolButton::clicked, [=](){ MeasureHelper::setMeasureType(MeasureHelper::getMeasureType()); @@ -403,49 +413,54 @@ void DefaultToolBar::initMeasureButton() { ADD_MEASURE_ACTION(j); } m->addSeparator(); - ADD_DEL_ACTION("Delete selected", AnnotationDeleteType::DeleteSelectedAnn); - ADD_DEL_ACTION("Delete all in current slice", AnnotationDeleteType::DeleteSliceAnn); - ADD_DEL_ACTION("Delete all in current series", AnnotationDeleteType::DeleteSeriesAnn); + ADD_DEL_ACTION(tr("Delete selected"), AnnotationDeleteType::DeleteSelectedAnn); + ADD_DEL_ACTION(tr("Delete all in current slice"), AnnotationDeleteType::DeleteSliceAnn); + ADD_DEL_ACTION(tr("Delete all in current series"), AnnotationDeleteType::DeleteSeriesAnn); mBtnMeasure->setPopupMode(QToolButton::MenuButtonPopup); mBtnMeasure->setMenu(m); + + m->addSeparator(); + // m->addAction(tr("Localtion Point"), this,[=](){ + // emit modeChanged(38); + // }); } void DefaultToolBar::initFusionButton() { mBtnFusion->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnFusion->setToolTip(QString("Fusion")); + mBtnFusion->setToolTip(tr("Fusion")); connect(mBtnFusion, &QToolButton::clicked, this, &DefaultToolBar::fusion); mBtnFusion->setEnabled(false); } void DefaultToolBar::initCineButton() { - mBtnCine->setToolTip(QString("Cine")); + mBtnCine->setToolTip(tr("Cine")); mBtnCine->setCheckable(true); connect(mBtnCine, &QToolButton::clicked, this, &DefaultToolBar::cine); } void DefaultToolBar::initClearButton() { - mBtnClear->setToolTip(QString("Delete current series")); + mBtnClear->setToolTip(tr("Delete current series")); connect(mBtnClear, &QToolButton::clicked, this, &DefaultToolBar::clear); } void DefaultToolBar::initTransformButton() { mBtnFlip->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnFlip->setToolTip(QString("Transformations")); + mBtnFlip->setToolTip(tr("Transformations")); QMenu *m = new QMenu(this); #define ADD_TRANSFORM_ACTION(text,type)\ - m->addAction(tr(text), this, [&] {\ + m->addAction(text, this, [&] {\ emit transform(type);\ }); - ADD_TRANSFORM_ACTION("Rotate 90 CCW",ROTATE_90_CCW); - ADD_TRANSFORM_ACTION("Rotate 90 CW", ROTATE_90_CW); - ADD_TRANSFORM_ACTION("Rotate 180",ROTATE_180); + ADD_TRANSFORM_ACTION(tr("Rotate 90 CCW"),ROTATE_90_CCW); + ADD_TRANSFORM_ACTION(tr("Rotate 90 CW"), ROTATE_90_CW); + ADD_TRANSFORM_ACTION(tr("Rotate 180"),ROTATE_180); m->addSeparator(); - ADD_TRANSFORM_ACTION("Flip horizontal",H_FLIP); - ADD_TRANSFORM_ACTION("Flip vertical",V_FLIP); + ADD_TRANSFORM_ACTION(tr("Flip horizontal"),H_FLIP); + ADD_TRANSFORM_ACTION(tr("Flip vertical"),V_FLIP); m->addSeparator(); - ADD_TRANSFORM_ACTION("Clear transformations",CLEAR); + ADD_TRANSFORM_ACTION(tr("Clear transformations"),CLEAR); mBtnFlip->setPopupMode(QToolButton::MenuButtonPopup); mBtnFlip->setMenu(m); connect(mBtnFlip, &QPushButton::clicked, this,[=](){ @@ -455,7 +470,7 @@ void DefaultToolBar::initTransformButton() { void DefaultToolBar::initMPRButton(){ mBtnMPR->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mBtnMPR->setToolTip(QString("MPR")); + mBtnMPR->setToolTip(tr("MPR")); QMenu *m = new QMenu(this); auto group = new QActionGroup(this); auto actionMPR= m->addAction(tr("3D MPR")); @@ -556,7 +571,7 @@ void DefaultToolBar::updateNeedCheckFunctionButtons(ViewFunctionState state) } void DefaultToolBar::initScreenButtons() { - mBtnFullScreen->setToolTip(QString("Full screen")); + mBtnFullScreen->setToolTip(tr("Full screen")); connect(mBtnFullScreen, &QToolButton::clicked, this, [=] { mActionFullScreen->setVisible(false); mActionMinimize->setVisible(true); @@ -566,7 +581,7 @@ void DefaultToolBar::initScreenButtons() { emit parentWindowStateChange(Qt::WindowState::WindowFullScreen); }); - mBtnMaximize->setToolTip(QString("Exit full screen mode")); + mBtnMaximize->setToolTip(tr("Exit full screen mode")); connect(mBtnMaximize, &QToolButton::clicked, this, [=] { mActionFullScreen->setVisible(true); mActionMinimize->setVisible(false); @@ -576,12 +591,12 @@ void DefaultToolBar::initScreenButtons() { emit parentWindowStateChange(Qt::WindowState::WindowMaximized); }); - mBtnMinimize->setToolTip(QString("Minimize")); + mBtnMinimize->setToolTip(tr("Minimize")); connect(mBtnMinimize, &QToolButton::clicked, this, [=] { emit parentWindowStateChange(Qt::WindowState::WindowMinimized); }); - mBtnClose->setToolTip(QString("Close")); + mBtnClose->setToolTip(tr("Close")); connect(mBtnClose, &QToolButton::clicked, this, &DefaultToolBar::parentWindowClose); } diff --git a/src/src/UI/Widget/ToolBar/DefaultToolBar.h b/src/src/UI/Widget/ToolBar/DefaultToolBar.h index d7ccbfb..cbdd739 100644 --- a/src/src/UI/Widget/ToolBar/DefaultToolBar.h +++ b/src/src/UI/Widget/ToolBar/DefaultToolBar.h @@ -36,6 +36,8 @@ signals: void clear(); void parentWindowStateChange(Qt::WindowState state); void parentWindowClose(); + void parentWindowLanguageChange(); + void transform(TransFormType type); void showMeta(); void volumeRendering(); diff --git a/src/src/UI/Window/QDicomViewer.cpp b/src/src/UI/Window/QDicomViewer.cpp index b190e10..b39ca28 100644 --- a/src/src/UI/Window/QDicomViewer.cpp +++ b/src/src/UI/Window/QDicomViewer.cpp @@ -282,6 +282,12 @@ void QDicomViewer::displayThumbnailBar(bool value) { void QDicomViewer::initScreenControl() { connect(ui->toolBar,&DefaultToolBar::parentWindowStateChange,this,&QDicomViewer::setWindowState); + connect(ui->toolBar,&DefaultToolBar::parentWindowLanguageChange, [=](){ + int result = QMessageBox::question(this,tr("confirm"),tr("Change Language will reload the application, please confirm to do this!"), + tr("Ok"),tr("Cancel")); + if (result!=0) return; + QCoreApplication::exit(99); + }); connect(ui->toolBar,&DefaultToolBar::parentWindowClose, this, &QWidget::close); } @@ -294,7 +300,7 @@ void QDicomViewer::openDICOMFromPACS(int err, std::string dirName) { openDICOM(dirName, DIR_OPEN_MODE); } else { //pop out msg box - QMessageBox::warning(this, "Warning", "open DICOM Images From PACS Fail"); + QMessageBox::warning(this, tr("Warning"), tr("open DICOM Images From PACS Fail")); } } diff --git a/src/src/main.cpp b/src/src/main.cpp index 7a66494..c16d93f 100644 --- a/src/src/main.cpp +++ b/src/src/main.cpp @@ -1,6 +1,6 @@ #include -#include "UI/Window/QDicomViewer.h" #include +#include #include #include "QVTKOpenGLNativeWidget.h" #include @@ -10,6 +10,9 @@ VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingFreeType) VTK_MODULE_INIT(vtkRenderingVolumeOpenGL2) +#include "UI/Window/QDicomViewer.h" +#include "Common/QGlobals.h" + //#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeType,vtkRenderingOpenGL2) #ifndef _DEBUG @@ -31,14 +34,56 @@ int main(int argc, char* argv[]) QFont font; font.setFamily(QString::fromUtf8("Arial")); - //QFont font("Microsoft YaHei" - //QFont font("Courier"); - //font.setStyleHint(QFont::); + + + QString cachePath = QDir::currentPath()+"/.cache"; + if (!QFile::exists(cachePath)) + { + QFile cache(cachePath); + cache.open(QFile::NewOnly); + cache.close(); + } + QSettings setting(cachePath,QSettings::IniFormat); + QString lang = setting.value("Lang").toString(); + QTranslator translator; + if (lang == "CN") + { + translator.load("./zh_CN.qm"); + LanguageHelper::setLanguage(ChineseSimple); + } + else{ + translator.load("./en_US.qm"); + LanguageHelper::setLanguage(English); + } + + QApplication::installTranslator(&translator); QApplication::setFont(font); //qDebug() << desktop_width << desktop_height; + int exitCode = 0; vtkObject::SetGlobalWarningDisplay(0); + { + QDicomViewer w; + w.show(); + exitCode = a.exec(); + } + while (exitCode == 99){ + lang = setting.value("Lang").toString(); + if (lang == "CN") + { + translator.load("./en_US.qm"); + setting.setValue("Lang","EN"); + LanguageHelper::setLanguage(English); + } + else{ + translator.load("./zh_CN.qm"); + setting.setValue("Lang","CN"); + LanguageHelper::setLanguage(ChineseSimple); + } + QApplication::installTranslator(&translator); QDicomViewer w; w.show(); - return a.exec(); + exitCode = a.exec(); + } + } diff --git a/src/translations/en_US.ts b/src/translations/en_US.ts new file mode 100644 index 0000000..57ab734 --- /dev/null +++ b/src/translations/en_US.ts @@ -0,0 +1,1154 @@ + + + + + ConfigurationDialog + + + Listener port: + + + + + My AE title: + + + + + Advanced settings + + + + + PACS location + + + + + Retrive Protocol + + + + + + IP address + + + + + + Port + + + + + + AE title + + + + + + Description + + + + + Save + + + + + Cancel + + + + + Retrieve protocol + + + + + Maximum active downloads + + + + + Preferred transfer syntax + + + + + Character set + + + + + ConfigurationTitleBar + + + PACS configuration + + + + + Customwindow + + + 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 + + + + + Layout + + + + + Toggle series synchronization + + + + + Sychronize slice + + + + + Sychronize zoom & pan + + + + + Sychronize window level & width + + + + + Adjust window level + + + + + Custom Window + + + + + Negative + + + + + Pan image + + + + + Zoom image + + + + + Browse series + + + + + Toggle annotations + + + + + Annotations + + + + + Cross Reference Line + + + + + Hide all measurements + + + + + Hide patient data + + + + + Show Dicom tags + + + + + Length + + + + + Angle + + + + + Closed polygon + + + + + Open polygon + + + + + Arrow + + + + + Ellipse + + + + + Text + + + + + Measurements + + + + + Delete selected + + + + + Delete all in current slice + + + + + Delete all in current series + + + + + Fusion + + + + + Cine + + + + + Delete current series + + + + + Transformations + + + + + Rotate 90 CCW + + + + + Rotate 90 CW + + + + + Rotate 180 + + + + + Flip horizontal + + + + + Flip vertical + + + + + Clear transformations + + + + + MPR + + + + + 3D MPR + + + + + Coronal + + + + + Sagittal + + + + + Axial + + + + + Full screen + + + + + Exit full screen mode + + + + + Minimize + + + + + Close + + + + + DicomImageView + + + Error + + + + + Unable to read file %1 + + + + + DicomTreeModel + + + Tag ID + + + + + VR + + + + + VM + + + + + Length + + + + + Description + + + + + Value + + + + + EllipseAnnotationActor + + + mm² + + + + + cm² + + + + + Area + + + + + ExportDialog + + + Dialog + + + + + Export Type + + + + + Export File + + + + + Current Image + + + + + Current Series + + + + + All Opened Series + + + + + File Format + + + + + JPEG + + + + + BMP + + + + + PNG + + + + + TIFF + + + + + DICOM + + + + + Export Location + + + + + Export Folder + + + + + FileName Prefix + + + + + Choose Folder... + + + + + Show in Explorer after exported + + + + + File Settings + + + + + Annotations + + + + + Full + + + + + Basic(anonymous) + + + + + Disabled + + + + + Export + + + + + Close + + + + + + select a directory + + + + + ExportToolButton + + + Send to PACS + + + + + All opened studies + + + + + Current study + + + + + Current series + + + + + FontPropertyWidget + + + Text Property + + + + + Specify the path to a TTF file here. + + + + + Apply + + + + + Resets any changed properties to their values from the last time 'Apply' was clicked. + + + + + Reset + + + + + Delete + + + + + Select font + + + + + Set font size + + + + + Set font opacity + + + + + Bold + + + + + + + ... + + + + + Italics + + + + + Shadow + + + + + GridPopWidget + + + Form + + + + + ImportTitleBar + + + Search and downlod studies from PACS locations + + + + + ImportWidget + + + Search + + + + + Clear + + + + + Study date + + + + + + + Patient name + + + + + Date of birth + + + + + + + Patient ID + + + + + + Modality + + + + + Study description + + + + + + + Accession number + + + + + PACS Configuration + + + + + 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 + + + + + uid + + + + + # + + + + + Number + + + + + Description + + + + + #Images + + + + + MyTitleBar + + + maximize + + + + + shut down + + + + + OpenPolyAnnotationActor + + + mm + + + + + cm + + + + + mm² + + + + + cm² + + + + + Distance + + + + + Area + + + + + PromptDialog + + + OK + + + + + PromptTitleBar + + + 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 + + + + + QDicomViewerClass + + + QDicomViewer + + + + + toolBar + + + + + ResliceMPRToolBar + + + 3D Rotate + + + + + Zoom + + + + + Fit window + + + + + RulerAnnotationActor + + + mm + + + + + cm + + + + + Distance + + + + + StoreDialog + + + Cancel + + + + + VCRToolbar + + + VCR Controls + + + + + &Play + + + + + Pre&vious Frame + + + + + &First Frame + + + + + &Next Frame + + + + + &Last Frame + + + + + VolumeRenderingToolBar + + + Anterior + + + + + Posterior + + + + + Left + + + + + Right + + + + + Superior + + + + + Inferior + + + + + 3D Rotate + + + + + Zoom + + + + + Fit window + + + + + Ruler + + + + + Arrow + + + + + calibrationWidget + + + Length Calibration + + + + + Enter new distance + + + + + mm + + + + + OK + + + + + Cancel + + + + diff --git a/src/translations/zh_CN.ts b/src/translations/zh_CN.ts new file mode 100644 index 0000000..43b957f --- /dev/null +++ b/src/translations/zh_CN.ts @@ -0,0 +1,1173 @@ + + + + + ConfigurationDialog + + + Listener port: + 监听端口: + + + + My AE title: + 本地AETitle: + + + + Advanced settings + 高级设置 + + + + PACS location + PACS位置 + + + + Retrive Protocol + 检索协议 + + + + + IP address + IP地址 + + + + + Port + 端口 + + + + + AE title + + + + + + Description + 描述 + + + + Save + 保存 + + + + Cancel + 取消 + + + + Retrieve protocol + 检索协议 + + + + Maximum active downloads + 最大可同时下载数 + + + + Preferred transfer syntax + 首选传输语法 + + + + Character set + 字符集 + + + + ConfigurationTitleBar + + + PACS configuration + PACS设置 + + + + Customwindow + + + Customwindow + 自定义窗宽窗位 + + + + Window level + 窗位 + + + + Window width + 窗宽 + + + + OK + 确定 + + + + Cancel + 取消 + + + + DefaultToolBar + + + Open DICOM folder + 打开文件夹 + + + + Open DICOM file + 打开文件 + + + + Quit + 退出 + + + + 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 + 自定义窗宽窗位 + + + + Negative + 负相 + + + + Pan image + 移动 + + + + Zoom image + 缩放 + + + + Browse series + 翻页 + + + + Toggle annotations + 四角标记 + + + + Annotations + 四角标记 + + + + Cross Reference Line + 参考线 + + + + Hide all measurements + 隐藏所有测量 + + + + Hide patient data + 隐藏患者信息 + + + + Show Dicom tags + 显示DICOM标记 + + + + Length + 直尺 + + + + Angle + 量角器 + + + + Closed polygon + 闭合多边形 + + + + Open polygon + 开放多边形 + + + + Arrow + 箭头 + + + + Ellipse + 椭圆 + + + + Text + 文字 + + + + Measurements + 测量工具 + + + + Delete selected + 删除选中 + + + + Delete all in current slice + 删除当前图像中所有测量 + + + + Delete all in current series + 删除当前序列所有图像 + + + + 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 + 关闭 + + + + DicomImageView + + + Error + 错误 + + + + Unable to read file %1 + 无法读取文件 %1 + + + + DicomTreeModel + + + Tag ID + + + + + VR + + + + + VM + + + + + Length + + + + + Description + + + + + Value + + + + + EllipseAnnotationActor + + + mm² + 平方毫米 + + + + cm² + 平方厘米 + + + + Area + 面积 + + + + ExportDialog + + + Dialog + + + + + Export Type + + + + + Export File + + + + + Current Image + + + + + Current Series + + + + + All Opened Series + + + + + File Format + + + + + JPEG + + + + + BMP + + + + + PNG + + + + + TIFF + + + + + DICOM + + + + + Export Location + + + + + Export Folder + + + + + FileName Prefix + + + + + Choose Folder... + + + + + Show in Explorer after exported + + + + + File Settings + + + + + Annotations + 四角标记 + + + + Full + + + + + Basic(anonymous) + + + + + Disabled + + + + + Export + + + + + Close + 关闭 + + + + + select a directory + + + + + ExportToolButton + + + Send to PACS + + + + + All opened studies + + + + + Current study + + + + + Current series + + + + + FontPropertyWidget + + + Text Property + 文字属性 + + + + Specify the path to a TTF file here. + + + + + Apply + 应用 + + + + Resets any changed properties to their values from the last time 'Apply' was clicked. + + + + + Reset + + + + + Delete + 删除 + + + + Select font + + + + + Set font size + + + + + Set font opacity + + + + + Bold + + + + + + + ... + + + + + Italics + + + + + Shadow + + + + + GridPopWidget + + + Form + + + + + ImportTitleBar + + + Search and downlod studies from PACS locations + 从PACS服务器检索、下载检查 + + + + ImportWidget + + + Search + 搜索 + + + + Clear + 清除 + + + + Study date + 检查日期 + + + + + + Patient name + 患者姓名 + + + + Date of birth + 出生日期 + + + + + + Patient ID + 患者编码 + + + + + Modality + 模态 + + + + 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 + 数据源 + + + + uid + + + + + # + + + + + Number + 序列号 + + + + Description + 描述 + + + + #Images + 数量 + + + + MyTitleBar + + + maximize + 最大化 + + + + shut down + 关闭 + + + + OpenPolyAnnotationActor + + + mm + 毫米 + + + + cm + 厘米 + + + + mm² + 平方毫米 + + + + cm² + 平方厘米 + + + + Distance + 周长 + + + Perimeter + 直径 + + + + Area + 面积 + + + + PromptDialog + + + OK + 确定 + + + + PromptTitleBar + + + 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打开 + + + + QDicomViewerClass + + + QDicomViewer + + + + + toolBar + + + + + QObject + + Perimeter + 直径 + + + + ResliceMPRToolBar + + + 3D Rotate + + + + + Zoom + + + + + Fit window + + + + + RulerAnnotationActor + + + mm + 毫米 + + + + cm + 厘米 + + + + Distance + 距离 + + + + StoreDialog + + + Cancel + 取消 + + + + VCRToolbar + + + VCR Controls + + + + + &Play + + + + + Pre&vious Frame + + + + + &First Frame + + + + + &Next Frame + + + + + &Last Frame + + + + + VolumeRenderingToolBar + + + Anterior + + + + + Posterior + + + + + Left + + + + + Right + + + + + Superior + + + + + Inferior + + + + + 3D Rotate + + + + + Zoom + + + + + Fit window + + + + + Ruler + + + + + Arrow + 箭头 + + + Measurements + 测量工具 + + + + calibrationWidget + + + Length Calibration + + + + + Enter new distance + + + + + mm + 毫米 + + + + OK + 确定 + + + + Cancel + 取消 + + +