comparison UnitTestsSources/FromDcmtkTests.cpp @ 2209:e3fd5bc429a2

URI to reconstruct the main DICOM tags, the JSON summary and the metadata
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Dec 2016 17:20:21 +0100
parents 6dc3bdb4088b
children a3a65de1840f
comparison
equal deleted inserted replaced
2208:90ea60bee5ff 2209:e3fd5bc429a2
467 ASSERT_THROW(f.Insert(DICOM_TAG_PATIENT_ID, "Hello", false), OrthancException); // Already existing tag 467 ASSERT_THROW(f.Insert(DICOM_TAG_PATIENT_ID, "Hello", false), OrthancException); // Already existing tag
468 f.ReplacePlainString(DICOM_TAG_SOP_INSTANCE_UID, "Toto"); // (*) 468 f.ReplacePlainString(DICOM_TAG_SOP_INSTANCE_UID, "Toto"); // (*)
469 f.ReplacePlainString(DICOM_TAG_SOP_CLASS_UID, "Tata"); // (**) 469 f.ReplacePlainString(DICOM_TAG_SOP_CLASS_UID, "Tata"); // (**)
470 470
471 std::string s; 471 std::string s;
472 ASSERT_FALSE(f.LookupTransferSyntax(s));
472 473
473 ASSERT_THROW(f.Replace(DICOM_TAG_ACCESSION_NUMBER, std::string("Accession"), 474 ASSERT_THROW(f.Replace(DICOM_TAG_ACCESSION_NUMBER, std::string("Accession"),
474 false, DicomReplaceMode_ThrowIfAbsent), OrthancException); 475 false, DicomReplaceMode_ThrowIfAbsent), OrthancException);
475 f.Replace(DICOM_TAG_ACCESSION_NUMBER, std::string("Accession"), false, DicomReplaceMode_IgnoreIfAbsent); 476 f.Replace(DICOM_TAG_ACCESSION_NUMBER, std::string("Accession"), false, DicomReplaceMode_IgnoreIfAbsent);
476 ASSERT_FALSE(f.GetTagValue(s, DICOM_TAG_ACCESSION_NUMBER)); 477 ASSERT_FALSE(f.GetTagValue(s, DICOM_TAG_ACCESSION_NUMBER));