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

HxCrossVal.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxCrossVal (HxImageRep im, HxValue val)
 Cross product. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxCrossVal HxImageRep    im,
HxValue    val
 

Cross product.

The function performs cross product (see Pixels) on all pixels in the input image via a binary pixel operation (see Images).

Implementation specifics : The pixel functor : HxBpoCross. The image functor instantiator : HxInstantiatorCrossV.

00013 {
00014     HxString fname("HxCrossVal");
00015 
00016     if (im.isNull())
00017     {
00018         HxGlobalError::instance()->reportError(fname, im.name(), "null image", HxGlobalError::HX_GE_INVALID);
00019         return HxImageRep();
00020     }
00021 
00022     if (im.pixelDimensionality() != 3)
00023     {
00024         HxGlobalError::instance()->reportError(fname, "Operation is only valid for vec3 image", HxGlobalError::HX_GE_INVALID);
00025         return HxImageRep();
00026     }
00027 
00028 
00029     if (im.signature().pixelType() != INT_VALUE)
00030     {
00031         HxGlobalError::instance()->reportError(fname, "logical operators are only valid on integer images", HxGlobalError::HX_GE_INVALID);
00032         return HxImageRep();
00033     }
00034 
00035     if ((val.tag() != HxValue::V3I) && (val.tag() != HxValue::V3D))
00036     {
00037         HxGlobalError::instance()->reportError(fname, "operation is only valid for vec3 values", HxGlobalError::HX_GE_INVALID);
00038         return HxImageRep();
00039     }
00040 
00041     return im.binaryPixOp(val, "cross");
00042 }


Generated on Tue Feb 3 14:18:46 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001