# HG changeset patch # User Sebastien Jodogne # Date 1593011844 -7200 # Node ID c5627b8493f3d4d48cccb7f1c05463818aaaa403 # Parent 5d892f5dd9c45ae3380d65382eb3b5f25ae0098f# Parent 6e43cac7833c4a78d37d37727af88815fa4e69b4 merge diff -r 5d892f5dd9c4 -r c5627b8493f3 Framework/Loaders/OrthancMultiframeVolumeLoader.h --- a/Framework/Loaders/OrthancMultiframeVolumeLoader.h Wed Jun 24 17:17:06 2020 +0200 +++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.h Wed Jun 24 17:17:24 2020 +0200 @@ -90,9 +90,6 @@ void SetUncompressedPixelData(const std::string& pixelData); - bool HasGeometry() const; - const OrthancStone::VolumeImageGeometry& GetImageGeometry() const; - protected: OrthancMultiframeVolumeLoader( OrthancStone::ILoadersContext& loadersContext, @@ -107,6 +104,9 @@ virtual ~OrthancMultiframeVolumeLoader(); + bool HasGeometry() const; + const OrthancStone::VolumeImageGeometry& GetImageGeometry() const; + bool IsPixelDataLoaded() const { return pixelDataLoaded_; diff -r 5d892f5dd9c4 -r c5627b8493f3 Framework/Oracle/WebAssemblyOracle.h --- a/Framework/Oracle/WebAssemblyOracle.h Wed Jun 24 17:17:06 2020 +0200 +++ b/Framework/Oracle/WebAssemblyOracle.h Wed Jun 24 17:17:24 2020 +0200 @@ -41,6 +41,7 @@ #include +#include namespace OrthancStone { diff -r 5d892f5dd9c4 -r c5627b8493f3 Framework/Toolbox/SubvoxelReader.h --- a/Framework/Toolbox/SubvoxelReader.h Wed Jun 24 17:17:06 2020 +0200 +++ b/Framework/Toolbox/SubvoxelReader.h Wed Jun 24 17:17:24 2020 +0200 @@ -33,6 +33,13 @@ { namespace Internals { + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ class SubvoxelReaderBase : public boost::noncopyable { private: @@ -84,11 +91,25 @@ } + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ template class SubvoxelReader; + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ template class SubvoxelReader : public Internals::SubvoxelReaderBase @@ -114,6 +135,13 @@ }; + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ template class SubvoxelReader : public Internals::SubvoxelReaderBase @@ -147,6 +175,13 @@ }; + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ template class SubvoxelReader : public Internals::SubvoxelReaderBase @@ -176,6 +211,9 @@ }; + /* + See important comment above + */ template bool SubvoxelReader::GetValue(PixelType& target, @@ -230,6 +268,9 @@ } + /* + See important comment above + */ template bool SubvoxelReader::Sample(float& f00, @@ -284,6 +325,9 @@ } + /* + See important comment above + */ template bool SubvoxelReader::GetFloatValue(float& target, @@ -323,6 +367,9 @@ } + /* + See important comment above + */ template bool SubvoxelReader::GetValue(PixelType& target, @@ -397,6 +444,10 @@ } + /* + See important comment above + */ + template bool SubvoxelReader::GetValue(PixelType& target, diff -r 5d892f5dd9c4 -r c5627b8493f3 Framework/Viewport/WebAssemblyViewport.cpp --- a/Framework/Viewport/WebAssemblyViewport.cpp Wed Jun 24 17:17:06 2020 +0200 +++ b/Framework/Viewport/WebAssemblyViewport.cpp Wed Jun 24 17:17:24 2020 +0200 @@ -288,6 +288,11 @@ } } + void WebAssemblyViewport::UpdateCanvasSize() + { + UpdateSize(*compositor_); + } + WebAssemblyViewport::~WebAssemblyViewport() { emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, diff -r 5d892f5dd9c4 -r c5627b8493f3 Framework/Viewport/WebAssemblyViewport.h --- a/Framework/Viewport/WebAssemblyViewport.h Wed Jun 24 17:17:06 2020 +0200 +++ b/Framework/Viewport/WebAssemblyViewport.h Wed Jun 24 17:17:24 2020 +0200 @@ -99,6 +99,7 @@ ~WebAssemblyViewport(); + virtual void UpdateCanvasSize(); /** This method takes ownership diff -r 5d892f5dd9c4 -r c5627b8493f3 Framework/Volumes/ImageBuffer3D.h --- a/Framework/Volumes/ImageBuffer3D.h Wed Jun 24 17:17:06 2020 +0200 +++ b/Framework/Volumes/ImageBuffer3D.h Wed Jun 24 17:17:24 2020 +0200 @@ -29,6 +29,44 @@ namespace OrthancStone { + /* + + This classes stores volume images sliced across the Z axis, vertically, in the decreasing Z order : + + +---------------+ + | | + | SLICE N-1 | + | | + +---------------+ + | | + | SLICE N-2 | + | | + +---------------+ + | | + | SLICE N-3 | + | | + . . + ...... ...... + . . + | | + | SLICE 2 | + | | + +---------------+ + | | + | SLICE 1 | + | | + +---------------+ + | | + | SLICE 0 | + | | + +---------------+ + + As you can see, if the 3d image has size width, height, depth, the 2d image has : + - 2d width = 3d width + - 2d height = 3d height * 3d depth + + */ + class ImageBuffer3D : public boost::noncopyable { private: