comparison Core/Images/ImageProcessing.h @ 3258:6f652c7bfc85

ImageProcessing::FillPolygon
author Alain Mazy <alain@mazy.be>
date Mon, 18 Feb 2019 18:43:40 +0100
parents 53bb1f4b3844
children 59a184cbb596
comparison
equal deleted inserted replaced
3257:5d1f998b0b18 3258:6f652c7bfc85
32 32
33 33
34 #pragma once 34 #pragma once
35 35
36 #include "ImageAccessor.h" 36 #include "ImageAccessor.h"
37 #include <vector>
37 38
38 #include <stdint.h> 39 #include <stdint.h>
39 40
40 namespace Orthanc 41 namespace Orthanc
41 { 42 {
42 namespace ImageProcessing 43 namespace ImageProcessing
43 { 44 {
45 class ImagePoint
46 {
47 int32_t x_;
48 int32_t y_;
49
50 public:
51 ImagePoint(int32_t x, int32_t y)
52 : x_(x),
53 y_(y)
54 {
55 }
56
57 int32_t GetX() const {return x_;}
58 int32_t GetY() const {return y_;}
59 };
60
44 void Copy(ImageAccessor& target, 61 void Copy(ImageAccessor& target,
45 const ImageAccessor& source); 62 const ImageAccessor& source);
46 63
47 void Convert(ImageAccessor& target, 64 void Convert(ImageAccessor& target,
48 const ImageAccessor& source); 65 const ImageAccessor& source);
99 int y1, 116 int y1,
100 uint8_t red, 117 uint8_t red,
101 uint8_t green, 118 uint8_t green,
102 uint8_t blue, 119 uint8_t blue,
103 uint8_t alpha); 120 uint8_t alpha);
121
122 void FillPolygon(ImageAccessor& image,
123 const std::vector<ImagePoint>& points,
124 int64_t value);
104 } 125 }
105 } 126 }