Mercurial > hg > orthanc
diff Core/DicomFormat/DicomValue.cpp @ 2412:cad393b41bc3
handy shortcuts in DicomMap
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 29 Sep 2017 11:35:45 +0200 |
parents | 3590c936e56f |
children | 878b59270859 |
line wrap: on
line diff
--- a/Core/DicomFormat/DicomValue.cpp Fri Sep 29 10:16:28 2017 +0200 +++ b/Core/DicomFormat/DicomValue.cpp Fri Sep 29 11:35:45 2017 +0200 @@ -175,4 +175,22 @@ { return ParseValue<double, true>(result, *this); } + + bool DicomValue::CopyToString(std::string& result, + bool allowBinary) const + { + if (IsNull()) + { + return false; + } + else if (IsBinary() && !allowBinary) + { + return false; + } + else + { + result.assign(content_); + return true; + } + } }