ddt 1.4.0
 
Loading...
Searching...
No Matches
ddtCPLImageGraphicsItem.hpp
Go to the documentation of this file.
1
11
12#ifndef DDT_DATAVISUALISATION_DDTWIDGETS_CPL_IMAGE_GRAPHICSITEM_HPP
13#define DDT_DATAVISUALISATION_DDTWIDGETS_CPL_IMAGE_GRAPHICSITEM_HPP
14
16#include "ddt/imageColor.hpp"
17
18#include <cpl.h>
19
24 public:
29
34 explicit DdtCPLImageGraphicsItem(cpl_image* const in_image);
35
42 DdtCPLImageGraphicsItem(cpl_image* const in_image,
43 ddt::colorMap_t* const color_map,
44 ddt::scalingLut_t* scaling_lut);
45
53 DdtCPLImageGraphicsItem(cpl_image* const in_image,
54 ddt::colorMapARGB_t* const color_map,
55 ddt::scalingLut_t* scaling_lut);
56
61
66 QRectF boundingRect() const override;
67
74 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
75 QWidget* widget) override;
76
81 virtual QImage* GetImage() override;
82
88 enum { ITEM_TYPE = 66036 };
89
94 int type() const override;
95
96 protected:
100 cpl_image* cimage;
101
105 QImage* qimage;
106
107 private:
108 int width;
109 int height;
110
114 void Init();
115
120 void LoadImageGrayColor(cpl_image* const in_image);
121
127 void LoadImageGrayColorInt(cpl_image* const in_image);
128
134 void LoadImageGrayColorFloat(cpl_image* const in_image);
135
141 void LoadImageGrayColorDouble(cpl_image* const in_image);
142
149 void LoadImageColor(const cpl_image* const in_image,
150 ddt::colorMap_t* color_map,
151 ddt::scalingLut_t* scaling_lut);
152
159 void LoadImageColor(const cpl_image* const in_image,
160 ddt::colorMapARGB_t* const color_map,
161 ddt::scalingLut_t* const scaling_lut);
162
170 void LoadImageColorInt(cpl_image* const in_image,
171 ddt::colorMap_t* const color_map,
172 ddt::scalingLut_t* const scaling_lut);
173
181 void LoadImageColorInt(cpl_image* const in_image,
182 ddt::colorMapARGB_t* const color_map,
183 ddt::scalingLut_t* const scaling_lut);
184
192 void LoadImageColorFloat(cpl_image* const in_image,
193 ddt::colorMap_t* const color_map,
194 ddt::scalingLut_t* const scaling_lut);
195
203 void LoadImageColorFloat(cpl_image* const in_image,
204 ddt::colorMapARGB_t* const color_map,
205 ddt::scalingLut_t* const scaling_lut);
206
214 void LoadImageColorDouble(cpl_image* const in_image,
215 ddt::colorMap_t* const color_map,
216 ddt::scalingLut_t* const scaling_lut);
217
225 void LoadImageColorDouble(cpl_image* const in_image,
226 ddt::colorMapARGB_t* const color_map,
227 ddt::scalingLut_t* const scaling_lut);
228
232 std::vector<unsigned int> GetRgbVectorGray() const;
233
237 std::vector<unsigned int> GetRgbVectorColor(
238 ddt::colorMap_t* const color_map) const;
239
244 void CreateImageAndPixvalRange(const cpl_image* const in_image,
245 double* const min_pixval,
246 double* const pixval_range);
247
252 void CreateImageAndScalingFactors(const cpl_image* const in_image,
253 const ddt::scalingLut_t* const scaling_lut,
254 double* const offset, double* const factor);
255
259 void CreateImage(const cpl_image* const in_image);
260};
261
262#endif // DDT_DATAVISUALISATION_DDTWIDGETS_CPL_IMAGE_GRAPHICSITEM_HPP
virtual ~DdtCPLImageGraphicsItem()
Definition ddtCPLImageGraphicsItem.cpp:68
virtual QImage * GetImage() override
Definition ddtCPLImageGraphicsItem.cpp:94
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition ddtCPLImageGraphicsItem.cpp:86
int type() const override
Definition ddtCPLImageGraphicsItem.cpp:81
@ ITEM_TYPE
Definition ddtCPLImageGraphicsItem.hpp:88
cpl_image * cimage
Definition ddtCPLImageGraphicsItem.hpp:100
QImage * qimage
Definition ddtCPLImageGraphicsItem.hpp:105
QRectF boundingRect() const override
Definition ddtCPLImageGraphicsItem.cpp:76
DdtCPLImageGraphicsItem()
Definition ddtCPLImageGraphicsItem.cpp:21
DdtImageGraphicsItem()
Definition ddtImageGraphicsItem.cpp:12
DDT Widgets. Class for Image Graphics Items. Class derived from QGraphicsItem. Base class for all typ...
Image Color class, offers access to color map related functions. This file is part of the DDT Image H...
std::array< std::array< float, COLOR_MAP_ENTRY_SIZE >, MAX_COLOR_MAP_ENTRIES > colorMap_t
Definition imageColor.hpp:48
std::array< unsigned int, MAX_COLOR_MAP_ENTRIES > colorMapARGB_t
Definition imageColor.hpp:58
Definition imageColor.hpp:68