# HG changeset patch # User Sebastien Jodogne # Date 1699377073 -3600 # Node ID 51c8b21b81e4d69db931ccca97047e9109d0f191 # Parent 40476d5e0cfd275685522d1947b4184e2c2643bf fix diff -r 40476d5e0cfd -r 51c8b21b81e4 OrthancStone/Sources/Toolbox/DicomStructuredReport.cpp --- a/OrthancStone/Sources/Toolbox/DicomStructuredReport.cpp Tue Nov 07 17:03:54 2023 +0100 +++ b/OrthancStone/Sources/Toolbox/DicomStructuredReport.cpp Tue Nov 07 18:11:13 2023 +0100 @@ -33,6 +33,13 @@ #include +static std::string FormatTag(const DcmTagKey& key) +{ + OFString s = key.toString(); + return std::string(s.c_str()); +} + + static std::string GetStringValue(DcmItem& dataset, const DcmTagKey& key) { @@ -45,7 +52,7 @@ else { throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat, - "Missing tag in DICOM-SR: " + key.toString()); + "Missing tag in DICOM-SR: " + FormatTag(key)); } } @@ -62,7 +69,7 @@ else { throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat, - "Missing sequence in DICOM-SR: " + key.toString()); + "Missing sequence in DICOM-SR: " + FormatTag(key)); } } diff -r 40476d5e0cfd -r 51c8b21b81e4 OrthancStone/Sources/Toolbox/DicomStructuredReport.h --- a/OrthancStone/Sources/Toolbox/DicomStructuredReport.h Tue Nov 07 17:03:54 2023 +0100 +++ b/OrthancStone/Sources/Toolbox/DicomStructuredReport.h Tue Nov 07 18:11:13 2023 +0100 @@ -34,6 +34,7 @@ #include #include +#include namespace OrthancStone {