diff OrthancServer/Sources/SliceOrdering.cpp @ 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 05b8fd21089c
children d962a2996637
line wrap: on
line diff
--- 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&)
         {