Mercurial > hg > orthanc
comparison OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp @ 5300:7d913ee2f665 am-experimental
fix
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 24 May 2023 08:54:54 +0200 |
parents | c04230962098 |
children | f26ed26a7793 |
comparison
equal
deleted
inserted
replaced
5299:c9ea57d73603 | 5300:7d913ee2f665 |
---|---|
3320 "}"; | 3320 "}"; |
3321 | 3321 |
3322 Json::Value v; | 3322 Json::Value v; |
3323 Orthanc::Toolbox::ReadJson(v, source); | 3323 Orthanc::Toolbox::ReadJson(v, source); |
3324 | 3324 |
3325 LOG(INFO) << source; | 3325 // LOG(INFO) << source; |
3326 LOG(INFO) << v.toStyledString(); | 3326 // LOG(INFO) << v.toStyledString(); |
3327 Json::Value result = Json::objectValue; | 3327 Json::Value result = Json::objectValue; |
3328 DicomMap map; | 3328 DicomMap map; |
3329 map.FromDicomAsJson(v, false, true); | 3329 map.FromDicomAsJson(v, false, true); |
3330 | 3330 |
3331 // for profiling for (int i=0; i < 100; ++i) | 3331 // for profiling for (int i=0; i < 100; ++i) |
3332 { | 3332 { |
3333 result = Json::objectValue; | 3333 result = Json::objectValue; |
3334 FromDcmtkBridge::ToJson(result, map, Orthanc::DicomToJsonFormat_DicomWeb); | 3334 FromDcmtkBridge::ToJson(result, map, Orthanc::DicomToJsonFormat_DicomWeb); |
3335 } | 3335 } |
3336 | 3336 |
3337 LOG(INFO) << result.toStyledString(); | |
3337 ASSERT_TRUE(result.isMember("00281053")); | 3338 ASSERT_TRUE(result.isMember("00281053")); |
3338 ASSERT_EQ("0.0625", result["00281053"]["Value"].asString()); | 3339 ASSERT_DOUBLE_EQ(0.0625, result["00281053"]["Value"][0].asDouble()); |
3339 } | 3340 } |
3340 } | 3341 } |
3341 | 3342 |
3342 | 3343 |
3343 #if ORTHANC_ENABLE_DCMTK_TRANSCODING == 1 | 3344 #if ORTHANC_ENABLE_DCMTK_TRANSCODING == 1 |