Hi Sander,
Sorry for the late answer. Of course you can. Assuming that img is a RGB color image in the code below:
Generic2DImage<P> img;
// ...
RGBColorSystem::sample r, g, b;
Point pos;
P::FromSample( r, img.Pixel( pos, 0 ) );
P::FromSample( g, img.Pixel( pos, 1 ) );
P::FromSample( b, img.Pixel( pos, 2 ) );
// Nonlinear luminance (CIE L* component)
RGBColorSystem::sample L = img.RGBWorkingSpace().CIEL( r, g, b );
// Linear (as long as gamma=1) luminance (CIE Y component)
RGBColorSystem::sample Y = img.RGBWorkingSpace().CIEY( r, g, b );
// Color saturation in the HSV color ordering system
RGBColorSystem::sample Sv = RGBColorSystem::HSVSaturation( r, g, b );
// Color saturation in the HSI color ordering system
RGBColorSystem::sample Si = RGBColorSystem::HSISaturation( r, g, b );
Note that HSVSaturation() and HSISaturation() are both static member functions of RGBColorSystem, so their calculation does not depend on a particular RGB working space, as is the case for CIE components. This is because HSV and HSI are not color spaces (in the strict colorimetric sense defined by PI/PCL) but just color ordering systems, or different representations of the RGB color cube.
The S curve in CurvesTransformation corresponds to the S element of HSV. As an alternative, you can use the CIE c* component, which also represents color saturation (the c curve of CurvesTransformation) with a strict colorimetric basis.