diff Framework/Radiography/RadiographyMaskLayer.h @ 476:a95090305dd4 am-touch-events

Introduced ControlPoint instead of Corner in the trackers and layers + drawing mask from the ControlPoints
author am@osimis.io
date Wed, 13 Feb 2019 12:04:02 +0100
parents 3c28542229a3
children e3d316ba34ba
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyMaskLayer.h	Tue Feb 12 12:22:13 2019 +0100
+++ b/Framework/Radiography/RadiographyMaskLayer.h	Wed Feb 13 12:04:02 2019 +0100
@@ -65,6 +65,17 @@
                         const AffineTransform2D& viewTransform,
                         ImageInterpolation interpolation) const;
 
+    virtual size_t GetControlPointCount() const
+    {
+      return corners_.size();
+    }
+
+    virtual void GetControlPointInternal(ControlPoint& controlPoint,
+                                         size_t index) const
+    {
+      controlPoint = ControlPoint(corners_[index].x, corners_[index].y, index);
+    }
+
     virtual bool GetDefaultWindowing(float& center,
                                      float& width) const
     {
@@ -91,7 +102,15 @@
 
     }
 
+  protected:
+    virtual const AffineTransform2D& GetTransform() const;
+
+    virtual const AffineTransform2D& GetTransformInverse() const;
+
+
   private:
     void DrawMask() const;
+    void DrawLine(const MaskPoint& start, const MaskPoint& end) const;
+
   };
 }