Mercurial > hg > orthanc-dicomweb
changeset 115:481a88323f8d
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 14 May 2016 16:38:50 +0200 |
parents | 528d18573c09 |
children | 57632586ecc6 |
files | Orthanc/Core/Enumerations.cpp Orthanc/Core/Enumerations.h Orthanc/Core/Toolbox.cpp Orthanc/Resources/CMake/BoostConfiguration.cmake |
diffstat | 4 files changed, 28 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <string.h> +#include <cassert> 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); }
--- 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 };
--- 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); }
--- 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})