Skip to content

access_channelAccessChannelAccessChannelaccess_channelaccess_channel🔗

Short description🔗

access_channelAccessChannelAccessChannelaccess_channelaccess_channel — Access a channel of a multi-channel image.

Signature🔗

access_channel( image MultiChannelImage, out image Image, channel Channel )void AccessChannel( const HObject& MultiChannelImage, HObject* Image, const HTuple& Channel )static void HOperatorSet.AccessChannel( HObject multiChannelImage, out HObject image, HTuple channel )def access_channel( multi_channel_image: HObject, channel: MaybeSequence[int] ) -> HObject

Herror access_channel( const Hobject MultiChannelImage, Hobject* Image, const Hlong Channel )

Herror T_access_channel( const Hobject MultiChannelImage, Hobject* Image, const Htuple Channel )

HImage HImage::AccessChannel( const HTuple& Channel ) const

HImage HImage::AccessChannel( Hlong Channel ) const

HImage HImage.AccessChannel( HTuple channel )

HImage HImage.AccessChannel( int channel )

Description🔗

The operator access_channelAccessChannel accesses one or more channels of the (multi-channel) input image MultiChannelImagemultiChannelImagemulti_channel_image. The result Imageimageimage contains as many channels as specified in Channelchannelchannel. The definition domain of the input is adopted.

Note that the channels are numbered from 1 to n. The number of channels can be determined via the operator count_channelsCountChannels.

If an empty tuple is passed in Channelchannelchannel, an object that consists only of the domain of the input is returned.

Execution information🔗

Execution information
  • Supports objects on compute devices.

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

MultiChannelImagemultiChannelImagemulti_channel_image (input_object) (multichannel-)image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

Multi-channel image.

Imageimageimage (output_object) (multichannel-)image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)Hobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

Selected channels of MultiChannelImage.

Channelchannelchannel (input_control) channel(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Indices of the channels to be accessed.

Default: 11
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 121, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Value range: 1 ≤ Channel

Example🔗

(C)

read_image(&Color,"patras")\;   /* read color image */
access_channel(Color,&Red,1)\;  /* extract red channel */
disp_image(Red,WindowHandle)\;

Combinations with other operators🔗

Combinations

Possible predecessors

count_channelsCountChannels

Possible successors

disp_imageDispImage

Alternatives

decompose2Decompose2, decompose3Decompose3, decompose4Decompose4, decompose5Decompose5

See also

count_channelsCountChannels

Module🔗

Foundation