Description
Transform a color image into a new image with a different color interpetation.
-
Return Type
-
A McImage object.
A new IMcImage instance in the specified color Interpretation.
-
Syntax
-
object.Transform (Interpretation, [Flags], [vSourceImg])
The Transform Method syntax has these parts: |
| object | An expression evaluating to an object of type McColorModel. | | Interpretation | Required. A mcInterpretation enumeration, as described in settings. Interpretation for the source image. 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). If mciAnyInterp, then the current source image Type Interpretation is used, though this just results in a copy of the source image.
| | Flags | Optional. A mcImageCreateFlags enumeration, as described in settings. Optional image creation flags for the new image. 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 or IMcRegionAccess instance.
| 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
Only the portion of the source image bounding the Aoi is transformed. Unless a vSourceImg is supplied as an IMcRegionAccess instance, the Aoi is copied to the new image. The new image is given a name starting with the interpretation name followed by the source image name.
Notes
The ExtractMultpleChannels method allows you to extract more than one channel in a single operation.
|