Compare commits
10 Commits
71ed482453
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
419e4a0e78 | ||
|
|
b1ce05bd29 | ||
|
|
70d6740571 | ||
|
|
2ec3ed9143 | ||
|
|
a930ca91fc | ||
|
|
b3ffe90533 | ||
|
|
5b39805d9f | ||
|
|
f748719b02 | ||
|
|
5047e296f7 | ||
|
|
d8c51b44c1 |
@@ -93,6 +93,9 @@ void DICOMHeaderHelper::readHeaderFromFile(const char * filePath){
|
||||
|
||||
dataset->findAndGetOFString(DCM_SeriesInstanceUID, fileHeader.SeriesUID);
|
||||
|
||||
dataset->findAndGetOFString(DCM_Laterality, fileHeader.Laterality);
|
||||
|
||||
|
||||
dataset->findAndGetSint32(DCM_SeriesNumber, fileHeader.SeriesNumber);
|
||||
|
||||
dataset->findAndGetSint32(DCM_AcquisitionNumber, fileHeader.AcquisitionNumber);
|
||||
@@ -355,6 +358,7 @@ ExtendMedicalImageProperties* DICOMHeaderHelper::createProperty(const std::vecto
|
||||
property->SetSeriesUID(header.SeriesUID.c_str());
|
||||
property->SetSeriesNumber(header.SeriesNumber);
|
||||
property->SetAcquisitionNumber(header.AcquisitionNumber);
|
||||
property->SetLaterality(header.Laterality.c_str());
|
||||
|
||||
// image reference
|
||||
property->SetRows(header.Rows);
|
||||
|
||||
@@ -12,6 +12,7 @@ class ExtendMedicalImageProperties;
|
||||
struct DICOMFileHeader {
|
||||
std::string FilePath;
|
||||
std::string SeriesUID;
|
||||
std::string Laterality;
|
||||
long SeriesNumber = 0;
|
||||
long AcquisitionNumber = 0;
|
||||
long InstanceNumber = 0;
|
||||
@@ -30,6 +31,7 @@ struct DICOMFileHeader {
|
||||
DICOMFileHeader(const DICOMFileHeader & other){
|
||||
FilePath = other.FilePath;
|
||||
SeriesUID = other.SeriesUID;
|
||||
Laterality = other.Laterality;
|
||||
SeriesNumber = other.SeriesNumber;
|
||||
AcquisitionNumber = other.AcquisitionNumber;
|
||||
InstanceNumber = other.InstanceNumber;
|
||||
|
||||
@@ -20,6 +20,7 @@ void ExtendMedicalImageProperties::Clear() {
|
||||
vtkMedicalImageProperties::Clear();
|
||||
this->SetStudyUID(nullptr);
|
||||
this->SetSeriesUID(nullptr);
|
||||
this->SetLaterality(nullptr);
|
||||
}
|
||||
|
||||
void ExtendMedicalImageProperties::ComputeTransformMatrix() {
|
||||
|
||||
@@ -48,6 +48,16 @@ public:
|
||||
vtkSetStringMacro(SeriesUID);
|
||||
//@}
|
||||
|
||||
//@{
|
||||
/**
|
||||
* Series Instance UID
|
||||
* DICOM (0020,000e)
|
||||
*/
|
||||
vtkGetStringMacro(Laterality);
|
||||
vtkSetStringMacro(Laterality);
|
||||
//@}
|
||||
|
||||
|
||||
//@{
|
||||
/**
|
||||
* Acquisition Number
|
||||
@@ -291,6 +301,7 @@ protected:
|
||||
long ImageSetNumber = 0;
|
||||
long Rows = 0;
|
||||
long Columns = 0;
|
||||
char* Laterality = nullptr;
|
||||
unsigned short SamplePerPixel;
|
||||
unsigned short BitsAllocated;
|
||||
unsigned short PixelRepresentation;
|
||||
|
||||
@@ -12,9 +12,10 @@ struct PACSStudyInfo {
|
||||
QString patientSex;
|
||||
QString patientAge;
|
||||
QString studyInstanceUID;
|
||||
QString studyID;
|
||||
QString requestingPhysician;
|
||||
QString studyDescription;
|
||||
QString modality;
|
||||
QString relatedInstanceNumber;
|
||||
|
||||
};
|
||||
|
||||
struct PACSSeriesInfo {
|
||||
|
||||
@@ -230,7 +230,7 @@ void QueryWorker::onFoundResult(int index, DcmDataset *response)
|
||||
{
|
||||
std::string studyDate_, patientName_, patientID_, accessionNumber_,
|
||||
patientBirthDate_, patientSex_, studyInstanceUID_,
|
||||
studyID_, requestingPhysician_, seriesUid_, modality_, seriesNumber_,
|
||||
studyDescription_, modality_, seriesUid_, seriesNumber_,
|
||||
instanceNumber_;
|
||||
response->findAndGetOFString(DCM_StudyDate, studyDate_);
|
||||
response->findAndGetOFString(DCM_PatientName, patientName_);
|
||||
@@ -239,10 +239,9 @@ void QueryWorker::onFoundResult(int index, DcmDataset *response)
|
||||
response->findAndGetOFString(DCM_PatientBirthDate, patientBirthDate_);
|
||||
response->findAndGetOFString(DCM_PatientSex, patientSex_);
|
||||
response->findAndGetOFString(DCM_StudyInstanceUID, studyInstanceUID_);
|
||||
response->findAndGetOFString(DCM_StudyID, studyID_);
|
||||
response->findAndGetOFString(DCM_RequestingPhysician, requestingPhysician_);
|
||||
response->findAndGetOFString(DCM_SeriesInstanceUID, seriesUid_);
|
||||
response->findAndGetOFString(DCM_StudyDescription, studyDescription_);
|
||||
response->findAndGetOFString(DCM_Modality, modality_);
|
||||
response->findAndGetOFString(DCM_SeriesInstanceUID, seriesUid_);
|
||||
response->findAndGetOFString(DCM_SeriesNumber, seriesNumber_);
|
||||
response->findAndGetOFString(DCM_NumberOfStudyRelatedInstances, instanceNumber_);
|
||||
|
||||
@@ -257,8 +256,8 @@ void QueryWorker::onFoundResult(int index, DcmDataset *response)
|
||||
study.patientBirthDate = QString::fromStdString(patientBirthDate_);
|
||||
study.patientSex = QString::fromStdString(patientSex_);
|
||||
study.studyInstanceUID = QString::fromStdString(studyInstanceUID_);
|
||||
study.studyID = QString::fromStdString(studyID_);
|
||||
study.requestingPhysician = QString::fromStdString(requestingPhysician_);
|
||||
study.studyDescription = QString::fromStdString(studyDescription_);
|
||||
study.modality = QString::fromStdString(modality_);
|
||||
study.relatedInstanceNumber = QString::fromStdString(instanceNumber_);
|
||||
|
||||
emit sendStudyItemFound(study);
|
||||
@@ -268,7 +267,7 @@ void QueryWorker::onFoundResult(int index, DcmDataset *response)
|
||||
PACSSeriesInfo series;
|
||||
series.patientName = QString::fromStdString(patientName_);
|
||||
series.studyInstanceUID = QString::fromStdString(studyInstanceUID_);
|
||||
series.studyID = QString::fromStdString(studyID_);
|
||||
series.studyID = QString::fromStdString(studyDescription_);
|
||||
series.seriesUID = QString::fromStdString(seriesUid_);
|
||||
series.modality = QString::fromStdString(modality_);
|
||||
series.seriesNumber = QString::fromStdString(seriesNumber_);
|
||||
|
||||
@@ -221,20 +221,14 @@ void ImportWidget::initFilterDicom()
|
||||
m_pDicomComboBox->addItem(tr("Patient ID"));
|
||||
m_pDicomComboBox->addItem(tr("Accession number"));
|
||||
m_pDicomComboBox->addItem(tr("Device name"));
|
||||
//m_pDicomComboBox->addItem("Study description");
|
||||
//m_pDicomComboBox->addItem("Referring physician");
|
||||
//m_pDicomComboBox->addItem("Performing physician");
|
||||
//m_pDicomComboBox->addItem("Reading physician");
|
||||
//m_pDicomComboBox->addItem("Institution name");
|
||||
}
|
||||
|
||||
void ImportWidget::initStudyHeader()
|
||||
{
|
||||
m_lStudyHeaders.clear();
|
||||
m_lStudyHeaders << tr("Study date") << tr("Patient name") << tr("Date of birth") << tr("Patient ID")
|
||||
<< tr("Modality") << tr("Study ID") << tr("Study Instance Uid") << tr("Accession number")
|
||||
<< tr("Referring physician") << tr("Performing physician") << tr("Reading physician") << tr("Institution name")
|
||||
<< tr("Images") << tr("Source");
|
||||
<< tr("Study Description") << tr("Accession number")
|
||||
<< tr("Images") << tr("Source")<< tr("Study Instance Uid") ;
|
||||
}
|
||||
|
||||
void ImportWidget::initStudy()
|
||||
@@ -510,93 +504,25 @@ void ImportWidget::updateStudyView()
|
||||
QStandardItem* name = new QStandardItem(itr->patientName); name->setEditable(false);
|
||||
QStandardItem* birth = new QStandardItem(itr->patientBirthDate); birth->setEditable(false);
|
||||
QStandardItem* id = new QStandardItem(itr->patientID); id->setEditable(false);
|
||||
QStandardItem* modality = new QStandardItem(""); modality->setEditable(false);
|
||||
QStandardItem* studyID = new QStandardItem(itr->studyID); studyID->setEditable(false);
|
||||
// QStandardItem* modality = new QStandardItem(m_pModalityComboBox->currentText()); modality->setEditable(false);
|
||||
QStandardItem* studyDescription = new QStandardItem(itr->studyDescription); studyDescription->setEditable(false);
|
||||
QStandardItem* accNo = new QStandardItem(itr->accessionNumber); accNo->setEditable(false);
|
||||
QStandardItem* uid = new QStandardItem(itr->studyInstanceUID); uid->setEditable(false);
|
||||
QStandardItem* referPhy = new QStandardItem(""); referPhy->setEditable(false);
|
||||
QStandardItem* performPhy = new QStandardItem(""); performPhy->setEditable(false);
|
||||
QStandardItem* readingPhysician = new QStandardItem(itr->requestingPhysician); readingPhysician->setEditable(false);
|
||||
QStandardItem* inst = new QStandardItem(""); inst->setEditable(false);
|
||||
QStandardItem* image = new QStandardItem(itr->relatedInstanceNumber); image->setEditable(false);
|
||||
QStandardItem* source = new QStandardItem(m_pPacsComboBox->currentText()); source->setEditable(false);
|
||||
|
||||
QList<QStandardItem*> list;
|
||||
list << date << name << birth << id << modality << studyID << uid << accNo << referPhy
|
||||
<< performPhy << readingPhysician << inst << image << source;
|
||||
list << date << name << birth << id << studyDescription << accNo
|
||||
<< image << source<< uid ;
|
||||
m_pStudyModel->insertRow(iRowIdx, list);
|
||||
++iRowIdx;
|
||||
}
|
||||
|
||||
//for each (PACSStudyInfo var in m_studyInfo)
|
||||
//{
|
||||
// QString n = var.studyDate;
|
||||
// QStandardItem* date = new QStandardItem(var.studyDate); date->setEditable(false);
|
||||
// QStandardItem* name = new QStandardItem(var.patientName); name->setEditable(false);
|
||||
// QStandardItem* birth = new QStandardItem(var.patientBirthDate); birth->setEditable(false);
|
||||
// QStandardItem* id = new QStandardItem(var.patientID); id->setEditable(false);
|
||||
// QStandardItem* modality = new QStandardItem(""); modality->setEditable(false);
|
||||
// QStandardItem* description = new QStandardItem(""); description->setEditable(false);
|
||||
// QStandardItem* accNo = new QStandardItem(var.accessionNumber); accNo->setEditable(false);
|
||||
// QStandardItem* examId = new QStandardItem(""); examId->setEditable(false);
|
||||
// QStandardItem* referPhy = new QStandardItem(""); referPhy->setEditable(false);
|
||||
// QStandardItem* performPhy = new QStandardItem(""); performPhy->setEditable(false);
|
||||
// QStandardItem* readingPhysician = new QStandardItem(var.requestingPhysician); readingPhysician->setEditable(false);
|
||||
// QStandardItem* inst = new QStandardItem(""); inst->setEditable(false);
|
||||
// QStandardItem* image = new QStandardItem(""); image->setEditable(false);
|
||||
// QStandardItem* source = new QStandardItem(m_pPacsComboBox->currentText()); source->setEditable(false);
|
||||
// QStandardItem* uid = new QStandardItem(var.studyInstanceUID); uid->setEditable(false);
|
||||
// QList<QStandardItem*> list;
|
||||
// list << date << name << birth << id << modality << description << accNo << examId << referPhy
|
||||
// << performPhy << readingPhysician << inst << image << source << uid;
|
||||
// m_pStudyModel->insertRow(iRowIdx, list);
|
||||
// ++iRowIdx;
|
||||
//}
|
||||
// m_pStudyResult->setModel(m_pStudyModel);
|
||||
// m_pStudyResult->setColumnHidden(14, true);
|
||||
}
|
||||
|
||||
|
||||
void ImportWidget::onStudySelected(const QModelIndex ¤t)
|
||||
{
|
||||
// int row = current.row();
|
||||
// if (row < 0)
|
||||
// return;
|
||||
|
||||
// if (mQueryWorkerThread == nullptr)
|
||||
// {
|
||||
// mQueryWorkerThread = new QThread;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (!mQueryWorkerThread->isFinished())
|
||||
// {
|
||||
// mQueryWorkerThread->exit();
|
||||
// mQueryWorkerThread->wait();
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (mQueryWorker == nullptr)
|
||||
// {
|
||||
// std::string peerIP, peerTitle, ourTitle;
|
||||
// unsigned long peerPort = 0, ourPort = 0;
|
||||
// getNetParams(peerIP, peerPort, peerTitle, ourPort, ourTitle);
|
||||
// if (peerIP.empty() || peerTitle.empty() || ourTitle.empty() || peerPort == 0 || ourPort == 0)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// mQueryWorker = new QueryWorker(QString::fromStdString(peerIP), peerPort, QString::fromStdString(peerTitle), QString::fromStdString(ourTitle));
|
||||
// QObject::connect(mQueryWorker, SIGNAL(sendFindDone(int)), this, SLOT(onQueryDone(int)), Qt::QueuedConnection);
|
||||
// QObject::connect(mQueryWorker, SIGNAL(sendStudyItemFound(PACSStudyInfo)), this, SLOT(onStudyFoundResult(PACSStudyInfo)), Qt::QueuedConnection);
|
||||
// QObject::connect(mQueryWorker, SIGNAL(sendSeriesItemFound(PACSSeriesInfo)), this, SLOT(onSeriesFoundResult(PACSSeriesInfo)), Qt::QueuedConnection);
|
||||
// }
|
||||
// mQueryWorker->moveToThread(mQueryWorkerThread);
|
||||
// mQueryWorkerThread->start();
|
||||
|
||||
// m_seriesInfo.clear();
|
||||
// std::string studyInstanceUID = m_pStudyModel->index(row, 14).data().toString().toStdString();
|
||||
// QMetaObject::invokeMethod(mQueryWorker, "queryBySeriesUID", Qt::QueuedConnection, Q_ARG(QString, QString::fromStdString(studyInstanceUID)));
|
||||
}
|
||||
|
||||
|
||||
@@ -630,9 +556,9 @@ void ImportWidget::executeCMove(const QModelIndex ¤t)
|
||||
m_pProgressBar->setValue(0);
|
||||
}
|
||||
bool toIntFlag = false;
|
||||
int imageCount = m_pStudyModel->index(row, 12).data().toInt(&toIntFlag);
|
||||
int imageCount = m_pStudyModel->index(row, 6).data().toInt(&toIntFlag);
|
||||
if (!toIntFlag) imageCount = 0;
|
||||
std::string studyInstanceUID = m_pStudyModel->index(row, 6).data().toString().toStdString();
|
||||
std::string studyInstanceUID = m_pStudyModel->index(row, 8).data().toString().toStdString();
|
||||
std::string studyID = m_pStudyModel->index(row, 5).data().toString().toStdString();
|
||||
std::string patientName = m_pStudyModel->index(row, 1).data().toString().toStdString();
|
||||
std::string outDirectory = DicomViewerHelper::applicationPath().toStdString();
|
||||
@@ -685,17 +611,8 @@ void ImportWidget::executeCGet(const QModelIndex ¤t)
|
||||
mGetWorkerThread->wait();
|
||||
}
|
||||
}
|
||||
|
||||
// std::string seriesNumber = m_pSeriesModel->index(row, 1).data().toString().toStdString();
|
||||
// std::string studyInstanceUID = m_pSeriesModel->index(row, 4).data().toString().toStdString();
|
||||
// std::string studyID = m_pSeriesModel->index(row, 5).data().toString().toStdString();
|
||||
// std::string seriesUID = m_pSeriesModel->index(row, 6).data().toString().toStdString();
|
||||
// std::string patientName = m_pSeriesModel->index(row, 7).data().toString().toStdString();
|
||||
std::string outDirectory = DicomViewerHelper::applicationPath().toStdString();
|
||||
outDirectory += "/";
|
||||
// outDirectory += studyInstanceUID;
|
||||
// outDirectory += "/";
|
||||
// outDirectory += seriesUID;
|
||||
|
||||
bool mkRet = false;
|
||||
QDir d(QString::fromStdString(outDirectory));
|
||||
@@ -718,10 +635,6 @@ void ImportWidget::executeCGet(const QModelIndex ¤t)
|
||||
mGetWorker->setOutputDirectory(QString::fromStdString(outDirectory));
|
||||
mGetWorker->moveToThread(mGetWorkerThread);
|
||||
mGetWorkerThread->start();
|
||||
|
||||
// std::string seriesInstanceUID = m_pSeriesModel->index(row, 6).data().toString().toStdString();
|
||||
// std::string dicomType = m_pSeriesModel->index(row, 2).data().toString().toStdString();
|
||||
// QMetaObject::invokeMethod(mGetWorker, "moveBySeriesUID", Qt::QueuedConnection, Q_ARG(QString, QString::fromStdString(studyInstanceUID)), Q_ARG(QString, QString::fromStdString(seriesInstanceUID)), Q_ARG(QString, QString::fromStdString(dicomType)));
|
||||
}
|
||||
|
||||
|
||||
@@ -736,7 +649,7 @@ void ImportWidget::moveDone(int code, QString dir)
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "error", "Download dicom failed");
|
||||
QMessageBox::warning(this, tr("error"), tr("Download dicom failed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ void ConfigurationDialog::initUi()
|
||||
m_pOurInfoLayout->addWidget(m_pOurTitleEdit);
|
||||
m_AdvancedSettingsButton = new QPushButton(m_pOurInfoWidget);
|
||||
m_AdvancedSettingsButton->setText(tr("Advanced settings"));
|
||||
m_AdvancedSettingsButton->setVisible(false);
|
||||
m_pOurInfoLayout->addWidget(m_AdvancedSettingsButton);
|
||||
m_pOurInfoWidget->setLayout(m_pOurInfoLayout);
|
||||
m_pMainLayout->addWidget(m_pOurInfoWidget);
|
||||
@@ -144,7 +145,7 @@ void ConfigurationDialog::initUi()
|
||||
connect(m_pPacsInfo,&QTableView::customContextMenuRequested,this,&ConfigurationDialog::pacsMenuRequest);
|
||||
m_pMainLayout->addWidget(m_pPacsInfo);
|
||||
m_pPacsMenu = new QMenu(m_pPacsInfo);
|
||||
QAction* cTestAction = new QAction("Test connection",m_pPacsMenu);
|
||||
QAction* cTestAction = new QAction(tr("Test connection"),m_pPacsMenu);
|
||||
connect(cTestAction, &QAction::triggered,[=](){
|
||||
ConnectionTestDialog testDialog(this);
|
||||
// testDialog.setModal(true);
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
#include <vtkCoordinate.h>
|
||||
|
||||
vtkStandardNewMacro(FastCornerAnnotationActor);
|
||||
|
||||
namespace{
|
||||
const char* FONT_FILE_PATH = "C:/Windows/Fonts/simhei.ttf";
|
||||
}
|
||||
FastCornerAnnotationActor::FastCornerAnnotationActor()
|
||||
: vtkProp(){
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
@@ -17,8 +19,8 @@ FastCornerAnnotationActor::FastCornerAnnotationActor()
|
||||
Actors[i]->Register(this);
|
||||
Actors[i]->SetTextScaleModeToNone();
|
||||
Actors[i]->SetUseBorderAlign(true);
|
||||
Actors[i]->GetTextProperty()->SetFontFamilyToCourier();
|
||||
Actors[i]->GetTextProperty()->SetFontSize(6);
|
||||
Actors[i]->GetTextProperty()->SetFontFamily(VTK_FONT_FILE);
|
||||
Actors[i]->GetTextProperty()->SetFontFile(FONT_FILE_PATH);
|
||||
Actors[i]->GetTextProperty()->BoldOn();
|
||||
Actors[i]->GetTextProperty()->ShadowOn();
|
||||
Actors[i]->GetActualPositionCoordinate()->SetCoordinateSystemToDisplay();
|
||||
|
||||
@@ -137,9 +137,8 @@ void AngleAnnotationActor::onMeasureMouseMove(vtkRenderWindowInteractor *iren) {
|
||||
int y = iren->GetEventPosition()[1];
|
||||
vtkRenderer *renderer = iren->FindPokedRenderer(x, y);
|
||||
if (!renderer) return;
|
||||
renderer->SetDisplayPoint(x, y, 0.0);
|
||||
renderer->DisplayToWorld();
|
||||
double *p = renderer->GetWorldPoint();
|
||||
double p[3]={0.0,0.0,0.0};
|
||||
MapScreenPointToWorld(x, y,renderer,p);
|
||||
if (this->placedPointCount == 1) {
|
||||
controlP2->SetWorldPosition(p);
|
||||
this->SetWorldPosition2(p);
|
||||
@@ -155,9 +154,8 @@ bool AngleAnnotationActor::onMeasureLeftButtonDown(vtkRenderWindowInteractor *ir
|
||||
int y = iren->GetEventPosition()[1];
|
||||
vtkRenderer *renderer = iren->FindPokedRenderer(x, y);
|
||||
if (!renderer) return false;
|
||||
renderer->SetDisplayPoint(x, y, 0.0);
|
||||
renderer->DisplayToWorld();
|
||||
double *p = renderer->GetWorldPoint();
|
||||
double p[3]={0.0,0.0,0.0};
|
||||
MapScreenPointToWorld(x, y,renderer,p);
|
||||
if (this->placedPointCount == 0) {
|
||||
controlP1->SetWorldPosition(p);
|
||||
controlP2->SetWorldPosition(p);
|
||||
@@ -184,9 +182,8 @@ bool AngleAnnotationActor::onMeasureLeftButtonUp(vtkRenderWindowInteractor *iren
|
||||
int y = iren->GetEventPosition()[1];
|
||||
vtkRenderer *renderer = iren->FindPokedRenderer(x, y);
|
||||
if (!renderer) return true;
|
||||
renderer->SetDisplayPoint(x, y, 0.0);
|
||||
renderer->DisplayToWorld();
|
||||
double *p = renderer->GetWorldPoint();
|
||||
double p[3]={0.0,0.0,0.0};
|
||||
MapScreenPointToWorld(x, y,renderer,p);
|
||||
if (this->placedPointCount == 1) {
|
||||
controlP2->SetWorldPosition(p);
|
||||
this->SetWorldPosition2(p);
|
||||
|
||||
@@ -440,7 +440,7 @@ void EllipseAnnotationActor::vtkValueCalcTemplate(vtkImageData *image, int slice
|
||||
}
|
||||
double area = vtkMath::Pi()*r1*r2;
|
||||
|
||||
makeMessage(count, avg, sq2, max, min, message, area>1000?area/100:area,area>100?mUnitcm2:mUnitmm2);
|
||||
makeMessage(count, avg, sq2, max, min, message, area>1000?area/100:area,area>1000?mUnitcm2:mUnitmm2);
|
||||
}
|
||||
else if (abs(normals[1])>0.5)
|
||||
{
|
||||
@@ -488,7 +488,7 @@ void EllipseAnnotationActor::vtkValueCalcTemplate(vtkImageData *image, int slice
|
||||
}
|
||||
}
|
||||
double area = vtkMath::Pi()*r1*r2;
|
||||
makeMessage(count, avg, sq2, max, min, message, area>1000?area/100:area,area>100?mUnitcm2:mUnitmm2);
|
||||
makeMessage(count, avg, sq2, max, min, message, area>1000?area/100:area,area>1000?mUnitcm2:mUnitmm2);
|
||||
}
|
||||
else{
|
||||
int CenterY = (pt1[1] + pt2[1]) / 2.0;
|
||||
@@ -533,7 +533,7 @@ void EllipseAnnotationActor::vtkValueCalcTemplate(vtkImageData *image, int slice
|
||||
}
|
||||
}
|
||||
double area = vtkMath::Pi()*r1*r2;
|
||||
makeMessage(count, avg, sq2, max, min, message, area>1000?area/100:area,area>100?mUnitcm2:mUnitmm2);
|
||||
makeMessage(count, avg, sq2, max, min, message, area>1000?area/100:area,area>1000?mUnitcm2:mUnitmm2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,9 +69,8 @@ bool OpenPolyAnnotationActor::onMeasureLeftButtonDown(vtkRenderWindowInteractor
|
||||
int y = iren->GetEventPosition()[1];
|
||||
vtkRenderer *renderer = iren->FindPokedRenderer(x, y);
|
||||
if (!renderer) return false;
|
||||
renderer->SetDisplayPoint(x, y, 0.0);
|
||||
renderer->DisplayToWorld();
|
||||
double *p = renderer->GetWorldPoint();
|
||||
double p[3]={0.0,0.0,0.0};
|
||||
MapScreenPointToWorld(x, y,renderer,p);
|
||||
auto controlP = ControlPointRActor::New();
|
||||
|
||||
controlP->SetWorldPosition(p);
|
||||
@@ -189,12 +188,18 @@ void OpenPolyAnnotationActor::UpdatePerimeterAndAreaText()
|
||||
double *rp = renderPoints->GetPoint(0);
|
||||
text->SetDisplayPosition(rp[0] + 10, rp[1] - 20);
|
||||
double distance = 0.0;
|
||||
for (vtkIdType i = 1; i < BaseDataPoints->GetNumberOfPoints(); ++i)
|
||||
for (vtkIdType i = 0; i < BaseDataPoints->GetNumberOfPoints(); ++i)
|
||||
{
|
||||
double p1[3] = {0.};
|
||||
double p2[3] = {0.};
|
||||
BaseDataPoints->GetPoint(i, p1);
|
||||
BaseDataPoints->GetPoint(i - 1, p2);
|
||||
if (i+1<BaseDataPoints->GetNumberOfPoints())
|
||||
{
|
||||
BaseDataPoints->GetPoint(i + 1, p2);
|
||||
}
|
||||
else if (Closed){
|
||||
BaseDataPoints->GetPoint(0, p2);
|
||||
}
|
||||
|
||||
distance += std::sqrt(vtkMath::Distance2BetweenPoints(p1, p2));
|
||||
}
|
||||
|
||||
@@ -1237,6 +1237,7 @@ public:
|
||||
|
||||
void DICOMImageViewer::InitCornerInfo(ExtendMedicalImageProperties *pSeries) {
|
||||
sprintf(SERIES_UID, "%s", pSeries->GetUniqueID().c_str());
|
||||
m_cornerInfo.ConstAnno[TOP_LEFT].clear();
|
||||
// mono and has preset
|
||||
if (pSeries->GetNumberOfWindowLevelPresets() > 0 && pSeries->GetSamplePerPixel() == 1) {
|
||||
double *wwwl = pSeries->GetNthWindowLevelPreset(0);
|
||||
@@ -1249,12 +1250,10 @@ void DICOMImageViewer::InitCornerInfo(ExtendMedicalImageProperties *pSeries) {
|
||||
m_cornerInfo.win_width = 256;
|
||||
}
|
||||
|
||||
char buffer[sizeof(long) * 8 + 1];
|
||||
const char *s = ltoa(pSeries->GetFileNames().size(), buffer, 10);
|
||||
m_cornerInfo.ConstAnno[TOP_LEFT].clear();
|
||||
m_cornerInfo.ConstAnno[TOP_LEFT].append(buffer);
|
||||
m_cornerInfo.ConstAnno[TOP_LEFT].append(" ");
|
||||
m_cornerInfo.ConstAnno[TOP_LEFT].append(pSeries->GetSeriesNumber());
|
||||
m_cornerInfo.ConstAnno[TOP_LEFT].append("\n");
|
||||
m_cornerInfo.ConstAnno[TOP_LEFT].append(pSeries->GetLaterality());
|
||||
|
||||
|
||||
m_cornerInfo.ConstAnno[TOP_RIGHT].clear();
|
||||
m_cornerInfo.ConstAnno[TOP_RIGHT].append(pSeries->GetPatientName());
|
||||
|
||||
@@ -41,8 +41,11 @@
|
||||
<translation>检索协议</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PACS/Widget/pacsconfiguration.cpp" line="148"/>
|
||||
<location filename="../src/PACS/Widget/pacsconfiguration.cpp" line="223"/>
|
||||
<location filename="../src/PACS/Widget/pacsconfiguration.cpp" line="147"/>
|
||||
<source>Test connection</source>
|
||||
<translation>连接测试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IP address</source>
|
||||
<translation>IP地址</translation>
|
||||
</message>
|
||||
@@ -116,22 +119,22 @@
|
||||
<message>
|
||||
<location filename="../src/PACS/Dialog/ConnectionTestDialog.cpp" line="9"/>
|
||||
<source>Connection Testing</source>
|
||||
<translation>"连接测试"</translation>
|
||||
<translation>连接测试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PACS/Dialog/ConnectionTestDialog.cpp" line="9"/>
|
||||
<source>Connecting......</source>
|
||||
<translation>"连接中......"</translation>
|
||||
<translation>连接中......</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PACS/Dialog/ConnectionTestDialog.cpp" line="32"/>
|
||||
<source>Success!</source>
|
||||
<translation >"连接成功!"</translation>
|
||||
<translation>连接成功!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PACS/Dialog/ConnectionTestDialog.cpp" line="35"/>
|
||||
<source>Fail!</source>
|
||||
<translation>"连接失败!"</translation>
|
||||
<translation>连接失败!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -862,8 +865,9 @@ Avg:%5, SD:%6</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Study description</source>
|
||||
<translation type="vanished">检查描述</translation>
|
||||
<location filename="../src/PACS/Widget/importwidget.cpp" line="230"/>
|
||||
<source>Study Description</source>
|
||||
<translation>检查描述</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PACS/Widget/importwidget.cpp" line="222"/>
|
||||
@@ -929,6 +933,16 @@ Avg:%5, SD:%6</source>
|
||||
<source>Custom date range</source>
|
||||
<translation>自定义时间段</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PACS/Widget/importwidget.cpp" line="652"/>
|
||||
<source>error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/PACS/Widget/importwidget.cpp" line="652"/>
|
||||
<source>Download dicom failed</source>
|
||||
<translation>下载DICOM文件失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exam ID</source>
|
||||
<translation type="vanished">检查编码</translation>
|
||||
|
||||
Reference in New Issue
Block a user