diff Framework/Widgets/LayerWidget.cpp @ 93:5945e81734a3 wasm

decoding of JPEG images
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 29 May 2017 17:28:31 +0200
parents 961ee171d933
children f47349f4815c
line wrap: on
line diff
--- a/Framework/Widgets/LayerWidget.cpp	Mon May 29 11:42:53 2017 +0200
+++ b/Framework/Widgets/LayerWidget.cpp	Mon May 29 17:28:31 2017 +0200
@@ -89,6 +89,11 @@
       return slice_;
     }
 
+    bool HasRenderer(size_t index)
+    {
+      return renderers_[index] != NULL;
+    }
+
     bool IsComplete() const
     {
       return countMissing_ == 0;
@@ -208,7 +213,8 @@
       assert(layers_[i] != NULL);
       if (GetAndFixExtent(ax, ay, bx, by, *layers_[i]))
       {
-        LOG(INFO) << "Extent of layer " << i << ": (" << ax << "," << ay << ")->(" << bx << "," << by << ")";
+        LOG(INFO) << "Extent of layer " << i << ": (" << ax << "," << ay
+                  << ")->(" << bx << "," << by << ")";
 
         if (first)
         {
@@ -379,6 +385,10 @@
 
   void LayerWidget::SetSlice(const SliceGeometry& slice)
   {
+    LOG(INFO) << "Setting slice origin: (" << slice.GetOrigin()[0]
+              << "," << slice.GetOrigin()[1]
+              << "," << slice.GetOrigin()[2] << ")";
+    
     Slice displayedSlice(slice_, THIN_SLICE_THICKNESS);
 
     if (!displayedSlice.ContainsPlane(slice))
@@ -490,6 +500,7 @@
       double x1, y1, x2, y2;
       if (GetAndFixExtent(x1, y1, x2, y2, *layers_[index]))
       {
+        printf("**%d** %f %f %f %f\n", index, x1, y1, x2, y2);
         UpdateLayer(index, new MissingLayerRenderer(x1, y1, x2, y2), Slice(slice, THIN_SLICE_THICKNESS));
       }
     }