#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
HxImageRep L_HXIMAGEREP | HxRGB2Intensity (HxImageRep im) |
Conversion of RGB to intensity. More... |
|
Conversion of RGB to intensity. The function converts an RGB image to an intensity image
00080 { 00081 HxString fname("HxRGB2Intensity"); 00082 00083 if (im.isNull()) 00084 { 00085 HxGlobalError::instance()->reportError(fname, im.name(), "null image", HxGlobalError::HX_GE_INVALID); 00086 return HxImageRep(); 00087 } 00088 if (im.signature().pixelDimensionality() != 3) 00089 { 00090 HxGlobalError::instance()->reportError(fname, "RGB to intensity conversions are only valid for Vec3 images", HxGlobalError::HX_GE_INVALID); 00091 return HxImageRep(); 00092 } 00093 00094 return im.unaryPixOp("RGB2Intensity"); 00095 } |