Add progress notify

This commit is contained in:
kradchen
2023-09-12 09:53:30 +08:00
parent 1e6dfaf212
commit b2721db958
12 changed files with 118 additions and 25 deletions

View File

@@ -96,6 +96,21 @@ namespace Recon
mStudyDate = date.data();
mStudyTime = time.data();
}
DICOMExporter::DICOMExporter()
{
//prepare Study
dcmGenerateUniqueIdentifier(mStudyInstanceUID,SITE_STUDY_UID_ROOT);
OFDateTime currentDateTime;
currentDateTime.setCurrentDateTime();
OFString date;
currentDateTime.getDate().getISOFormattedDate(date,false);
OFString time;
currentDateTime.getTime().getISOFormattedTime(time,true,false,false,false);
mStudyDate = date.data();
mStudyTime = time.data();
}
DICOMExporter::~DICOMExporter()
{
@@ -138,13 +153,18 @@ namespace Recon
::initialSeriesTime(dataset);
dataset->putAndInsertString(DCM_InstitutionName, mPatientData.getInstituationName().data());
dataset->putAndInsertString(DCM_InstitutionAddress, mPatientData.getInstituationAddress().data());
dataset->putAndInsertString(DCM_ReferringPhysicianName, mPatientData.getOperatorName().data());
dataset->putAndInsertString(DCM_PatientName, mPatientData.getPatientName().data());
dataset->putAndInsertString(DCM_InstitutionName, mPatientData.getInstituationName().empty()?
"InstName":mPatientData.getInstituationName().data());
dataset->putAndInsertString(DCM_InstitutionAddress, mPatientData.getInstituationAddress().empty()?
"default addr":mPatientData.getInstituationAddress().data());
dataset->putAndInsertString(DCM_ReferringPhysicianName,mPatientData.getOperatorName().empty()?
"ReferringPhysician": mPatientData.getOperatorName().data());
dataset->putAndInsertString(DCM_PatientName, mPatientData.getPatientName().empty()?
"TestPatient":mPatientData.getPatientName().data());
dataset->putAndInsertString(DCM_PatientSex, mPatientData.getPatientSex().data());
dataset->putAndInsertString(DCM_PatientBirthDate, mPatientData.getPatientBirthDate().data());
dataset->putAndInsertString(DCM_PatientID, mPatientData.getPatientID().data());
dataset->putAndInsertString(DCM_PatientID, mPatientData.getPatientID().empty()?
"TestPatID":mPatientData.getPatientID().data());
dataset->putAndInsertString(DCM_Laterality, mPatientData.getLaterality().data());
dataset->putAndInsertString(DCM_StudyID, "0");

View File

@@ -16,6 +16,8 @@ public:
ATT
};
explicit DICOMExporter(const PatientData& aPatientData);
//仅仅用于测试!!!
DICOMExporter();
DICOMExporter(DICOMExporter &&) = default;
DICOMExporter(const DICOMExporter &) = default;
DICOMExporter &operator=(DICOMExporter &&) = default;