diff Framework/Radiography/RadiographyAlphaLayer.h @ 1200:54cbffabdc45 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 Nov 2019 11:03:41 +0100
parents b537002f83a9 a5f2a6b04a31
children 68579a31eeb4
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyAlphaLayer.h	Thu Nov 28 17:13:33 2019 +0100
+++ b/Framework/Radiography/RadiographyAlphaLayer.h	Fri Nov 29 11:03:41 2019 +0100
@@ -33,14 +33,12 @@
   class RadiographyAlphaLayer : public RadiographyLayer
   {
   private:
-    std::auto_ptr<Orthanc::ImageAccessor>  alpha_;      // Grayscale8
-    bool                                   useWindowing_;
-    float                                  foreground_;
+    std::auto_ptr<Orthanc::ImageAccessor>  alpha_;       // Grayscale8 in the range [0, 255]  0 = transparent, 255 = opaque -> the foreground value will be displayed
+    float                                  foreground_;  // in the range [0.0, 65535.0]
 
   public:
     RadiographyAlphaLayer(const RadiographyScene& scene) :
       RadiographyLayer(scene),
-      useWindowing_(true),
       foreground_(0)
     {
     }
@@ -48,7 +46,6 @@
 
     void SetForegroundValue(float foreground)
     {
-      useWindowing_ = false;
       foreground_ = foreground;
     }
 
@@ -57,11 +54,6 @@
       return foreground_;
     }
 
-    bool IsUsingWindowing() const
-    {
-      return useWindowing_;
-    }
-
     void SetAlpha(Orthanc::ImageAccessor* image);
 
     virtual bool GetDefaultWindowing(float& center,
@@ -73,7 +65,10 @@
 
     virtual void Render(Orthanc::ImageAccessor& buffer,
                         const AffineTransform2D& viewTransform,
-                        ImageInterpolation interpolation) const;
+                        ImageInterpolation interpolation,
+                        float windowCenter,
+                        float windowWidth,
+                        bool applyWindowing) const;
 
     virtual bool GetRange(float& minValue,
                           float& maxValue) const;