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

HxMakeFromDoubleData.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxMakeFromDoubleData (int pixelDimensionality, int dimensions, HxSizes sizes, double *data)
 Make a new image with given signature and sizes. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxMakeFromDoubleData int    pixelDimensionality,
int    dimensions,
HxSizes    sizes,
double *    data
 

Make a new image with given signature and sizes.

Pixel data is initialized from given values.

00015 {
00016     HxString fname("HxMakeFromDoubleData");
00017 
00018     if ((pixelDimensionality < 1) || (pixelDimensionality > 3))
00019     {
00020         HxGlobalError::instance()->reportError(fname, "Illegal pixel dimensionality", HxGlobalError::HX_GE_INVALID);
00021         return HxImageRep();
00022     }
00023     if ((dimensions < 2) || (dimensions > 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 (dimensions > 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 double*, but how?
00048 
00049     return HxImageFactory::instance().fromDoubleData(pixelDimensionality,
00050                 dimensions, sizes, data);
00051 }


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