changeset 1117:383aa2a7d426 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 Nov 2019 15:54:57 +0100
parents a08699daf78b (current diff) f00deb2b4733 (diff)
children a8bf81756839
files Framework/Loaders/OrthancMultiframeVolumeLoader.cpp Framework/Radiography/RadiographyLayer.cpp Framework/Radiography/RadiographyScene.cpp Framework/Radiography/RadiographyWidget.cpp
diffstat 6 files changed, 19 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Nov 04 15:54:35 2019 +0100
+++ b/.hgtags	Mon Nov 04 15:54:57 2019 +0100
@@ -37,3 +37,4 @@
 5a18e6a395bc3fcc2915bb169f145027da0702a5 toa2019102301
 df76d308303107cdd327790d3a92b58fa4500f76 toa2019102302
 640feb146fa8186ac4e5ecb87d18b267750ccec3 toa2019102801
+33b0a762e98ade4e1f00e26bf865b417269443fb toa2019110401
--- a/Framework/Deprecated/Toolbox/ViewportGeometry.cpp	Mon Nov 04 15:54:35 2019 +0100
+++ b/Framework/Deprecated/Toolbox/ViewportGeometry.cpp	Mon Nov 04 15:54:57 2019 +0100
@@ -81,9 +81,9 @@
 
   void ViewportGeometry::SetSceneExtent(const OrthancStone::Extent2D& extent)
   {
-    LOG(INFO) << "New scene extent: ("
-              << extent.GetX1() << "," << extent.GetY1() << ") => ("
-              << extent.GetX2() << "," << extent.GetY2() << ")";
+//    LOG(INFO) << "New scene extent: ("
+//              << extent.GetX1() << "," << extent.GetY1() << ") => ("
+//              << extent.GetX2() << "," << extent.GetY2() << ")";
 
     sceneExtent_ = extent;
     ComputeTransform();
--- a/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp	Mon Nov 04 15:54:35 2019 +0100
+++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp	Mon Nov 04 15:54:57 2019 +0100
@@ -185,7 +185,6 @@
         "No support for multiframe instances with transfer syntax: " + transferSyntaxUid_);
     }
   }
-      
 
   void OrthancMultiframeVolumeLoader::SetTransferSyntax(const std::string& transferSyntax)
   {
@@ -254,6 +253,15 @@
     target = le16toh(*reinterpret_cast<const uint16_t*>(source));
   }
 
+  ORTHANC_FORCE_INLINE
+    static void CopyPixel(int16_t& target, const void* source)
+  {
+    // byte swapping is the same for unsigned and signed integers
+    // (the sign bit is always stored with the MSByte)
+    uint16_t* targetUp = reinterpret_cast<uint16_t*>(&target);
+    CopyPixel(*targetUp, source);
+  }
+
   template <typename T>
   void OrthancMultiframeVolumeLoader::CopyPixelData(const std::string& pixelData)
   {
@@ -293,7 +301,6 @@
         for (unsigned int x = 0; x < width; x++)
         {
           CopyPixel(*target, source);
-            
           target ++;
           source += bpp;
         }
@@ -311,6 +318,9 @@
       case Orthanc::PixelFormat_Grayscale16:
         CopyPixelData<uint16_t>(pixelData);
         break;
+      case Orthanc::PixelFormat_SignedGrayscale16:
+        CopyPixelData<int16_t>(pixelData);
+        break;
       default:
         throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
     }
--- a/Framework/Radiography/RadiographyLayer.cpp	Mon Nov 04 15:54:35 2019 +0100
+++ b/Framework/Radiography/RadiographyLayer.cpp	Mon Nov 04 15:54:57 2019 +0100
@@ -224,13 +224,6 @@
   void RadiographyLayer::SetSize(unsigned int width,
                                  unsigned int height)
   {
-    if (hasSize_ &&
-        (width != width_ ||
-         height != height_))
-    {
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_IncompatibleImageSize);
-    }
-
     hasSize_ = true;
     width_ = width;
     height_ = height;
--- a/Framework/Radiography/RadiographyScene.cpp	Mon Nov 04 15:54:35 2019 +0100
+++ b/Framework/Radiography/RadiographyScene.cpp	Mon Nov 04 15:54:57 2019 +0100
@@ -134,7 +134,7 @@
 
     std::auto_ptr<RadiographyLayer> raii(layer);
 
-    LOG(INFO) << "Registering layer: " << countLayers_;
+    // LOG(INFO) << "Registering layer: " << countLayers_;
 
     size_t index = countLayers_++;
     raii->SetIndex(index);
--- a/Framework/Radiography/RadiographyWidget.cpp	Mon Nov 04 15:54:35 2019 +0100
+++ b/Framework/Radiography/RadiographyWidget.cpp	Mon Nov 04 15:54:57 2019 +0100
@@ -238,15 +238,14 @@
   
   void RadiographyWidget::OnGeometryChanged(const RadiographyScene::GeometryChangedMessage& message)
   {
-    LOG(INFO) << "Scene geometry has changed";
-
+//    LOG(INFO) << "Scene geometry has changed";
     FitContent();
   }
 
   
   void RadiographyWidget::OnContentChanged(const RadiographyScene::ContentChangedMessage& message)
   {
-    LOG(INFO) << "Scene content has changed";
+//    LOG(INFO) << "Scene content has changed";
     NotifyContentChanged();
   }