comparison OrthancFramework/Sources/Images/ImageProcessing.h @ 4300:b30a8de92ad9

abi continued
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Nov 2020 19:33:18 +0100
parents bf7b9edf6b81
children d9473bd5ed43
comparison
equal deleted inserted replaced
4299:3f85db78c441 4300:b30a8de92ad9
35 class ORTHANC_PUBLIC ImageProcessing : public boost::noncopyable 35 class ORTHANC_PUBLIC ImageProcessing : public boost::noncopyable
36 { 36 {
37 public: 37 public:
38 class ORTHANC_PUBLIC ImagePoint 38 class ORTHANC_PUBLIC ImagePoint
39 { 39 {
40 private:
40 int32_t x_; 41 int32_t x_;
41 int32_t y_; 42 int32_t y_;
42 43
43 public: 44 public:
44 ImagePoint(int32_t x, 45 ImagePoint(int32_t x,
45 int32_t y) : 46 int32_t y);
46 x_(x), 47
47 y_(y) 48 int32_t GetX() const;
48 { 49
49 } 50 int32_t GetY() const;
50 51
51 int32_t GetX() const 52 void Set(int32_t x, int32_t y);
52 { 53
53 return x_; 54 void ClipTo(int32_t minX,
54 } 55 int32_t maxX,
55 56 int32_t minY,
56 int32_t GetY() const 57 int32_t maxY);
57 {
58 return y_;
59 }
60
61 void Set(int32_t x, int32_t y)
62 {
63 x_ = x;
64 y_ = y;
65 }
66
67 void ClipTo(int32_t minX, int32_t maxX, int32_t minY, int32_t maxY);
68 58
69 double GetDistanceTo(const ImagePoint& other) const; 59 double GetDistanceTo(const ImagePoint& other) const;
70 60
71 double GetDistanceToLine(double a, double b, double c) const; // where ax + by + c = 0 is the equation of the line 61 double GetDistanceToLine(double a,
62 double b,
63 double c) const; // where ax + by + c = 0 is the equation of the line
72 }; 64 };
73 65
74 static void Copy(ImageAccessor& target, 66 static void Copy(ImageAccessor& target,
75 const ImageAccessor& source); 67 const ImageAccessor& source);
76 68