Mercurial > hg > orthanc-stone
comparison Framework/Radiography/RadiographyMaskLayer.h @ 480:2f6ecb5037ea am-touch-events
added mouse tracker for Layer Mask. Everything seems ok
author | am@osimis.io |
---|---|
date | Thu, 14 Feb 2019 10:18:02 +0100 |
parents | e3d316ba34ba |
children | 159a465e27bd |
comparison
equal
deleted
inserted
replaced
479:e3d316ba34ba | 480:2f6ecb5037ea |
---|---|
58 foreground_(foreground) | 58 foreground_(foreground) |
59 { | 59 { |
60 } | 60 } |
61 | 61 |
62 void SetCorners(const std::vector<MaskPoint>& corners); | 62 void SetCorners(const std::vector<MaskPoint>& corners); |
63 void SetCorner(const MaskPoint& corner, size_t index); | |
63 | 64 |
64 virtual void Render(Orthanc::ImageAccessor& buffer, | 65 virtual void Render(Orthanc::ImageAccessor& buffer, |
65 const AffineTransform2D& viewTransform, | 66 const AffineTransform2D& viewTransform, |
66 ImageInterpolation interpolation) const; | 67 ImageInterpolation interpolation) const; |
67 | 68 |
68 virtual size_t GetControlPointCount() const | 69 virtual size_t GetControlPointCount() const |
69 { | 70 { |
70 return corners_.size(); | 71 return corners_.size(); |
71 } | 72 } |
72 | 73 |
73 virtual void GetControlPointInternal(ControlPoint& controlPoint, | 74 virtual void GetControlPoint(ControlPoint& cpScene, |
74 size_t index) const | 75 size_t index) const |
75 { | 76 { |
76 controlPoint = ControlPoint(corners_[index].x, corners_[index].y, index); | 77 ControlPoint cp(corners_[index].x, corners_[index].y, index); |
78 | |
79 // transforms image coordinates into scene coordinates | |
80 GetTransform().Apply(cp.x, cp.y); | |
81 cpScene = cp; | |
77 } | 82 } |
78 | 83 |
79 virtual bool GetDefaultWindowing(float& center, | 84 virtual bool GetDefaultWindowing(float& center, |
80 float& width) const | 85 float& width) const |
81 { | 86 { |
100 | 105 |
101 return true; | 106 return true; |
102 | 107 |
103 } | 108 } |
104 | 109 |
110 virtual bool GetPixel(unsigned int& imageX, | |
111 unsigned int& imageY, | |
112 double sceneX, | |
113 double sceneY) const; | |
114 | |
105 protected: | 115 protected: |
106 virtual const AffineTransform2D& GetTransform() const; | 116 virtual const AffineTransform2D& GetTransform() const; |
107 | 117 |
108 virtual const AffineTransform2D& GetTransformInverse() const; | 118 virtual const AffineTransform2D& GetTransformInverse() const; |
109 | 119 |