comparison 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
comparison
equal deleted inserted replaced
4141:99927401587c 4142:0ea450e1f0ea
62 62
63 for (size_t i = 0; i < tokens.size(); i++) 63 for (size_t i = 0; i < tokens.size(); i++)
64 { 64 {
65 try 65 try
66 { 66 {
67 result[i] = boost::lexical_cast<float>(tokens[i]); 67 const std::string token = Toolbox::StripSpaces(tokens[i]);
68 result[i] = boost::lexical_cast<float>(token);
68 } 69 }
69 catch (boost::bad_lexical_cast&) 70 catch (boost::bad_lexical_cast&)
70 { 71 {
71 return false; 72 return false;
72 } 73 }
180 !frames->IsNull() && 181 !frames->IsNull() &&
181 !frames->IsBinary()) 182 !frames->IsBinary())
182 { 183 {
183 try 184 try
184 { 185 {
185 framesCount_ = boost::lexical_cast<unsigned int>(frames->GetContent()); 186 const std::string token = Toolbox::StripSpaces(frames->GetContent());
187 framesCount_ = boost::lexical_cast<unsigned int>(token);
186 } 188 }
187 catch (boost::bad_lexical_cast&) 189 catch (boost::bad_lexical_cast&)
188 { 190 {
189 } 191 }
190 } 192 }