Core Optical, Inc.
ColorimetricConverter ConvertXYZtoIPT Method Industrial Strength, Scientific Grade
Transforms source data in-place from CIE XYZ space to Image-Processing Transform / Intensity-Protan-Tritan (IPT) color space.

Namespace: PrecisionImage.Colorimetry
Assembly: PrecisionImage (in PrecisionImage.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax

public void ConvertXYZtoIPT(
	SourceData dataSource
)

Parameters

dataSource
Type: PrecisionImage SourceData
A SourceData object encapsulating the image data to be converted.
Exceptions

Remarks

This method transforms the source data from CIE XYZ space to Intensity-Protan-Tritan (IPT) color space. XYZ values must be stored in channels 0, 1 and 2 respectively. IPT output values are stored in-place in channels 0, 1 and 2. To guarantee an invertable result, output values are not clamped to any arbitrary range and are stored as-is. The dataSource object must contain at least 3 channels or an OnlineArgumentOutOfRangeException exception will result.
Examples

The following converts the image data from Linear RGB to CIE XYZ, and then from CIE XYZ to IPT space.
using PrecisionImage;
using PrecisionImage.Colorimetry;

// Instantiate the SourceData object. "MyBitmapSource" is an rgb image with no alpha channel: 
SourceData imageData = new SourceData(MyBitmapSource);

// Instantiate the ColorimetricConverter object: 
ColorimetricConverter colorConverter = new ColorimetricConverter();

// Image data is currently in linear RGB space. Transform to CIE XYZ in-place (imageData must have exactly 3 channels 
// or exception will result), and then from XYZ to IPT (in-place):
colorConverter.ConvertLinearRGBtoXYZ(imageData);
colorConverter.ConvertXYZtoIPT(imageData);

// Assume some processing on one or more of the IPT channels:
.
.
.
// After channel processing, transform IPT values back to linear RGB (in-place):
colorConverter.ConvertIPTtoXYZ(imageData);
colorConverter.ConvertXYZtoLinearRGB(imageData);
See Also