Description
Replaces one or more Channels in a new or existing color image from an array of monochrome images.
-
Return Type
-
A McImage object.
The destination merged image. If the image was created as part of the operation it is given a name starting with the interpretation name followed by Merged.
-
Syntax
-
object.MergeMultipleChannels (vChannelImgs, [Channels], [Interpretation], [Flags], [vSourceImg])
The MergeMultipleChannels Method syntax has these parts: |
| object | An expression evaluating to an object of type McColorModel. | | vChannelImgs | Required. A Variant value. | | Channels | Optional. A Variant value. A selector giving the the zero-based indices of the channels to merge (e.g., zero is the Red channel of mciRGB Interpretations). If this argument is missing (or empty) or is a scalar -1, then all channels are merged in the order channel 0 up to the NumberOfChannels for the source image Type. Otherwise, you may specify a single scalar channel index or an array of such indices. There must be one vChannelImg supplied for each selected channel.
| | Interpretation | Optional. A mcInterpretation enumeration, as described in settings. is used. The specified mcInterpretation must have the same NumberOfChannels as the source image's Interpretation (for example, the mciRGB, mciBGR, mciHSI and mciHSL interpretations all have 3 channels, but the mciPolar and mciComplex interpretations have 2 channels).
| | Flags | Optional. A mcImageCreateFlags enumeration, as described in settings. Optional image creation flags for the new images. By default the value is zero, which creates a visible image that is part of the Images collection.
| | vSourceImg | Optional. A Variant value. Optional source image, operator applies to parent image when parameter is omitted. If neither a parent or vSourceImg is given, then a new image is created from the given Interpretation type, using the bit depth and Aoi of the first vChannelImg in the array. Although the Aoi is taken from the first vChannelImg in the array, the new image will only be as large as the smallest Aoi in all of the source images. Furthermore, the new image will only have as many frames as the source image with the fewest frames in its ActiveFrameRange.
| 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
|
The settings for Flags are:
 | mcicfDefault | 0 | |
 | mcicfContiguous | 1 |
If set, frames are allocated contiguously, and you cannot add to the FrameCount at a later time.
|
 | mcicfNoInit | 2 |
Default is to initialize to 0 (black), this flag suppresses initialization.
|
 | mcicfNoAddToCollection | 4 |
If set, the image is created, but not added to the collection (see Notes).
|
 | mcicfNotVisible | 8 |
If set, the image is created, possibly added to collection (see above), but not made visible.
|
 | mcipfNoImportProperties | 8388608 |
Suppress ImportProperties for functions creating an image from another.
|
Remarks
This operation is restricted to and masked by the destiation image's Aoi.
The MergeChannel method is a simpler version of this method. It will merge a single channels into an existing image.
|