Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
IccArrayBasic.h
Go to the documentation of this file.
1/** @file
2 File: IccArrayBasic.h
3
4 Contains: Header for implementation of basic IccArray handlers
5
6 Version: V1
7
8 Copyright: � see ICC Software License
9*/
10
11/*
12 * The ICC Software License, Version 0.2
13 *
14 *
15 * Copyright (c) 2003-2012 The International Color Consortium. All rights
16 * reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 *
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 *
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in
27 * the documentation and/or other materials provided with the
28 * distribution.
29 *
30 * 3. In the absence of prior written permission, the names "ICC" and "The
31 * International Color Consortium" must not be used to imply that the
32 * ICC organization endorses or promotes products derived from this
33 * software.
34 *
35 *
36 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
40 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47 * SUCH DAMAGE.
48 * ====================================================================
49 *
50 * This software consists of voluntary contributions made by many
51 * individuals on behalf of the The International Color Consortium.
52 *
53 *
54 * Membership in the ICC is encouraged when this software is used for
55 * commercial purposes.
56 *
57 *
58 * For more information on The International Color Consortium, please
59 * see <http://www.color.org/>.
60 *
61 *
62 */
63
64//////////////////////////////////////////////////////////////////////
65// HISTORY:
66//
67// -Initial implementation by Max Derhak 7-27-2011
68//
69//////////////////////////////////////////////////////////////////////
70
71#if !defined(_ICCTARRAYBASIC_H)
72#define _ICCTARRAYBASIC_H
73
74#include <list>
75#include <string>
76#include <map>
77#include "IccDefs.h"
78#include "IccTagComposite.h"
79#ifdef USEREFICCMAXNAMESPACE
80namespace refIccMAX {
81#endif
82
83/**
84****************************************************************************
85* Class: CIccArrayUnknown
86*
87* Purpose: The Unknown array handler
88*****************************************************************************
89*/
91{
92public:
93 CIccArrayUnknown(CIccTagArray *pTagArray = NULL, icArraySignature sigArray = (icArraySignature)0);
94 virtual ~CIccArrayUnknown();
95 virtual IIccArray* NewCopy(CIccTagArray *pTagArray) const;
96
97 virtual void Describe(std::string &sDescription, int nVerboseness) const;
98
99 virtual const icChar *GetClassName() const { return "CIccArrayUnknown"; }
100
101 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile* pProfile=NULL) const;
102
103protected:
106
107};
108
109/**
110****************************************************************************
111* Class: CIccArrayColorantInfo
112*
113* Purpose: The ColorantInfo array handler
114*****************************************************************************
115*/
117{
118public:
119 CIccArrayColorantInfo(CIccTagArray *pTagArray = NULL);
120 virtual ~CIccArrayColorantInfo();
121 virtual IIccArray* NewCopy(CIccTagArray *pTagArray) const;
122
123 virtual void Describe(std::string &sDescription, int nVerboseness) const;
124
125 virtual const icChar *GetClassName() const { return "CIccArrayColorantInfo"; }
126
127 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile* pProfile = NULL) const;
128
129};
130
131
133
134typedef std::map<std::string, CIccStructNamedColor*> icNamedColorStructList;
135
136/**
137****************************************************************************
138* Class: CIccArrayNamedColor
139*
140* Purpose: The Named Color array handler
141*****************************************************************************
142*/
144{
145public:
146 CIccArrayNamedColor(CIccTagArray *pTagArray=NULL);
147 virtual ~CIccArrayNamedColor();
148 virtual IIccArray* NewCopy(CIccTagArray *pTagArray) const;
149
150 virtual void Describe(std::string &sDescription, int nVerboseness) const;
151
152 virtual const icChar *GetClassName() const { return "CIccArrayNamedColor"; }
153
154 void SetColorSpaces(icColorSpaceSignature csPcs, icColorSpaceSignature csDevice,
156 const icSpectralRange *pSpectralRange = NULL,
157 const icSpectralRange *pBiSPectralRange = NULL);
158
159 icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile* pProfile=NULL) const;
160
161 bool Begin();
162
163 CIccStructNamedColor* FindColor(const icChar *szColor) const;
164 CIccStructNamedColor* FindDeviceColor(const icFloatNumber *pDevColor) const;
165 CIccStructNamedColor* FindPcsColor(const icFloatNumber *pPCS, icFloatNumber dMinDE=1000.0) const;
166 CIccStructNamedColor* FindSpectralColor(const icFloatNumber *pSpec, icFloatNumber dMinRms=1000.0) const;
167
168 bool GetDeviceTint(icFloatNumber *dstColor,
169 const CIccStructNamedColor *pColor,
170 icFloatNumber tint=1.0f,
172 bool GetPcsTint(icFloatNumber *dstColor,
173 const CIccStructNamedColor *pColor,
174 icFloatNumber tint=1.0f,
176 bool GetSpectralTint(icFloatNumber *dstColor,
177 const CIccStructNamedColor *pColor,
178 icFloatNumber tint=1.0f,
180
181 icUInt32Number GetDeviceSamples() { return m_nDeviceSamples; }
182 icUInt32Number GetPcsSamples() { return m_nPcsSamples; }
183 icUInt32Number GetSpectralSamples() { return m_nSpectralSamples; }
184
185protected:
186 bool GetTint(icFloatNumber *dstColor,
187 CIccTagNumArray *pZero,
188 CIccTagNumArray *pData,
189 CIccTagNumArray *pTint,
190 icFloatNumber tint,
191 icUInt32Number nSamples);
192
198
200
202
206};
207
208
209
210#ifdef USEREFICCMAXNAMESPACE
211} //namespace refIccMAX
212#endif
213
214#endif // !defined(_ICCARRAYBASIC_H)
std::map< std::string, CIccStructNamedColor * > icNamedColorStructList
icArraySignature sig
File: IccDefs.h
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
char icChar
Definition IccDefs.h:109
icValidateStatus
Definition IccDefs.h:118
#define ICCPROFLIB_API
File: IccTagComposite.h.
unsigned int icUInt32Number
Class: CIccArrayColorantInfo.
virtual const icChar * GetClassName() const
Class: CIccArrayNamedColor.
icColorSpaceSignature m_csDevice
icSpectralColorSignature m_csSpectralPcs
icNamedColorStructList * m_list
CIccStructNamedColor * m_pZeroTint
bool GetTint(icFloatNumber *dstColor, CIccTagNumArray *pZero, CIccTagNumArray *pData, CIccTagNumArray *pTint, icFloatNumber tint, icUInt32Number nSamples)
icUInt32Number m_nSpectralSamples
icUInt32Number m_nPcsSamples
icUInt32Number GetPcsSamples()
icSpectralRange m_spectralRange
icUInt32Number GetDeviceSamples()
icUInt32Number m_nDeviceSamples
icUInt32Number GetSpectralSamples()
icColorSpaceSignature m_csPcs
icSpectralRange m_biSpectralRange
virtual const icChar * GetClassName() const
Class: CIccArrayUnknown.
CIccTagArray * m_pTag
icArraySignature m_sig
virtual const icChar * GetClassName() const
Class: CIccStructNamedColor.
Class: CIccTagArray.
Class: CIccTagNumArray.
Class: IIccArray.
icColorSpaceSignature
Color Space Signatures.
icNamedColorlMemberSignature
NamedColorStructure (icSigNamedColorStruct) Member Tag signatures.
@ icSigNmclPcsDataMbr
@ icSigNmclDeviceDataMbr
@ icSigNmclSpectralDataMbr
icSpectralColorSignature
icSpectralColorSignature enumerations
@ icSigNoSpectralData
icArraySignature
Tag Array type signatures.
spectral range