#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
void L_HXIMAGEREP | HxExportDoubleData (HxImageRep img, double *data) |
Export image data to array of double. More... |
|
Export image data to array of double. 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.
00013 { 00014 HxString fname("HxExportDoubleData"); 00015 00016 if (img.isNull()) 00017 { 00018 HxGlobalError::instance()->reportError(fname, img.name(), "null image", HxGlobalError::HX_GE_INVALID); 00019 return; 00020 } 00021 00022 if (data == NULL) 00023 { 00024 HxGlobalError::instance()->reportError(fname, "null pointer", HxGlobalError::HX_GE_INVALID); 00025 return; 00026 } 00027 00028 HxTagList tags; 00029 HxString exportOp 00030 = HxString("exportPix<") + HxString(HxClassName<double>()) + ">"; 00031 HxAddTag(tags, "dataPtr", static_cast<void*>(data)); 00032 img.exportOp(exportOp, tags); 00033 } |