changeset 739:be9c1530d40a

deprecating enum SliceImageQuality
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 22 May 2019 09:13:04 +0200
parents 8e31b174ab26
children 31487d066d1d
files Applications/Samples/SimpleViewerApplicationSingleFile.h Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.cpp Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.h Framework/Deprecated/SmartLoader.cpp Framework/Deprecated/SmartLoader.h Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp Framework/Deprecated/Toolbox/OrthancSlicesLoader.h Framework/Radiography/RadiographyDicomLayer.cpp Framework/Radiography/RadiographyLayer.cpp Framework/Radiography/RadiographyLayer.h Framework/Radiography/RadiographyLayerCropTracker.cpp Framework/Radiography/RadiographyLayerResizeTracker.cpp Framework/Radiography/RadiographyScene.cpp Framework/Radiography/RadiographyScene.h Framework/Radiography/RadiographySceneReader.cpp Framework/Radiography/RadiographySceneReader.h Framework/Radiography/RadiographyWidget.cpp Framework/StoneEnumerations.h
diffstat 18 files changed, 118 insertions(+), 113 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Samples/SimpleViewerApplicationSingleFile.h	Wed May 22 08:54:38 2019 +0200
+++ b/Applications/Samples/SimpleViewerApplicationSingleFile.h	Wed May 22 09:13:04 2019 +0200
@@ -312,7 +312,7 @@
 
           // sources
           smartLoader_.reset(new Deprecated::SmartLoader(GetBroker(), context->GetOrthancApiClient()));
-          smartLoader_->SetImageQuality(SliceImageQuality_FullPam);
+          smartLoader_->SetImageQuality(Deprecated::SliceImageQuality_FullPam);
 
           mainLayout_->SetTransmitMouseOver(true);
           mainWidgetInteractor_.reset(new MainWidgetInteractor(*this));
--- a/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.cpp	Wed May 22 09:13:04 2019 +0200
@@ -63,8 +63,8 @@
 
     virtual ILayerRenderer* CreateRenderer() const
     {
-      bool isFull = (message_.GetEffectiveQuality() == OrthancStone::SliceImageQuality_FullPng ||
-                     message_.GetEffectiveQuality() == OrthancStone::SliceImageQuality_FullPam);
+      bool isFull = (message_.GetEffectiveQuality() == SliceImageQuality_FullPng ||
+                     message_.GetEffectiveQuality() == SliceImageQuality_FullPam);
 
       return FrameRenderer::CreateRenderer(message_.GetImage(), message_.GetSlice(), isFull);
     }
@@ -92,7 +92,7 @@
     IVolumeSlicer(broker),
     IObserver(broker),
     loader_(broker, orthanc),
-    quality_(OrthancStone::SliceImageQuality_FullPng)
+    quality_(SliceImageQuality_FullPng)
   {
     loader_.RegisterObserverCallback(
       new OrthancStone::Callable<DicomSeriesVolumeSlicer, OrthancSlicesLoader::SliceGeometryReadyMessage>
--- a/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.h	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.h	Wed May 22 09:13:04 2019 +0200
@@ -44,13 +44,13 @@
       
     private:
       const Orthanc::ImageAccessor&  frame_;
-      OrthancStone::SliceImageQuality              imageQuality_;
+      SliceImageQuality              imageQuality_;
       const Slice&                   slice_;
 
     public:
       FrameReadyMessage(DicomSeriesVolumeSlicer& origin,
                         const Orthanc::ImageAccessor& frame,
-                        OrthancStone::SliceImageQuality imageQuality,
+                        SliceImageQuality imageQuality,
                         const Slice& slice) :
         OriginMessage(origin),
         frame_(frame),
@@ -64,7 +64,7 @@
         return frame_;
       }
 
-      OrthancStone::SliceImageQuality GetImageQuality() const
+      SliceImageQuality GetImageQuality() const
       {
         return imageQuality_;
       }
@@ -80,7 +80,7 @@
     class RendererFactory;
     
     OrthancSlicesLoader  loader_;
-    OrthancStone::SliceImageQuality    quality_;
+    SliceImageQuality    quality_;
 
   public:
     DicomSeriesVolumeSlicer(OrthancStone::MessageBroker& broker,
@@ -93,12 +93,12 @@
     void LoadFrame(const std::string& instanceId,
                    unsigned int frame);
 
-    void SetImageQuality(OrthancStone::SliceImageQuality quality)
+    void SetImageQuality(SliceImageQuality quality)
     {
       quality_ = quality;
     }
 
-    OrthancStone::SliceImageQuality GetImageQuality() const
+    SliceImageQuality GetImageQuality() const
     {
       return quality_;
     }
--- a/Framework/Deprecated/SmartLoader.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Deprecated/SmartLoader.cpp	Wed May 22 09:13:04 2019 +0200
@@ -54,8 +54,8 @@
 
       virtual ILayerRenderer* CreateRenderer() const
       {
-        bool isFull = (that_.effectiveQuality_ == OrthancStone::SliceImageQuality_FullPng ||
-                       that_.effectiveQuality_ == OrthancStone::SliceImageQuality_FullPam);
+        bool isFull = (that_.effectiveQuality_ == SliceImageQuality_FullPng ||
+                       that_.effectiveQuality_ == SliceImageQuality_FullPam);
 
         return FrameRenderer::CreateRenderer(*that_.image_, *that_.slice_, isFull);
       }
@@ -64,7 +64,7 @@
     unsigned int                    sliceIndex_;
     std::auto_ptr<Slice>            slice_;
     boost::shared_ptr<Orthanc::ImageAccessor>   image_;
-    OrthancStone::SliceImageQuality               effectiveQuality_;
+    SliceImageQuality               effectiveQuality_;
     CachedSliceStatus               status_;
 
   public:
@@ -123,7 +123,7 @@
                            OrthancApiClient& orthancApiClient) :
     IObservable(broker),
     IObserver(broker),
-    imageQuality_(OrthancStone::SliceImageQuality_FullPam),
+    imageQuality_(SliceImageQuality_FullPam),
     orthancApiClient_(orthancApiClient)
   {
   }
--- a/Framework/Deprecated/SmartLoader.h	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Deprecated/SmartLoader.h	Wed May 22 09:13:04 2019 +0200
@@ -41,7 +41,7 @@
     typedef std::map<std::string, boost::shared_ptr<IVolumeSlicer> > PreloadingInstances;
     PreloadingInstances preloadingInstances_;
 
-    OrthancStone::SliceImageQuality     imageQuality_;
+    SliceImageQuality     imageQuality_;
     OrthancApiClient&     orthancApiClient_;
 
   public:
@@ -51,7 +51,7 @@
 //    void PreloadSeries(const std::string seriesId);
     void PreloadSlice(const std::string instanceId, unsigned int frame);
 
-    void SetImageQuality(OrthancStone::SliceImageQuality imageQuality) { imageQuality_ = imageQuality; }
+    void SetImageQuality(SliceImageQuality imageQuality) { imageQuality_ = imageQuality; }
 
     void SetFrameInWidget(SliceViewerWidget& sliceViewer, size_t layerIndex, const std::string& instanceId, unsigned int frame);
 
--- a/Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp	Wed May 22 09:13:04 2019 +0200
@@ -78,7 +78,7 @@
     unsigned int       sliceIndex_;
     const Slice*       slice_;
     std::string        instanceId_;
-    OrthancStone::SliceImageQuality  quality_;
+    SliceImageQuality  quality_;
 
     Operation(Mode mode) :
       mode_(mode)
@@ -91,7 +91,7 @@
       return mode_;
     }
 
-    OrthancStone::SliceImageQuality GetQuality() const
+    SliceImageQuality GetQuality() const
     {
       assert(mode_ == Mode_LoadImage ||
              mode_ == Mode_LoadRawImage);
@@ -144,7 +144,7 @@
 
     static Operation* DownloadSliceImage(unsigned int  sliceIndex,
                                          const Slice&  slice,
-                                         OrthancStone::SliceImageQuality quality)
+                                         SliceImageQuality quality)
     {
       std::auto_ptr<Operation> tmp(new Operation(Mode_LoadImage));
       tmp->sliceIndex_ = sliceIndex;
@@ -159,7 +159,7 @@
       std::auto_ptr<Operation> tmp(new Operation(Mode_LoadRawImage));
       tmp->sliceIndex_ = sliceIndex;
       tmp->slice_ = &slice;
-      tmp->quality_ = OrthancStone::SliceImageQuality_InternalRaw;
+      tmp->quality_ = SliceImageQuality_InternalRaw;
       return tmp.release();
     }
 
@@ -778,7 +778,7 @@
         IWebService::HttpRequestErrorMessage>
           (*this, &OrthancSlicesLoader::OnSliceImageError),
       Operation::DownloadSliceImage(
-        static_cast<unsigned int>(index), slice, OrthancStone::SliceImageQuality_FullPng));
+        static_cast<unsigned int>(index), slice, SliceImageQuality_FullPng));
 }
   
   void OrthancSlicesLoader::ScheduleSliceImagePam(const Slice& slice,
@@ -814,28 +814,28 @@
         IWebService::HttpRequestErrorMessage>
           (*this, &OrthancSlicesLoader::OnSliceImageError),
       Operation::DownloadSliceImage(static_cast<unsigned int>(index), 
-                                    slice, OrthancStone::SliceImageQuality_FullPam));
+                                    slice, SliceImageQuality_FullPam));
   }
 
 
   
   void OrthancSlicesLoader::ScheduleSliceImageJpeg(const Slice& slice,
                                                    size_t index,
-                                                   OrthancStone::SliceImageQuality quality)
+                                                   SliceImageQuality quality)
   {
     unsigned int value;
     
     switch (quality)
     {
-      case OrthancStone::SliceImageQuality_Jpeg50:
+      case SliceImageQuality_Jpeg50:
         value = 50;
         break;
 
-      case OrthancStone::SliceImageQuality_Jpeg90:
+      case SliceImageQuality_Jpeg90:
         value = 90;
         break;
 
-      case OrthancStone::SliceImageQuality_Jpeg95:
+      case SliceImageQuality_Jpeg95:
         value = 95;
         break;
       
@@ -863,7 +863,7 @@
   
   
   void OrthancSlicesLoader::ScheduleLoadSliceImage(size_t index,
-                                                   OrthancStone::SliceImageQuality quality)
+                                                   SliceImageQuality quality)
   {
     if (state_ != State_GeometryReady)
     {
@@ -876,10 +876,10 @@
     {
       switch (quality)
       {
-        case OrthancStone::SliceImageQuality_FullPng:
+        case SliceImageQuality_FullPng:
           ScheduleSliceImagePng(slice, index);
           break;
-        case OrthancStone::SliceImageQuality_FullPam:
+        case SliceImageQuality_FullPam:
           ScheduleSliceImagePam(slice, index);
           break;
         default:
--- a/Framework/Deprecated/Toolbox/OrthancSlicesLoader.h	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Deprecated/Toolbox/OrthancSlicesLoader.h	Wed May 22 09:13:04 2019 +0200
@@ -48,14 +48,14 @@
       unsigned int                   sliceIndex_;
       const Slice&                   slice_;
       const Orthanc::ImageAccessor&  image_;
-      OrthancStone::SliceImageQuality  effectiveQuality_;
+      SliceImageQuality              effectiveQuality_;
 
     public:
       SliceImageReadyMessage(const OrthancSlicesLoader& origin,
                              unsigned int sliceIndex,
                              const Slice& slice,
                              const Orthanc::ImageAccessor& image,
-                             OrthancStone::SliceImageQuality effectiveQuality) :
+                             SliceImageQuality effectiveQuality) :
         OriginMessage(origin),
         sliceIndex_(sliceIndex),
         slice_(slice),
@@ -79,7 +79,7 @@
         return image_;
       }
 
-      OrthancStone::SliceImageQuality GetEffectiveQuality() const
+      SliceImageQuality GetEffectiveQuality() const
       {
         return effectiveQuality_;
       }        
@@ -93,13 +93,13 @@
     private:
       const Slice&       slice_;
       unsigned int       sliceIndex_;
-      OrthancStone::SliceImageQuality  effectiveQuality_;
+      SliceImageQuality  effectiveQuality_;
 
     public:
       SliceImageErrorMessage(const OrthancSlicesLoader& origin,
                              unsigned int sliceIndex,
                              const Slice& slice,
-                             OrthancStone::SliceImageQuality effectiveQuality) :
+                             SliceImageQuality effectiveQuality) :
         OriginMessage(origin),
         slice_(slice),
         sliceIndex_(sliceIndex),
@@ -116,7 +116,7 @@
         return slice_;
       }
 
-      OrthancStone::SliceImageQuality GetEffectiveQuality() const
+      SliceImageQuality GetEffectiveQuality() const
       {
         return effectiveQuality_;
       }        
@@ -178,7 +178,7 @@
 
     void ScheduleSliceImageJpeg(const Slice& slice,
                                 size_t index,
-                                OrthancStone::SliceImageQuality quality);
+                                SliceImageQuality quality);
 
     void SortAndFinalizeSlices();
     
@@ -204,6 +204,6 @@
                      const OrthancStone::CoordinateSystem3D& plane) const;
 
     void ScheduleLoadSliceImage(size_t index,
-                                OrthancStone::SliceImageQuality requestedQuality);
+                                SliceImageQuality requestedQuality);
   };
 }
--- a/Framework/Radiography/RadiographyDicomLayer.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographyDicomLayer.cpp	Wed May 22 09:13:04 2019 +0200
@@ -85,11 +85,11 @@
     {
       if (tmp == "MONOCHROME1")
       {
-        SetPreferredPhotomotricDisplayMode(PhotometricDisplayMode_Monochrome1);
+        SetPreferredPhotomotricDisplayMode(RadiographyPhotometricDisplayMode_Monochrome1);
       }
       else if (tmp == "MONOCHROME2")
       {
-        SetPreferredPhotomotricDisplayMode(PhotometricDisplayMode_Monochrome2);
+        SetPreferredPhotomotricDisplayMode(RadiographyPhotometricDisplayMode_Monochrome2);
       }
     }
   }
--- a/Framework/Radiography/RadiographyLayer.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographyLayer.cpp	Wed May 22 09:13:04 2019 +0200
@@ -125,7 +125,7 @@
     hasSize_(false),
     width_(0),
     height_(0),
-    prefferedPhotometricDisplayMode_(PhotometricDisplayMode_Default),
+    prefferedPhotometricDisplayMode_(RadiographyPhotometricDisplayMode_Default),
     scene_(scene)
   {
     UpdateTransform();
@@ -137,7 +137,7 @@
     UpdateTransform();
   }
 
-  void RadiographyLayer::SetPreferredPhotomotricDisplayMode(PhotometricDisplayMode  prefferedPhotometricDisplayMode)
+  void RadiographyLayer::SetPreferredPhotomotricDisplayMode(RadiographyPhotometricDisplayMode  prefferedPhotometricDisplayMode)
   {
     prefferedPhotometricDisplayMode_ = prefferedPhotometricDisplayMode;
 
@@ -349,21 +349,21 @@
     ControlPoint cp;
     switch (index)
     {
-    case ControlPoint_TopLeftCorner:
-      cp = ControlPoint(cropX, cropY, ControlPoint_TopLeftCorner);
-      break;
+      case RadiographyControlPointType_TopLeftCorner:
+        cp = ControlPoint(cropX, cropY, RadiographyControlPointType_TopLeftCorner);
+        break;
 
-    case ControlPoint_TopRightCorner:
-      cp = ControlPoint(cropX + cropWidth, cropY, ControlPoint_TopRightCorner);
-      break;
+      case RadiographyControlPointType_TopRightCorner:
+        cp = ControlPoint(cropX + cropWidth, cropY, RadiographyControlPointType_TopRightCorner);
+        break;
 
-    case ControlPoint_BottomLeftCorner:
-      cp = ControlPoint(cropX, cropY + cropHeight, ControlPoint_BottomLeftCorner);
-      break;
+      case RadiographyControlPointType_BottomLeftCorner:
+        cp = ControlPoint(cropX, cropY + cropHeight, RadiographyControlPointType_BottomLeftCorner);
+        break;
 
-    case ControlPoint_BottomRightCorner:
-      cp = ControlPoint(cropX + cropWidth, cropY + cropHeight, ControlPoint_BottomRightCorner);
-      break;
+      case RadiographyControlPointType_BottomRightCorner:
+        cp = ControlPoint(cropX + cropWidth, cropY + cropHeight, RadiographyControlPointType_BottomRightCorner);
+        break;
 
     default:
       throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
--- a/Framework/Radiography/RadiographyLayer.h	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographyLayer.h	Wed May 22 09:13:04 2019 +0200
@@ -31,6 +31,23 @@
 {
   class RadiographyScene;
 
+  enum RadiographyControlPointType
+  {
+    RadiographyControlPointType_TopLeftCorner = 0,
+    RadiographyControlPointType_TopRightCorner = 1,
+    RadiographyControlPointType_BottomRightCorner = 2,
+    RadiographyControlPointType_BottomLeftCorner = 3
+  };
+
+  enum RadiographyPhotometricDisplayMode
+  {
+    RadiographyPhotometricDisplayMode_Default,
+
+    RadiographyPhotometricDisplayMode_Monochrome1,
+    RadiographyPhotometricDisplayMode_Monochrome2
+  };
+
+  
   struct ControlPoint
   {
     double x;
@@ -196,7 +213,7 @@
     AffineTransform2D  transform_;
     AffineTransform2D  transformInverse_;
     Geometry           geometry_;
-    PhotometricDisplayMode  prefferedPhotometricDisplayMode_;
+    RadiographyPhotometricDisplayMode  prefferedPhotometricDisplayMode_;
     const RadiographyScene&   scene_;
 
   protected:
@@ -210,7 +227,7 @@
       return transformInverse_;
     }
 
-    void SetPreferredPhotomotricDisplayMode(PhotometricDisplayMode  prefferedPhotometricDisplayMode);
+    void SetPreferredPhotomotricDisplayMode(RadiographyPhotometricDisplayMode  prefferedPhotometricDisplayMode);
 
   private:
     void UpdateTransform();
@@ -325,7 +342,7 @@
     virtual bool GetDefaultWindowing(float& center,
                                      float& width) const = 0;
 
-    PhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const
+    RadiographyPhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const
     {
       return prefferedPhotometricDisplayMode_;
     }
--- a/Framework/Radiography/RadiographyLayerCropTracker.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographyLayerCropTracker.cpp	Wed May 22 09:13:04 2019 +0200
@@ -112,8 +112,8 @@
       {
         unsigned int targetX, targetWidth;
 
-        if (startControlPoint_.index == ControlPoint_TopLeftCorner ||
-            startControlPoint_.index == ControlPoint_BottomLeftCorner)
+        if (startControlPoint_.index == RadiographyControlPointType_TopLeftCorner ||
+            startControlPoint_.index == RadiographyControlPointType_BottomLeftCorner)
         {
           targetX = std::min(x, cropX_ + cropWidth_);
           targetWidth = cropX_ + cropWidth_ - targetX;
@@ -126,8 +126,8 @@
 
         unsigned int targetY, targetHeight;
 
-        if (startControlPoint_.index == ControlPoint_TopLeftCorner ||
-            startControlPoint_.index == ControlPoint_TopRightCorner)
+        if (startControlPoint_.index == RadiographyControlPointType_TopLeftCorner ||
+            startControlPoint_.index == RadiographyControlPointType_TopRightCorner)
         {
           targetY = std::min(y, cropY_ + cropHeight_);
           targetHeight = cropY_ + cropHeight_ - targetY;
--- a/Framework/Radiography/RadiographyLayerResizeTracker.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographyLayerResizeTracker.cpp	Wed May 22 09:13:04 2019 +0200
@@ -102,20 +102,20 @@
       size_t oppositeControlPointType;
       switch (startControlPoint.index)
       {
-        case ControlPoint_TopLeftCorner:
-          oppositeControlPointType = ControlPoint_BottomRightCorner;
+        case RadiographyControlPointType_TopLeftCorner:
+          oppositeControlPointType = RadiographyControlPointType_BottomRightCorner;
           break;
 
-        case ControlPoint_TopRightCorner:
-          oppositeControlPointType = ControlPoint_BottomLeftCorner;
+        case RadiographyControlPointType_TopRightCorner:
+          oppositeControlPointType = RadiographyControlPointType_BottomLeftCorner;
           break;
 
-        case ControlPoint_BottomLeftCorner:
-          oppositeControlPointType = ControlPoint_TopRightCorner;
+        case RadiographyControlPointType_BottomLeftCorner:
+          oppositeControlPointType = RadiographyControlPointType_TopRightCorner;
           break;
 
-        case ControlPoint_BottomRightCorner:
-          oppositeControlPointType = ControlPoint_TopLeftCorner;
+        case RadiographyControlPointType_BottomRightCorner:
+          oppositeControlPointType = RadiographyControlPointType_TopLeftCorner;
           break;
 
         default:
--- a/Framework/Radiography/RadiographyScene.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographyScene.cpp	Wed May 22 09:13:04 2019 +0200
@@ -172,18 +172,18 @@
     }
   }
 
-  PhotometricDisplayMode RadiographyScene::GetPreferredPhotomotricDisplayMode() const
+  RadiographyPhotometricDisplayMode RadiographyScene::GetPreferredPhotomotricDisplayMode() const
   {
     // return the mode of the first layer who "cares" about its display mode (normaly, the one and only layer that is a DicomLayer)
     for (Layers::const_iterator it = layers_.begin(); it != layers_.end(); it++)
     {
-      if (it->second->GetPreferredPhotomotricDisplayMode() != PhotometricDisplayMode_Default)
+      if (it->second->GetPreferredPhotomotricDisplayMode() != RadiographyPhotometricDisplayMode_Default)
       {
         return it->second->GetPreferredPhotomotricDisplayMode();
       }
     }
 
-    return PhotometricDisplayMode_Default;
+    return RadiographyPhotometricDisplayMode_Default;
   }
 
 
@@ -345,7 +345,7 @@
                                                      const std::string& instance,
                                                      unsigned int frame,
                                                      Deprecated::DicomFrameConverter* converter,  // takes ownership
-                                                     PhotometricDisplayMode preferredPhotometricDisplayMode,
+                                                     RadiographyPhotometricDisplayMode preferredPhotometricDisplayMode,
                                                      RadiographyLayer::Geometry* geometry)
   {
     RadiographyDicomLayer& layer = dynamic_cast<RadiographyDicomLayer&>(RegisterLayer(new RadiographyDicomLayer(IObservable::GetBroker(), *this)));
@@ -642,9 +642,9 @@
 
     createDicomRequestContent["Tags"] = dicomTags;
 
-    PhotometricDisplayMode photometricMode = GetPreferredPhotomotricDisplayMode();
-    if ((invert && photometricMode != PhotometricDisplayMode_Monochrome2) ||
-        (!invert && photometricMode == PhotometricDisplayMode_Monochrome1))
+    RadiographyPhotometricDisplayMode photometricMode = GetPreferredPhotomotricDisplayMode();
+    if ((invert && photometricMode != RadiographyPhotometricDisplayMode_Monochrome2) ||
+        (!invert && photometricMode == RadiographyPhotometricDisplayMode_Monochrome1))
     {
       createDicomRequestContent["Tags"]["PhotometricInterpretation"] = "MONOCHROME1";
     }
--- a/Framework/Radiography/RadiographyScene.h	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographyScene.h	Wed May 22 09:13:04 2019 +0200
@@ -172,7 +172,7 @@
     virtual void SetWindowing(float center,
                               float width);
 
-    PhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const;
+    RadiographyPhotometricDisplayMode GetPreferredPhotomotricDisplayMode() const;
 
     RadiographyLayer& LoadText(const Orthanc::Font& font,
                                const std::string& utf8,
@@ -194,7 +194,7 @@
                                              const std::string& instance,
                                              unsigned int frame,
                                              Deprecated::DicomFrameConverter* converter,  // takes ownership
-                                             PhotometricDisplayMode preferredPhotometricDisplayMode,
+                                             RadiographyPhotometricDisplayMode preferredPhotometricDisplayMode,
                                              RadiographyLayer::Geometry* geometry);
 
     virtual RadiographyLayer& LoadDicomFrame(Deprecated::OrthancApiClient& orthanc,
--- a/Framework/Radiography/RadiographySceneReader.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographySceneReader.cpp	Wed May 22 09:13:04 2019 +0200
@@ -33,7 +33,7 @@
 
   void RadiographySceneBuilder::Read(const Json::Value& input, Orthanc::ImageAccessor* dicomImage /* takes ownership */,
                                      Deprecated::DicomFrameConverter* dicomFrameConverter  /* takes ownership */,
-                                     PhotometricDisplayMode preferredPhotometricDisplayMode
+                                     RadiographyPhotometricDisplayMode preferredPhotometricDisplayMode
                                      )
   {
     dicomImage_.reset(dicomImage);
--- a/Framework/Radiography/RadiographySceneReader.h	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographySceneReader.h	Wed May 22 09:13:04 2019 +0200
@@ -42,8 +42,8 @@
     RadiographyScene&                               scene_;
     const Orthanc::FontRegistry*                    fontRegistry_;
     std::auto_ptr<Orthanc::ImageAccessor>           dicomImage_;
-    std::auto_ptr<Deprecated::DicomFrameConverter>              dicomFrameConverter_;
-    PhotometricDisplayMode                          preferredPhotometricDisplayMode_;
+    std::auto_ptr<Deprecated::DicomFrameConverter>  dicomFrameConverter_;
+    RadiographyPhotometricDisplayMode               preferredPhotometricDisplayMode_;
 
   public:
     RadiographySceneBuilder(RadiographyScene& scene) :
@@ -56,7 +56,7 @@
     void Read(const Json::Value& input,
               Orthanc::ImageAccessor* dicomImage, // takes ownership
               Deprecated::DicomFrameConverter* dicomFrameConverter, // takes ownership
-              PhotometricDisplayMode preferredPhotometricDisplayMode
+              RadiographyPhotometricDisplayMode preferredPhotometricDisplayMode
               );
 
     void SetFontRegistry(const Orthanc::FontRegistry& fontRegistry)
--- a/Framework/Radiography/RadiographyWidget.cpp	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/Radiography/RadiographyWidget.cpp	Wed May 22 09:13:04 2019 +0200
@@ -35,7 +35,7 @@
     // MONOCHROME1 images must be inverted and the user can invert the 
     // image, too -> XOR the two
     return (scene_->GetPreferredPhotomotricDisplayMode() == 
-      PhotometricDisplayMode_Monochrome1) ^ invert_; 
+            RadiographyPhotometricDisplayMode_Monochrome1) ^ invert_; 
   }
 
   void RadiographyWidget::RenderBackground(
@@ -46,14 +46,14 @@
 
     switch (scene_->GetPreferredPhotomotricDisplayMode())
     {
-    case PhotometricDisplayMode_Monochrome1:
-    case PhotometricDisplayMode_Default:
+    case RadiographyPhotometricDisplayMode_Monochrome1:
+    case RadiographyPhotometricDisplayMode_Default:
       if (IsInvertedInternal())
         backgroundValue = maxValue;
       else
         backgroundValue = minValue;
       break;
-    case PhotometricDisplayMode_Monochrome2:
+    case RadiographyPhotometricDisplayMode_Monochrome2:
       if (IsInvertedInternal())
         backgroundValue = minValue;
       else
--- a/Framework/StoneEnumerations.h	Wed May 22 08:54:38 2019 +0200
+++ b/Framework/StoneEnumerations.h	Wed May 22 09:13:04 2019 +0200
@@ -23,6 +23,22 @@
 
 #include <string>
 
+
+namespace Deprecated
+{
+  enum SliceImageQuality
+  {
+    SliceImageQuality_FullPng,  // smaller to transmit but longer to generate on Orthanc side (better choice when on low bandwidth)
+    SliceImageQuality_FullPam,  // bigger to transmit but faster to generate on Orthanc side (better choice when on localhost or LAN)
+    SliceImageQuality_Jpeg50,
+    SliceImageQuality_Jpeg90,
+    SliceImageQuality_Jpeg95,
+
+    SliceImageQuality_InternalRaw   // downloads the raw pixels data as they are stored in the DICOM file (internal use only)
+  };  
+}
+
+
 namespace OrthancStone
 {
   enum SliceOffsetMode
@@ -85,17 +101,6 @@
     KeyboardKeys_Down = 40
   };
 
-  enum SliceImageQuality
-  {
-    SliceImageQuality_FullPng,  // smaller to transmit but longer to generate on Orthanc side (better choice when on low bandwidth)
-    SliceImageQuality_FullPam,  // bigger to transmit but faster to generate on Orthanc side (better choice when on localhost or LAN)
-    SliceImageQuality_Jpeg50,
-    SliceImageQuality_Jpeg90,
-    SliceImageQuality_Jpeg95,
-
-    SliceImageQuality_InternalRaw   // downloads the raw pixels data as they are stored in the DICOM file (internal use only)
-  };
-
   enum SopClassUid
   {
     SopClassUid_Other,
@@ -115,23 +120,6 @@
     BitmapAnchor_TopRight
   };
 
-  enum ControlPointType
-  {
-    ControlPoint_TopLeftCorner = 0,
-    ControlPoint_TopRightCorner = 1,
-    ControlPoint_BottomRightCorner = 2,
-    ControlPoint_BottomLeftCorner = 3
-  };
-
-  enum PhotometricDisplayMode
-  {
-    PhotometricDisplayMode_Default,
-
-    PhotometricDisplayMode_Monochrome1,
-    PhotometricDisplayMode_Monochrome2
-  };
-
-  
   SopClassUid StringToSopClassUid(const std::string& source);
 
   void ComputeWindowing(float& targetCenter,