1 
2 #ifndef XRGA_H
3 #define XRGA_H
4 
5 /*
6  * This file contains resources to translate colors to/from
7  * X-Rites XRGA calibration standard. This only applies to
8  * reflective measurements from historical Gretag-Macbeth & X-Rite
9  * instruments, and current X-Rite instruments.
10  */
11 
12 /*
13  * Author:  Graeme W. Gill
14  * Date:    9/2/2016
15  * Version: 1.00
16  *
17  * Copyright 2016 Graeme W. Gill
18  * All rights reserved.
19  *
20  * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :-
21  * see the License2.txt file for licencing details.
22  */
23 
24 #ifdef __cplusplus
25 	extern "C" {
26 #endif
27 
28 typedef enum {
29 	xcalstd_nonpol = 0,	/* Unpolarized */
30 	xcalstd_pol    = 1	/* Polarized */
31 } xcalpol;
32 
33 /* Apply a conversion from one calibration standard to another to an xspect. */
34 void xspec_convert_xrga(xspect *dst, xspect *srcp, xcalpol pol, xcalstd dsp, xcalstd ssp);
35 
36 /* Apply a conversion from one calibration standard to another to an array of ipatch's */
37 void ipatch_convert_xrga(ipatch *vals, int nvals,
38                          xcalpol pol, xcalstd dsp, xcalstd ssp, int clamp);
39 
40 /* Macro returns true if a conversion is needed */
41 #define XCALSTD_NEEDED(ssp, dsp) \
42 	((ssp) != xcalstd_native && (dsp) != xcalstd_native && (dsp) != (ssp))
43 
44 #ifdef __cplusplus
45 	}
46 #endif
47 
48 #endif /* XRGA_H */
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87