# HG changeset patch # User Sebastien Jodogne # Date 1600348701 -7200 # Node ID e731e62692a9c34ba236fd0f0eb7df9e966475fb # Parent e0045462a25c9828d0b780aa5cd09e8a91d4cdfb upgrading Orthanc framework diff -r e0045462a25c -r e731e62692a9 Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp --- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Fri Aug 21 21:57:54 2020 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Thu Sep 17 15:18:21 2020 +0200 @@ -1150,8 +1150,7 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); } - std::unique_ptr frame( - Orthanc::DicomImageDecoder::Decode(message.GetDicom(), frameIndex_)); + std::unique_ptr frame(message.GetDicom().DecodeFrame(frameIndex_)); if (frame.get() == NULL) { diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/Loaders/SeriesFramesLoader.cpp --- a/OrthancStone/Sources/Loaders/SeriesFramesLoader.cpp Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/Loaders/SeriesFramesLoader.cpp Thu Sep 17 15:18:21 2020 +0200 @@ -25,7 +25,7 @@ #include "../Oracle/ParseDicomFromWadoCommand.h" #if ORTHANC_ENABLE_DCMTK == 1 -# include +# include #endif #include @@ -170,9 +170,7 @@ size_t frameIndex = frames_.GetFrameIndex(payload.GetSeriesIndex()); std::unique_ptr decoded; - decoded.reset(Orthanc::DicomImageDecoder::Decode( - dicom, - static_cast(frameIndex))); + decoded.reset(dicom.DecodeFrame(static_cast(frameIndex))); if (decoded.get() == NULL) { diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/Loaders/SeriesThumbnailsLoader.cpp --- a/OrthancStone/Sources/Loaders/SeriesThumbnailsLoader.cpp Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/Loaders/SeriesThumbnailsLoader.cpp Thu Sep 17 15:18:21 2020 +0200 @@ -37,7 +37,6 @@ #if ORTHANC_ENABLE_DCMTK == 1 # include -# include #endif @@ -555,8 +554,7 @@ } else { - std::unique_ptr frame( - Orthanc::DicomImageDecoder::Decode(message.GetDicom(), 0)); + std::unique_ptr frame(message.GetDicom().DecodeFrame(0)); std::unique_ptr thumbnail; diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/OpenGL/OpenGLTexture.cpp --- a/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/OpenGL/OpenGLTexture.cpp Thu Sep 17 15:18:21 2020 +0200 @@ -126,7 +126,7 @@ // Load the texture from the image buffer glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, image.GetWidth(), image.GetHeight(), - 0, sourceFormat, GL_UNSIGNED_BYTE, image.GetBuffer()); + 0, sourceFormat, GL_UNSIGNED_BYTE, image.GetConstBuffer()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, interpolation); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, interpolation); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.h --- a/OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.h Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.h Thu Sep 17 15:18:21 2020 +0200 @@ -39,7 +39,7 @@ #include "IOpenGLContext.h" -#include +#include // For ORTHANC_OVERRIDE #include diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/Scene2D/ColorSceneLayer.h --- a/OrthancStone/Sources/Scene2D/ColorSceneLayer.h Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/Scene2D/ColorSceneLayer.h Thu Sep 17 15:18:21 2020 +0200 @@ -24,7 +24,7 @@ #include "ISceneLayer.h" #include "Color.h" -#include // For ORTHANC_OVERRIDE +#include // For ORTHANC_OVERRIDE namespace OrthancStone { diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/Scene2DViewport/OneGesturePointerTracker.h --- a/OrthancStone/Sources/Scene2DViewport/OneGesturePointerTracker.h Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/Scene2DViewport/OneGesturePointerTracker.h Thu Sep 17 15:18:21 2020 +0200 @@ -24,6 +24,8 @@ #include "../Viewport/IViewport.h" +#include // For ORTHANC_OVERRIDE + #include #include diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/Toolbox/ParsedDicomDataset.h --- a/OrthancStone/Sources/Toolbox/ParsedDicomDataset.h Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/Toolbox/ParsedDicomDataset.h Thu Sep 17 15:18:21 2020 +0200 @@ -23,6 +23,7 @@ #include "OrthancDatasets/IDicomDataset.h" +#include // For ORTHANC_OVERRIDE #include namespace OrthancStone diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/Viewport/DefaultViewportInteractor.h --- a/OrthancStone/Sources/Viewport/DefaultViewportInteractor.h Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/Viewport/DefaultViewportInteractor.h Thu Sep 17 15:18:21 2020 +0200 @@ -22,6 +22,8 @@ #include "IViewportInteractor.h" +#include // For ORTHANC_OVERRIDE + namespace OrthancStone { class DefaultViewportInteractor : public IViewportInteractor diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/Volumes/ImageBuffer3D.cpp --- a/OrthancStone/Sources/Volumes/ImageBuffer3D.cpp Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/Volumes/ImageBuffer3D.cpp Thu Sep 17 15:18:21 2020 +0200 @@ -31,7 +31,7 @@ { void ImageBuffer3D::GetAxialSliceAccessor(Orthanc::ImageAccessor& target, unsigned int slice, - bool readOnly) const + bool readOnly) { if (slice >= depth_) { @@ -53,7 +53,7 @@ void ImageBuffer3D::GetCoronalSliceAccessor(Orthanc::ImageAccessor& target, unsigned int slice, - bool readOnly) const + bool readOnly) { if (slice >= height_) { @@ -203,14 +203,20 @@ VolumeProjection projection, unsigned int slice) { + /** + * NB: The "const_cast" below are OK, as the "readonly" argument + * to "GetAxialSliceAccessor()" and "GetCoronalSliceAccessor()" + * are set to "true", which implies read-only access. + **/ + switch (projection) { case VolumeProjection_Axial: - that.GetAxialSliceAccessor(accessor_, slice, true); + const_cast(that).GetAxialSliceAccessor(accessor_, slice, true); break; case VolumeProjection_Coronal: - that.GetCoronalSliceAccessor(accessor_, slice, true); + const_cast(that).GetCoronalSliceAccessor(accessor_, slice, true); break; case VolumeProjection_Sagittal: diff -r e0045462a25c -r e731e62692a9 OrthancStone/Sources/Volumes/ImageBuffer3D.h --- a/OrthancStone/Sources/Volumes/ImageBuffer3D.h Fri Aug 21 21:57:54 2020 +0200 +++ b/OrthancStone/Sources/Volumes/ImageBuffer3D.h Thu Sep 17 15:18:21 2020 +0200 @@ -86,11 +86,11 @@ void GetAxialSliceAccessor(Orthanc::ImageAccessor& target, unsigned int slice, - bool readOnly) const; + bool readOnly); void GetCoronalSliceAccessor(Orthanc::ImageAccessor& target, unsigned int slice, - bool readOnly) const; + bool readOnly); Orthanc::Image* ExtractSagittalSlice(unsigned int slice) const;