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

HxMakeFromJavaRgb.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxMakeFromJavaRgb (const HxImageSignature &signature, HxSizes sizes, int *pixels)
 Make a new image with given signature and sizes. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxMakeFromJavaRgb const HxImageSignature   signature,
HxSizes    sizes,
int *    pixels
 

Make a new image with given signature and sizes.

Pixel data is initialized from given values. The given values are stored in Java RGB format.

00015 {
00016     HxString fname("HxMakeFromJavaRgb");
00017 
00018     if ((signature.pixelDimensionality() < 1) || (signature.pixelDimensionality() > 3))
00019     {
00020         HxGlobalError::instance()->reportError(fname, "Illegal pixel dimensionality", HxGlobalError::HX_GE_INVALID);
00021         return HxImageRep();
00022     }
00023     if ((signature.imageDimensionality() < 2) || (signature.imageDimensionality() > 3))
00024     {
00025         HxGlobalError::instance()->reportError(fname, "Illegal number of dimensions", HxGlobalError::HX_GE_INVALID);
00026         return HxImageRep();
00027     }
00028 
00029     if (sizes.x() < 1)
00030     {
00031         HxGlobalError::instance()->reportError(fname, "Illegal x size", HxGlobalError::HX_GE_INVALID);
00032         return HxImageRep();
00033     }
00034     if (sizes.y() < 1)
00035     {
00036         HxGlobalError::instance()->reportError(fname, "Illegal y size", HxGlobalError::HX_GE_INVALID);
00037         return HxImageRep();
00038     }
00039     if (signature.imageDimensionality() > 2)
00040     {
00041         if (sizes.y() < 1)
00042         {
00043             HxGlobalError::instance()->reportError(fname, "Illegal y size", HxGlobalError::HX_GE_INVALID);
00044             return HxImageRep();
00045         }
00046     }
00047 // check size of int*, but how?
00048 
00049 
00050     return HxImageFactory::instance().fromJavaRgb(signature, sizes, pixels);
00051 }


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