Description
Replaces a Channel in an existing color image from a monochrome image.
-
Return Type
-
A McImage object.
The modified color IMcImage.
-
Syntax
-
object.MergeChannel (vChannelImg, Channel, [Interpretation], [vSourceImg])
The MergeChannel Method syntax has these parts: |
| object | An expression evaluating to an object of type McColorModel. | | vChannelImg | Required. A Variant value. Required monochrome channel source image or IMcRegionAccess instance. For an image the VARIANT may hold the IMcImage instance, a string image name or numeric index for an Item in the Images collection. If given as an IMcRegionAccess instance, the image type may be a multiband image if the ChannelToProcess property is set to some channel.
| | Channel | Required. A Long value. The Channel to modify.
| | Interpretation | Optional. A mcInterpretation enumeration, as described in settings. mcInterpretation : Optional interpretation for Channel number.
| | vSourceImg | Optional. A Variant value. Optional source image, operator applies to parent image when parameter is omitted. Either the parent of vSourceImg must be given.
| Settings The settings for Interpretation are:
 | mciAnyInterp | 0 |
current interpretation
|
 | mciMonochrome | 1 |
only one channel
|
 | mciIndexedColor | 2 |
8 bits per pixel, pseudo-colored
|
 | mciGenericMultiBand | 3 |
multichannel, when needed, pixel luminance is averaged across the channels
|
 | mciRGB | 4 |
normal color model, 3 channels arranged as RGBRGBRGB...
|
 | mciBGR | 5 |
Similar to RGB, except the channels are reversed for DIBs as BGRBGRBGR...
|
 | mciHSL | 6 |
Three channels, Hue, Saturation, and Luminance
|
 | mciHSI | 7 |
Three channels, Hue, Saturation, and Intensity
|
 | mciComplex | 8 |
Two channels, real and imaginary arranged as RIRIRI..., only supported with McFloat
|
 | mciPolar | 9 |
Two channels, magnitude and phase arranged as MPMPMP..., only supported with McFloat
|
Remarks
This operation is restricted to and masked by the destiation image's Aoi.
The MergeMultipleChannels method is a more general version of this method. It allows you to merge multiple channels in one operation, and it allows you to create the merged image as part of the operation.
|