Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxRGB2Intensity.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxRGB2Intensity (HxImageRep im)
 Conversion of RGB to intensity. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxRGB2Intensity HxImageRep    im
 

Conversion of RGB to intensity.

The function converts an RGB image to an intensity image

ColRGB2Int.gif

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 }


Generated on Mon Jan 27 15:48:55 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001