aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/Helpers/ResourceHelper.cs
blob: 7a861f89f1f2eaa4f8dba2f0e334a634318c151c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef _COLORTABLE_H_
#define _COLORTABLE_H_

#include "C_RGB_XYZ_Lab.h"
#include "ColorSpace.pb-c.h"
#include "ColorTransf.h"
#include "CT_Header.h"
#include "GBD.h"
#include "Curves.h"
#include "ForwardModel.h"

typedef enum {
	A2B,
	A2BR,
	B2A,
	B2AR,
	cprt,
	gbd,
	gbdR,
	wtpt,
	desc,
	lcrv,
	lcrR,
	FMCo,
	FMCR
}TagList;
class  ColorTable {
public:
	ColorTable();
	~ColorTable();
	void InitColorTables(bool has_rddata, uint8_t *data, int nprocessranges);

	int  GetnB2AnSepIn( ){
() { return(m_nB2AnSepOut); }; int GetnA2BnSepIn() { return(m_nA2BnSepIn); }; int GetnA2BnSepOut() { return(m_nA2BnSepOut); }; int GetnGamutRegions() { return(m_nGamutRegions); }; double *GetNormFactor() { return(m_NormFactor); }; double *GetInverseNormFactor() { return(m_InvNormFactor); }; double *GetNormGamutRegionMaxLim() { return(m_NormGamutRegionMaxLim); }; double *GetGamutRegionMaxLim() { return(m_GamutRegionMaxLim); }; double *GetGamutRegionMinLim() { return(m_GamutRegionMinLim); }; double *GetCTLiquidFactors() { return(m_CTLiquidFactors); }; C_RGB_XYZ_Lab GetWhitePoint_CT() { return(m_whitepointXYZ_CT); }; ForwardModel *GetForwardModel() { return(m_forwardmodel); }; int GetTableVersion() { return(m_TableVersion); }; int GetTableSubVersion() { return(m_TableSubVersion); }; ColorTransf *m_B2ATransform; ColorTransf *m_A2BTransform; ColorTransf *m_B2ARTransform; ColorTransf *m_A2BRTransform; GBD *m_GBD; GBD *m_GBDR; Curves *m_LinCurves; Curves *m_LinCurvesR; ForwardModel *m_forwardmodel; ForwardModel *m_forwardmodelR; private: void readColorTables(bool has_rddata, uint8_t *data, int nprocessranges); void SetNormFactor(); void SetInverseNormFactor(); void NormGamutRegionMaxLim(); int m_nB2AnSepIn; int m_nB2AnSepOut; int m_nA2BnSepIn; int m_nA2BnSepOut; int m_nGamutRegions; int m_nProcessRanges; int m_TableVersion; int m_TableSubVersion; double *m_NormFactor; double *m_InvNormFactor; double *m_GamutRegionMaxLim; double *m_GamutRegionMinLim; double*m_NormGamutRegionMaxLim; double *m_CTLiquidFactors; C_RGB_XYZ_Lab m_whitepointXYZ_CT; void SetnB2AnSepIn(int nB2AnSepIn) { m_nB2AnSepIn = nB2AnSepIn; }; void SetnB2AnSepOut(int nB2AnSepOut) { m_nB2AnSepOut = nB2AnSepOut; }; void SetnA2BnSepIn(int nA2BnSepIn) { m_nA2BnSepIn = nA2BnSepIn; }; void SetnA2BnSepOut(int nA2BnSepOut) { m_nA2BnSepOut = nA2BnSepOut; }; void SetnGamutRegions(int nGamutRegions) { m_nGamutRegions = nGamutRegions; }; void SetTableVersion(int TableVersion) { m_TableVersion = TableVersion; }; void SetTableSubVersion(int TableSubVersion) { m_TableSubVersion = TableSubVersion; }; CT_Header *read_header(uint8_t* data, int &bytesread); void read_xyz_type(int offset, int data_size, C_RGB_XYZ_Lab *xyz, uint8_t *data); void read_text_type(int offset, int data_size, std::string *textstr, uint8_t *data); void read_text_description_type(int offset, int data_size, std::string *textdescstr, uint8_t *data); }; #endif