ImageGear for C and C++ on Windows v20.0 - Updated
IG_FIP_co_obj_to_image
API Reference Guide > FreqIP Component API Reference > FreqIP Component Functions Reference > Complex Object Functions > IG_FIP_co_obj_to_image

This function converts a complex object to a HIGEAR object, using the conversion type specified by parameter nConvType.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_FIP_co_obj_to_image(
        HIGCOMPLEXOBJ hIGComplexObj, 
        HIGEAR* lphIGear,
        enumIGCoObjConvType nConvType, 
        LPAT_DOUBLE lpMinimum, 
        LPAT_DOUBLE lpScale
);

Arguments:

Name Type Description
hIGComplexObj HIGCOMPLEXOBJ Handle to the object to be converted to HIGEAR.
lphIGear HIGEAR* Returns the converted HIGEAR object.
nConvType enumIGCoObjConvType Conversion type used to convert the object to HIGEAR.
lpMinimum LPAT_DOUBLE Returns the minimum value of the data before scaling.
lpScale LPAT_DOUBLE Returns the scale factor.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Pixel format of the output image is Grayscale – 8 or 16 bpp.

Remarks:

A complex object should be converted to HIGEAR only for displaying purpose, otherwise, it should remain in its original format to retain the data accuracy.

Because a HIGCOMPLEXOBJ object contains both real and imaginary data, we need to first combine these two data sets into one in order to store the result in a HIGEAR object, using the option specified by the parameter nConvType. Options available include IG_CO_OBJ_CONV_TYPE_REAL, IG_CO_OBJ_CONV_TYPE_IMAGINARY, IG_CO_OBJ_CONV_TYPE_MAGNITUDE, etc. Please see the help page for enumIGCoObjConvType for details.

The dimensions of the converted HIGEAR object are determined by those of the complex object, with width and height being the same. The depth of the HIGEAR object can be 8, 16 or 32, depending on the image size. If the image size is less than or equal to (1 << 8), then the depth will be 8bit; less than or equal to (1 << 16), then 16bit; otherwise, the depth will be 32bit. Of course, the HIGEAR object will only have one channel.

Once the bit depth is determined, data are then scaled linearly to occupy the entire range of that bit depth and copied to the buffer of HIGEAR. Minimum value before scaling and scale factor can be returned through lpMinimum and lpScale parameters if wanted, so as to provide a coarse way to reconstruct the data.

Is this page helpful?
Yes No
Thanks for your feedback.