changeset 1491:c5627b8493f3

merge
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 Jun 2020 17:17:24 +0200
parents 5d892f5dd9c4 (current diff) 6e43cac7833c (diff)
children 4b5ec9ea268e
files
diffstat 6 files changed, 99 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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_;
--- 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 <WebServiceParameters.h>
 
+#include <Enumerations.h>
 
 namespace OrthancStone
 {
--- 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 <Orthanc::PixelFormat Format,
             ImageInterpolation Interpolation>
   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 <Orthanc::PixelFormat Format>
   class SubvoxelReader<Format, ImageInterpolation_Nearest> : 
     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 <Orthanc::PixelFormat Format>
   class SubvoxelReader<Format, ImageInterpolation_Bilinear> : 
     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 <Orthanc::PixelFormat Format>
   class SubvoxelReader<Format, ImageInterpolation_Trilinear> : 
     public Internals::SubvoxelReaderBase
@@ -176,6 +211,9 @@
   };
 
 
+  /*
+  See important comment above
+  */
 
   template <Orthanc::PixelFormat Format>
   bool SubvoxelReader<Format, ImageInterpolation_Nearest>::GetValue(PixelType& target,
@@ -230,6 +268,9 @@
   }
 
 
+  /*
+  See important comment above
+  */
 
   template <Orthanc::PixelFormat Format>
   bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::Sample(float& f00,
@@ -284,6 +325,9 @@
   }
 
 
+  /*
+  See important comment above
+  */
 
   template <Orthanc::PixelFormat Format>
   bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetFloatValue(float& target,
@@ -323,6 +367,9 @@
   }
 
 
+  /*
+  See important comment above
+  */
 
   template <Orthanc::PixelFormat Format>
   bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetValue(PixelType& target,
@@ -397,6 +444,10 @@
   }
 
 
+  /*
+  See important comment above
+  */
+
 
   template <Orthanc::PixelFormat Format>
   bool SubvoxelReader<Format, ImageInterpolation_Trilinear>::GetValue(PixelType& target,
--- 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,
--- 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
--- 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: