ImageGear .NET v25.1 - Updated
ToImage(ImGearCoObjConvType,Double,Double) Method




ImageGear.Processing.Advanced Assembly > ImageGear.FreqIP Namespace > ImGearComplexObject Class > ToImage Method : ToImage(ImGearCoObjConvType,Double,Double) Method
Conversion type used to convert the object to ImageGear.Core.ImGearPage class. See ImGearCoObjConvType enumeration.
Returns the minimum value of the data before scaling.
Returns the scale factor.
Converts a complex object to an ImageGear.Core.ImGearPage class object, using the conversion type specified by parameter conversionType.
Syntax
'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
) 

Parameters

conversionType
Conversion type used to convert the object to ImageGear.Core.ImGearPage class. See ImGearCoObjConvType enumeration.
minValue
Returns the minimum value of the data before scaling.
scale
Returns the scale factor.

Return Value

Remarks
This method converts a complex object to an ImageGear.Core.ImGearPage class object, using the conversion type specified by parameter 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.

See Also

Reference

ImGearComplexObject Class
ImGearComplexObject Members
Overload List
ImGearPage Class
ImGearCoObjConvType Enumeration