FLImaging 7.10.21.1
FLImageDisplayUtilities.h
1#pragma once
2#include "FLPoint.h"
3
9
11namespace FLImaging
12{
14 namespace Foundation
15 {
16 typedef struct FL_EXPORT sColorSequenceInfo
17 {
18 public:
19 sColorSequenceInfo();
20 ~sColorSequenceInfo();
21 void Assign(int32_t i32Channels);
22 bool IsRGB();
23 bool IsYCbCr();
24 bool IsCMYK();
25 bool IsHSV();
26 bool IsLab();
27 bool IsHSI();
28 bool IsHSL();
29 bool IsLCh();
30 bool IsOk_Lab();
31 bool IsOk_LCh();
32
33 public:
34 int32_t i32Channels;
35 Base::EColorSequence eColorSequence;
36 int32_t* pI32Index;
37 }SColorSequenceInfo;
38
79 struct FL_EXPORT sBufferFormat
80 {
81 sBufferFormat();
82 sBufferFormat(bool _bAlignToDword, bool _bBGR, bool _bBottomUp);
83 bool bAlignToDword;
84 bool bBGR;
85 bool bBottomUp;
86 };
87
88 typedef struct sBufferFormat SBufferFormat;
89
100 {
101 public:
110
111 static CFLImageDisplayUtilities* GetObject();
112 static bool Initialize();
113 static bool IsInitialized();
114
124 static uint8_t* GetFloatTable();
125
135 static uint32_t* GetIntensitySpectrumTable();
136
160 static uint32_t* GetSegmentationColorTable();
161
189 static int64_t GetAlignedRowStrideBytes(int64_t i64Width, int64_t i64Channel);
190
206 static const CResult GetRangeOfFloatImage(const Base::CFLImage* pFliSrc,
207 double& f64MinVal,
208 double& f64MaxVal);
262 static const CResult ConvertFLImageToBuffer(const Base::CFLImage* pFliSrc,
263 uint8_t* pDstBuffer,
264 int64_t i64DstWidth,
265 int64_t i64DstHeight,
266 const Foundation::CFLPoint<double>* pFlpOffset = nullptr,
267 double f64ScaleX = 1.,
268 double f64ScaleY = 1.,
269 double f64MinVal = 0.,
270 double f64MaxVal = 1.,
271 bool bSegmentationWithColor = false,
272 bool bReductionInterpolation = false,
273 const SBufferFormat& sFormat = SBufferFormat());
274
275 static const CResult ConvertFLImageToBuffer(const Base::CFLImage& fliSrc,
276 uint8_t* pDstBuffer,
277 int64_t i64DstWidth,
278 int64_t i64DstHeight,
279 const Foundation::CFLPoint<double>* pFlpOffset = nullptr,
280 double f64ScaleX = 1.,
281 double f64ScaleY = 1.,
282 double f64MinVal = 0.,
283 double f64MaxVal = 1.,
284 bool bSegmentationWithColor = false,
285 bool bReductionInterpolation = false,
286 const SBufferFormat& sFormat = SBufferFormat());
287
288 static bool IsColorSequence(const Base::CFLImage* pFli);
289 static void GetColorSequenceInfo(SColorSequenceInfo& sCSI, const Base::CFLImage* pFliImage);
290
291 protected:
292 volatile bool m_bInitialized;
293 };
294 }
295}
FLIMaging's image class.
Definition FLImagingBase/FLImage.h:35
FLImaging module execution result object.
Definition FLImagingBase/ResultsDef.h:1712
static uint32_t * GetIntensitySpectrumTable()
Retrieve the color spectrum lookup table used for visualizing intensity values.
static const CResult ConvertFLImageToBuffer(const Base::CFLImage *pFliSrc, uint8_t *pDstBuffer, int64_t i64DstWidth, int64_t i64DstHeight, const Foundation::CFLPoint< double > *pFlpOffset=nullptr, double f64ScaleX=1., double f64ScaleY=1., double f64MinVal=0., double f64MaxVal=1., bool bSegmentationWithColor=false, bool bReductionInterpolation=false, const SBufferFormat &sFormat=SBufferFormat())
Converts a CFLImage into a display-ready pixel buffer.
static int64_t GetAlignedRowStrideBytes(int64_t i64Width, int64_t i64Channel)
Computes the byte stride (row size in bytes) for an image row, applying 4-byte (DWORD) alignment as u...
static uint32_t * GetSegmentationColorTable()
Returns the predefined segmentation-color lookup table.
static const CResult GetRangeOfFloatImage(const Base::CFLImage *pFliSrc, double &f64MinVal, double &f64MaxVal)
Compute the minimum and maximum pixel values of a floating-point image.
static uint8_t * GetFloatTable()
Retrieve the lookup table used to map floating-point pixel values (0.0–1.0) to 8-bit intensity.
A class representing a point.
Definition FLImagingFoundation/FLPoint.h:24
Definition FLImagingFoundation/AlgorithmBase.h:16
@ Assign
Set the value of CGUIPropertyItemView3DFigure to the specified figure.
Definition FLImagingGUICLR/DefinitionsGUIView3D.h:3539
Specifies the output buffer layout for displaying or exporting an FLImage.
Definition FLImageDisplayUtilities.h:80