tile_channelstile_channelsTileChannelsTileChannelstile_channels (Operator)

Name

tile_channelstile_channelsTileChannelsTileChannelstile_channels — Tile multiple images into a large image.

Signature

tile_channels(Image : TiledImage : NumColumns, TileOrder : )

Herror tile_channels(const Hobject Image, Hobject* TiledImage, const Hlong NumColumns, const char* TileOrder)

Herror T_tile_channels(const Hobject Image, Hobject* TiledImage, const Htuple NumColumns, const Htuple TileOrder)

void TileChannels(const HObject& Image, HObject* TiledImage, const HTuple& NumColumns, const HTuple& TileOrder)

HImage HImage::TileChannels(Hlong NumColumns, const HString& TileOrder) const

HImage HImage::TileChannels(Hlong NumColumns, const char* TileOrder) const

HImage HImage::TileChannels(Hlong NumColumns, const wchar_t* TileOrder) const   (Windows only)

static void HOperatorSet.TileChannels(HObject image, out HObject tiledImage, HTuple numColumns, HTuple tileOrder)

HImage HImage.TileChannels(int numColumns, string tileOrder)

def tile_channels(image: HObject, num_columns: int, tile_order: str) -> HObject

Description

tile_channelstile_channelsTileChannelsTileChannelsTileChannelstile_channels tiles an image consisting of multiple channels into a large single-channel image. The input image ImageImageImageImageimageimage contains Num images of the same size, which are stored in the individual channels. The output image TiledImageTiledImageTiledImageTiledImagetiledImagetiled_image contains a single channel image, where the Num input channels have been tiled into NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns columns. In particular, this means that tile_channelstile_channelsTileChannelsTileChannelsTileChannelstile_channels cannot tile color images. For this purpose, tile_imagestile_imagesTileImagesTileImagesTileImagestile_images can be used. The parameter TileOrderTileOrderTileOrderTileOrdertileOrdertile_order determines the order in which the images are copied into the output in the cases in which this is not already determined by NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns (i.e., if NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns != 1 and NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns != Num). If TileOrderTileOrderTileOrderTileOrdertileOrdertile_order = 'horizontal'"horizontal""horizontal""horizontal""horizontal""horizontal" the images are copied in the horizontal direction, i.e., the second channel of ImageImageImageImageimageimage will be to the right of the first channel. If TileOrderTileOrderTileOrderTileOrdertileOrdertile_order = 'vertical'"vertical""vertical""vertical""vertical""vertical" the images are copied in the vertical direction, i.e., the second channel of ImageImageImageImageimageimage will be below the first channel. The domain of TiledImageTiledImageTiledImageTiledImagetiledImagetiled_image is obtained by copying the domain of ImageImageImageImageimageimage to the corresponding locations in the output image. If Num is not a multiple of NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns the output image will have undefined gray values in the lower right corner of the image. The output domain will reflect this.

Execution Information

Parameters

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)

Input image.

TiledImageTiledImageTiledImageTiledImagetiledImagetiled_image (output_object)  singlechannelimage(-array) objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)

Tiled output image.

NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of columns to use for the output image.

Default value: 1

Suggested values: 1, 2, 3, 4, 5, 6, 7

Restriction: NumColumns >= 1

TileOrderTileOrderTileOrderTileOrdertileOrdertile_order (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Order of the input images in the output image.

Default value: 'vertical' "vertical" "vertical" "vertical" "vertical" "vertical"

List of values: 'horizontal'"horizontal""horizontal""horizontal""horizontal""horizontal", 'vertical'"vertical""vertical""vertical""vertical""vertical"

Example (HDevelop)

* Grab 5 single-channel images and stack them vertically.
gen_rectangle1 (Image, 0, 0, Height-1, Width-1)
for I := 1 to 5 by 1
    grab_image_async (ImageGrabbed, AcqHandle, -1)
    append_channel (Image, ImageGrabbed, Image)
endfor
tile_channels (Image, TiledImage, 1, 'vertical')

Result

tile_channelstile_channelsTileChannelsTileChannelsTileChannelstile_channels returns 2 (H_MSG_TRUE) if all parameters are correct and no error occurs during execution. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

append_channelappend_channelAppendChannelAppendChannelAppendChannelappend_channel

Alternatives

tile_imagestile_imagesTileImagesTileImagesTileImagestile_images, tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsetTileImagesOffsettile_images_offset

See also

change_formatchange_formatChangeFormatChangeFormatChangeFormatchange_format, crop_partcrop_partCropPartCropPartCropPartcrop_part, crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1CropRectangle1crop_rectangle1

Module

Foundation