Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Images/ImageProcessing.h @ 4872:b1556cefa5c6
reimplementation from scratch of ImageProcessing::FillPolygon()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 17 Jan 2022 21:11:40 +0100 |
parents | 43e613a7756b |
children | dfbe764995cf |
comparison
equal
deleted
inserted
replaced
4871:55469ccfb384 | 4872:b1556cefa5c6 |
---|---|
62 double GetDistanceToLine(double a, | 62 double GetDistanceToLine(double a, |
63 double b, | 63 double b, |
64 double c) const; // where ax + by + c = 0 is the equation of the line | 64 double c) const; // where ax + by + c = 0 is the equation of the line |
65 }; | 65 }; |
66 | 66 |
67 class ORTHANC_PUBLIC IPolygonFiller : public boost::noncopyable | |
68 { | |
69 public: | |
70 virtual ~IPolygonFiller() | |
71 { | |
72 } | |
73 | |
74 virtual void Fill(int y, | |
75 int x1, | |
76 int x2) = 0; | |
77 }; | |
78 | |
67 static void Copy(ImageAccessor& target, | 79 static void Copy(ImageAccessor& target, |
68 const ImageAccessor& source); | 80 const ImageAccessor& source); |
69 | 81 |
70 static void Convert(ImageAccessor& target, | 82 static void Convert(ImageAccessor& target, |
71 const ImageAccessor& source); | 83 const ImageAccessor& source); |
158 uint8_t red, | 170 uint8_t red, |
159 uint8_t green, | 171 uint8_t green, |
160 uint8_t blue, | 172 uint8_t blue, |
161 uint8_t alpha); | 173 uint8_t alpha); |
162 | 174 |
175 static void FillPolygon(IPolygonFiller& filler, | |
176 const std::vector<ImagePoint>& points); | |
177 | |
163 static void FillPolygon(ImageAccessor& image, | 178 static void FillPolygon(ImageAccessor& image, |
164 const std::vector<ImagePoint>& points, | 179 const std::vector<ImagePoint>& points, |
165 int64_t value); | 180 int64_t value); |
166 | 181 |
167 static void Resize(ImageAccessor& target, | 182 static void Resize(ImageAccessor& target, |