changeset 631:ea8322566596

notes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 May 2019 18:26:52 +0200
parents cc69acccd9f8
children b0652595b62a
files Framework/Scene2D/FloatTextureSceneLayer.h Samples/Sdl/Loader.cpp Samples/WebAssembly/BasicScene.cpp Samples/WebAssembly/CMakeLists.txt Samples/WebAssembly/NOTES.txt
diffstat 5 files changed, 17 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Scene2D/FloatTextureSceneLayer.h	Tue May 07 18:34:40 2019 +0200
+++ b/Framework/Scene2D/FloatTextureSceneLayer.h	Wed May 08 18:26:52 2019 +0200
@@ -33,6 +33,7 @@
     float            customWidth_;
 
   public:
+    // The pixel format must be "Float32"
     FloatTextureSceneLayer(const Orthanc::ImageAccessor& texture);
 
     void SetWindowing(ImageWindowing windowing);
--- a/Samples/Sdl/Loader.cpp	Tue May 07 18:34:40 2019 +0200
+++ b/Samples/Sdl/Loader.cpp	Wed May 08 18:26:52 2019 +0200
@@ -1037,6 +1037,8 @@
       // Tag "3004-000c" is "Grid Frame Offset Vector", which is
       // mandatory to read RT DOSE, but is too long to be returned by default
 
+      // TODO => Should be part of a second call if needed
+
       std::auto_ptr<Refactoring::OrthancApiOracleCommand> command(new Refactoring::OrthancApiOracleCommand);
       command->SetUri("/instances/" + instanceId + "/tags?ignore-length=3004-000c");
       command->SetPayload(new LoadInstanceGeometryHandler(*this));
--- a/Samples/WebAssembly/BasicScene.cpp	Tue May 07 18:34:40 2019 +0200
+++ b/Samples/WebAssembly/BasicScene.cpp	Wed May 08 18:26:52 2019 +0200
@@ -343,10 +343,16 @@
 
 void OrthancStone::WebAssemblyViewport::SetupEvents(const std::string& canvas)
 {
-  //emscripten_set_click_callback(canvas.c_str(), this, false, OnMouseEvent);
-  emscripten_set_mousedown_callback(canvas.c_str(), this, false, OnMouseEvent);
-  emscripten_set_mousemove_callback(canvas.c_str(), this, false, OnMouseEvent);
-  emscripten_set_mouseup_callback(canvas.c_str(), this, false, OnMouseEvent);
+  if (0)
+  {
+    emscripten_set_click_callback(canvas.c_str(), this, false, OnMouseEvent);
+  }
+  else
+  {
+    emscripten_set_mousedown_callback(canvas.c_str(), this, false, OnMouseEvent);
+    emscripten_set_mousemove_callback(canvas.c_str(), this, false, OnMouseEvent);
+    emscripten_set_mouseup_callback(canvas.c_str(), this, false, OnMouseEvent);
+  }
 }
 
 
--- a/Samples/WebAssembly/CMakeLists.txt	Tue May 07 18:34:40 2019 +0200
+++ b/Samples/WebAssembly/CMakeLists.txt	Wed May 08 18:26:52 2019 +0200
@@ -1,10 +1,3 @@
-
-# source ~/Downloads/emsdk/emsdk_env.sh
-# cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release -DALLOW_DOWNLOADS=ON .. -DCMAKE_INSTALL_PREFIX=/tmp/stone
-# ninja install
-# sudo docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/stone:/root/stone:ro jodogne/orthanc-plugins:1.5.6 /root/stone/Configuration.json --verbose
-
-
 cmake_minimum_required(VERSION 2.8.3)
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Samples/WebAssembly/NOTES.txt	Wed May 08 18:26:52 2019 +0200
@@ -0,0 +1,4 @@
+$ source ~/Downloads/emsdk/emsdk_env.sh
+$ cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release -DALLOW_DOWNLOADS=ON .. -DCMAKE_INSTALL_PREFIX=/tmp/stone
+$ ninja install
+$ sudo docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/stone:/root/stone:ro jodogne/orthanc-plugins:1.5.6 /root/stone/Configuration.json --verbose