Click or drag to resize

IMcImageConvertEx Method

Creates a copy of the AOI of this image with a different type.

Namespace:  MediaCy.IQL.Engine
Assembly:  MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
Syntax
VB
Function ConvertEx ( 
	<OptionalAttribute> vType As Object,
	Optional ConversionFlags As mcImageConversionFlags = mcImageConversionFlags.mcicfAskUser,
	<OptionalAttribute> vSourceRange As Object,
	<OptionalAttribute> vDestinationRange As Object,
	Optional ImageCreationFlags As mcImageCreateFlags = mcImageCreateFlags.mcicfDefault
) As McImage

Parameters

vType (Optional)
Type: SystemObject
This can be an instance of a McImageType interface or it can be a numeric value from mcImageQuickTypes. If the ConversionFlags is mcicfToFloat it is ignored, otherwise it must be given.
ConversionFlags (Optional)
Type: MediaCy.IQL.EnginemcImageConversionFlags
This must be avalue from McImageConversionFlags. A value of mcicfAskUser (zero) can be supplied as the ConversionFlags argument to request display of a dialog which allows the user to select and control the conversion parameters. If either mcicfCalibrate or mcicfToFloat is supplied, then any IntensityCalibration property is applied to the luminance values during conversion.
vSourceRange (Optional)
Type: SystemObject
This range specifies the dynamic range to use for the input image during conversion. If it is not given, then the CastingSourceRange is used. See Remarks.
vDestinationRange (Optional)
Type: SystemObject
This range specifies the dynamic range to use for the output image during conversion. See Remarks.
ImageCreationFlags (Optional)
Type: MediaCy.IQL.EnginemcImageCreateFlags
Flag to pass to the IMcImages::Add method. See mcImageCreateFlags for the list of supported flags. You may also OR in mcImportPropertiesFlags to control which properties, if any are copied into the new image. If no mcImportPropertiesFlags are OR'ed into the value, then we default to mcipfAllExceptIntensity plus mcipfApplyMonoColorToRGB, so that monochrome tint or pseudo coloring will be burned into any destination RGB image.

Return Value

Type: McImage
A new McImage.
Remarks
The Convert method is a simpler version of this method. ConvertEx allows more control over the conversion. If UseActiveFrameRange is TRUE, then any ActiveFrameRange is honored to decide which frames should be copied. At least one frame must be selected for copying.
Remarks
If the image has an Aoi, then the converted image will be the size of the rectangular bounds of the Aoi, and only pixels which are foreground in the Aoi will be copied into the new, converted image. The mcicfDirect conversion flag can be used to assure that values from the source image are copied directly to the destination image without any scaling (values outside the permissible intensity range will be clipped as necessary). The source and destination ranges can be used to map a specified dynamic range of the input intensity values to a specified dynamic range of the output image. Either or both may be specified - where omitted the CastingSourceRange is used for the source, and the native intensity range of the destination vType will be used.
See Also