ImageGear22.Processing.Advanced Assembly > ImageGear.FreqIP Namespace > ImGearComplexObject Class > ToImage Method : ToImage(ImGearCoObjConvType,Double,Double) Method |
conversionType
.'Declaration Public Overloads Function ToImage( _ ByVal conversionType As ImGearCoObjConvType, _ ByRef minValue As Double, _ ByRef scale As Double _ ) As ImGearPage
'Usage Dim instance As ImGearComplexObject Dim conversionType As ImGearCoObjConvType Dim minValue As Double Dim scale As Double Dim value As ImGearPage value = instance.ToImage(conversionType, minValue, scale)
public ImGearPage ToImage( ImGearCoObjConvType conversionType, out double minValue, out double scale )
public: ImGearPage* ToImage( ImGearCoObjConvType conversionType, [PARAMFLAG::Out] double minValue, [PARAMFLAG::Out] double scale )
public: ImGearPage^ ToImage( ImGearCoObjConvType conversionType, [Out] double minValue, [Out] double scale )
conversionType
. A complex object should be converted to ImageGear.Core.ImGearPage class only for display purposes; otherwise, it should remain in its original format to retain the data accuracy.
As an ImGearComplexObject class object contains both real and imaginary data, we need firstly to combine these two data sets into one in order to store the result in an ImageGear.Core.ImGearPage class object, using the option specified by the parameter conversionType
. Options available include REAL, IMAGINARY, MAGNITUDE, etc. Please see the help page for ImGearCoObjConvType enumeration.
The dimensions of the converted ImageGear.Core.ImGearPage class object are determined by those of the complex object, with width and height being the same. The depth of the ImageGear.Core.ImGearPage class 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 ImageGear.Core.ImGearPage class 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 ImageGear.Core.ImGearPage class. Minimum value before scaling and scale factor can be returned through minValue
and scale
parameters if wanted, so as to provide a coarse way to reconstruct the data.