Mercurial > hg > orthanc
comparison OrthancServer/UnitTestsSources/UnitTestsMain.cpp @ 4508:8f9090b137f1
Optimization in C-STORE SCP by avoiding an unnecessary DICOM parsing
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 11 Feb 2021 11:00:05 +0100 |
parents | 7d1eabfac6e0 |
children | 5b929e6b3c36 |
comparison
equal
deleted
inserted
replaced
4507:b4c58795f3a8 | 4508:8f9090b137f1 |
---|---|
245 | 245 |
246 ASSERT_TRUE(dataset.findAndGetElement(DCM_Rows, element).good() && | 246 ASSERT_TRUE(dataset.findAndGetElement(DCM_Rows, element).good() && |
247 element != NULL && | 247 element != NULL && |
248 element->getTag().getEVR() == EVR_US); | 248 element->getTag().getEVR() == EVR_US); |
249 | 249 |
250 DicomInstanceToStore toStore; | 250 std::unique_ptr<DicomInstanceToStore> toStore(DicomInstanceToStore::CreateFromParsedDicomFile(dicom)); |
251 toStore.SetParsedDicomFile(dicom); | |
252 | 251 |
253 Json::Value dicomAsJson; | 252 Json::Value dicomAsJson; |
254 OrthancConfiguration::DefaultDicomDatasetToJson(dicomAsJson, toStore.GetParsedDicomFile()); | 253 OrthancConfiguration::DefaultDicomDatasetToJson(dicomAsJson, toStore->GetParsedDicomFile()); |
255 | 254 |
256 DicomMap m; | 255 DicomMap m; |
257 m.FromDicomAsJson(dicomAsJson); | 256 m.FromDicomAsJson(dicomAsJson); |
258 | 257 |
259 ASSERT_EQ("ISO_IR 100", m.GetValue(DICOM_TAG_SPECIFIC_CHARACTER_SET).GetContent()); | 258 ASSERT_EQ("ISO_IR 100", m.GetValue(DICOM_TAG_SPECIFIC_CHARACTER_SET).GetContent()); |