# HG changeset patch # User Sebastien Jodogne # Date 1463236730 -7200 # Node ID 481a88323f8dfdb97ef779f256d2d4f2f4f5f405 # Parent 528d18573c0963c08d13d30a633f3656bf3514ac sync diff -r 528d18573c09 -r 481a88323f8d Orthanc/Core/Enumerations.cpp --- a/Orthanc/Core/Enumerations.cpp Thu Apr 28 17:20:36 2016 +0200 +++ b/Orthanc/Core/Enumerations.cpp Sat May 14 16:38:50 2016 +0200 @@ -37,6 +37,7 @@ #include "Toolbox.h" #include +#include namespace Orthanc { @@ -740,6 +741,9 @@ case PixelFormat_SignedGrayscale16: return "Grayscale (signed 16bpp)"; + case PixelFormat_Float32: + return "Grayscale (float 32bpp)"; + default: throw OrthancException(ErrorCode_ParameterOutOfRange); } @@ -913,6 +917,10 @@ case PixelFormat_RGBA32: return 4; + case PixelFormat_Float32: + assert(sizeof(float) == 4); + return 4; + default: throw OrthancException(ErrorCode_ParameterOutOfRange); } diff -r 528d18573c09 -r 481a88323f8d Orthanc/Core/Enumerations.h --- a/Orthanc/Core/Enumerations.h Thu Apr 28 17:20:36 2016 +0200 +++ b/Orthanc/Core/Enumerations.h Sat May 14 16:38:50 2016 +0200 @@ -187,7 +187,13 @@ * {summary}{Graylevel, signed 16bpp image.} * {description}{The image is graylevel. Each pixel is signed and stored in two bytes.} **/ - PixelFormat_SignedGrayscale16 = 5 + PixelFormat_SignedGrayscale16 = 5, + + /** + * {summary}{Graylevel, floating-point image.} + * {description}{The image is graylevel. Each pixel is floating-point and stored in 4 bytes.} + **/ + PixelFormat_Float32 = 6 }; diff -r 528d18573c09 -r 481a88323f8d Orthanc/Core/Toolbox.cpp --- a/Orthanc/Core/Toolbox.cpp Thu Apr 28 17:20:36 2016 +0200 +++ b/Orthanc/Core/Toolbox.cpp Sat May 14 16:38:50 2016 +0200 @@ -582,6 +582,18 @@ void Toolbox::DecodeBase64(std::string& result, const std::string& data) { + for (size_t i = 0; i < data.length(); i++) + { + if (!isalnum(data[i]) && + data[i] != '+' && + data[i] != '/' && + data[i] != '=') + { + // This is not a valid character for a Base64 string + throw OrthancException(ErrorCode_BadFileFormat); + } + } + result = base64_decode(data); } diff -r 528d18573c09 -r 481a88323f8d Orthanc/Resources/CMake/BoostConfiguration.cmake --- a/Orthanc/Resources/CMake/BoostConfiguration.cmake Thu Apr 28 17:20:36 2016 +0200 +++ b/Orthanc/Resources/CMake/BoostConfiguration.cmake Sat May 14 16:38:50 2016 +0200 @@ -42,7 +42,7 @@ # Parameters for Boost 1.60.0 set(BOOST_NAME boost_1_60_0) set(BOOST_BCP_SUFFIX bcpdigest-1.0.1) - set(BOOST_MD5 "0646971514a1e012fbe382c5662a8605") + set(BOOST_MD5 "a789f8ec2056ad1c2d5f0cb64687cc7b") set(BOOST_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz") set(BOOST_FILESYSTEM_SOURCES_DIR "${BOOST_NAME}/libs/filesystem/src") set(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME})