changeset 4142:0ea450e1f0ea

"/series/.../ordered-slices" supports spaces in Image Position/Orientation Patient tags
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Aug 2020 17:44:39 +0200
parents 99927401587c
children 1ec3e1e18f50 ecc11c232326
files NEWS OrthancServer/Sources/SliceOrdering.cpp
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue Aug 11 16:57:34 2020 +0200
+++ b/NEWS	Thu Aug 13 17:44:39 2020 +0200
@@ -2,6 +2,7 @@
 ===============================
 
 * Fix DICOM SCP filters if some query tag has more than 256 characters
+* "/series/.../ordered-slices" supports spaces in Image Position/Orientation Patient tags
 
 
 Version 1.7.2 (2020-07-08)
--- a/OrthancServer/Sources/SliceOrdering.cpp	Tue Aug 11 16:57:34 2020 +0200
+++ b/OrthancServer/Sources/SliceOrdering.cpp	Thu Aug 13 17:44:39 2020 +0200
@@ -64,7 +64,8 @@
     {
       try
       {
-        result[i] = boost::lexical_cast<float>(tokens[i]);
+        const std::string token = Toolbox::StripSpaces(tokens[i]);
+        result[i] = boost::lexical_cast<float>(token);
       }
       catch (boost::bad_lexical_cast&)
       {
@@ -182,7 +183,8 @@
       {
         try
         {
-          framesCount_ = boost::lexical_cast<unsigned int>(frames->GetContent());
+          const std::string token = Toolbox::StripSpaces(frames->GetContent());
+          framesCount_ = boost::lexical_cast<unsigned int>(token);
         }
         catch (boost::bad_lexical_cast&)
         {