# HG changeset patch # User Sebastien Jodogne # Date 1448881463 -3600 # Node ID d5396fcd80bb5f9aa29f7b9e71213a01c4a8774d # Parent 21123729ac71dea00359d9c75b1bf6a6c7c352bc fix diff -r 21123729ac71 -r d5396fcd80bb Plugin/DecodedImageAdapter.cpp --- a/Plugin/DecodedImageAdapter.cpp Mon Nov 30 11:02:50 2015 +0100 +++ b/Plugin/DecodedImageAdapter.cpp Mon Nov 30 12:04:23 2015 +0100 @@ -33,6 +33,7 @@ #include #include + namespace OrthancPlugins { bool DecodedImageAdapter::ParseUri(CompressionType& type, @@ -168,7 +169,7 @@ { try { - return boost::lexical_cast(tmp); + return boost::lexical_cast(Orthanc::Toolbox::StripSpaces(tmp)); } catch (boost::bad_lexical_cast&) { @@ -231,7 +232,7 @@ } float slope = GetFloatTag(tags, "0028,1053", 1.0f); - float intercept = GetFloatTag(tags, "0028,1052", 1.0f); + float intercept = GetFloatTag(tags, "0028,1052", 0.0f); result["slope"] = slope; result["intercept"] = intercept; @@ -251,8 +252,8 @@ { try { - result["columnPixelSpacing"] = boost::lexical_cast(tokens[1]); - result["rowPixelSpacing"] = boost::lexical_cast(tokens[0]); + result["columnPixelSpacing"] = boost::lexical_cast(Orthanc::Toolbox::StripSpaces(tokens[1])); + result["rowPixelSpacing"] = boost::lexical_cast(Orthanc::Toolbox::StripSpaces(tokens[0])); ok = true; } catch (boost::bad_lexical_cast&)