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