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

HxImageAsDouble.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxImageAsDouble (HxImageRep img)
 Convert the pixel representation to double. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxImageAsDouble HxImageRep    img
 

Convert the pixel representation to double.

Conversion is done via a cast.

00014 {
00015     HxString fname("HxImageAsDouble");
00016 
00017     if (img.isNull())
00018     {
00019         HxGlobalError::instance()->reportError(fname, img.name(), "null image", HxGlobalError::HX_GE_INVALID);
00020         return HxImageRep();
00021     }
00022     if (img.pixelDimensionality() != 1)
00023     {
00024         HxGlobalError::instance()->reportError(fname, "operation only valid on scalar image", HxGlobalError::HX_GE_INVALID);
00025         return HxImageRep();
00026     }
00027 
00028     HxImageSignature signature(HXIMAGESIG2DDOUBLE);
00029     signature.setImageDimensionality(img.dimensionality());
00030     return img.signature() == signature ?
00031             img : HxImageFactory::instance().fromImage(signature, img);
00032 }


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