Gamut mapping in WCS is established at color transform creation time, rather than at profile creation time. And, while our baseline gamut mapping methods each implement a different gamut mapping algorithm, there are some operations that are common to all of them. So, here I'll describe those commonalities, before going into the individual gamut mapping algorithms in following posts.
All gamut mapping operations in WCS are performed between explicit gamut boundary descriptions (GBDs) in our color appearance model (CAM) space. This space based on CIECAM02. For each device or color space involved in a color transform we construct a GBD. A GBD may consist of one or two gamut shells: a "reference shell", and for some devices a "plausible shell".
A GBD shell is represented as an indexed vertex list of the (possibly convex) hull of the device gamut. The indexed vertex list is stored in CIECAM02 Jab. The structure of the indexed vertex list is optimized for hardware acceleration by DirectX. This approach has many well known solutions (search for "convex hull DirectX" on the web and you get well over 100 hits).
For output devices (displays and printers) we only need to create one shell, the "reference shell". This is because characterization targets can fully span the device space for output devices. For printers we wrap a convex hull around the measurement sample points. For additive RGB devices, we warp the surface of the RGB color cube into the color appearance space and use that.
For virtual RGB devices (i.e. sRGB, wcsRGB) we may or may not have device sample values provided. When the measurement values are available, we generate the reference shell as for output devices. If not, then we warp the surface of a color cube for device values in the range [0.0 .. 1.0] into the color appearance space and use that. For input devices (cameras and scanners), where a calibration target may not entirely span the device color space, we create a reference shell and a "plausible shell". The reference shell is just a convex hull around the measurement samples used to initialize the input device model. We then use that device model itself to extrapolate color values for the full device color range. Those extrapolated color values are wrapped with a convex hull to form the plausible shell. Typically, our baseline gamut mapping models apply different gamut mapping in the region between the reference and plausible shells than is used within the reference shell itself.
Given a source and a destination GBD (these may be just be adjacent stages in a longer transform sequence) the first operation performed in our baseline gamut mapping models is to adjust both the source and destination GBDs so that their neutral axes align with the neutral axis of the CAM space. Here is an illustration of that adjustment on a particular hue slice in CAM space:
This neutral axis mapping is used during gamut mapping in the following fashion: Each color in the source color data set is converted into CAM space using the source device model and the viewing condition parameters supplied in the source color appearance model profile (CAMP). That color in CAM space is then adjusted using the source neutral axis alignment adjustment at its lighness level on its CAM hue "leaf". Next, the gamut mapping model specified in the gamut mapping model profile is applied to map the color from the adjusted source gamut into the adjusted destination gamut. Then, the inverse of the destination neutral axis alignment adjustment is applied to the gamut mapped color to yield the output color in CAM space. And Finally, the destination-side CAMP and device model are used to convert the color from CAM space to the destination color space.
I will go into the individual WCS baseline gamut mapping models in subsequent postings in this series.