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

HxExportByteData.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

void L_HXIMAGEREP HxExportByteData (HxImageRep img, HxByte *data)
 Export image data to array of HxByte. More...


Detailed Description


Function Documentation

void L_HXIMAGEREP HxExportByteData HxImageRep    img,
HxByte   data
 

Export image data to array of HxByte.

The size of the (pre-allocated) array must be equal to the dimensionality of the pixel values times the number of pixels in the image.

00014 {
00015     HxString fname("HxExportByteData");
00016 
00017     if (img.isNull())
00018     {
00019         HxGlobalError::instance()->reportError(fname, img.name(), "null image", HxGlobalError::HX_GE_INVALID);
00020         return;
00021     }
00022 
00023     if (data == NULL)
00024     {
00025         HxGlobalError::instance()->reportError(fname, "null pointer", HxGlobalError::HX_GE_INVALID);
00026         return;
00027     }
00028 
00029     HxTagList tags;
00030     HxString exportOp
00031         = HxString("exportPix<") + HxString(HxClassName<HxByte>()) + ">";
00032     HxAddTag(tags, "dataPtr", static_cast<void*>(data));
00033     img.exportOp(exportOp, tags);
00034 }


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