# HG changeset patch # User Sebastien Jodogne # Date 1559024964 -7200 # Node ID 907189734acd16a4fac956b11730bd67f11d5762 # Parent 9f68155c75b025cdb56747976aefe99b93620de7# Parent c83a45f864b2fe8af63b4fe5859e94d783724d74 merge diff -r c83a45f864b2 -r 907189734acd Framework/Toolbox/DicomStructureSet.cpp --- a/Framework/Toolbox/DicomStructureSet.cpp Tue May 28 08:15:38 2019 +0200 +++ b/Framework/Toolbox/DicomStructureSet.cpp Tue May 28 08:29:24 2019 +0200 @@ -31,7 +31,6 @@ #include #include -#include #include #include #include @@ -422,7 +421,6 @@ << static_cast(structures_[i].green_) << "," << static_cast(structures_[i].blue_) << ")"; - // These temporary variables avoid allocating many vectors in the loop below OrthancPlugins::DicomPath countPointsPath(DICOM_TAG_ROI_CONTOUR_SEQUENCE, i, DICOM_TAG_CONTOUR_SEQUENCE, 0, diff -r c83a45f864b2 -r 907189734acd Framework/Toolbox/LinearAlgebra.cpp --- a/Framework/Toolbox/LinearAlgebra.cpp Tue May 28 08:15:38 2019 +0200 +++ b/Framework/Toolbox/LinearAlgebra.cpp Tue May 28 08:29:24 2019 +0200 @@ -26,7 +26,6 @@ #include #include -#include #include namespace OrthancStone @@ -71,9 +70,16 @@ { try { - target[i] = boost::lexical_cast(items[i]); + /** + * We don't use "boost::lexical_cast<>" here, as it is very + * slow. As we are parsing many doubles, we prefer to use + * the standard "std::stod" function: + * http://www.cplusplus.com/reference/string/stod/ + **/ + + target[i] = std::stod(items[i]); } - catch (boost::bad_lexical_cast&) + catch (std::exception&) { target.clear(); return false;