comparison UnitTestsSources/MultiThreadingTests.cpp @ 3691:4922bdd046dd

Fix issue #140 (Modifying private tags with REST API changes VR from LO to UN) - DANGEROUS COMMIT
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Feb 2020 21:44:09 +0100
parents 94f4a18a79cc
children 898903022836 2a170a8f1faf
comparison
equal deleted inserted replaced
3690:a9ce35d67c3c 3691:4922bdd046dd
1141 TEST(JobsSerialization, DicomModification) 1141 TEST(JobsSerialization, DicomModification)
1142 { 1142 {
1143 Json::Value s; 1143 Json::Value s;
1144 1144
1145 ParsedDicomFile source(true); 1145 ParsedDicomFile source(true);
1146 source.Insert(DICOM_TAG_STUDY_DESCRIPTION, "Test 1", false); 1146 source.Insert(DICOM_TAG_STUDY_DESCRIPTION, "Test 1", false, "");
1147 source.Insert(DICOM_TAG_SERIES_DESCRIPTION, "Test 2", false); 1147 source.Insert(DICOM_TAG_SERIES_DESCRIPTION, "Test 2", false, "");
1148 source.Insert(DICOM_TAG_PATIENT_NAME, "Test 3", false); 1148 source.Insert(DICOM_TAG_PATIENT_NAME, "Test 3", false, "");
1149 1149
1150 std::auto_ptr<ParsedDicomFile> modified(source.Clone(true)); 1150 std::auto_ptr<ParsedDicomFile> modified(source.Clone(true));
1151 1151
1152 { 1152 {
1153 DicomModification modification; 1153 DicomModification modification;
1308 bool CreateInstance(std::string& id) 1308 bool CreateInstance(std::string& id)
1309 { 1309 {
1310 // Create a sample DICOM file 1310 // Create a sample DICOM file
1311 ParsedDicomFile dicom(true); 1311 ParsedDicomFile dicom(true);
1312 dicom.Replace(DICOM_TAG_PATIENT_NAME, std::string("JODOGNE"), 1312 dicom.Replace(DICOM_TAG_PATIENT_NAME, std::string("JODOGNE"),
1313 false, DicomReplaceMode_InsertIfAbsent); 1313 false, DicomReplaceMode_InsertIfAbsent, "");
1314 1314
1315 DicomInstanceToStore toStore; 1315 DicomInstanceToStore toStore;
1316 toStore.SetParsedDicomFile(dicom); 1316 toStore.SetParsedDicomFile(dicom);
1317 1317
1318 return (context_->Store(id, toStore) == StoreStatus_Success); 1318 return (context_->Store(id, toStore) == StoreStatus_Success);