Description

This property is used to control display of individual R, G or B channels.

Property type

A Long value.  

Syntax

object.ChannelToView [= value]

The ChannelToView Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDisplay.
valueA Long value.

Remarks

The default value of mcwcAllChannels (-1) implies all channels. A value of 0 through 2 specifies that only the Red, Green or Blue display channels, respectively, should be shown.

Note that the channel displayed is one of the final RGB channels after applying any lookup tables and casting the result to RGB for display. This works the same irrespective of the source image type, which might be monochrome, HSI, etcetera. If you want to view one channel of some multichannel image type, use the McOpLib IMcColorModel.ExtractChannel method to extract your channel of interest as a monochrome image.

Exceptions

E_INVALIDARG

new channel number must be mcwcAllChannels (-1) or

from 0 (Red) to 2 (Blue).