# HG changeset patch # User Sebastien Jodogne # Date 1477476843 -7200 # Node ID 4b7e0244881fc51b377230d3ad5a9c026f383c0d # Parent 55407926aac391af125f9820458b2b7b832bb615 fix diff -r 55407926aac3 -r 4b7e0244881f Framework/Messaging/MessagingToolbox.cpp --- a/Framework/Messaging/MessagingToolbox.cpp Mon Oct 24 14:45:05 2016 +0200 +++ b/Framework/Messaging/MessagingToolbox.cpp Wed Oct 26 12:14:03 2016 +0200 @@ -413,7 +413,7 @@ // Decode a grayscale JPEG 8bpp image coming from the Web viewer std::auto_ptr image - (new Orthanc::Image(targetFormat, reader->GetWidth(), reader->GetHeight())); + (new Orthanc::Image(targetFormat, reader->GetWidth(), reader->GetHeight(), false)); float scaling = static_cast(stretchHigh - stretchLow) / 255.0f; float offset = static_cast(stretchLow) / scaling; diff -r 55407926aac3 -r 4b7e0244881f Framework/Orthanc/Core/HttpClient.cpp --- a/Framework/Orthanc/Core/HttpClient.cpp Mon Oct 24 14:45:05 2016 +0200 +++ b/Framework/Orthanc/Core/HttpClient.cpp Wed Oct 26 12:14:03 2016 +0200 @@ -328,7 +328,8 @@ pimpl_(new PImpl), verifyPeers_(true), pkcs11Enabled_(false), - headersToLowerCase_(true) + headersToLowerCase_(true), + redirectionFollowed_(true) { Setup(); } @@ -338,7 +339,8 @@ const std::string& uri) : pimpl_(new PImpl), verifyPeers_(true), - headersToLowerCase_(true) + headersToLowerCase_(true), + redirectionFollowed_(true) { Setup(); diff -r 55407926aac3 -r 4b7e0244881f Framework/Orthanc/Core/Images/Image.cpp --- a/Framework/Orthanc/Core/Images/Image.cpp Mon Oct 24 14:45:05 2016 +0200 +++ b/Framework/Orthanc/Core/Images/Image.cpp Wed Oct 26 12:14:03 2016 +0200 @@ -40,8 +40,9 @@ { Image::Image(PixelFormat format, unsigned int width, - unsigned int height) : - image_(format, width, height) + unsigned int height, + bool forceMinimalPitch) : + image_(format, width, height, forceMinimalPitch) { ImageAccessor accessor = image_.GetAccessor(); AssignWritable(format, width, height, accessor.GetPitch(), accessor.GetBuffer()); @@ -50,7 +51,7 @@ Image* Image::Clone(const ImageAccessor& source) { - std::auto_ptr target(new Image(source.GetFormat(), source.GetWidth(), source.GetHeight())); + std::auto_ptr target(new Image(source.GetFormat(), source.GetWidth(), source.GetHeight(), false)); ImageProcessing::Copy(*target, source); return target.release(); } diff -r 55407926aac3 -r 4b7e0244881f Framework/Orthanc/Core/Images/Image.h --- a/Framework/Orthanc/Core/Images/Image.h Mon Oct 24 14:45:05 2016 +0200 +++ b/Framework/Orthanc/Core/Images/Image.h Wed Oct 26 12:14:03 2016 +0200 @@ -45,7 +45,8 @@ public: Image(PixelFormat format, unsigned int width, - unsigned int height); + unsigned int height, + bool forceMinimalPitch); static Image* Clone(const ImageAccessor& source); }; diff -r 55407926aac3 -r 4b7e0244881f Framework/Orthanc/Core/Images/ImageBuffer.cpp --- a/Framework/Orthanc/Core/Images/ImageBuffer.cpp Mon Oct 24 14:45:05 2016 +0200 +++ b/Framework/Orthanc/Core/Images/ImageBuffer.cpp Wed Oct 26 12:14:03 2016 +0200 @@ -87,7 +87,9 @@ ImageBuffer::ImageBuffer(PixelFormat format, unsigned int width, - unsigned int height) + unsigned int height, + bool forceMinimalPitch) : + forceMinimalPitch_(forceMinimalPitch) { Initialize(); SetWidth(width); @@ -158,16 +160,6 @@ } - void ImageBuffer::SetMinimalPitchForced(bool force) - { - if (force != forceMinimalPitch_) - { - changed_ = true; - forceMinimalPitch_ = force; - } - } - - void ImageBuffer::AcquireOwnership(ImageBuffer& other) { // Remove the content of the current image diff -r 55407926aac3 -r 4b7e0244881f Framework/Orthanc/Core/Images/ImageBuffer.h --- a/Framework/Orthanc/Core/Images/ImageBuffer.h Mon Oct 24 14:45:05 2016 +0200 +++ b/Framework/Orthanc/Core/Images/ImageBuffer.h Wed Oct 26 12:14:03 2016 +0200 @@ -61,7 +61,8 @@ public: ImageBuffer(PixelFormat format, unsigned int width, - unsigned int height); + unsigned int height, + bool forceMinimalPitch); ImageBuffer() { @@ -108,8 +109,6 @@ return forceMinimalPitch_; } - void SetMinimalPitchForced(bool force); - void AcquireOwnership(ImageBuffer& other); }; } diff -r 55407926aac3 -r 4b7e0244881f Framework/Toolbox/DicomFrameConverter.cpp --- a/Framework/Toolbox/DicomFrameConverter.cpp Mon Oct 24 14:45:05 2016 +0200 +++ b/Framework/Toolbox/DicomFrameConverter.cpp Wed Oct 26 12:14:03 2016 +0200 @@ -132,7 +132,8 @@ // This is the case of a grayscale frame. Convert it to Float32. std::auto_ptr converted(new Orthanc::Image(Orthanc::PixelFormat_Float32, source->GetWidth(), - source->GetHeight())); + source->GetHeight(), + false)); Orthanc::ImageProcessing::Convert(*converted, *source); source.reset(NULL); // We don't need the source frame anymore diff -r 55407926aac3 -r 4b7e0244881f Framework/Volumes/ImageBuffer3D.cpp --- a/Framework/Volumes/ImageBuffer3D.cpp Mon Oct 24 14:45:05 2016 +0200 +++ b/Framework/Volumes/ImageBuffer3D.cpp Wed Oct 26 12:14:03 2016 +0200 @@ -94,7 +94,7 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); } - std::auto_ptr result(new Orthanc::Image(format_, height_, depth_)); + std::auto_ptr result(new Orthanc::Image(format_, height_, depth_, false)); unsigned int bytesPerPixel = Orthanc::GetBytesPerPixel(format_); @@ -121,7 +121,7 @@ unsigned int width, unsigned int height, unsigned int depth) : - image_(format, width, height * depth), + image_(format, width, height * depth, false), format_(format), width_(width), height_(height),